/* Caxton Voice — public site. Concept: "two voices meet in the middle".
   Inter for reading and interface, Newsreader italic for the voice of the brand. */
@layer reset, tokens, base, layout, components, motion;

@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; }
  h1, h2, h3, p, ul, ol, figure { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  img, svg, canvas { display: block; max-width: 100%; }
  [hidden] { display: none !important; }
}

@layer tokens {
  :root {
    --ink: #14213d;
    --ink-2: #3b4a66;
    --muted: #5b667e;
    --rule: rgba(20, 33, 61, 0.14);
    --bg: #f5f3ee;
    --paper: #fbfaf7;
    --navy: #1d2b53;
    --navy-deep: #131d3a;
    --accent: #c8102e;
    --ok: #157f4f;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --margin: clamp(16px, 5vw, 72px);
    --max: 1280px;
    --section-y: clamp(72px, 11vw, 160px);
    --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
    --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
    --step-1: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
    --step-2: clamp(1.5rem, 1.25rem + 1.1vw, 2.1rem);
    --step-3: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
    --step-4: clamp(3rem, 1.6rem + 6vw, 7rem);
    --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
    color-scheme: light;
  }
}

@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
  body { background: var(--bg); color: var(--ink); font: 400 var(--step-0)/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
  a { color: inherit; }
  em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
  h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
  p { text-wrap: pretty; }
  ::selection { background: var(--navy); color: #fff; }
  :focus-visible { outline: 3px solid #6f8fe0; outline-offset: 3px; border-radius: 4px; }
  .skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
  .skip:focus { top: 12px; }
}

@layer layout {
  .wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--margin); }
  .section { padding-block: var(--section-y); }
  .section--tight { padding-block: calc(var(--section-y) * 0.6); }
  .section__head { display: grid; gap: 16px; max-width: 900px; margin-bottom: clamp(36px, 6vw, 72px); }
  .section__head h2 { font-size: var(--step-3); line-height: 1.04; letter-spacing: -0.03em; }
  .section__sub { color: var(--ink-2); max-width: 60ch; font-size: var(--step-1); line-height: 1.5; }
}

@layer components {
  /* brand */
  .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--navy); position: relative; flex: none; }
  .brand-mark::after { content: ""; position: absolute; inset: 8px; border-radius: 3px; border: 3px solid #fff; border-right-color: var(--accent); }

  .label { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

  /* buttons */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font: 600 0.98rem/1 var(--sans); text-decoration: none; color: var(--ink); border: 1px solid transparent; cursor: pointer; transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 120ms var(--ease), border-color 180ms var(--ease); }
  .btn:active { transform: scale(0.97); }
  .btn--primary { background: var(--navy); color: #fff; }
  .btn--primary:hover { background: var(--navy-deep); }
  .btn--ghost { border-color: var(--rule); background: rgba(255, 255, 255, 0.5); }
  .btn--ghost:hover { border-color: var(--ink-2); }
  .btn--link { padding-inline: 6px; }
  .btn--link:hover span { transform: translateX(3px); }
  .btn--link span { transition: transform 180ms var(--ease); }
  .btn--light { background: #fff; color: var(--navy); }
  .btn--light:hover { background: #eef0f6; }
  .btn--lg { min-height: 54px; padding: 0 26px; font-size: 1.04rem; }

  /* navigation: translucent layer, content scrolls under it */
  .nav { position: sticky; top: 0; z-index: 20; background: rgba(245, 243, 238, 0.72); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-bottom: 1px solid transparent; transition: border-color 240ms var(--ease); }
  .nav.is-scrolled { border-bottom-color: var(--rule); }
  .nav__in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
  .nav__links { display: flex; gap: 26px; margin-inline: auto; }
  .nav__links a { text-decoration: none; color: var(--ink-2); font-size: 0.96rem; font-weight: 500; }
  .nav__links a:hover { color: var(--ink); }
  .nav__actions { display: flex; gap: 8px; }
  @media (max-width: 880px) { .nav__links { display: none; } .nav__actions { margin-left: auto; } }
  @media (max-width: 420px) { .nav__actions #nav-login { display: none; } .brand { font-size: 1rem; } }
  @media (prefers-reduced-transparency: reduce) { .nav { background: var(--bg); backdrop-filter: none; } }

  /* hero */
  .hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 120px) clamp(64px, 9vw, 130px); isolation: isolate; }
  .hero__voices { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.9; -webkit-mask-image: linear-gradient(to bottom, transparent 55%, #000 85%); mask-image: linear-gradient(to bottom, transparent 55%, #000 85%); }
  .hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
  .hero__copy { display: grid; gap: 26px; }
  .eyebrow { display: inline-flex; align-items: center; gap: 10px; width: fit-content; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--rule); font-size: 0.9rem; color: var(--ink-2); }
  .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(21, 127, 79, 0.15); }
  .eyebrow.is-off .dot { background: #b08a2e; box-shadow: 0 0 0 4px rgba(176, 138, 46, 0.15); }
  .display { font-size: var(--step-4); line-height: 0.96; letter-spacing: -0.045em; font-weight: 650; }
  .display em { font-weight: 400; letter-spacing: -0.03em; color: var(--navy); }
  .display .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
  .display .line > span { display: inline-block; }
  .lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 34em; }
  .cta-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
  .fine { font-size: 0.92rem; color: var(--muted); }
  .traits { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 0.95rem; color: var(--ink-2); }
  .traits li { display: inline-flex; align-items: center; gap: 8px; }
  .traits svg { width: 18px; height: 18px; color: var(--navy); }
  @media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } }

  /* hero demo: a conversation, as the product shows it */
  .demo { position: relative; background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 22px; box-shadow: 0 1px 2px rgba(20, 33, 61, 0.05), 0 24px 60px -24px rgba(20, 33, 61, 0.28); overflow: hidden; }
  .demo__bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--rule); font-size: 0.88rem; font-weight: 600; }
  .demo__rec { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .demo__pair { margin-left: auto; font-weight: 500; color: var(--muted); }
  .demo__body { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 18px; height: 340px; overflow: hidden; }
  .demo__cap { padding: 0 18px 14px; font-size: 0.78rem; color: var(--muted); }
  .bubble { max-width: 86%; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--rule); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
  .bubble.me { align-self: flex-end; background: #eef1f8; border-color: transparent; }
  .bubble__who { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
  .bubble__main { font-size: 1.02rem; line-height: 1.4; color: var(--ink); min-height: 1.4em; }
  .bubble__sub { display: none; margin-top: 6px; font-size: 0.86rem; color: var(--muted); }
  .bubble__sub.is-in { display: block; animation: fade-up 450ms var(--ease) both; }
  .bubble__k { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 4px; color: var(--accent); }
  .bubble__who { display: flex; align-items: center; gap: 6px; }
  .bubble__state { margin-left: auto; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
  .ico { display: inline-flex; width: 14px; height: 14px; }
  .ico svg { width: 100%; height: 100%; }
  /* voice waveform: bars that move while someone speaks */
  .vwave { display: flex; align-items: center; gap: 2px; height: 20px; margin: 4px 0 6px; }
  .bubble__k .vwave { height: 14px; margin: 0 0 0 4px; }
  .vwave i { flex: none; width: 3px; height: 100%; border-radius: 2px; background: currentColor; color: var(--navy); opacity: 0.85; transform: scaleY(0.12); transform-origin: center; transition: transform 300ms var(--ease); }
  .bubble:not(.me) .vwave i { color: var(--accent); }
  .bubble__k .vwave i { color: var(--accent); }
  .bubble.me .bubble__k .vwave i { color: var(--accent); }
  .bubble:not(.me) .bubble__k .vwave i { color: var(--navy); }
  .bubble:not(.me) .bubble__k { color: var(--navy); }
  .vwave.on i { animation: talk 0.9s ease-in-out infinite; animation-delay: var(--d); }
  .vwave.done { height: 0; margin: 0; overflow: hidden; transition: height 300ms var(--ease), margin 300ms var(--ease); }
  @keyframes talk { 0%, 100% { transform: scaleY(0.15); } 50% { transform: scaleY(var(--h)); } }
  .bubble.is-new { opacity: 0; transform: translateY(10px); }
  .caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--navy); animation: caret 1s steps(1) infinite; }
  @keyframes caret { 50% { opacity: 0; } }

  /* languages */
  .langs { border-block: 1px solid var(--rule); background: var(--paper); }
  .langs__in { display: grid; grid-template-columns: auto 1fr; gap: 16px 40px; align-items: baseline; padding-block: 28px; }
  .langs__list { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 1.05rem; color: var(--ink-2); }
  @media (max-width: 760px) { .langs__in { grid-template-columns: 1fr; } }

  /* steps */
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
  .step { display: grid; gap: 18px; padding: 28px 28px 8px 0; }
  .step + .step { padding-left: 28px; border-left: 1px solid var(--rule); }
  .step__n { font-family: var(--serif); font-style: italic; font-size: var(--step-3); line-height: 1; color: var(--accent); }
  .step h3 { font-size: var(--step-1); margin-bottom: 8px; }
  .step p { color: var(--ink-2); }
  @media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .step, .step + .step { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--rule); } }

  /* modes */
  .modes { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.5vw, 32px); }
  .mode { display: grid; gap: 12px; align-content: start; padding: clamp(24px, 3vw, 40px); background: var(--paper); border: 1px solid var(--rule); border-radius: 24px; }
  .mode__art { width: 100%; height: auto; margin-bottom: 18px; background: var(--bg); border-radius: 16px; padding: 14px; }
  .mode h3 { font-size: var(--step-2); line-height: 1.15; }
  .mode p:last-child { color: var(--ink-2); }
  .a-frame { fill: #fff; stroke: var(--navy); stroke-width: 2; }
  .a-soft { fill: rgba(29, 43, 83, 0.12); }
  .a-wave { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 4 7; }
  .a-navy { stroke: var(--navy); }
  .a-red { stroke: var(--accent); }
  @media (max-width: 860px) { .modes { grid-template-columns: 1fr; } }

  /* index list */
  .index { border-top: 1px solid var(--rule); }
  .index li { display: grid; grid-template-columns: 64px minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--rule); transition: padding-left 300ms var(--ease); }
  .index li:hover { padding-left: 10px; }
  .index__n { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.2rem; }
  .index__t { font-size: var(--step-2); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
  .index__d { color: var(--ink-2); }
  @media (max-width: 760px) { .index li { grid-template-columns: 40px 1fr; } .index__d { grid-column: 2; } }

  /* dark chapter */
  .section--dark { background: var(--navy); color: #fff; }
  .section--dark .label { color: rgba(255, 255, 255, 0.66); }
  .section--dark h2 em { color: #ffd4da; }
  .trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid rgba(255, 255, 255, 0.18); }
  .trust__item { padding: 28px 24px 0 0; }
  .trust__item + .trust__item { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, 0.18); }
  .trust__item h3 { font-size: var(--step-1); margin-bottom: 10px; }
  .trust__item p { color: rgba(255, 255, 255, 0.78); }
  @media (max-width: 960px) { .trust { grid-template-columns: 1fr 1fr; } .trust__item:nth-child(3) { border-left: 0; padding-left: 0; } .trust__item { padding-bottom: 28px; } }
  @media (max-width: 560px) { .trust { grid-template-columns: 1fr; } .trust__item, .trust__item + .trust__item { padding: 24px 0; border-left: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); } }

  /* pricing */
  .packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(16px, 2vw, 24px); }
  .pack { display: grid; gap: 6px; padding: 30px; background: var(--paper); border: 1px solid var(--rule); border-radius: 24px; }
  .pack.is-featured { background: #fff; border-color: var(--navy); box-shadow: 0 24px 50px -30px rgba(20, 33, 61, 0.45); }
  .pack__name { font-weight: 600; color: var(--ink-2); }
  .pack__price { font-size: var(--step-3); font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .pack__meta { color: var(--muted); font-variant-numeric: tabular-nums; }
  .pack .btn { margin-top: 18px; width: fit-content; }

  /* faq */
  .faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
  .faq .section__head { margin-bottom: 0; }
  .faq__list { border-top: 1px solid var(--rule); }
  .faq__list details { border-bottom: 1px solid var(--rule); }
  .faq__list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }
  .faq__list summary::-webkit-details-marker { display: none; }
  .faq__list summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--muted); transition: transform 240ms var(--ease); }
  .faq__list details[open] summary::after { transform: rotate(45deg); }
  .faq__list details p { padding: 0 0 24px; color: var(--ink-2); max-width: 62ch; }
  @media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

  /* final call to action */
  .final { background: var(--navy-deep); color: #fff; padding-block: clamp(80px, 12vw, 170px); }
  .final__in { display: grid; gap: 36px; }
  .final h2 { font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.045em; max-width: 12em; }
  .final h2 em { color: #ffd4da; }
  .final__status { color: rgba(255, 255, 255, 0.72); font-size: 0.95rem; }

  /* footer */
  .foot { background: var(--navy-deep); color: rgba(255, 255, 255, 0.72); border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .foot__in { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; padding-block: 28px; }
  .foot .brand { color: #fff; }
  .foot .brand-mark { background: #fff; }
  .foot .brand-mark::after { border-color: var(--navy); border-right-color: var(--accent); }
  .foot__note { display: inline-flex; align-items: center; gap: 10px; font-size: 0.9rem; }
  .flag { width: 30px; height: 15px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
  .foot__links { display: flex; gap: 20px; margin-left: auto; }
  .foot__links a { color: #fff; text-decoration: none; font-size: 0.92rem; }
  .foot__links a:hover { text-decoration: underline; }
}

@layer motion {
  /* Initial states only once JavaScript runs: without it, everything is visible. */
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  /* Hero: pure CSS, so it plays at once and ends visible even without JavaScript. */
  .display .line > span { animation: rise 1100ms var(--ease) both; }
  .display .line:nth-child(2) > span { animation-delay: 90ms; }
  .hero__copy > :not(h1), .demo { animation: fade-up 900ms var(--ease) 320ms both; }
  .demo { animation-delay: 480ms; }
  @keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
  @keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
    .display .line > span, .hero__copy > :not(h1), .demo { animation: none; }
    .caret { animation: none; }
    .vwave.on i { animation: none; transform: scaleY(0.4); }
    .index li:hover { padding-left: 0; }
  }
}
