/* ============================================================
   AI Automation — flagship immersive page (ink theme)
   Structure mirrors the Custom Web Applications page; accents
   swapped (coral for use cases, olive for differentiators) so
   sibling pages feel related but not identical.
   ============================================================ */

section { padding: 6.5rem 0; }

/* ---------- 1. hero (pinned WebGL pipeline) ---------- */
.hero { padding: 0; }
.hero-stage {
  position: relative;
  height: calc(100vh - var(--nav-h));
  min-height: 640px;
  overflow: hidden;
  background: radial-gradient(ellipse 120% 90% at 50% 0%, var(--ink-600) 0%, var(--ink-800) 55%, var(--ink-900) 100%);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent 45%, rgba(8, 16, 25, 0.55) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 800px;
  text-align: center;
  align-items: center;
  margin-inline: auto;
}
.hero-copy h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 1.2rem;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--amber);
}
.hero-sub {
  margin: 1.5rem 0 2.2rem;
  max-width: 66ch;
  color: var(--text-dim);
  font-size: 1.06rem;
}
.cta-group { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.scroll-hint svg { width: 16px; height: 16px; animation: hint-bob 1.8s ease-in-out infinite; }
@keyframes hint-bob {
  50% { transform: translateY(6px); }
}

/* pipeline captions — one per station */
.dive-captions { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.dive-caption {
  position: absolute;
  top: 50%;
  left: clamp(1.5rem, 8vw, 8rem);
  translate: 0 -50%;
  max-width: 360px;
  opacity: 0;
}
.dive-caption .num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--amber);
}
.dive-caption h3 { font-size: 1.9rem; margin: 0.5rem 0; }
.dive-caption p { color: var(--text-dim); font-size: 0.98rem; }

.dive-progress {
  position: absolute;
  right: clamp(1.2rem, 4vw, 3rem);
  top: 50%;
  translate: 0 -50%;
  width: 2px;
  height: 180px;
  background: rgba(240, 235, 218, 0.15);
  border-radius: 2px;
  z-index: 2;
  opacity: 0;
}
.dive-progress i {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: top;
  transform: scaleY(0);
  background: var(--amber);
  border-radius: 2px;
}

/* ---------- 2. overview ---------- */
.overview { background: var(--ink-800); }
.overview-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.overview-copy .eyebrow { margin-bottom: 1.4rem; }
.icon-badge.lg { width: 58px; height: 58px; border-radius: 16px; margin-bottom: 1.4rem; }
.icon-badge.lg svg { width: 28px; height: 28px; }
.overview-copy h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 1.2rem; }
.overview-copy p { color: var(--text-dim); margin-bottom: 1rem; max-width: 58ch; }

.stat-strip { display: grid; gap: 1.1rem; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1.1rem;
  align-items: center;
  transition: border-color 0.25s var(--ease-out);
}
.stat-card:hover { border-color: var(--amber); }
.stat-icon {
  grid-row: span 2;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--amber) 12%, transparent);
  color: var(--amber);
  border: 1px solid var(--line-strong);
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-label { color: var(--text-faint); font-size: 0.88rem; }

@media (min-width: 640px) and (max-width: 1023px) {
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 3. capabilities ---------- */
.capabilities { background: var(--ink-900); border-block: 1px solid var(--line); }
.capabilities .section-head { margin-bottom: 3rem; }
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.cap-card { display: flex; flex-direction: column; gap: 0.9rem; }
.cap-card:hover {
  border-color: var(--amber);
  transform: translateY(-5px);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.8);
}
.cap-card h3 { font-size: 1.15rem; }
.cap-card p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- 4. process ---------- */
.process .section-head { margin-bottom: 4rem; }
.timeline { position: relative; }
.rail {
  position: absolute;
  left: 27px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(240, 235, 218, 0.12);
  border-radius: 2px;
}
.rail i {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: top;
  transform: scaleY(0);
  background: linear-gradient(var(--amber), var(--coral));
  border-radius: 2px;
}
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2.6rem;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.6rem;
  align-items: start;
}
.step .marker {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-faint);
  background: var(--ink-800);
  border: 1px solid var(--line-strong);
  position: relative;
  z-index: 1;
  transition: color 0.4s, border-color 0.4s, background-color 0.4s, box-shadow 0.4s;
}
.step.is-active .marker {
  color: var(--ink-900);
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--amber) 18%, transparent);
}
.step-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
  transition: border-color 0.4s;
}
.step.is-active .step-body { border-color: color-mix(in srgb, var(--amber) 45%, var(--line)); }
.step-body h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.step-body p { color: var(--text-dim); font-size: 0.95rem; }

@media (min-width: 1024px) {
  .timeline { padding-top: 1rem; }
  .rail { left: 50%; translate: -50% 0; }
  .steps { gap: 3.4rem; }
  .step {
    grid-template-columns: 1fr 56px 1fr;
    gap: 2.2rem;
    align-items: center;
  }
  .step .marker { grid-column: 2; }
  .step:nth-child(odd) .step-body { grid-column: 1; grid-row: 1; }
  .step:nth-child(even) .step-body { grid-column: 3; grid-row: 1; }
}

/* ---------- 5. use cases (coral accent) ---------- */
.use-cases {
  overflow-x: clip; /* cards GSAP-slide in from the side; never widen the page */ background: var(--ink-900); border-block: 1px solid var(--line); }
.use-cases .section-head { margin-bottom: 3rem; }
.uc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.uc-card { display: flex; flex-direction: column; gap: 0.8rem; }
.uc-card:hover {
  border-color: var(--coral);
  transform: translateY(-5px);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.8);
}
.uc-card .tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.26rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--coral) 55%, transparent);
  color: color-mix(in srgb, var(--coral) 75%, var(--cream));
}
.uc-card .uc-head { display: flex; align-items: center; gap: 0.8rem; }
.uc-card .icon-badge { background: color-mix(in srgb, var(--coral) 12%, transparent); color: color-mix(in srgb, var(--coral) 80%, var(--cream)); }
.uc-card h3 { font-size: 1.12rem; }
.uc-card p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- 6. mid CTA ---------- */
.mid-cta { padding: 5rem 0; }
.mid-cta-card {
  background: var(--cream);
  color: #142430;
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 5vw, 3.8rem);
  display: grid;
  grid-template-columns: 1.6fr auto;
  gap: 2.5rem;
  align-items: center;
}
.mid-cta-card h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.mid-cta-card p { color: rgba(20, 36, 48, 0.75); margin-top: 0.9rem; max-width: 58ch; }
.trust-list {
  list-style: none;
  padding: 0;
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.6rem;
}
.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
}
.trust-list svg { width: 17px; height: 17px; color: var(--olive); }

/* ---------- 7. why synexian (olive accent) ---------- */
.why-syn .section-head { margin-bottom: 3rem; }
.diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
.diff-card {
  padding: 2.2rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.diff-card:hover { border-color: var(--olive); transform: translateY(-4px); }
.diff-card .icon-badge { background: color-mix(in srgb, var(--olive) 12%, transparent); color: var(--olive); width: 52px; height: 52px; }
.diff-card h3 { font-size: 1.4rem; }
.diff-card p { color: var(--text-dim); font-size: 0.98rem; }

/* ---------- 8. FAQ ---------- */
.faq { background: var(--ink-900); border-top: 1px solid var(--line); }
.faq .section-head { margin-bottom: 2.6rem; max-width: 720px; }
.faq-list { max-width: 820px; display: grid; gap: 0.9rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s;
}
.faq-item.open { border-color: var(--line-strong); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
}
.faq-q .chev {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--amber);
  transition: transform 0.3s var(--ease-out);
}
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease-out);
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p {
  padding: 0 1.5rem 1.35rem;
  color: var(--text-dim);
  font-size: 0.96rem;
  max-width: 68ch;
}

/* ---------- 9. footer CTA ---------- */
.footer-cta {
  background:
    radial-gradient(ellipse 90% 120% at 50% 110%, color-mix(in srgb, var(--amber) 14%, transparent), transparent 60%),
    var(--ink-800);
  text-align: center;
  padding: 7.5rem 0;
}
.footer-cta-inner { max-width: 720px; }
.footer-cta .eyebrow { justify-content: center; }
.footer-cta h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-top: 1rem; }
.footer-cta p { color: var(--text-dim); margin: 1.2rem auto 2.2rem; max-width: 60ch; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .overview-grid { grid-template-columns: 1fr; }
  .cap-grid, .uc-grid { grid-template-columns: repeat(2, 1fr); }
  .diff-grid { grid-template-columns: 1fr; }
  .mid-cta-card { grid-template-columns: 1fr; }
  .dive-caption { left: 1.5rem; max-width: 280px; }
}
@media (max-width: 680px) {
  section { padding: 4.5rem 0; }
  .cap-grid, .uc-grid { grid-template-columns: 1fr; }
  .hero-stage { min-height: 560px; }
  .dive-caption { top: auto; bottom: 5.5rem; translate: 0 0; }
}
