/* ══════════════════════════════════════════════════════════════════════
   La Agencia — the public page

   Persuade, not Operate. Same world as the console (ink, bone paper,
   vermilion) so arriving at the app is not a genre change — but here the
   3D carries the atmosphere and the DOM carries the argument.

   The rule that survives from the console: VERMILION MEANS A PERSON MUST
   DECIDE. On this page that makes it the accent of exactly one idea —
   the gate — and never a decoration.

   Comprehensibility is the brief. Everything below the world is flat,
   quiet and readable without any of the spectacle above it, because a
   landing page that cannot explain the product has failed at its job.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --void:    #0b0a09;
  --ink:     #100e0c;
  --paper:   #efe9dd;
  --paper-2: #cdc4b4;
  --paper-3: #8d8375;
  --rule:    #2b2621;
  --stamp:   #e2492f;
  --stamp-2: #f3a08d;
  --signed:  #74c495;

  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --ui:      "Instrument Sans", "Helvetica Neue", Helvetica, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gut: clamp(1.25rem, 5vw, 5rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--rule) transparent;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--paper);
  font: 400 16px/1.6 var(--ui);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--stamp); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--paper-3); }

:where(a, button):focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: -.025em; }
p { margin: 0; }
a { color: inherit; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
code { font: 400 .88em var(--mono); background: #ffffff10; padding: .12em .38em; }

/* ── The world sits behind everything ────────────────────────────────── */

#world {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block;
}

/* Copy sits over a live scene, so it needs its own ground. A vignette
   darkens the edges — where the text lives — and leaves the centre, where
   the sheets actually are, untouched. Cheaper and less ugly than putting
   every paragraph in a box. */
#scrim {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  transition: background .6s var(--ease);
  background:
    radial-gradient(ellipse 78% 62% at 50% 45%, transparent 0%, rgba(11,10,9,.5) 80%, rgba(11,10,9,.85) 100%),
    linear-gradient(to bottom, rgba(11,10,9,.72) 0%, transparent 22%, transparent 74%, rgba(11,10,9,.82) 100%);
}
/* The copy column gets its own ground, and only that column. */
#scrim::after {
  content: ""; position: absolute; inset: 0;
  transition: opacity .6s var(--ease), background .6s var(--ease);
  background: linear-gradient(to right, rgba(11,10,9,.95) 0%, rgba(11,10,9,.8) 30%, transparent 62%);
}
body[data-side="right"] #scrim::after {
  background: linear-gradient(to left, rgba(11,10,9,.95) 0%, rgba(11,10,9,.8) 30%, transparent 62%);
}
body[data-side="center"] #scrim::after {
  background: radial-gradient(ellipse 62% 48% at 50% 52%, rgba(11,10,9,.88) 0%, rgba(11,10,9,.62) 55%, transparent 100%);
}

/* Film grain. Real texture, not a gradient wash. */
#grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(5) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0) } 20% { transform: translate(-3%,2%) }
  40% { transform: translate(2%,-3%) } 60% { transform: translate(-2%,-2%) }
  80% { transform: translate(3%,1%) }
}

main, .plain, .top { position: relative; z-index: 2; }

/* ── Top bar ─────────────────────────────────────────────────────────── */

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem var(--gut);
  transition: background .3s var(--ease), backdrop-filter .3s var(--ease);
}
.top.is-stuck {
  background: color-mix(in oklab, var(--void) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.top__mark { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.top__mark svg { width: 19px; height: 19px; color: var(--stamp); }
.top__mark span { font-family: var(--display); font-size: 1.15rem; }
.top__in {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  padding: .5rem .9rem; border: 1px solid var(--rule);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.top__in svg { width: 15px; height: 15px; }
.top__in:hover { border-color: var(--paper-3); background: #ffffff08; }

/* ── Chapters ────────────────────────────────────────────────────────── */

.beat {
  min-height: 100svh;
  display: grid; align-items: center;
  padding: 7rem var(--gut) 5rem;
}
.beat--open { min-height: 100svh; }
/* The signature is the moment: the stamp lands centre-frame, so the copy
   sits under it rather than across it. */
.beat[data-cam="sign"] { align-items: end; padding-bottom: 4.5rem; }
.beat--flat { min-height: 90svh; }

.beat__hold { max-width: 44ch; text-shadow: 0 1px 24px rgba(11,10,9,.85), 0 1px 3px rgba(11,10,9,.7); }
.beat__hold--right { margin-left: auto; text-align: right; }
.beat__hold .mid, .beat__hold .mid-p { text-align: center; }
.beat__hold:has(.mid) { max-width: 52ch; margin-inline: auto; }

.lede {
  font-size: clamp(2.9rem, 7.6vw, 6rem);
  line-height: .94; letter-spacing: -.04em;
  max-width: 15ch;
}
.lede em { font-style: italic; color: var(--stamp); }

.stand {
  margin-top: 1.5rem; max-width: 46ch;
  font-size: clamp(1rem, 1.5vw, 1.16rem); line-height: 1.62; color: var(--paper-2);
}

.beat h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.02; letter-spacing: -.03em;
}
.beat p { margin-top: 1.15rem; color: var(--paper-2); line-height: 1.65; }
.beat .fine { margin-top: .9rem; font-size: 14px; color: #a89d8c; }

.acts { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.cta {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .82rem 1.35rem;
  font: 600 14.5px/1 var(--ui); text-decoration: none;
  border: 1px solid var(--rule);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .12s var(--ease);
}
.cta svg { width: 16px; height: 16px; }
.cta:hover { border-color: var(--paper-3); background: #ffffff08; }
.cta:active { transform: translateY(1px); }
.cta--solid { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.cta--solid:hover { background: #f2593d; border-color: #f2593d; }

.scrollcue {
  position: absolute; bottom: 2rem; left: 50%; translate: -50% 0;
  color: var(--paper-3); animation: cue 2.4s var(--ease) infinite;
}
.scrollcue svg { width: 20px; height: 20px; }
@keyframes cue { 0%,100% { transform: translateY(0); opacity: .4 } 50% { transform: translateY(7px); opacity: 1 } }

/* The four questions, as a numbered run — the sequence carries meaning. */
.four { margin: 1.6rem 0 0; padding: 0; list-style: none; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.four li {
  display: grid; gap: .2rem; padding: .85rem 1rem;
  background: color-mix(in oklab, var(--void) 88%, transparent);
  backdrop-filter: blur(6px);
}
.four b { font-size: 14px; font-weight: 600; }
.four span { font-size: 13.5px; color: var(--paper-3); line-height: 1.55; }
.four--doubt b { color: var(--stamp-2); }

.figures {
  margin: 2rem 0 0; display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  background: var(--rule); border: 1px solid var(--rule);
}
.figures div { padding: 1.1rem 1.2rem; background: color-mix(in oklab, var(--void) 88%, transparent); backdrop-filter: blur(6px); }
.figures dt { font: 600 10px/1.4 var(--ui); letter-spacing: .13em; text-transform: uppercase; color: var(--paper-3); }
.figures dd {
  margin: .5rem 0 0; font: 400 2rem/1 var(--display);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.figures dd.small { font-size: 1.25rem; }

/* ── The flat, readable half ─────────────────────────────────────────── */

.plain {
  background: var(--ink);
  border-top: 1px solid var(--rule);
  padding: clamp(4rem, 9vw, 7.5rem) var(--gut);
}
.wrap { max-width: 1080px; margin-inline: auto; }
.plain__h { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 2.5rem; letter-spacing: -.03em; }

.steps { margin: 0 0 4rem; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.steps li {
  counter-increment: s; background: var(--ink);
  padding: 1.5rem 1.6rem 1.5rem 4.2rem; position: relative;
}
.steps li::before {
  content: counter(s); position: absolute; left: 1.5rem; top: 1.5rem;
  font: 400 1.5rem/1 var(--display); color: var(--stamp);
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.3rem; }
.steps p { margin-top: .45rem; color: var(--paper-2); max-width: 68ch; font-size: 15px; }

.cols { display: grid; gap: 2rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); }
.col__h {
  font-family: var(--ui); font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--stamp);
  padding-bottom: .6rem; margin-bottom: .7rem; border-bottom: 1px solid var(--rule);
}
.cols p { color: var(--paper-2); font-size: 14.5px; line-height: 1.65; }

/* The product, at full width. A ruled frame and a caption, no card. */
.sheet { margin: 0 0 clamp(3rem, 7vw, 5.5rem); }
.sheet img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.sheet figcaption { margin-top: .9rem; font-size: 13.5px; line-height: 1.6; color: var(--paper-3); max-width: 72ch; }

/* Two ways of working, in the same ruled idiom as the steps. The price is
   a line, not a number, until the first clients have set one. */
.plans { margin: 0 0 clamp(3rem, 7vw, 5.5rem); }
.plain__h--sub { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 1.6rem; }
.plans__row { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.plan { background: var(--ink); padding: 1.5rem 1.6rem 1.6rem; display: grid; gap: .8rem; align-content: start; }
.plan__who { color: var(--paper-2); font-size: 15px; line-height: 1.6; }
.plan__list { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.plan__list li { position: relative; padding-left: 1.1rem; color: var(--paper-2); font-size: 14.5px; line-height: 1.6; }
.plan__list li::before { content: ""; position: absolute; left: 0; top: .72em; width: .45rem; height: 1px; background: var(--stamp); }
.plan__price { margin-top: .4rem; padding-top: .9rem; border-top: 1px solid var(--rule); font-size: 14px; color: var(--paper-3); }
.plan__price b { color: var(--paper); font-weight: 600; }
.plans__fine { margin-top: 1.1rem; font-size: 13.5px; color: var(--paper-3); max-width: 72ch; }
.plans__fine a { color: var(--paper-2); }

.end { margin-top: clamp(4rem, 8vw, 7rem); text-align: center; display: grid; justify-items: center; gap: 1rem; }
.end__mark { width: 34px; height: 34px; color: var(--stamp); }
.end h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.end p { color: var(--paper-2); max-width: 52ch; }
.end .fine { font-size: 13px; color: var(--paper-3); }
.end .cta { margin-top: .6rem; }

/* ── Motion in, once ─────────────────────────────────────────────────── */

.beat__hold > *, .steps li, .cols > div, .end > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.is-lit .beat__hold > *, .is-lit.steps li, .is-lit > div, .is-lit > * {
  opacity: 1; transform: none;
}
.beat__hold > *:nth-child(2) { transition-delay: .08s }
.beat__hold > *:nth-child(3) { transition-delay: .16s }
.beat__hold > *:nth-child(4) { transition-delay: .24s }

@media (prefers-reduced-motion: reduce) {
  .beat__hold > *, .steps li, .cols > div, .end > * { opacity: 1; transform: none; transition: none; }
  #grain { animation: none; }
  .scrollcue { animation: none; }
}

/* ── Narrow ──────────────────────────────────────────────────────────── */

/* Kept in step with `portrait()` in landing.js: the camera and the copy
   have to agree on when the page is a portrait. */
@media (max-width: 720px), (orientation: portrait) {
  /* Portrait has no left or right to stage into, so the composition splits
     horizontally instead: the world holds the upper frame, the copy sits at
     the bottom over a solid ground. A tablet held upright is a portrait
     too, whatever its width: at 800 px the copy column sat on the sheets. */
  .beat { padding-top: 6rem; align-items: end; padding-bottom: 3.2rem; }
  .beat[data-cam="sign"] { padding-bottom: 3.2rem; }
  .beat__hold, .beat__hold--right { max-width: none; margin-left: 0; text-align: left; }
  .beat__hold .mid, .beat__hold .mid-p { text-align: left; }
  #scrim::after {
    background: linear-gradient(to top,
      rgba(11,10,9,.97) 0%, rgba(11,10,9,.94) 34%,
      rgba(11,10,9,.55) 56%, transparent 80%) !important;
  }
  .top__in span { display: none; }
  .lede { font-size: clamp(2.5rem, 11vw, 3.6rem); }
  .steps li { padding: 1.3rem 1.2rem 1.3rem 3.4rem; }
  .steps li::before { left: 1.1rem; top: 1.3rem; font-size: 1.25rem; }
}


/* ── Asking for access ─────────────────────────────────────────────────
   THE TOKENS HERE MEAN THE OPPOSITE OF THE CONSOLE'S. On this page
   `--ink` is the near-black ground and `--paper` is the text; in
   app.css `--ink` is the text. Writing this block in the console's
   vocabulary put `color: var(--ink)` on the inputs, which is black
   type on a black page — invisible, and only in the one place a
   visitor has to type. `--ink-2` and `--ink-3` are not defined here at
   all, so they failed silently rather than loudly.

   Text is `--paper`. Muted text is `--paper-3`. Check against `body`
   before reaching for a token on this page.

   Set in the same ruled, flat idiom as the rest of the plain half —
   no card, no panel, no box inside a box. The submit button borrows
   the page's existing solid CTA and nothing else is tinted.        */

.ask { display: grid; gap: 20px; margin-top: 32px; max-width: 680px; text-align: left; }
.ask__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ask__field { display: grid; gap: 8px; }
.ask__field > span {
  font: 500 12px/1.4 var(--ui); letter-spacing: .04em; text-transform: uppercase;
  color: var(--paper-3);
}
.ask__field > span i { font-style: normal; text-transform: none; letter-spacing: 0; }
.ask__field input,
.ask__field textarea {
  /* Inputs opt out of inheritance, so both are stated. */
  width: 100%; font: 400 16px/1.5 var(--ui); color: var(--paper);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: 8px 0; border-radius: 0;
  transition: border-color .24s cubic-bezier(.32, .72, 0, 1);
}
.ask__field textarea { resize: vertical; min-height: 72px; }
/* No opacity dimming: these placeholders carry real example answers, and at
   .85 they measured 4.12:1 — under AA on the one form a stranger has to fill
   in. At full strength they match the labels at 5.3:1, still far below the
   16:1 of what you actually type, so a filled field never reads as empty. */
.ask__field input::placeholder,
.ask__field textarea::placeholder { color: var(--paper-3); opacity: 1; }
.ask__field input:hover,
.ask__field textarea:hover { border-bottom-color: var(--paper-3); }
.ask__field input:focus-visible,
.ask__field textarea:focus-visible {
  outline: none; border-bottom-color: var(--paper); box-shadow: 0 1px 0 0 var(--paper);
}
.ask__field.is-wrong input { border-bottom-color: var(--stamp); }

.ask__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ask__go { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.ask__go .fine { margin: 0; max-width: 40ch; }
.ask button[disabled] { opacity: .55; cursor: progress; }
.ask button:active { transform: translateY(1px); }

.ask__said { font-size: 15px; line-height: 1.6; margin: 0; }
.ask__said.is-wrong { color: var(--stamp); }
.ask__said.is-done { color: var(--paper); }

.fine--sep { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rule); }
.fine--sep a { color: var(--paper-2); }

/* Sent: the form is replaced by its own answer rather than sitting there
   greyed out, because there is nothing left to fill in. */
.ask.is-done .ask__row,
.ask.is-done .ask__field,
.ask.is-done .ask__go { display: none; }

@media (max-width: 700px) {
  .ask__row { grid-template-columns: 1fr; }
}
