/* Proweno — proweno.com landing
   Wimbledon palette (docs/DESIGN_SYSTEM.md) on an Apple-style scroll story. */

:root {
  --bg: #FBFAF6;
  --bg-2: #F7F4E8;
  --ink: #111815;
  --ink-2: #4b5548;
  --muted: #6b726b;
  --line: #EDE8DC;
  --paper: #ffffff;
  --green: #006633;
  --green-ink: #005529;
  --green-tint: rgba(0, 102, 51, 0.10);
  --purple: #663399;
  --dark-bg: #111815;
  --dark-ink: #F7F4E8;
  --dark-muted: #9ca19a;
  --shadow: 0 1px 2px rgba(17, 24, 21, 0.06), 0 12px 32px rgba(17, 24, 21, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1411;
    --bg-2: #151c17;
    --ink: #F7F4E8;
    --ink-2: #d1cfc5;
    --muted: #9ca19a;
    --line: #26302a;
    --paper: #1a221c;
    --green: #3fa66f;
    --green-ink: #5ec48a;
    --green-tint: rgba(63, 166, 111, 0.16);
    --purple: #a583d1;
    --dark-bg: #07090a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1411;
  --bg-2: #151c17;
  --ink: #F7F4E8;
  --ink-2: #d1cfc5;
  --muted: #9ca19a;
  --line: #26302a;
  --paper: #1a221c;
  --green: #3fa66f;
  --green-ink: #5ec48a;
  --green-tint: rgba(63, 166, 111, 0.16);
  --purple: #a583d1;
  --dark-bg: #07090a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2 { margin: 0; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 7.2vw, 5.6rem); line-height: 1.0; }
h2 { font-size: clamp(2rem, 4.8vw, 3.6rem); line-height: 1.04; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 10px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
  font-size: 14px;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.01em; font-size: 16px; }
.nav-mark { width: 12px; height: 12px; border-radius: 3px 3px 3px 0; background: var(--green); }
.nav-links { display: flex; gap: 22px; margin-left: auto; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { color: var(--green-ink); font-weight: 500; }
.lang { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--line); }
.lang-btn {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-weight: 500; font-size: 12px; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.lang-btn.is-active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(17,24,21,.12); }

/* ── Hero ────────────────────────────────────────── */
.hero {
  min-height: 92svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  gap: 22px;
  padding: calc(96px + env(safe-area-inset-top, 0px)) var(--gutter) 64px;
  max-width: 1100px; margin: 0 auto;
}
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--green-ink); }
.lede { max-width: 38em; font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--ink-2); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.hero > * { transition: opacity .2s linear, transform .2s linear; }
.hero.is-leaving > * { opacity: var(--hero-o, 1); transform: translateY(calc((1 - var(--hero-o, 1)) * -24px)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.005em;
  transition: transform .25s var(--ease), background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-ink); }
.btn-quiet { color: var(--green-ink); }
.btn-quiet:hover { background: var(--green-tint); }

/* ── Pinned stages ───────────────────────────────── */
.stage { position: relative; }
.stage-docs { height: 420svh; }
.stage-voice { height: 300svh; }
.stage-pin {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr; justify-items: center;
  padding: calc(84px + env(safe-area-inset-top, 0px)) var(--gutter) 24px;
}

/* captions */
.captions { position: relative; width: min(100%, 680px); height: 8.5em; text-align: center; }
.caption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  opacity: var(--o, 0); transform: translateY(calc((1 - var(--o, 0)) * 10px));
  will-change: opacity, transform;
}
.caption span { font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
.caption small { font-size: clamp(.95rem, 1.4vw, 1.1rem); color: var(--ink-2); max-width: 34em; text-wrap: pretty; }

/* the pile */
.pile { position: relative; width: 100%; max-width: 900px; }
.doc {
  position: absolute; left: 50%; top: 50%;
  width: min(270px, 66vw); aspect-ratio: 210 / 297;
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  will-change: transform;
}
.doc-bg::before {
  content: ""; position: absolute; inset: 22px 20px;
  background:
    linear-gradient(var(--line) 0 0) 0 0 / 60% 7px no-repeat,
    repeating-linear-gradient(var(--line) 0 5px, transparent 5px 14px) 0 24px / 100% 60% no-repeat;
  opacity: .9;
}
.doc-main {
  padding: 22px 20px; overflow: hidden;
  font-size: 8.4px; line-height: 1.45; color: var(--ink-2);
  display: flex; flex-direction: column; gap: 6px;
  z-index: 2;
}
.doc-h { font-weight: 600; color: var(--ink); font-size: 8.8px; }
.doc-title { text-align: center; font-weight: 600; color: var(--ink); letter-spacing: .12em; margin: 4px 0; }
.doc-sig { margin-top: auto; text-align: right; }
.ent {
  background: transparent; color: inherit; border-radius: 3px; padding: 0 2px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  transition: background .35s var(--ease), color .35s;
}
.ent.is-on { background: var(--green-tint); color: var(--green-ink); font-weight: 500; }
.scan {
  position: absolute; left: 0; right: 0; height: 2px;
  top: calc(var(--y, 0) * 100%);
  background: var(--green); box-shadow: 0 0 14px 4px var(--green-tint), 0 0 2px var(--green);
  opacity: var(--so, 0); pointer-events: none;
}

/* extracted case panel */
.case {
  position: absolute; right: max(var(--gutter), calc(50% - 450px)); top: 50%;
  width: min(320px, 82vw);
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 16px 18px;
  transform: translate(calc((1 - var(--o, 0)) * 40px), -50%);
  opacity: var(--o, 0); will-change: opacity, transform;
  font-size: 14px;
}
.case-h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; letter-spacing: -0.01em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.case dl { margin: 12px 0 0; display: grid; gap: 8px; }
.case-row {
  display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: baseline;
  opacity: var(--o, 0); transform: translateX(calc((1 - var(--o, 0)) * 12px));
}
.case-row dt { color: var(--muted); font-size: 12px; }
.case-row dd { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.case-task {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); font-size: 12.5px;
  opacity: var(--o, 0);
}
.check { flex: none; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: var(--green);
  background-image: linear-gradient(#fff 0 0), linear-gradient(#fff 0 0);
  background-size: 6px 1.6px, 3px 1.6px; background-repeat: no-repeat;
  background-position: 6px 7px, 4px 8px; transform: rotate(-45deg); }

/* ── Plain acts ──────────────────────────────────── */
.act { padding: clamp(96px, 14vh, 160px) var(--gutter); display: grid; justify-items: center; gap: 48px; }
.act-text { max-width: 640px; text-align: center; display: grid; gap: 18px; }
.act-text p { color: var(--ink-2); font-size: clamp(1rem, 1.5vw, 1.2rem); text-wrap: pretty; }

/* board */
.board {
  width: 100%; max-width: 900px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  padding: 14px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line);
}
.col { display: grid; gap: 10px; align-content: start; }
.col-h { font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 6px; }
.card {
  display: grid; gap: 2px; padding: 12px 14px;
  background: var(--paper); border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(17,24,21,.05);
  font-size: 13.5px;
}
.card b { font-weight: 600; letter-spacing: -0.01em; }
.card span { color: var(--ink-2); }
.tag { justify-self: start; margin-top: 6px; font-style: normal; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.tag-hot { background: rgba(230, 81, 0, .12); color: #c14a00; }
.tag-date { background: var(--green-tint); color: var(--green-ink); font-family: var(--mono); }
.tag-shared { background: var(--green-tint); color: var(--green-ink); }

.deadline {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 18px 12px 12px; border-radius: 14px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
  max-width: 560px; width: 100%;
}
.cal { flex: none; width: 52px; text-align: center; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.cal-m { display: block; background: #c62828; color: #fff; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 0; }
.cal-d { display: block; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; padding: 2px 0 4px; font-variant-numeric: tabular-nums; }
.deadline-t { display: grid; gap: 2px; font-size: 14px; }
.deadline-t span { color: var(--ink-2); font-size: 13px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* invite an external lawyer */
.invite { width: 100%; max-width: 900px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; }
.inv-col { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.inv-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }
.dot-purple { background: var(--purple); }
.inv-cases { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inv-cases li { display: grid; gap: 2px; padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; }
.inv-cases b { font-weight: 600; letter-spacing: -0.01em; }
.inv-cases span { color: var(--ink-2); }
.inv-cases .is-shared { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }
.inv-cases .tag { margin-top: 6px; }
.inv-link { display: grid; gap: 6px; justify-items: center; text-align: center; }
.link-pill { font-family: var(--mono); font-size: 12px; color: var(--green-ink); background: var(--green-tint); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.inv-link small { color: var(--muted); font-size: 12px; max-width: 12em; }
.inv-access { list-style: none; margin: 0; padding: 4px 4px 0; display: grid; gap: 5px; font-size: 13px; }
.inv-access li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.inv-access li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--green);
  background-image: linear-gradient(#fff 0 0), linear-gradient(#fff 0 0); background-size: 6px 1.6px, 3px 1.6px; background-repeat: no-repeat; background-position: 6px 7px, 4px 8px; transform: rotate(-45deg); }
.inv-access li.no { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.inv-access li.no::before { background: var(--line); background-image: none; transform: none; }

/* voice */
.voice { width: 100%; max-width: 600px; display: grid; gap: 14px; align-self: center; }
.wave { display: flex; justify-content: center; align-items: center; gap: 4px; height: 44px; }
.wave i { display: block; width: 4px; border-radius: 2px; background: var(--purple); height: calc(6px + var(--h, 0) * 44px); transition: height .12s linear; }
.letter {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 18px 22px 20px;
}
.letter-meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.letter-body { font-size: 15.5px; line-height: 1.6; color: var(--ink); text-wrap: pretty; min-height: 4.8em; }
.actions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.action {
  display: grid; gap: 4px; padding: 12px 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  font-size: 14px; color: var(--ink);
  opacity: var(--o, 0); transform: translateY(calc((1 - var(--o, 0)) * 14px));
}
.act-type { justify-self: start; font-style: normal; font-size: 11px; font-weight: 500; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; }
.act-note { background: var(--green-tint); color: var(--green-ink); }
.act-task { background: rgba(102, 51, 153, .12); color: var(--purple); }
.act-case { background: rgba(230, 81, 0, .12); color: #c14a00; }
.apply { display: flex; align-items: center; gap: 14px; justify-content: center; flex-wrap: wrap; opacity: var(--o, 0); transform: translateY(calc((1 - var(--o, 0)) * 10px)); }
.apply small { color: var(--muted); font-size: 13px; }
/* the dictation stage must fit transcript + three actions + apply in one viewport */
.stage-voice .act-text { gap: 10px; }
.stage-voice h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.stage-voice .act-text p { font-size: clamp(.95rem, 1.3vw, 1.05rem); max-width: 560px; }
.stage-voice .stage-pin { grid-template-rows: auto auto; align-content: start; row-gap: 14px; }
.stage-voice .action { padding: 9px 14px; font-size: 13.5px; }
.stage-voice .letter { padding: 14px 18px 16px; }
.stage-voice .letter-body { font-size: 14.5px; min-height: 4.4em; }
.stage-voice .wave { height: 32px; }
.stage-voice .wave i { height: calc(4px + var(--h, 0) * 26px); }
.caret { display: inline-block; width: 2px; height: 1em; vertical-align: -0.15em; background: var(--green); margin-left: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* dark act */
.act-dark { background: var(--dark-bg); color: var(--dark-ink); border-radius: 28px; margin: 0 var(--gutter); padding-inline: var(--gutter); }
.act-dark .act-text p { color: var(--dark-muted); }
.facts { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 980px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.facts li { display: grid; gap: 8px; padding-top: 18px; border-top: 1px solid rgba(247, 244, 232, .18); }
.facts b { font-weight: 600; font-size: 17px; letter-spacing: -0.015em; }
.facts span { color: var(--dark-muted); font-size: 14.5px; line-height: 1.5; }

/* cta */
.act-cta { text-align: center; gap: 18px; }
.wl { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; width: 100%; max-width: 640px; margin-top: 10px; }
.wl-in {
  height: 44px; padding: 0 16px; border-radius: 999px; font: inherit; font-size: 15px;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line); min-width: 0;
  transition: border-color .2s;
}
.wl-in:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }
.wl-in::placeholder { color: var(--muted); }
.wl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-msg { grid-column: 1 / -1; min-height: 1.5em; font-size: 14px; color: var(--ink-2); }
.wl-msg.is-ok { color: var(--green-ink); font-weight: 500; }
.wl-msg.is-err { color: #c14a00; }
.wl.is-done .wl-in, .wl.is-done .btn { display: none; }
.wl.is-done .wl-msg { font-size: 17px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.act-cta h2 { max-width: 14em; }
.act-cta p { color: var(--ink-2); max-width: 34em; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px;
  padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  font-size: 13px; color: var(--muted); border-top: 1px solid var(--line);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 820px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .nav { gap: 14px; }
  .board { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 20px; }
  .case { right: auto; left: 50%; top: auto; bottom: 16px; transform: translate(-50%, calc((1 - var(--o, 0)) * 24px)); width: min(340px, calc(100vw - 32px)); }
  .doc { width: min(220px, 58vw); }
  .doc-main { font-size: 7.2px; padding: 16px 14px; }
  .captions { height: 9.5em; }
  .act-dark { margin: 0 16px; border-radius: 20px; }
  .wl { grid-template-columns: 1fr; }
  .invite { grid-template-columns: 1fr; }
  .inv-link small { max-width: none; }
}

/* ── Reduced motion ──────────────────────────────── */
/* Scroll-scrubbed stages stay: the reader drives them. Only self-running motion goes. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  .hero > * { transition: none; }
  .ent, .wave i, .btn, .nav { transition: none; }
}
