/* Ad2Sway — design system v2
   Editorial press × studio telemetry.
   Paper and ink, one signal red, real scale, full-bleed dark bands, numbered
   index rows, and motion with weight. Self-contained: no framework, no CDN CSS. */

:root {
  /* colour */
  --paper: #f3efe6;
  --paper-2: #eae4d7;
  --panel: #e7e0d1;
  --panel-2: #ddd5c3;
  --ink: #12100e;
  --ink-2: #2a2621;
  --muted: #5e574c;
  --muted-2: #857c6c;
  --line: #d8d0bf;
  --line-strong: #c2b8a3;
  --accent: #e0301e;
  --accent-deep: #b7230f;
  --accent-text: #b7230f; /* 5.6:1 on paper — for accent-coloured text, not fills */
  --olive: #3a4430;
  --amber: #b26a00;
  --live: #2f6f4e;
  --fail: #c0281c;

  /* On-dark ink: dark bands use #12100e. These are the only text/control
     colours allowed there — the paper-tone variables above disappear on black. */
  --on-dark: #f5f1e8;
  --on-dark-muted: #cbc3b3;
  --on-dark-accent: #ff7b5c; /* 7.4:1 on #12100e */

  /* type */
  --serif: "Fraunces", "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* space — 1-4-9 rhythm */
  --u: 4px;
  --s1: 8px;
  --s2: 16px;
  --s3: 36px;
  --s4: 72px;
  --s5: 144px;

  --radius: 2px;
  --measure: 68ch;
  --wrap: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 260ms var(--ease);
  --t-fast: 160ms var(--ease);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.08rem);
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 80% at 80% -10%, rgba(224, 48, 30, 0.07), transparent 60%),
    radial-gradient(90% 60% at 8% 0%, rgba(58, 68, 48, 0.07), transparent 55%),
    linear-gradient(90deg, rgba(18, 16, 14, 0.022) 1px, transparent 1px);
  background-size: auto, auto, 96px 100%;
  background-position: 0 0, 0 0, 50% 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before { /* paper grain, above the wash, below content */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  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='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

img, video, svg { max-width: 100%; display: block; }
img, video { height: auto; }

[id] { scroll-margin-top: 96px; }

a { color: inherit; text-decoration: none; }
a.link { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a.link:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

/* ---------------------------------------------------------------- type */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 20, "WONK" 1;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 1.5rem + 5vw, 5.6rem); line-height: 0.94; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.4rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); letter-spacing: -0.01em; }
p { margin: 0 0 var(--s2); }

.display { font-family: var(--serif); font-weight: 500; line-height: 0.92; letter-spacing: -0.04em; }
.hero-type { font-size: clamp(2.8rem, 1.4rem + 6.6vw, 7rem); line-height: 0.9; letter-spacing: -0.04em; }
.lede { font-size: clamp(1.12rem, 1.02rem + 0.65vw, 1.5rem); color: var(--ink-2); line-height: 1.5; max-width: 62ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-text);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.6; }
.mono { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.01em; }
.muted { color: var(--muted); }
.measure { max-width: var(--measure); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* links that draw their underline */
.link-draw { position: relative; }
.link-draw::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 320ms var(--ease);
}
.link-draw:hover::after, .link-draw:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 5vw, 56px); }
.section { padding-block: clamp(56px, 8vw, 120px); position: relative; z-index: 1; }
.section--tight { padding-block: clamp(32px, 4.5vw, 64px); }
.stack > * + * { margin-top: var(--s3); }

.grid { display: grid; gap: var(--s3); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* asymmetric editorial split */
.split { display: grid; gap: var(--s3); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: var(--s4); } .split--rev { grid-template-columns: 7fr 5fr; } }

.rule { border: 0; border-top: 1px solid var(--line); margin: var(--s3) 0; }
.rule--heavy { border-top: 1px solid var(--ink); }
.rule-draw { transform-origin: left; }
.js .rule-draw { transform: scaleX(0); transition: transform 900ms var(--ease); }
.js .rule-draw.in { transform: scaleX(1); }

/* ---------------------------------------------------------------- dark band */
.band { background: var(--ink); color: #f3efe6; }
.band .muted { color: #b3aa99; }
.band .eyebrow { color: #ff6b4a; }
.band .rule { border-color: #2e2a25; }
.band .rule--heavy { border-color: #f3efe6; }
.band .card { background: #1b1815; border-color: #2e2a25; }
.band .tag, .band .pill { border-color: #3a352f; color: #cfc7b7; }
.band .lede { color: #ded6c7; }
.band::selection, .band *::selection { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- header/nav */
.scroll-progress {
  position: fixed; inset: 0 auto auto 0; height: 2px; width: 100%; z-index: 90;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 80ms linear;
}
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t);
}
.site-header.scrolled { box-shadow: 0 8px 28px rgba(18, 16, 14, 0.07); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding-block: 14px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark {
  width: 30px; height: 30px; border-radius: var(--radius);
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 1rem;
  transition: transform var(--t), background var(--t);
}
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.06); background: var(--accent); }
.brand__name { font-family: var(--serif); font-size: 1.24rem; font-weight: 600; letter-spacing: -0.02em; }

.nav-links { display: none; align-items: center; gap: clamp(12px, 1.5vw, 24px); }
.nav-links > a, .nav-links > form, .nav-links .btn, .nav-links .pill { white-space: nowrap; }
.nav-links a:not(.btn) {
  position: relative; font-size: 0.95rem; color: var(--ink-2); padding-block: 6px;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform 300ms var(--ease);
}
.nav-links a:not(.btn):hover::after, .nav-links a:not(.btn):focus-visible::after { transform: scaleX(1); transform-origin: left; }
@media (min-width: 1080px) { .nav-links { display: flex; } .nav .hamburger { display: none; } }

.hamburger {
  appearance: none; background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius); width: 46px; height: 46px;
  display: grid; place-items: center; gap: 5px; cursor: pointer; z-index: 95;
}
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform var(--t), opacity var(--t); }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(340px, 86vw); z-index: 93;
  background: var(--paper); border-left: 1px solid var(--line);
  padding: 96px var(--s3) var(--s3);
  transform: translateX(102%); transition: transform 320ms var(--ease);
  display: flex; flex-direction: column; gap: var(--s2); overflow-y: auto;
}
.drawer.open { transform: translateX(0); box-shadow: -30px 0 80px rgba(18, 16, 14, 0.16); }
.drawer a { font-family: var(--serif); font-size: 1.35rem; letter-spacing: -0.01em; }
.scrim { position: fixed; inset: 0; background: rgba(18, 16, 14, 0.38); z-index: 92; opacity: 0; pointer-events: none; transition: opacity var(--t); }
.scrim.open { opacity: 1; pointer-events: auto; }

/* ---------------------------------------------------------------- buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 13px 22px; border-radius: var(--radius);
  font-family: var(--sans); font-weight: 500; font-size: 0.95rem; letter-spacing: 0.01em;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer; overflow: hidden; isolation: isolate;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn::after { /* sheen sweep */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.16) 50%, transparent 80%);
  transform: translateX(-120%); transition: transform 700ms var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(18, 16, 14, 0.18); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(18, 16, 14, 0.16); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); box-shadow: 0 12px 34px rgba(224, 48, 30, 0.28); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: color-mix(in srgb, var(--panel) 70%, transparent); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn .arrow { transition: transform var(--t); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------------------------------------------------------------- cards/panels */
.card {
  background: color-mix(in srgb, var(--paper) 62%, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s3);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.card--panel { background: var(--panel); }
.card--flush { padding: 0; overflow: auto; }
.card--lift:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 18px 40px rgba(18, 16, 14, 0.08); }
/* Retention nudge modifiers */
.card--ready { border-color: var(--live); }
.card--ready .card__kicker::before { background: var(--live); }
.card--low { border-color: var(--amber); }
.card--low .card__kicker::before { background: var(--amber); }
.card__kicker {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 8px;
}
.card__kicker::before { content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }

/* ---------------------------------------------------------------- numbered index rows */
.index { border-top: 1px solid var(--line-strong); }
.index__row {
  display: grid; grid-template-columns: 48px 1fr; gap: var(--s2);
  align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line);
  transition: background var(--t), padding-left var(--t);
}
.index__row:hover { background: linear-gradient(90deg, rgba(224, 48, 30, 0.055), transparent 70%); padding-left: 10px; }
.index__n { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; color: var(--accent-text); }
.index__title { font-family: var(--serif); font-size: clamp(1.15rem, 1rem + 0.7vw, 1.6rem); letter-spacing: -0.01em; }
.index__body { color: var(--muted); margin-top: 6px; max-width: 56ch; }

/* ---------------------------------------------------------------- marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 16px; position: relative; z-index: 1; }
.marquee__track { display: flex; gap: 40px; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 40px; white-space: nowrap;
}
.marquee__item::after { content: "·"; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th, .table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: color-mix(in srgb, var(--panel) 55%, transparent); }
.table .num { font-family: var(--mono); }

/* ---------------------------------------------------------------- forms */
.field { display: block; }
.field > span { display: block; font-size: 0.8rem; letter-spacing: 0.02em; color: var(--muted); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(224, 48, 30, 0.14); transform: translateY(-1px); }
textarea.input { min-height: 128px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: var(--s2); }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------------------------------------------------------------- pills/badges */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted);
  background: transparent; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--live { color: var(--live); border-color: color-mix(in srgb, var(--live) 35%, transparent); }
.pill--queued { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 38%, transparent); }
.pill--fail { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 35%, transparent); }
.pill--plain::before { display: none; }
.tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }

/* ---------------------------------------------------------------- flash + toast */
.flash {
  border: 1px solid var(--line-strong); border-left-width: 3px; border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: var(--s2); font-size: 0.93rem;
  animation: flash-in 320ms var(--ease) both;
}
.flash--error { border-left-color: var(--fail); background: color-mix(in srgb, var(--fail) 6%, transparent); }
.flash--warn { border-left-color: var(--amber); background: color-mix(in srgb, var(--amber) 7%, transparent); }
.flash--ok { border-left-color: var(--live); background: color-mix(in srgb, var(--live) 6%, transparent); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- hero */
.hero { padding-block: clamp(48px, 8vw, 112px) clamp(32px, 5vw, 72px); position: relative; z-index: 1; }
.hero__inner { display: grid; gap: var(--s4); align-items: center; }
@media (min-width: 960px) { .hero__inner { grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 72px); } }
.hero h1 { margin-bottom: var(--s3); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: var(--s3); }
.hero__note { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: 14px; }

.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--line); }
.hero__meta span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.hero__meta span::before { content: ""; width: 5px; height: 5px; background: var(--live); border-radius: 50%; }

/* console panel */
.console { background: var(--ink); color: #efe9dd; border-radius: var(--radius); padding: var(--s3); border: 1px solid var(--ink); box-shadow: 0 24px 60px rgba(18, 16, 14, 0.18); }
.console__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); padding: 13px 0; border-bottom: 1px solid rgba(243, 239, 230, 0.14); }
.console__row:last-child { border-bottom: 0; }
.console__step { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #b8b1a3; }
.console__val { font-family: var(--serif); font-size: 1.06rem; color: #f3efe6; text-align: right; }
.console__bar { height: 3px; background: rgba(243, 239, 230, 0.14); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.console__bar > i { display: block; height: 100%; width: 100%; background: var(--accent); }
.js .console__bar > i { width: 0; transition: width 1200ms var(--ease); }
.js .console.in .console__bar > i { width: 100%; }

/* ---------------------------------------------------------------- stats */
.stats { display: grid; gap: var(--s2); grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); }
@media (min-width: 820px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .stat { border-bottom: 0; border-right: 1px solid var(--line); padding-right: var(--s2); } .stat:last-child { border-right: 0; } }
.stat__num { font-family: var(--serif); font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.2rem); line-height: 0.9; letter-spacing: -0.04em; }
.stat__label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }

/* steps */
.step { display: grid; grid-template-columns: auto 1fr; gap: var(--s2); align-items: start; padding-block: var(--s2); border-bottom: 1px solid var(--line); }
.step__n { font-family: var(--mono); font-size: 0.74rem; color: var(--accent); padding-top: 6px; }

/* pull quote */
.quote { font-family: var(--serif); font-size: clamp(1.6rem, 1.1rem + 2.2vw, 3rem); line-height: 1.08; letter-spacing: -0.03em; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--s4); padding-block: var(--s3) var(--s2); position: relative; z-index: 1; }
.site-footer .cols { display: grid; gap: var(--s3); }
@media (min-width: 720px) { .site-footer .cols { grid-template-columns: 2fr repeat(3, 1fr); } }
.site-footer a { color: var(--muted); font-size: 0.9rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer .fine { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); line-height: 1.7; }
.site-footer .legal-fine { max-width: 92ch; margin-top: var(--s3); }

/* ---------------------------------------------------------------- media */
.media-grid { display: grid; gap: var(--s2); grid-template-columns: 1fr; }
@media (min-width: 620px) { .media-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .media-grid { grid-template-columns: repeat(3, 1fr); } }
.media { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.media:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(18, 16, 14, 0.1); border-color: var(--line-strong); }
.media__img { aspect-ratio: 9 / 16; width: 100%; object-fit: cover; background: var(--panel); transition: transform 600ms var(--ease); }
.media:hover .media__img { transform: scale(1.015); }
.media__img--16x9 { aspect-ratio: 16 / 9; }
.media__img--9x16 { aspect-ratio: 9 / 16; width: auto; height: auto; max-width: 100%; max-height: 720px; margin-inline: auto; background: var(--ink); }

/* the real thing: the brief beside the ad it produced */
.proof { display: grid; gap: var(--s2); align-items: start; }
@media (min-width: 700px) { .proof { grid-template-columns: 1.35fr 1fr; } }
.proof__brief {
  border-left: 2px solid var(--accent); padding: 4px 0 4px var(--s2);
  font-family: var(--serif); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.4; color: var(--ink-2);
}
.media__meta { padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; font-size: 0.78rem; }

/* ---------------------------------------------------------------- workflow canvas */
/* The rail replaced the old six-up node grid; the canvas stays for the storyboard. */

/* skeletons */
.skeleton {
  border-radius: var(--radius); min-height: 12px;
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 37%, var(--panel) 63%);
  background-size: 400% 100%; animation: shimmer 1.5s var(--ease) infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------------------------------------------------------------- motion */
/* Enhancement only: without JS the `.js` class is absent, so everything renders. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 760ms var(--ease), transform 760ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-delay="80"] { transition-delay: 80ms; }
.js .reveal[data-delay="120"] { transition-delay: 120ms; }
.js .reveal[data-delay="160"] { transition-delay: 160ms; }
.js .reveal[data-delay="240"] { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .rule-draw { transform: none; transition: none; }
  .js .console__bar > i { width: 100%; transition: none; }
  .marquee__track { animation: none; }
  .btn:hover, .media:hover, .card--lift:hover, .flow__node:hover { transform: none; }
  .btn::after { display: none; }
  .skeleton { animation: none; }
}

/* utilities */
.flex { display: flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.wrap-gap { flex-wrap: wrap; gap: var(--s2); }
.gap-2 { gap: var(--s2); }
.mt-1 { margin-top: var(--s1); }
.mt-2 { margin-top: var(--s2); }
.mt-3 { margin-top: var(--s3); }
.mt-4 { margin-top: var(--s4); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.article { max-width: var(--measure); }
.article h2 { margin-top: var(--s4); }
.article h3 { margin-top: var(--s3); }

/* ---------------------------------------------------------------- v2 refinements
   Fixes from the first visual pass: console mass vs headline, band presence,
   proof-section scale, table density, FAQ affordance. */

.console {
  display: flex; flex-direction: column;
  padding: clamp(22px, 2.4vw, 34px);
}
.console__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding-bottom: var(--s2); border-bottom: 1px solid rgba(243, 239, 230, 0.18); }
.console__body { display: flex; flex-direction: column; }
.console__row { flex: 0 0 auto; padding: 16px 0; }
.console__val { font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.3rem); }
.console__foot { padding-top: var(--s2); border-top: 1px solid rgba(243, 239, 230, 0.18); display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.console__foot .console__val { color: var(--accent); }

.band.section { padding-block: clamp(76px, 9vw, 148px); }
.band .stat__label { color: #cbc3b3; font-size: 0.76rem; }
.band .stat { border-color: #2e2a25; }
.band .stats { border-top-color: #f3efe6; }
.stat__num { font-size: clamp(2.8rem, 1.8rem + 3.8vw, 4.6rem); }

.table { font-size: 0.98rem; }
.table th, .table td { padding: 16px 18px; }
.table tbody td:first-child { padding-right: 28px; }
.table .num { color: var(--ink); font-weight: 500; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--paper) 62%, #fff); padding: 6px 14px; }

details > summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: var(--s2); align-items: baseline; cursor: pointer; padding: 20px 0; font-family: var(--serif); font-size: 1.2rem; transition: color var(--t-fast); }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; font-family: var(--mono); font-size: 1.15rem; color: var(--accent); transition: transform 280ms var(--ease); }
details[open] > summary::after { transform: rotate(45deg); }
details > summary:hover { color: var(--accent); }

.media-feature { display: grid; gap: var(--s2); }
@media (min-width: 900px) { .media-feature { grid-template-columns: 4fr 8fr; align-items: start; } }
.media-feature .media__img--tall { aspect-ratio: 9 / 16; max-height: 520px; }
.media-feature--stack { grid-template-columns: 1fr; }

.hero__inner { align-items: center; }
.hero__right { display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 960px) { .hero__inner { grid-template-columns: 7fr 5fr; } }
.hero-type { font-size: clamp(2.5rem, 1.5rem + 4.6vw, 5.3rem); }
.lede { font-size: clamp(1.1rem, 1rem + 0.55vw, 1.34rem); }

.items-baseline { align-items: baseline; }
.items-end { align-items: flex-end; }

/* breadcrumb links are small text; give them a real hit area on touch */
nav[aria-label="Breadcrumb"] a { display: inline-block; padding-block: 8px; }
@media (pointer: coarse) { nav[aria-label="Breadcrumb"] a { padding-block: 12px; } }

/* ---------------------------------------------------------------- stages
   The whole pipeline in four plain steps, with the real work shown inside the
   step it belongs to. Used on the landing, the dashboard, the campaign page,
   the workflow tracker and the storyboard so the story never changes shape. */

.stages { display: grid; gap: var(--s2); list-style: none; margin: 0; padding: 0; }
@media (min-width: 900px) { .stages { grid-template-columns: repeat(4, 1fr); gap: 28px; } }

.stage {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s2); background: color-mix(in srgb, var(--paper) 62%, #fff);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.stage:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 14px 30px rgba(18, 16, 14, 0.07); }
.stage--done { border-color: color-mix(in srgb, var(--live) 35%, var(--line)); background: color-mix(in srgb, var(--live) 5%, #fff); }
.stage--now { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 48, 30, 0.1); }
.stage--waiting { border-color: var(--accent); border-width: 2px; background: color-mix(in srgb, var(--accent) 4%, #fff); }
.stage--next { opacity: 0.8; }
.stage--next:hover { opacity: 1; }
.stage__link { display: inline-block; margin-top: 4px; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.stage__link:hover { color: var(--accent-text); }

.stage__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.stage__n { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--muted); }
.stage__status { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stage--done .stage__status { color: var(--live); }
.stage--now .stage__status, .stage--waiting .stage__status { color: var(--accent-text); }
.stage__title { font-family: var(--serif); font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem); letter-spacing: -0.01em; }
.stage__line { color: var(--muted); font-size: 0.88rem; margin: 0; }
.stage--now .stage__line, .stage--waiting .stage__line { color: var(--ink-2); }
.stage__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.stage__action { margin-top: 4px; }
.stage__note { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }

/* four-dot position marker for campaign rows */
.dots { display: inline-flex; gap: 4px; align-items: center; }
.dots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.dots i.on { background: var(--live); }
.dots i.here { background: var(--accent); }

.stage__pieces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stage__piece { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); aspect-ratio: 9 / 16; position: relative; }
.stage__piece img, .stage__piece video { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage__piece--file { display: grid; place-items: center; font-family: var(--mono); font-size: 0.62rem; color: var(--muted); text-align: center; padding: 4px; }

@media (min-width: 900px) {
  .stages .stage:not(:last-child)::after {
    content: "\2192"; position: absolute; right: -22px; top: 50%;
    transform: translateY(-50%); color: var(--muted);
    font-size: 1.05rem; line-height: 1;
  }
  .stage--done:not(:last-child)::after { color: var(--live); }
}

/* on narrow screens the four stages read top to bottom, so draw the thread down */
@media (max-width: 899px) {
  .stages { position: relative; }
  .stages .stage:not(:last-child)::after {
    content: ""; position: absolute; left: 26px; bottom: -14px; height: 12px; width: 1px;
    background: var(--line-strong);
  }
}

@media (prefers-reduced-motion: reduce) { .stage:hover { transform: none; } }
/* ---------------------------------------------------------------- live panel
   While work is running, say what it is doing and how long it has been going. */

.live {
  border: 1px solid var(--line-strong); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 14px 16px; margin-top: var(--s2);
  background: color-mix(in srgb, var(--accent) 4%, #fff);
}
.live__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .live__dot { animation: live-breathe 1.8s var(--ease) infinite; }
}
@keyframes live-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.live__headline { font-family: var(--serif); font-size: 1.05rem; }
.live__time { margin-left: auto; font-size: 0.74rem; }
.live__pieces { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
@media (min-width: 700px) { .live__pieces { grid-template-columns: repeat(2, 1fr); } }
.live__piece { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.live__piece i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); display: block; flex: 0 0 auto; }
.live__piece--ready { color: var(--ink-2); }
.live__piece--ready i { background: var(--live); }
.live__piece--making i { background: var(--accent); }
.live__events { list-style: none; margin: 12px 0 0; padding: 0; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.live__events li { padding: 4px 0; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- the conversation
   The studio asks, you answer, the plan changes. Not a form with fixed fields. */

.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.thread__said {
  border-left: 2px solid var(--line-strong); padding-left: 10px;
  font-size: 0.88rem; color: var(--ink-2);
}
.ask {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 14px 16px; background: color-mix(in srgb, var(--paper) 55%, #fff);
}
.ask__q { font-family: var(--serif); font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem); margin: 0 0 6px; }
.ask__why { color: var(--muted); font-size: 0.88rem; margin: 0 0 10px; }
.filelist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.filelist:empty { display: none; }
.filelist li { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--muted); }
.filelist img { width: 42px; height: 42px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); }

/* progress meter for the four-stage tracker */
.meter { border-top: 1px solid var(--line-strong); padding-top: 12px; }
.meter__bar { height: 4px; background: var(--panel-2); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.meter__bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 900ms var(--ease); }

.facts { margin: 0; display: grid; gap: 8px; }
.facts > div { display: flex; justify-content: space-between; gap: var(--s2); align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { margin: 0; font-size: 0.76rem; }
.facts dd { margin: 0; font-weight: 500; }


/* ---------------------------------------------------------------- quality slider
   One control for every ad: the picture gets better, the idea does not change. */
.quality-slider {
  width: 100%; margin: 10px 0 6px; accent-color: var(--accent);
  appearance: none; height: 4px; border-radius: 999px;
  background: linear-gradient(to right, var(--line-strong), var(--ink));
}
.quality-slider::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); cursor: grab;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.18);
}
.quality-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); cursor: grab;
}
.quality-scale {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em;
}
.quality-scale [data-tier-stop].is-current { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- responsive fixes
   Keep the off-canvas drawer from widening the document, let grid children
   shrink around embeds, and turn dense tables into labelled cards on phones. */

html, body { overflow-x: clip; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }

.drawer {
  visibility: hidden;
  transition: transform 320ms var(--ease), visibility 0s linear 320ms;
}
.drawer.open {
  visibility: visible;
  transition: transform 320ms var(--ease), visibility 0s linear 0s;
}

.grid > *, .card, .paypal-slot { min-width: 0; }
.paypal-slot, .paypal-slot iframe, .paypal-slot > div { max-width: 100%; }

@media (max-width: 560px) {
  .grid-4--buy { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .table--stack { border-collapse: separate; border-spacing: 0; }
  .table--stack thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td {
    display: block; width: 100%;
  }
  .table--stack tr {
    border: 1px solid var(--line); border-radius: var(--radius);
    background: color-mix(in srgb, var(--paper) 55%, #fff);
    padding: 6px 14px; margin: 0 0 10px;
  }
  .table--stack tr:last-child { margin-bottom: 0; }
  .table--stack td {
    display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 12px; align-items: start; text-align: left;
    padding: 8px 0; border-bottom: 1px solid var(--hairline);
  }
  .table--stack td:last-child { border-bottom: 0; }
  .table--stack td::before {
    content: attr(data-label);
    font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted); padding-top: 3px;
  }
  .table--stack td[data-label=""]::before,
  .table--stack td[colspan]::before { display: none; }
  .table--stack td[data-label=""],
  .table--stack td[colspan] { display: block; text-align: left; }
  .table--stack td[data-label=""] { padding: 2px 0 8px; }
  .table--stack .paypal-slot { margin-top: 0; }
  .table--stack .btn { width: auto; }
}

/* Four credit packs need room for the PayPal button; use two columns on
   tablets and only go four-across on wide desktops. */
.grid-4--buy { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1200px) { .grid-4--buy { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .grid-4--buy { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- tier picker
   Three real, clickable quality cards. The radio stays accessible underneath. */
.tier-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.tier-choice { display: block; cursor: pointer; }
.tier-choice__body {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper) 55%, #fff);
  padding: 16px; transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.tier-choice:hover .tier-choice__body { border-color: var(--ink); transform: translateY(-2px); }
.tier-choice input:checked + .tier-choice__body {
  border: 2px solid var(--ink); padding: 15px;
  box-shadow: 0 10px 28px rgba(18, 16, 14, 0.08);
}
.tier-choice input:focus-visible + .tier-choice__body {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.tier-choice__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tier-choice__name { font-family: var(--serif); font-size: 1.22rem; letter-spacing: -0.01em; }
.tier-choice__quality {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.tier-choice__price { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2); }
.tier-choice__price strong { font-size: 1.35rem; color: var(--ink); }
.tier-choice__price small { display: block; font-size: 0.68rem; color: var(--muted); margin-top: 2px; }
.tier-choice__meta { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); line-height: 1.5; margin-top: auto; }
@media (max-width: 720px) { .tier-picker { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- legal + cookies
   Legal pages stay readable at long-form lengths; the cookie bar is a notice,
   not a modal, so it never blocks the page or the buy buttons. */
.terms-check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--ink-2); line-height: 1.5; }
.terms-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: 0 0 auto; }
.terms-check a { color: var(--accent-text); text-decoration: underline; }

.legal { max-width: 78ch; margin-inline: auto; }
.legal h2 { margin-top: 2.2rem; font-size: 1.35rem; }
.legal h3 { margin-top: 1.4rem; font-size: 1.05rem; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.75; }
.legal p { margin-top: 12px; }
.legal ul, .legal ol { margin-top: 10px; padding-left: 22px; }
.legal li { margin-top: 6px; }
.legal .fine { color: var(--muted); }

.cookie-bar { position: fixed; inset: auto 0 0 0; z-index: 80; background: var(--ink); color: var(--paper); border-top: 3px solid var(--accent); box-shadow: 0 -10px 30px rgba(18, 16, 14, .18); }
.cookie-bar[hidden] { display: none; }
.cookie-bar__inner { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-block: 12px; }
.cookie-bar p { margin: 0; max-width: 72ch; font-family: var(--mono); font-size: .72rem; line-height: 1.6; color: var(--paper-2); }
.cookie-bar a { color: #fff; text-decoration: underline; }
.cookie-bar a:hover { color: #fff; }
.cookie-bar__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-bar .btn { white-space: nowrap; }
.cookie-bar .btn--ghost { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 45%, transparent); }
.cookie-bar .btn--ghost:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 640px) { .cookie-bar__inner { align-items: flex-start; } }

/* ---------------------------------------------------------------- dark contrast
   Full-bleed black bands and the hero console are not decorative: they carry
   buttons, prices and metrics. Paper-tone muted text and the default ink button
   vanish against #12100e, so every foreground role gets an explicit on-dark
   colour here. This block is last on purpose — it wins over the base styles. */

.band { color: var(--on-dark); }
.band .muted,
.band .hero__note,
.band .hero__meta span,
.band .stat__label,
.band .card__kicker,
.band .index__body,
.band .stage__n,
.band .stage__status { color: var(--on-dark-muted); }
.band .eyebrow,
.band .index__n,
.band .step__n,
.band details > summary::after { color: var(--on-dark-accent); }
.band .card__kicker::before { background: var(--on-dark-accent); }
.band .index__row:hover { background: rgba(255, 255, 255, 0.05); }
.band .rule,
.band .stat,
.band .table th,
.band .table td { border-color: #3a352f; }
.band .table-wrap { background: #1b1815; border-color: #3a352f; }
.band .table thead th { color: var(--on-dark-muted); }
.band .table .num { color: var(--on-dark); }
.band .pill--live { color: var(--on-dark-accent); border-color: rgba(255, 123, 92, 0.4); }

/* Buttons on black: ink-on-ink is illegible, so the default and ghost buttons
   flip to a light fill. The accent button stays red with a white label. */
.band .btn,
.band .btn--ghost {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.band .btn:hover,
.band .btn--ghost:hover { background: #fff; border-color: #fff; color: var(--ink); }
.band .btn--accent,
.band .btn--accent:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.band .btn:focus-visible { outline-color: var(--on-dark-accent); }

/* The hero console is a dark data panel, not a band, but the same rules apply. */
.console__foot .console__val { color: var(--on-dark-accent); }
.console .btn,
.console .btn--ghost {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.console .btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Cookie choice: Deny is a visible outline, Accept is a bright filled button.
   Neither may use the ink fill against the black notice bar. */
.cookie-bar .btn { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.cookie-bar .btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.cookie-bar .btn--accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.cookie-bar .btn--ghost { background: transparent; color: var(--on-dark); border-color: rgba(245, 241, 232, 0.6); }
.cookie-bar .btn--ghost:hover { background: var(--paper); color: var(--ink); }
.cookie-bar .btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cookie-bar p { color: var(--on-dark-muted); }
.cookie-bar a { color: var(--on-dark); }

