/* ==========================================================================
   E Arc Technologies — style sheet
   Light and dark themes are driven by [data-theme] on <html>: :root holds the
   light values, [data-theme="dark"] overrides them. The theme bootstrap in
   index.html sets the attribute before first paint (see js/app.js theme).
   ========================================================================== */

:root {
  --font-heading: Montserrat, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-alt: #fafafa;
  --color-row: #f7f7f7;
  --color-heading: #222222;
  --color-text: #666666;
  --color-muted: #6f6f6f;
  --color-border: #e8e8e8;
  --color-accent: #2e8aac;
  --color-accent-dark: #17597a;
  --color-accent-strong: #1d6a8a;
  --color-on-accent: #ffffff;
  --color-danger: #c0392b;
  --color-open: #2f9e57;
  --color-open-dark: #46c46e;
  --color-input-bg: #ffffff;
  --color-input-border: #dddddd;
  --color-input-text: #333333;
  --color-dark: #1b1f22;
  --color-dark-text: rgba(255, 255, 255, 0.82);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lift: 0 14px 30px rgba(0, 0, 0, 0.14);
  --overlay: 0.55; /* dark wash over the photo backgrounds */
  --backdrop: 0.55; /* dark wash behind the pipeline detail modal */

  --nav-height: 72px;
  --container-width: 1170px;
  --section-padding: 80px;
  --maze: url('../img/pw_maze_black_2X.png');
  --theme-speed: 0.25s;
}

[data-theme='dark'] {
  --color-bg: #12181d;
  --color-surface: #1c252d;
  --color-alt: #171f26;
  --color-row: #1c252d;
  --color-heading: #f2f6f9;
  --color-text: #b8c4cf;
  --color-muted: #93a3b1;
  --color-border: #2a3742;
  --color-accent: #4aa8d0;
  --color-accent-dark: #6fc0e0;
  --color-accent-strong: #2e9ecb;
  --color-on-accent: #ffffff;
  --color-danger: #e06c5b;
  --color-open: #46c46e;
  --color-input-bg: #12181d;
  --color-input-border: #2a3742;
  --color-input-text: #e8eef4;
  --color-dark: #10161b;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 14px 30px rgba(0, 0, 0, 0.55);
  --overlay: 0.72;
  --backdrop: 0.72;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
  transition: background-color var(--theme-speed) ease, color var(--theme-speed) ease;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.3;
  margin: 0 0 15px;
}

p {
  margin: 0 0 15px;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--theme-speed) ease;
}

a:hover {
  color: var(--color-accent-dark);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 15px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  /* Dark background keeps the focused skip link above AA contrast. */
  background: var(--color-heading);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: background-color var(--theme-speed) ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--nav-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Pushes the nav + actions to the right edge. */
  margin-right: auto;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--color-heading);
  text-transform: uppercase;
}

.brand:hover {
  color: var(--color-accent);
}

.brand-logo {
  display: block;
  width: 40px;
}

.nav-list {
  display: flex;
  gap: 28px;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-heading);
  transition: color var(--theme-speed) ease;
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--color-accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-heading);
  cursor: pointer;
  transition: background-color var(--theme-speed) ease, color var(--theme-speed) ease, border-color var(--theme-speed) ease;
}

.theme-toggle:hover,
.nav-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.theme-toggle .bi {
  font-size: 17px;
}

/* The icon shown offers the switch: moon in light mode, sun in dark mode. */
.theme-toggle .bi-sun-fill {
  display: none;
}

[data-theme='dark'] .theme-toggle .bi-sun-fill {
  display: inline-block;
}

[data-theme='dark'] .theme-toggle .bi-moon-stars {
  display: none;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  content: '';
}

.nav-toggle-bars::before {
  transform: translateY(-7px);
}

.nav-toggle-bars::after {
  transform: translateY(5px);
}

.nav-toggle {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 70px 0;
  text-align: center;
  background-color: var(--color-dark);
  background-image: var(--maze);
  background-repeat: repeat;
  color: #ffffff;
  transition: background-color var(--theme-speed) ease;
}

/* Accent-tinted wash over the maze keeps the hero dark but not flat. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 78% 18%, rgba(46, 138, 172, 0.14), transparent 70%),
    radial-gradient(40% 40% at 12% 85%, rgba(46, 138, 172, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.35));
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-logo {
  display: block;
  width: 200px;
  margin: 0 auto 32px;
}

.hero h1 {
  font-size: 50px;
  font-weight: 700;
  letter-spacing: 0;
  color: #ffffff;
}

.hero-tagline {
  max-width: 760px;
  margin: 0 auto 34px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 13px 34px;
  border: 0;
  border-radius: 3px;
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--color-accent-dark);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

/* Secondary hero call-to-action on the dark maze background. */
.btn-ghost {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.65);
  color: #ffffff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff;
}

.hero .btn + .btn {
  margin-left: 12px;
}

/* ---------- Section pattern ---------- */

.section {
  padding: var(--section-padding) 0;
  scroll-margin-top: calc(var(--nav-height) + 10px);
}

.section-alt {
  background: var(--color-alt);
  transition: background-color var(--theme-speed) ease;
}

.section-dark {
  background-color: var(--color-dark);
  background-image:
    linear-gradient(rgba(10, 14, 18, var(--overlay)), rgba(10, 14, 18, var(--overlay))),
    url('../img/section-bg1.jpg');
  background-size: cover, cover;
  background-position: center, center;
  color: var(--color-dark-text);
  transition: background-color var(--theme-speed) ease;
}

.section-dark .section-title,
.section-dark .section-subtitle {
  color: #ffffff;
}

.section-dark .section-subtitle {
  opacity: 0.75;
}

.section-title {
  margin-bottom: 6px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1px;
  text-align: center;
  text-transform: uppercase;
}

/* Accent underline bar shared by every section title. */
.section-title::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: var(--color-accent);
}

.section-subtitle {
  margin-bottom: 55px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  color: var(--color-muted);
  transition: color var(--theme-speed) ease;
}

/* ---------- Services ---------- */

.service-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.service-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  padding: 26px 24px;
  background: var(--color-row);
  border: 1px solid transparent;
  border-radius: 3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color var(--theme-speed) ease, border-color var(--theme-speed) ease;
}

.service-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--color-accent);
}

.service-icon {
  color: var(--color-accent);
}

.service-icon .bi {
  font-size: 34px;
}

.service-title {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.service-text {
  margin: 0;
  font-size: 14.5px;
}

/* ---------- Delivery pipeline ---------- */

.pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

/* Connecting gradient line through the numbered nodes (desktop). */
.pipeline::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), rgba(46, 138, 172, 0.25));
}

.pipeline-step {
  position: relative;
  z-index: 1;
  text-align: center;
}

.pipeline-node {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-accent);
  transition: background-color var(--theme-speed) ease;
}

.pipeline-node .bi {
  font-size: 24px;
}

.pipeline-number {
  position: absolute;
  top: -9px;
  right: -9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: var(--color-accent);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.pipeline-title {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pipeline-text {
  margin: 0;
  font-size: 14px;
}

/* The whole step is the button; reset every control affordance so the
   layout above is unchanged. text-align: inherit keeps the step's own
   alignment (centered on desktop, left on mobile). */
.pipeline-open {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}

.pipeline-open:hover .pipeline-more {
  color: var(--color-accent-dark);
}

.pipeline-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-accent);
  transition: color var(--theme-speed) ease;
}

.pipeline-more .bi {
  font-size: 10px;
}


/* ---------- Pipeline light beam + progress ---------- */

.pipeline-wrap {
  position: relative;
}

/* Positioning box for the progress fill (the muted base line is .pipeline-progress::before). */
.pipeline-line {
  position: absolute;
  top: 25px;
  left: 10%;
  right: 10%;
  height: 4px;
  pointer-events: none;
}

.pipeline-line-fill {
  display: block;
  width: var(--pipeline-progress, 0%);
  height: 2px;
  margin-top: 1px;
  border-radius: 2px;
  background: var(--color-accent);
  box-shadow: 0 0 10px rgba(46, 138, 172, 0.7);
  transition: width 0.5s ease;
}

/* The travelling light: a soft streak that sweeps the track once visible. */
.pipeline-beam {
  position: absolute;
  top: 25px;
  left: 10%;
  right: 10%;
  height: 4px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pipeline-wrap.is-active .pipeline-beam {
  opacity: 1;
}

.pipeline-beam::after {
  content: '';
  position: absolute;
  top: 0;
  left: -90px;
  width: 90px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  animation: beam-travel 2.8s linear infinite;
}

@keyframes beam-travel {
  from { left: -90px; }
  to { left: 100%; }
}

.pipeline-step.is-current .pipeline-node {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(46, 138, 172, 0.18);
}

.pipeline-step.is-current .pipeline-number {
  background: var(--color-accent-dark);
}

.pipeline-step.is-current .pipeline-more {
  color: var(--color-accent-dark);
}

/* ---------- Interactive technology diagram ---------- */

.stack-diagram {
  margin-bottom: 0;
}

.stack-diagram-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 36px 70px;
  align-items: center;
}

.stack-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.stack-links line {
  stroke: var(--color-border);
  stroke-width: 2;
  transition: stroke 0.3s ease, stroke-width 0.3s ease, stroke-dashoffset 0.9s ease;
}

.stack-links line.is-active {
  stroke: var(--color-accent);
  stroke-width: 3;
}

.stack-node-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stack-node-left {
  align-items: flex-end;
}

.stack-node-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color var(--theme-speed) ease, color var(--theme-speed) ease;
}

.stack-node-left .stack-node-btn {
  flex-direction: row-reverse;
}

.stack-node-btn:hover,
.stack-node-btn.is-active {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  color: var(--color-heading);
  box-shadow: var(--shadow-card);
}

.stack-node-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--color-row);
  color: var(--color-accent);
  font-size: 11px;
  letter-spacing: 0;
}

.stack-hub {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 138px;
  height: 138px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(46, 138, 172, 0.22), var(--color-surface) 70%);
  box-shadow: 0 0 44px rgba(46, 138, 172, 0.28);
  text-align: center;
}

.stack-hub-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-heading);
}

.stack-hub-sub {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--color-muted);
  white-space: nowrap;
}

.stack-preview {
  margin-top: 30px;
  text-align: center;
}

.stack-preview-title {
  margin-bottom: 14px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-heading);
}

.stack-preview-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* The prerendered HTML carries every category; only the active one shows
   until app.js collapses the panel on load. */
.stack-preview-group:not(.is-active) {
  display: none;
}

/* Nodes and hub fade up when the diagram scrolls into view. */
.stack-node {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: calc(var(--i, 0) * 55ms);
}

.stack-diagram.is-active .stack-node {
  opacity: 1;
  transform: none;
}

.stack-hub {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stack-diagram.is-active .stack-hub {
  opacity: 1;
  transform: none;
}

/* ---------- Technology stack ---------- */

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text);
  transition: border-color 0.2s ease, background-color var(--theme-speed) ease;
}

.stack-chip:hover {
  border-color: var(--color-accent);
}

.stack-img {
  display: block;
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* Brand SVGs are monochrome; invert them so they stay legible on dark chips. */
[data-theme='dark'] .stack-img {
  filter: invert(1);
}

/* ---------- About / counters ---------- */

.about-copy {
  max-width: 840px;
  margin: 0 auto 55px;
  text-align: center;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto 55px;
}

.about-card {
  padding: 28px 26px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color var(--theme-speed) ease;
}

.about-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card);
}

.about-card-icon {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.about-card-icon .bi {
  font-size: 30px;
}

.about-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.about-card p {
  margin: 0;
  font-size: 14.5px;
}

.about-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
  margin: 0 auto 65px;
}

.about-fact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.about-fact .bi {
  font-size: 14px;
  color: var(--color-accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-icon {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--color-accent);
}

.stat-icon .bi {
  font-size: 30px;
}

.stat-number {
  margin: 0 0 2px;
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-heading);
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color var(--theme-speed) ease;
}

/* ---------- "Let's Talk Business" banner ---------- */

.banner {
  padding: 90px 0;
  text-align: center;
  background-color: var(--color-dark);
  background-image:
    linear-gradient(rgba(10, 14, 18, var(--overlay)), rgba(10, 14, 18, var(--overlay))),
    url('../img/section-bg2.jpg');
  background-size: cover, cover;
  background-position: center, center;
  transition: background-color var(--theme-speed) ease;
}

.banner-title {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: #ffffff;
}

/* ---------- FAQ ---------- */

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}

.faq-details {
  padding: 18px 22px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  transition: border-color 0.2s ease, background-color var(--theme-speed) ease;
}

.faq-details[open] {
  border-color: var(--color-accent);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--color-heading);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  flex: none;
  font-size: 20px;
  font-weight: 400;
  color: var(--color-accent);
}

.faq-details[open] .faq-question::after {
  content: '\2212';
}

.faq-answer {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--color-text);
}

/* ---------- Contact ---------- */

.contact {
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/bg-map.png') no-repeat center / contain;
  opacity: 0.06;
  pointer-events: none;
}

.contact .container {
  position: relative;
  z-index: 1;
}

/* Contact info on the left, live map on the right. */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.contact-method {
  display: block;
  color: var(--color-text);
  word-break: break-word;
}

.contact-method + .contact-method {
  margin-top: 6px;
}

.contact-method:hover {
  color: var(--color-accent);
}

.contact-map {
  position: relative;
  min-height: 480px;
  height: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.contact-map iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 26px 24px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color var(--theme-speed) ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card);
}

.contact-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-row);
  color: var(--color-accent);
}

.contact-card-icon .bi {
  font-size: 20px;
}

.contact-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-card-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-muted);
}

.contact-card-value {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  word-break: break-word;
}

.contact-card-value a {
  color: var(--color-text);
}

.contact-card-value a:hover {
  color: var(--color-accent);
}

/* The whole card is the tap target for phone, email, and address. */
a.contact-card {
  text-decoration: none;
}

a.contact-card:focus-visible {
  outline-offset: 2px;
}

.contact-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.contact-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}

.contact-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-muted);
}

.contact-status.is-open {
  color: var(--color-open);
  border-color: var(--color-open);
}

.contact-status.is-open .contact-status-dot {
  background: var(--color-open);
  box-shadow: 0 0 0 3px rgba(47, 158, 87, 0.18);
}

.contact-cta {
  max-width: 620px;
  margin: 4px auto 0;
  text-align: center;
  font-size: 15.5px;
  color: var(--color-muted);
}

.contact-hours {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Fixed day column so every time starts at the same x, with the pair
   grouped together like a two-column table. */
.contact-hours-row {
  display: grid;
  grid-template-columns: minmax(0, 60%) 1fr;
  gap: 6px 32px;
  align-items: baseline;
  font-size: 14.5px;
}

.contact-hours-day {
  color: var(--color-text);
}

.contact-hours-time {
  color: var(--color-muted);
}


/* ---------- Footer ---------- */

.site-footer {
  padding: 60px 0 45px;
  text-align: center;
  background-color: var(--color-dark);
  background-image: var(--maze);
  background-repeat: repeat;
  color: rgba(255, 255, 255, 0.7);
  transition: background-color var(--theme-speed) ease;
}

.footer-copy {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  color: #ffffff;
}

.footer-credit {
  margin: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
}

.noscript-note {
  max-width: 720px;
  margin: 30px auto;
  padding: 20px;
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  background: var(--color-alt);
  text-align: center;
}

/* ---------- Pipeline detail modal ---------- */

body.modal-open {
  overflow: hidden;
}

/* [hidden] must win over the flex display below, or the backdrop never hides. */
.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(10, 14, 18, var(--backdrop));
  transition: opacity var(--theme-speed) ease;
}

.modal-backdrop:not([hidden]) {
  animation: modal-fade var(--theme-speed) ease;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: 40px 36px 32px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-lift);
  transition: opacity var(--theme-speed) ease, transform var(--theme-speed) ease;
}

.modal-backdrop:not([hidden]) .modal {
  animation: modal-in var(--theme-speed) ease;
}

@keyframes modal-fade {
  from { opacity: 0; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-row);
  color: var(--color-heading);
  cursor: pointer;
  transition: background-color var(--theme-speed) ease, color var(--theme-speed) ease;
}

.modal-close:hover {
  background: var(--color-accent);
  color: #ffffff;
}

.modal-close .bi {
  font-size: 16px;
}

.modal-icon {
  display: block;
  margin-bottom: 14px;
  color: var(--color-accent);
}

.modal-icon .bi {
  font-size: 40px;
}

.modal-kicker {
  margin-bottom: 4px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-muted);
}

.modal-title {
  margin-bottom: 18px;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-heading);
}

.modal-body li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
}

/* Accent dot marker; the list style itself is already reset globally. */
.modal-body li::before {
  content: '';
  position: absolute;
  top: 0.6em;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .service-list {
    grid-template-columns: repeat(2, 1fr);
  }


  .about-highlights {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-map {
    min-height: 360px;
  }
}

@media (max-width: 1199px) {
  /* Diagram: hub on top, nodes stacked full width below it. The SVG links
     are hidden here — in a single column they only add clutter. */
  .stack-links {
    display: none;
  }

  .stack-diagram-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* Two balanced columns of nodes keep the diagram compact at this width. */
  .stack-node-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stack-node-left {
    order: 2;
    align-items: stretch;
  }

  .stack-hub {
    order: 1;
    width: 132px;
    height: 132px;
    margin: 0 auto;
  }

  .stack-hub-title {
    font-size: 19px;
  }

  .stack-node-right {
    order: 3;
    align-items: stretch;
  }

  .stack-node-btn {
    width: 100%;
    padding: 10px 14px;
  }

  .stack-node-left .stack-node-btn {
    flex-direction: row;
  }

  .stack-preview {
    margin-top: 24px;
  }
}

@media (max-width: 767px) {
  :root {
    --nav-height: 64px;
    --section-padding: 50px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 15px 16px;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  }

  body.nav-open .primary-nav {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-list a {
    display: flex;
    width: 100%;
    padding: 12px 4px;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-list li:last-child a {
    border-bottom: 0;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .hero-tagline {
    letter-spacing: 1px;
  }

  .section-title {
    font-size: 26px;
    letter-spacing: 0;
  }

  /* Pipeline collapses to a vertical track with the number badge flowing
     beside each node. */
  .pipeline {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pipeline::before {
    top: 27px;
    bottom: 30px;
    left: 26px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--color-accent), rgba(46, 138, 172, 0.25));
  }

  .pipeline-step {
    display: block;
    padding-bottom: 28px;
    text-align: left;
  }

  /* The button owns the two-column track: node on the left, step text
     beside it. */
  .pipeline-open {
    display: grid;
    grid-template-columns: 54px 1fr;
    column-gap: 18px;
  }

  .pipeline-open .pipeline-node { grid-row: 1; grid-column: 1; }
  .pipeline-open .pipeline-title { grid-row: 1; grid-column: 2; }
  .pipeline-open .pipeline-text { grid-row: 2; grid-column: 2; }
  .pipeline-open .pipeline-more { grid-row: 3; grid-column: 2; }

  .pipeline-node {
    margin-bottom: 0;
  }

  .banner {
    padding: 60px 0;
  }

  .banner-title {
    font-size: 28px;
    letter-spacing: 0;
  }

  .service-list {
    grid-template-columns: 1fr;
  }


  .stack-node-list {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .stack-hub {
    width: 120px;
    height: 120px;
  }

  .stack-preview {
    margin-top: 18px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 34px 20px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .contact-details {
    grid-template-columns: 1fr;
  }

  .contact-map {
    min-height: 300px;
  }

  /* Pipeline: the beam and progress switch to a vertical track. */
  .pipeline-line {
    top: 27px;
    bottom: 30px;
    left: 25px;
    right: auto;
    width: 4px;
    height: auto;
  }

  .pipeline-line-fill {
    width: 2px;
    height: var(--pipeline-progress, 0%);
    margin-top: 0;
    transition: height 0.5s ease;
  }

  .pipeline-beam {
    top: 27px;
    bottom: 30px;
    left: 25px;
    right: auto;
    width: 4px;
    height: auto;
  }

  .pipeline-beam::after {
    top: -48px;
    left: 0;
    width: 100%;
    height: 48px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.95), transparent);
    animation-name: beam-travel-v;
  }

  @keyframes beam-travel-v {
    from { top: -48px; }
    to { top: 100%; }
  }
}

@media (max-width: 480px) {
  .stat-number {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
