/* ============================================================
   LLM Wrappers — flagship immersive page (ink theme)
   Same family skeleton as sibling service pages; identity here
   is the gateway: an abstraction layer between app and models.
   Accents: amber for use cases, olive for differentiators.
   ============================================================ */

section { padding: 6.5rem 0; }

/* ---------- 1. hero (pinned WebGL gateway) ---------- */
.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: 820px;
  text-align: center;
  align-items: center;
  margin-inline: auto;
}
.hero-copy h1 {
  font-size: clamp(2.3rem, 5vw, 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: 70ch;
  color: var(--text-dim);
  font-size: 1.03rem;
}
.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); }
}

.dive-captions { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.dive-caption {
  position: absolute;
  top: 50%;
  left: clamp(1.5rem, 7vw, 7rem);
  translate: 0 -50%;
  max-width: 370px;
  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.8rem; margin: 0.5rem 0; }
.dive-caption p { color: var(--text-dim); font-size: 0.98rem; }

.loop-tagline {
  position: absolute;
  left: 50%;
  bottom: clamp(3rem, 10vh, 6rem);
  translate: -50% 0;
  z-index: 2;
  text-align: center;
  max-width: 640px;
  opacity: 0;
  pointer-events: none;
}
.loop-tagline .eyebrow { justify-content: center; }
.loop-tagline h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  margin-top: 0.7rem;
}

.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; }

/* four stat cards — 2x2 on wide screens */
.stat-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.25s var(--ease-out);
}
.stat-card:hover { border-color: var(--amber); }
.stat-icon {
  width: 44px;
  height: 44px;
  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: 22px; height: 22px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-label { color: var(--text-faint); font-size: 0.86rem; }
.stat-label em {
  display: block;
  font-style: normal;
  font-size: 0.76rem;
  color: var(--text-faint);
  opacity: 0.8;
}

@media (max-width: 480px) {
  .stat-strip { grid-template-columns: 1fr; }
}

/* ---------- 3. raw call vs wrapper ---------- */
.versus {
  overflow-x: clip; /* GSAP x-slide of the two cards must never widen the page */
  background: var(--ink-900); border-block: 1px solid var(--line); }
.versus .section-head { margin-bottom: 3rem; max-width: 760px; }
.vs-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.4rem;
  align-items: stretch;
}
.vs-card {
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  border: 1px solid var(--line);
}
.vs-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1.4rem;
}
.vs-card ul { list-style: none; padding: 0; display: grid; gap: 0.95rem; }
.vs-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.97rem;
}
.vs-card li svg { flex: none; width: 18px; height: 18px; margin-top: 3px; }

.vs-raw { background: var(--ink-800); }
.vs-raw h3 { color: var(--text-faint); }
.vs-raw li { color: var(--text-faint); }
.vs-raw li svg { color: var(--coral); opacity: 0.7; }

.vs-wrap {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  box-shadow: 0 24px 70px -40px color-mix(in srgb, var(--amber) 35%, transparent);
}
.vs-wrap h3 { color: var(--amber); }
.vs-wrap li { color: var(--text); font-weight: 500; }
.vs-wrap li svg { color: var(--olive); }

/* ---------- 4. request pipeline (sticky diagram + walkthrough) ---------- */
.lifecycle { background: var(--ink-800); border-bottom: 1px solid var(--line); }
.lifecycle .section-head { margin-bottom: 3rem; max-width: 740px; }

.lifecycle-diagram {
  position: sticky;
  top: calc(var(--nav-h) + 0.8rem);
  z-index: 5;
  background: color-mix(in srgb, var(--ink-800) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.4rem 0.6rem;
  margin-bottom: 3rem;
}
.lifecycle-diagram svg { width: 100%; height: auto; display: block; }

.lc-llm path {
  stroke: var(--line-strong);
  stroke-width: 1.4;
  transition: stroke 0.4s;
}
.lc-llm rect {
  fill: var(--ink-700);
  stroke: var(--line-strong);
  stroke-width: 1.4;
  transition: fill 0.4s, stroke 0.4s;
}
.lc-llm text {
  fill: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-anchor: middle;
  transition: fill 0.4s;
}
.lc-llm.on path { stroke: var(--amber); }
.lc-llm.on rect { stroke: var(--amber); fill: color-mix(in srgb, var(--amber) 22%, var(--ink-700)); }
.lc-llm.on text { fill: var(--cream); }

.lc-node circle {
  fill: var(--ink-700);
  stroke: var(--line-strong);
  stroke-width: 1.5;
  transition: fill 0.4s, stroke 0.4s;
}
.lc-node text {
  fill: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-anchor: middle;
  transition: fill 0.4s;
}
.lc-node.on circle { fill: var(--amber); stroke: var(--amber); }
.lc-node.on text { fill: var(--cream); }
.lc-node.done circle { fill: color-mix(in srgb, var(--amber) 30%, var(--ink-700)); stroke: var(--amber); }
.lc-node.done text { fill: var(--text-dim); }

.lc-link {
  stroke: var(--line-strong);
  stroke-width: 1.5;
  transition: stroke 0.4s;
}
.lc-link.on { stroke: var(--amber); }

.lc-feedback {
  stroke: var(--coral);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
  opacity: 0.25;
  transition: opacity 0.5s;
}
.lc-feedback.on {
  opacity: 1;
  animation: lc-flow 1.2s linear infinite;
}
@keyframes lc-flow {
  to { stroke-dashoffset: -22; }
}
.lc-feedback-label {
  fill: var(--coral);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-anchor: middle;
  opacity: 0;
  transition: opacity 0.5s;
}
.lc-feedback-label.on { opacity: 0.9; }

.stage-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 640px;
  display: grid;
  gap: clamp(3rem, 12vh, 7rem);
  padding-bottom: 4rem;
}
.stage-item { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: start; }
.stage-item .num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--amber);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}
.stage-item.is-active .num {
  background: var(--amber);
  color: var(--ink-900);
  border-color: var(--amber);
}
.stage-item h3 { font-size: 1.35rem; margin-bottom: 0.45rem; }
.stage-item p { color: var(--text-dim); font-size: 0.98rem; max-width: 52ch; }

/* ---------- 5. capabilities ---------- */
.capabilities { background: var(--ink-900); border-bottom: 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; }

/* ---------- 6. 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; }
}

/* ---------- 7. use cases (amber 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(--amber);
  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(--amber) 55%, transparent);
  color: var(--amber);
}
.uc-card .uc-head { display: flex; align-items: center; gap: 0.8rem; }
.uc-card .icon-badge { background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--amber); }
.uc-card h3 { font-size: 1.12rem; }
.uc-card p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- 8. 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; }
.mid-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
}
.mid-cta-card .btn-ghost {
  color: #142430;
  border-color: rgba(20, 36, 48, 0.35);
}
.mid-cta-card .btn-ghost:hover { border-color: var(--amber-deep); color: var(--amber-deep); }
.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); }

/* ---------- 9. tech stack ---------- */
.tech { background: var(--ink-900); border-block: 1px solid var(--line); }
.tech .section-head { margin-bottom: 2.6rem; }
.tech-rows { display: grid; gap: 1.4rem; }
.tech-row-label {
  width: min(var(--container), 100% - 3rem);
  margin: 0 auto -0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.tech-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: default;
  transition: border-color 0.25s;
}
.tech-item:hover { border-color: var(--line-strong); }
.tech-item .logo {
  width: 26px;
  height: 26px;
  background-color: rgba(240, 235, 218, 0.5);
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
  transition: background-color 0.25s;
}
.tech-item:hover .logo { background-color: var(--brand, var(--cream)); }
.tech-item span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.25s;
}
.tech-item:hover span { color: var(--text); }

/* ---------- 10. 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; }

/* ---------- 11. 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;
}

/* ---------- 12. 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; }
  .vs-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; }
  .mid-cta-actions { flex-direction: row; flex-wrap: wrap; }
  .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; }
  .loop-tagline { bottom: 2rem; }
  .lc-node text { font-size: 15px; }
}
