:root {
  --color-bg: #f3f3f3;
  --color-surface: #ffffff;
  --color-ink: #0f1b26;
  --color-ink-soft: #3a4855;
  --color-muted: #7a8794;
  --color-line: rgba(15, 27, 38, 0.1);
  --color-brand: #2eb8e0;
  --color-brand-deep: #1b8fb2;
  --color-dark: #0f1b26;

  --font-sans: "Sora", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --text-hero: clamp(2.6rem, 1.4rem + 4.6vw, 5.4rem);
  --text-title: clamp(2rem, 1.2rem + 3vw, 3.8rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);

  --gutter: clamp(20px, 5vw, 80px);
  --space-section: clamp(5rem, 3rem + 7vw, 10rem);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font: 300 var(--text-base) / 1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 3px; }

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

.eyebrow {
  margin: 0 0 1.2rem;
  font: 400 0.78rem / 1.5 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.skip-link {
  position: absolute;
  top: -60px;
  left: var(--gutter);
  z-index: 60;
  padding: 10px 16px;
  background: var(--color-ink);
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus { top: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.is-solid {
  background: rgba(243, 243, 243, 0.82);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 1px 0 var(--color-line);
}

.nav__logo img { width: 132px; }

.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }

.nav nav a {
  font-size: 0.88rem;
  color: var(--color-ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}

.nav nav a:hover { color: var(--color-brand-deep); }

.nav .nav__cta {
  padding: 9px 18px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-ink);
}

.nav .nav__cta:hover { border-color: var(--color-brand); color: var(--color-ink); }

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 15px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--color-ink);
  color: #fff;
  font: 500 0.92rem / 1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out-expo), background 0.2s, box-shadow 0.25s;
}

.button:hover { background: var(--color-brand-deep); transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(27, 143, 178, 0.6); }
.button:active { transform: none; }

.button--ghost {
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: inset 0 0 0 1px var(--color-line);
}

.button--ghost:hover { background: var(--color-surface); color: var(--color-brand-deep); box-shadow: inset 0 0 0 1px var(--color-brand); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 120px var(--gutter) 80px;
}

/* The keyword-rich h1 is styled as the eyebrow; the big tagline is a <p> */
.hero__title {
  margin: 0;
  max-width: 12ch;
  font-size: var(--text-hero);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hero__lead { margin: 1.6rem 0 2.2rem; max-width: 46ch; color: var(--color-ink-soft); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  translate: -50% 0;
  margin: 0;
  font: 400 0.74rem / 1 var(--font-mono);
  color: var(--color-muted);
}

/* ---------- Scroll chapters ---------- */
.chapter { position: relative; height: 320vh; }

.chapter__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 2rem;
  padding: 90px var(--gutter) 40px calc(var(--gutter) + 28px);
  overflow: hidden;
}

.chapter__step {
  margin: 0 0 1.2rem;
  font: 400 0.82rem / 1 var(--font-mono);
  color: var(--color-muted);
}

.chapter__step b { color: var(--color-brand-deep); font-weight: 500; margin-right: 0.5em; }

.chapter h2 { font-size: var(--text-title); max-width: 13ch; }

.chapter__lead { margin: 1.2rem 0 2rem; max-width: 40ch; color: var(--color-ink-soft); }

.chapter__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
  border-left: 1px solid var(--color-line);
}

/* Items light up one by one as the chapter progresses (state set by scrub.js) */
.chapter__items li {
  position: relative;
  padding-left: 1.3rem;
  opacity: 0.32;
  transition: opacity 0.45s;
}

.chapter__items li::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.6s var(--ease-out-expo);
}

.chapter__items li.is-active { opacity: 1; }
.chapter__items li.is-active::before { transform: scaleY(1); }

.chapter__items h3 { font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; }
.chapter__items p { margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--color-muted); }

.chapter__visual { position: relative; height: 100%; display: grid; place-items: center; }

/* Canvas backing store = frame size; CSS scales it. Edges fade into the page so
   the studio background of the video merges with the site background. */
.chapter__visual canvas {
  width: 118%;
  aspect-ratio: 16 / 9;
  -webkit-mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, #000 60%, transparent 100%);
}

/* Vertical progress rail on the left edge */
.chapter__rail {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  translate: 0 -50%;
  width: 2px;
  height: 46vh;
  background: var(--color-line);
  border-radius: 2px;
}

.chapter__rail i {
  position: absolute;
  inset: 0;
  background: var(--color-brand);
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: top;
}

.chapter__rail::after {
  content: "";
  position: absolute;
  left: 50%;
  top: var(--rail-dot, 0%);
  width: 10px;
  height: 10px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--color-brand);
  box-shadow: 0 0 0 5px rgba(46, 184, 224, 0.18);
}

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Sections ---------- */
main > section:not(.hero):not(.chapter) { padding: var(--space-section) var(--gutter); }

.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head h2 { font-size: var(--text-title); }

.trust {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  background: var(--color-surface);
  border-block: 1px solid var(--color-line);
  padding-block: clamp(3rem, 6vw, 5rem) !important;
}

.trust img { width: clamp(180px, 20vw, 260px); }

.trust__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.trust__facts b { display: block; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); font-weight: 500; letter-spacing: -0.03em; }
.trust__facts span { font-size: 0.9rem; color: var(--color-muted); }

.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-line); }

.service-list li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--color-line);
  transition: padding 0.4s var(--ease-out-expo), background 0.3s;
}

.service-list li:hover { padding-left: 1rem; background: linear-gradient(90deg, rgba(46, 184, 224, 0.08), transparent 60%); }
.service-list span { font: 400 0.8rem / 1 var(--font-mono); color: var(--color-brand-deep); }
.service-list h3 { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); }
.service-list p { margin: 0; color: var(--color-ink-soft); }

.dark { background: var(--color-dark); color: #e9eef3; }
.eyebrow--light { color: #8fa3b5; }

.dark__statement { font-size: clamp(1.8rem, 1rem + 3vw, 3.6rem); font-weight: 400; max-width: 22ch; }
.dark__statement span { display: block; margin-top: 0.4em; color: #5d7184; }

.outcomes {
  list-style: none;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.outcomes li { padding: 2rem; background: var(--color-dark); transition: background 0.3s; }
.outcomes li:hover { background: #142432; }
.outcomes h3 { font-size: 1.15rem; color: #fff; }
.outcomes h3::before { content: ""; display: block; width: 18px; height: 2px; margin-bottom: 1.4rem; background: var(--color-brand); }
.outcomes p { margin: 0.5rem 0 0; font-size: 0.92rem; color: #8fa3b5; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.steps li { padding: 1.8rem; background: var(--color-surface); border-radius: 16px; box-shadow: 0 1px 0 var(--color-line); transition: transform 0.4s var(--ease-out-expo), box-shadow 0.3s; }
.steps li:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(15, 27, 38, 0.35); }
.steps span { font: 400 0.8rem / 1 var(--font-mono); color: var(--color-brand-deep); }
.steps h3 { margin: 2.6rem 0 0.5rem; font-size: 1.3rem; }
.steps p { margin: 0; font-size: 0.92rem; color: var(--color-ink-soft); }

.faq__list { max-width: 860px; border-top: 1px solid var(--color-line); }
.faq details { border-bottom: 1px solid var(--color-line); }

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  list-style: none;
  cursor: pointer;
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.25rem);
  font-weight: 400;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--color-brand-deep); font-size: 1.4rem; line-height: 1; transition: transform 0.3s var(--ease-out-expo); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.5rem; max-width: 66ch; color: var(--color-ink-soft); }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  background: var(--color-surface);
  border-top: 1px solid var(--color-line);
}

.contact h2 { font-size: var(--text-title); max-width: 12ch; }

.contact__list { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1.2rem; }
.contact__list span { display: block; font: 400 0.75rem / 1.6 var(--font-mono); color: var(--color-muted); }
.contact__list a { text-decoration: none; font-weight: 400; }
.contact__list a:hover { color: var(--color-brand-deep); }

.contact__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-content: start; }
.field { display: grid; gap: 0.4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font: 400 0.75rem / 1 var(--font-mono); color: var(--color-muted); }

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-bg);
  color: var(--color-ink);
  font: 300 1rem / 1.4 var(--font-sans);
  resize: vertical;
  transition: border-color 0.2s, background 0.2s;
}

.field input:focus,
.field textarea:focus { outline: none; border-color: var(--color-brand); background: #fff; }

.contact__form .button { justify-self: start; }
.form__error { grid-column: 1 / -1; margin: 0; color: #c0392b; font-size: 0.9rem; }
.form__note { grid-column: 1 / -1; margin: 0; font-size: 0.8rem; color: var(--color-muted); }

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem var(--gutter);
  border-top: 1px solid var(--color-line);
  font-size: 0.8rem;
  color: var(--color-muted);
}

.footer img { width: 110px; }
.footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav nav a:not(.nav__cta) { display: none; }
  .trust { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding-top: 110px; }

  /* Chapters: object on top, copy below */
  .chapter__sticky {
    grid-template-columns: 1fr;
    grid-template-rows: 42% auto;
    align-items: start;
    padding: 76px var(--gutter) 24px calc(var(--gutter) + 18px);
    gap: 0;
  }

  .chapter__visual { order: -1; }
  .chapter__visual canvas { width: 130%; }
  .chapter__rail { height: 34vh; top: 62%; }
  .chapter__lead { margin: 0.8rem 0 1.2rem; }
  .chapter__items { gap: 0.8rem; }
  .chapter__items p { font-size: 0.84rem; }

  .trust__facts,
  .service-list li,
  .outcomes,
  .steps,
  .contact,
  .contact__form { grid-template-columns: 1fr; }

  .service-list li { gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
