/* avouchapi.com: one stylesheet for /, /c/<token> and /u/<token>.
   Brand (sharecut-model/brand/BRAND.md): Ink #0b0b0b, Paper #f4f2ee, Signed green only for verified things, Mona Sans.
   Shape system: buttons are full pills; cards are a double bezel (outer 30px, inner 24px); inputs and small tiles 14px.
   Motion: custom curves only, UI under 300 ms, presses scale to 0.97, nothing enters from scale(0), transform/opacity only,
   hovers only where there is a real pointer, reduced motion keeps fades and drops movement. No italics anywhere. */

:root {
  --c-ink: #0b0b0b;
  --c-paper: #f4f2ee;
  --bg: #f4f2ee;
  --fg: #0b0b0b;
  --muted: #57534c;
  --card: #ffffff;
  --shell: rgba(11, 11, 11, 0.045);
  --line: rgba(11, 11, 11, 0.1);
  --green: #178a57;
  --btn-bg: #0b0b0b;
  --btn-fg: #ffffff;
  --btn-spark: #ffffff;
  --focus: #0b0b0b;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --sans: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gut: clamp(16px, 4vw, 48px);
  /* pl-magic reads these */
  --ink: var(--fg);
  --accent: var(--fg);
  --mu-sh-bg: var(--btn-bg);
  --mu-sh-ink: var(--btn-fg);
  --mu-spark: var(--btn-spark);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --fg: #f4f2ee;
    --muted: #b0aca4;
    --card: #1a1a18;
    --shell: rgba(244, 242, 238, 0.05);
    --line: rgba(244, 242, 238, 0.12);
    --green: #2bc47f;
    --btn-bg: #f4f2ee;
    --btn-fg: #0b0b0b;
    --btn-spark: #0b0b0b;
    --focus: #f4f2ee;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, .statement { text-wrap: balance; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
em, i { font-style: normal; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gut)); margin-inline: auto; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tabular { font-variant-numeric: tabular-nums; }

/* ── the wordmark: the a✓ mark drawn as a mask in currentColor, then "avouch" ── */
.wordmark { display: inline-flex; align-items: center; gap: 0.42em; font-weight: 600; font-size: 21px; letter-spacing: -0.03em; text-decoration: none; line-height: 1; }
.mark { width: 1.18em; height: 1.18em; background: currentColor; -webkit-mask: url("/assets/brand/avouch-mark.svg") center / contain no-repeat; mask: url("/assets/brand/avouch-mark.svg") center / contain no-repeat; flex: none; }

/* ── buttons: pill, button-in-button trailing circle, press feedback ── */
.btn { --h: 54px; position: relative; display: inline-flex; align-items: center; gap: 14px; height: var(--h); padding: 0 7px 0 24px; border: 0; border-radius: 999px;
  font: 500 16px/1 var(--sans); letter-spacing: -0.005em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(0.97); }
.btn-ink { background: var(--btn-bg); color: var(--btn-fg); }
.btn-paper { background: var(--c-paper); color: var(--c-ink); }
.btn-line { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; padding: 0 22px; }
.btn .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 17px; line-height: 1;
  background: color-mix(in srgb, currentColor 14%, transparent); transition: transform 200ms var(--ease-out); }
.btn > span:first-child { position: relative; z-index: 1; }
.btn.no-ic { padding: 0 24px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .btn-ink:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--btn-fg)); }
  .btn:hover .ic { transform: translate(2px, -1px); }
}
.link-quiet { color: var(--muted); text-decoration: none; transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .link-quiet:hover { color: var(--fg); } }

/* ── double bezel: an outer tray and an inner plate with concentric radii ── */
.bezel { padding: 7px; border-radius: 30px; background: var(--shell); box-shadow: inset 0 0 0 1px var(--line); }
.bezel-core { border-radius: 23px; background: var(--card); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 2px rgba(11, 11, 11, 0.04), 0 12px 40px -18px rgba(40, 32, 20, 0.18); }
@media (prefers-color-scheme: dark) { .bezel-core { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 50px -24px rgba(0, 0, 0, 0.7); } }

/* ── rise on scroll: transform only, so nothing is ever hidden (his rule) ── */
.js [data-rise] { transform: translateY(22px); transition: transform 640ms var(--ease-out); transition-delay: calc(var(--k, 0) * 60ms); }
.js [data-rise].is-in { transform: none; }

/* ── top bar ── */
.top { position: absolute; inset: 0 0 auto; z-index: 20; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top .btn { --h: 42px; font-size: 15px; padding: 0 18px; }
.top-light { color: #fff; }
.top-light .btn-line { color: #fff; }
.top-plain { position: relative; }

/* ════════════════ the company page ════════════════ */
.cinema { position: relative; min-height: 100vh; min-height: 100dvh; max-height: 980px; display: grid; align-items: end; color: #fff; background: var(--c-ink); overflow: hidden; isolation: isolate; }
.cuts { position: absolute; inset: 0; z-index: -2; }
.cuts video, .cuts img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.cuts .is-on { opacity: 1; }
.cuts [data-cut="a"] { object-position: 30% 35%; }
.cuts [data-cut="b"] { object-position: 32% 30%; }
.cuts [data-cut="c"] { object-position: 42% 30%; }
.cinema::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 11, 11, 0.5) 0%, rgba(11, 11, 11, 0) 22%, rgba(11, 11, 11, 0) 42%, rgba(11, 11, 11, 0.82) 82%, rgba(11, 11, 11, 0.92) 100%); }
.cinema .wrap { padding: 140px 0 96px; }
.cinema h1 { margin: 0; font-weight: 400; font-size: clamp(44px, 7.4vw, 104px); line-height: 0.98; letter-spacing: -0.045em; }
@media (min-width: 700px) { .cinema h1 .l2 { white-space: nowrap; } }
.cinema h1 .l2 { display: block; color: rgba(255, 255, 255, 0.62); }
.cinema .sub { margin: 26px 0 34px; max-width: 34ch; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.45; color: rgba(255, 255, 255, 0.86); }
.cinema .btn-paper .ic { background: rgba(11, 11, 11, 0.08); }

.panel { position: relative; z-index: 2; margin-top: -44px; background: var(--bg); border-radius: 44px 44px 0 0; padding: clamp(88px, 11vw, 150px) 0 0; }
.statement { margin: 0; font-weight: 300; font-size: clamp(32px, 4.6vw, 64px); line-height: 1.06; letter-spacing: -0.035em; max-width: 19ch; }
.statement .dim { color: var(--muted); }
.lede { margin: 34px 0 0; max-width: 58ch; font-size: clamp(17px, 1.4vw, 19px); color: var(--muted); }
.lede strong { color: var(--fg); font-weight: 500; }

.engine { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 7vw, 110px); align-items: center; padding: clamp(110px, 13vw, 180px) 0; }
.engine h2, .rules h2, .founder h2, .claim h2, .takes-head h2 { margin: 0; font-weight: 400; font-size: clamp(30px, 3.6vw, 50px); line-height: 1.04; letter-spacing: -0.035em; }
.engine p { margin: 22px 0 0; max-width: 46ch; color: var(--muted); }
.reel { position: relative; aspect-ratio: 4 / 5; border-radius: 23px; overflow: hidden; background: var(--c-ink); }
.reel video, .reel img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }

.rules { padding: 0 0 clamp(110px, 13vw, 180px); }
.rules dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 6vw, 96px); margin: 52px 0 0; }
.rules dl > div { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.rules dt { font-weight: 500; font-size: 20px; letter-spacing: -0.015em; }
.rules dd { margin: 8px 0 0; color: var(--muted); max-width: 40ch; }

.founder { padding: clamp(80px, 10vw, 130px) 0; border-top: 1px solid var(--line); }
.founder .bezel { max-width: 860px; }
.founder .bezel-core { padding: clamp(32px, 5vw, 64px); }
.founder p { margin: 20px 0 30px; max-width: 54ch; color: var(--muted); }
.founder .addr { display: block; margin-top: 16px; font-size: 15px; color: var(--muted); }

.foot { padding: 44px 0 56px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot .wrap { display: grid; grid-template-columns: auto 1fr; gap: 18px 40px; align-items: start; }
.foot .wordmark { color: var(--fg); font-size: 18px; }
.foot .meta { justify-self: end; text-align: right; }
.foot p { margin: 0; }
.foot .credit { grid-column: 1 / -1; font-size: 13px; }
.foot a { color: inherit; }

/* ════════════════ the personal page /c/<token> ════════════════ */
.c-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 96px); align-items: center; padding: clamp(28px, 6vw, 72px) 0 clamp(90px, 11vw, 150px); }
.hey { margin: 0 0 18px; font-size: clamp(18px, 1.6vw, 21px); font-weight: 500; letter-spacing: -0.01em; color: var(--muted); }
.hey b { color: var(--fg); font-weight: 600; }
.c-hero h1 { margin: 0; font-weight: 400; font-size: clamp(42px, 6vw, 84px); line-height: 0.98; letter-spacing: -0.045em; max-width: 11ch; }
.c-hero .sub { margin: 24px 0 34px; max-width: 36ch; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); }

/* the before/after figure */
.ba { margin: 0; }
.ba .bezel-core { overflow: hidden; }
.ba .bezel-core { padding: clamp(18px, 2.4vw, 28px); }
.ba-grid { display: grid; grid-template-columns: 78px auto minmax(0, 1fr); gap: 16px; align-items: center; }
.ba-col-label { white-space: nowrap; margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.ba-takes { display: grid; gap: 10px; }
.ba-take { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--fg) 7%, var(--card)); display: grid; place-items: end start; padding: 7px; }
.ba-take span { font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.ba-take video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-arrow { color: var(--muted); font-size: 20px; }
.phone { position: relative; width: min(100%, 250px); aspect-ratio: 9 / 19.5; margin-inline: auto; border-radius: 38px; padding: 9px; background: #0b0b0b; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 26px 60px -26px rgba(20, 16, 10, 0.55); }
.phone-screen { position: relative; height: 100%; border-radius: 30px; overflow: hidden; background: #161614; color: #f4f2ee; display: grid; align-content: end; padding: 22px 18px; }
.phone-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone-screen .ph-handle { font-size: clamp(19px, 2vw, 24px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-screen .ph-handle.is-long { font-size: clamp(15px, 1.5vw, 18px); }
.phone-screen .ph-handle.is-xlong { font-size: 13px; }
.phone-screen .ph-sub { margin-top: 6px; font-size: 13px; color: rgba(244, 242, 238, 0.62); }
.phone-screen .ph-lines { position: absolute; inset: 22px 18px auto; display: grid; gap: 8px; }
.phone-screen .ph-lines i { display: block; height: 6px; border-radius: 3px; background: rgba(244, 242, 238, 0.09); }
.phone-screen .ph-lines i:nth-child(1) { width: 38%; }
.phone-screen .ph-lines i:nth-child(2) { width: 62%; }
.ba-note { margin: 16px 4px 0; font-size: 13.5px; color: var(--muted); }

/* the three takes */
.takes { padding: clamp(90px, 11vw, 150px) 0; border-top: 1px solid var(--line); }
.takes-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.takes-head { position: sticky; top: 32px; }
.takes-head p { margin: 20px 0 0; color: var(--muted); max-width: 40ch; }
.slots { display: grid; gap: 14px; }
.slot { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 16px 16px 16px; border-radius: 23px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: transform 160ms var(--ease-out), box-shadow 200ms ease; -webkit-tap-highlight-color: transparent; }
.slot:active { transform: scale(0.985); }
.slot:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
.slot input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.slot-thumb { position: relative; width: 64px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--fg) 7%, var(--card)); }
.slot-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot-thumb .plus { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 300; color: var(--muted); }
.slot.has-file .plus { display: none; }
.slot .slot-title { display: block; margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.015em; }
.slot .hint { display: block; margin: 4px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.slot .file { display: block; margin: 8px 0 0; font-size: 13.5px; color: var(--fg); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .file:empty { display: none; }
.slot .err { display: block; margin: 6px 0 0; font-size: 13.5px; color: #b42318; }
.slot .err:empty { display: none; }
.slot .pick { font-size: 14px; font-weight: 500; padding: 9px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.slot.has-file .pick { color: var(--muted); }
@media (prefers-color-scheme: dark) { .slot .err, .form-err { color: #ff8a7a; } }

.form-rest { display: grid; gap: 18px; margin-top: 26px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; }
.field input { height: 54px; border-radius: 14px; border: 0; padding: 0 16px; font: 400 17px var(--sans); color: var(--fg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.field input::placeholder { color: color-mix(in srgb, var(--muted) 85%, transparent); }
.field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.field .help { font-size: 13.5px; color: var(--muted); }
.tick { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 15.5px; line-height: 1.45; cursor: pointer; }
.tick input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--fg); cursor: pointer; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 8px; }
.small { font-size: 13.5px; color: var(--muted); max-width: 46ch; margin: 0; }
.form-err { margin: 0; font-size: 14.5px; color: #b42318; }
.form-err:empty { display: none; }

.done { display: none; }
.is-done .done { display: block; }
.is-done form { display: none; }
.done .bezel-core { padding: clamp(28px, 4vw, 44px); }
.done h3 { margin: 0; font-size: clamp(26px, 2.6vw, 34px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; }
.done p { margin: 14px 0 0; color: var(--muted); max-width: 46ch; }
.done .bezel { opacity: 1; transform: none; transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
@starting-style { .is-done .done .bezel { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* the claim: an ink card on the paper page (no section flip) */
.claim { padding: 0 0 clamp(90px, 11vw, 140px); }
.claim .bezel { background: color-mix(in srgb, var(--c-ink) 6%, transparent); }
.claim .bezel-core { background: var(--c-ink); color: var(--c-paper); padding: clamp(32px, 5.5vw, 72px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 48px; align-items: end; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.claim p { margin: 18px 0 0; max-width: 50ch; color: rgba(244, 242, 238, 0.72); }
.claim .spots { margin-top: 22px; font-size: 15px; color: rgba(244, 242, 238, 0.88); font-variant-numeric: tabular-nums; }
.claim .spots:empty { display: none; }
@media (prefers-color-scheme: dark) { .claim .bezel-core { background: #050505; box-shadow: inset 0 0 0 1px rgba(244, 242, 238, 0.1); } }

.c-foot .wrap { grid-template-columns: auto 1fr; }

/* ════════════════ the one-card pages (/u/<token>, 404) ════════════════ */
.solo { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.solo-card { width: min(520px, 100%); }
.solo-card .bezel-core { padding: clamp(28px, 6vw, 44px); }
.solo-card .wordmark { margin-bottom: 34px; font-size: 19px; }
.solo-h { margin: 0; font-weight: 400; font-size: clamp(28px, 6vw, 36px); line-height: 1.08; letter-spacing: -0.03em; }
.solo-p { margin: 14px 0 28px; color: var(--muted); }
.solo form { margin: 0; }

/* ════════════════ phones ════════════════ */
@media (max-width: 860px) {
  .engine, .c-hero, .takes-grid { grid-template-columns: minmax(0, 1fr); }
  .takes-head { position: static; }
  .claim .bezel-core { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .reel { aspect-ratio: 4 / 5; max-width: 520px; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .top .wrap { height: 64px; }
  .top nav { gap: 14px; }
  .top nav .hide-sm { display: none; }
  .cinema .wrap { padding: 120px 0 84px; }
  .cinema .sub { margin: 20px 0 28px; }
  .panel { border-radius: 30px 30px 0 0; margin-top: -30px; }
  .rules dl { grid-template-columns: minmax(0, 1fr); }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .foot .meta { justify-self: start; text-align: left; }
  .ba .bezel-core { padding: 16px; }
  .ba-grid { grid-template-columns: 54px 14px minmax(0, 1fr); gap: 10px; }
  .ba-arrow { font-size: 16px; }
  .phone { width: 100%; max-width: 230px; border-radius: 32px; padding: 7px; }
  .phone-screen { padding: 18px 14px; }
  .phone-screen .ph-sub { font-size: 12px; }
  .phone-screen { border-radius: 26px; }
  .slot { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .slot-thumb { width: 56px; }
  .slot .pick { grid-column: 2; justify-self: start; margin-top: 2px; }
  .btn { --h: 52px; }
  .submit-row .btn { width: 100%; justify-content: space-between; }
}

/* ════════════════ reduced motion: fades stay, movement goes ════════════════ */
@media (prefers-reduced-motion: reduce) {
  .js [data-rise] { transform: none; transition: none; }
  .btn, .slot { transition: background-color 200ms ease, color 200ms ease; }
  .btn:active, .slot:active { transform: none; }
  .btn .ic { transition: none; }
  @media (hover: hover) and (pointer: fine) { .btn:hover .ic { transform: none; } }
  .done .bezel { transition: opacity 200ms ease; }
  @starting-style { .is-done .done .bezel { transform: none; } }
}

/* small helpers (no inline styles: the CSP forbids them) */
[data-k="1"] { --k: 1; }
[data-k="2"] { --k: 2; }
.bezel-core.tight { padding: 7px; }
.foot .tag { margin-top: 12px; }
.nav-link { color: inherit; text-decoration: none; opacity: 0.86; transition: opacity 160ms ease; }
@media (hover: hover) and (pointer: fine) { .nav-link:hover { opacity: 1; } }
