/* Hallmark · genre: modern-minimal · macrostructure: Workbench (split hero → steps → desk → spec → access)
 * theme: studied-DNA (source: usehallmark.com/examples/tally) · paper oklch(98.4% 0.005 258) · accent oklch(54% 0.22 268)
 * fonts: Geist + Geist Mono · nav: N5 Floating pill · footer: Ft5 Statement · enrichment: Tier-A CSS product panels
 * audience: bloggers and niche/news-site owners · use: request access · tone: technical
 * pre-emit critique: P4 H4 E4 S5 R4 V4
 */
@import url("./tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
html {
  font-family: var(--font-body);
  color: var(--color-ink-0);
  background: var(--color-paper-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
body {
  font-size: var(--text-base);
  line-height: 1.6;
  background:
    radial-gradient(1100px 560px at 8% -12%, color-mix(in oklch, var(--color-accent-tint) 75%, transparent), transparent 62%),
    var(--color-paper-0);
}
::selection { background: var(--color-accent); color: var(--color-paper-0); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-sm); }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--color-paper-2); padding: 0.05em 0.35em; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-style: normal; margin: 0; overflow-wrap: anywhere; min-width: 0; }
p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2rem); }

.section-title {
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 18ch;
}

/* ───────── nav · N5 floating pill ───────── */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: var(--z-nav);
  display: flex; align-items: center; gap: var(--space-xs);
  width: max-content; max-width: calc(100% - 24px);
  padding: 6px 6px 6px 16px;
  background: color-mix(in oklch, var(--color-paper-0) 80%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: var(--rule-soft); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  font-size: var(--text-sm);
}
.nav__brand { display: flex; align-items: center; gap: 7px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; margin-right: var(--space-xs); white-space: nowrap; }
.nav__brand svg { color: var(--color-accent); }
.nav__links { display: none; gap: 2px; }
.nav__link {
  padding: 8px 12px; border-radius: var(--radius-pill); color: var(--color-ink-1);
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.nav__link:hover { background: var(--color-paper-2); color: var(--color-ink-0); }
.nav__cta {
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--color-ink-0); color: var(--color-paper-0); font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), transform 100ms var(--ease-out);
}
.nav__cta:hover { background: var(--color-accent); }
.nav__cta:active { transform: translateY(1px); }
@media (min-width: 48rem) { .nav__links { display: flex; } }
/* Smallest phones: Sign in stays in the footer; the pill keeps brand + one CTA. */
@media (max-width: 22.5rem) { .nav__link[data-app-link] { display: none; } .nav { padding-left: 12px; } }

/* ───────── buttons + signup ───────── */
.btn {
  font: inherit; font-weight: 500; font-size: var(--text-sm);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 46px; padding: 0 var(--space-lg);
  border-radius: var(--radius-pill); border: 1px solid transparent; cursor: pointer;
  white-space: nowrap; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out), transform 100ms var(--ease-out);
}
.btn--primary { background: var(--color-ink-0); color: var(--color-paper-0); }
.btn--primary:hover { background: var(--color-accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[data-state="loading"] { opacity: 0.6; cursor: progress; transform: none; }

.signup { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-xl); max-width: 30rem; }
.signup input {
  flex: 1 1 14rem; min-width: 0; min-height: 46px;
  font: inherit; font-size: var(--text-sm); color: var(--color-ink-0);
  padding: 0 var(--space-md); border-radius: var(--radius-pill);
  border: var(--rule-soft); background: var(--color-surface);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.signup input:hover { border-color: color-mix(in oklch, var(--color-ink-0) 28%, transparent); }
.signup input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; border-color: var(--color-focus); }
.signup input:user-invalid { border-color: var(--color-danger); }
.signup--stack { flex-direction: column; max-width: 26rem; }
.signup--stack input, .signup--stack .btn { flex: none; width: 100%; }

/* ───────── hero · split ───────── */
.hero { position: relative; padding: 120px 0 var(--space-3xl); overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--color-ink-0) 5%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--color-ink-0) 5%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 30% 20%, black, transparent 70%);
}
.hero__layout { position: relative; display: grid; gap: var(--space-2xl); grid-template-columns: minmax(0, 1fr); align-items: center; }
.hero__h1 {
  font-size: var(--text-display);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  max-width: 13ch;
}
.hero__sub { margin-top: var(--space-lg); font-size: var(--text-md); line-height: 1.55; color: var(--color-ink-1); max-width: 34rem; }
.hero__fineprint {
  list-style: none; padding: 0; margin: var(--space-md) 0 0;
  display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md);
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-2);
}
.hero__fineprint li::before { content: "✓"; color: var(--color-success); margin-right: 6px; }
@media (min-width: 62rem) {
  .hero { padding-top: 168px; }
  .hero__layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3xl); }
}

/* hero video · the product in 30 seconds */
.hero-video {
  position: relative; margin: 0;
  border: var(--rule-soft); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-surface);
  box-shadow: 0 30px 60px -30px color-mix(in oklch, var(--color-ink-0) 30%, transparent), var(--shadow-card);
}
.hero-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.hero-video__sound {
  position: absolute; right: var(--space-sm); bottom: var(--space-sm);
  font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-ink-0); background: color-mix(in oklch, var(--color-surface) 88%, transparent);
  border: var(--rule-soft); border-radius: var(--radius-pill); padding: 4px 10px; cursor: pointer;
  backdrop-filter: blur(6px);
}
.hero-video__sound:hover { background: var(--color-surface); }
.hero-video__sound:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ───────── how it works · step sequence ───────── */
.how { padding: var(--space-3xl) 0; border-top: var(--rule-hair); }
.steps { list-style: none; margin: var(--space-2xl) 0 0; padding: 0; display: grid; gap: 0; counter-reset: none; }
.step { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--space-md); padding: var(--space-lg) 0; border-top: var(--rule-hair); }
.step:last-child { border-bottom: var(--rule-hair); }
.step__n { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-accent); padding-top: 3px; }
.step h3 { font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.step p { margin-top: var(--space-xs); color: var(--color-ink-1); max-width: 40rem; }
@media (min-width: 62rem) {
  .steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-3xl); }
  .step:nth-last-child(2) { border-bottom: var(--rule-hair); }
}

/* ───────── desk · review console ───────── */
.desk { padding: var(--space-3xl) 0; background: var(--color-paper-1); border-block: var(--rule-hair); }
.desk__layout { display: grid; gap: var(--space-2xl); grid-template-columns: minmax(0, 1fr); align-items: center; }
.desk__copy p { margin-top: var(--space-md); color: var(--color-ink-1); max-width: 30rem; }
.desk__panel { background: var(--color-surface); border: var(--rule-soft); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-card); display: grid; gap: var(--space-md); }
.desk__serp { display: grid; gap: 3px; padding: var(--space-md); border-radius: var(--radius-md); border: var(--rule-hair); font-family: arial, sans-serif; }
.desk__url { font-size: 13px; color: var(--color-serp-text); overflow-wrap: anywhere; }
.desk__title { font-size: 19px; line-height: 1.3; color: var(--color-serp-title); overflow-wrap: anywhere; }
.desk__desc { font-size: 14px; line-height: 1.5; color: var(--color-serp-text); }
.desk__fields { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
.desk__fields div { padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); background: var(--color-paper-1); }
.desk__fields dt { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-ink-2); }
.desk__fields dd { margin: 2px 0 0; font-size: var(--text-sm); font-weight: 500; font-variant-numeric: tabular-nums; }
.desk__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); padding-top: var(--space-sm); border-top: var(--rule-hair); }
.desk__when { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-1); white-space: nowrap; }
.desk__btn { font-size: var(--text-sm); font-weight: 500; padding: 8px 14px; border-radius: var(--radius-pill); background: var(--color-ink-0); color: var(--color-paper-0); white-space: nowrap; }
@media (min-width: 62rem) {
  .desk__layout { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--space-3xl); }
  .desk__fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ───────── spec sheet ───────── */
.spec { padding: var(--space-3xl) 0 var(--space-2xl); }
.spec__lede { margin-top: var(--space-md); color: var(--color-ink-1); max-width: 40rem; }
.spec__table { width: 100%; border-collapse: collapse; margin-top: var(--space-xl); font-size: var(--text-sm); }
.spec__table th, .spec__table td { text-align: left; vertical-align: top; padding: var(--space-sm) 0; border-top: var(--rule-hair); }
.spec__table tr:last-child th, .spec__table tr:last-child td { border-bottom: var(--rule-hair); }
.spec__table th { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-ink-2); width: 7.5rem; padding-right: var(--space-md); white-space: nowrap; }
.spec__table td { color: var(--color-ink-1); }

/* ───────── access ───────── */
.access { padding: var(--space-2xl) 0 var(--space-3xl); }
.access__panel {
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 5vw, 3.5rem);
  background: var(--color-ink-0); color: var(--color-paper-0);
  display: grid; gap: var(--space-md);
}
.access__panel .section-title { color: var(--color-paper-0); }
.access__panel p { color: color-mix(in oklch, var(--color-paper-0) 78%, transparent); max-width: 34rem; }
.access__panel .signup input { background: color-mix(in oklch, var(--color-paper-0) 10%, transparent); color: var(--color-paper-0); border-color: color-mix(in oklch, var(--color-paper-0) 22%, transparent); }
.access__panel .signup input::placeholder { color: color-mix(in oklch, var(--color-paper-0) 55%, transparent); }
.access__panel .btn--primary { background: var(--color-paper-0); color: var(--color-ink-0); }
.access__panel .btn--primary:hover { background: var(--color-accent-tint); }
.access__panel .signup { margin-top: var(--space-xs); }
.access__status { font-weight: 500; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); background: color-mix(in oklch, var(--color-paper-0) 10%, transparent); }
.access__status[data-kind="ok"] { color: var(--color-companion); }
.access__status[data-kind="error"] { color: var(--color-hot-tint); }

/* ───────── footer · Ft5 statement ───────── */
.footer { padding: var(--space-2xl) 0 var(--space-xl); }
.footer__line { font-family: var(--font-display); font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; max-width: 22ch; }
.footer__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs); margin-top: var(--space-xl); padding-top: var(--space-md); border-top: var(--rule-hair); font-size: var(--text-sm); color: var(--color-ink-2); }
.footer__brand { font-weight: 600; color: var(--color-ink-0); }
.footer__meta a { white-space: nowrap; }

/* ───────── proof · real Search Console data ───────── */
.proof { padding: var(--space-3xl) 0; border-top: var(--rule-hair); }
.proof__layout { display: grid; gap: var(--space-2xl); grid-template-columns: minmax(0, 1fr); align-items: start; }
.proof__copy > p { margin-top: var(--space-md); color: var(--color-ink-1); max-width: 30rem; }
.proof__stats { margin: var(--space-xl) 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg) var(--space-md); }
.proof__stats dt { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-ink-2); }
.proof__stats dd { margin: 2px 0 0; font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (min-width: 62rem) { .proof__layout { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-3xl); } }

.chart { margin: 0; background: var(--color-surface); border: var(--rule-soft); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-card); }
.chart figcaption { display: grid; gap: 2px; margin-bottom: var(--space-lg); }
.chart figcaption strong { font-size: var(--text-base); letter-spacing: -0.01em; }
.chart figcaption span { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-2); }
.chart__plot { position: relative; height: 220px; padding-left: 2.75rem; }
.chart__grid { position: absolute; inset: 0 0 1.5rem 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart__grid span { display: flex; align-items: center; gap: 6px; height: 0; font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-ink-2); }
.chart__grid span::before { content: attr(data-v); width: 2.25rem; text-align: right; }
.chart__grid span { text-indent: 0; }
.chart__grid span::after { content: ""; flex: 1; border-top: var(--rule-hair); }
.chart__grid span { justify-content: flex-start; }
.chart__bars { position: absolute; inset: 0 0 0 2.75rem; list-style: none; margin: 0; padding: 0 0 1.5rem; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 2px; align-items: end; }
.bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: default; outline-offset: 2px; }
.bar__fill { display: block; width: min(70%, 28px); height: var(--h); background: var(--color-accent-soft); border-radius: 4px 4px 0 0; transition: background-color var(--dur-fast) var(--ease-out); }
.bar--peak .bar__fill, .bar:hover .bar__fill, .bar:focus-visible .bar__fill { background: var(--color-accent); }
.bar__val { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500; color: var(--color-ink-0); margin-bottom: 4px; white-space: nowrap; }
.bar__x { position: absolute; bottom: -1.5rem; font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-ink-2); white-space: nowrap; line-height: 1.5rem; }
.chart__tip { position: absolute; top: 0; right: 0; max-width: 100%; font-size: var(--text-xs); background: var(--color-ink-0); color: var(--color-paper-0); padding: 6px 10px; border-radius: var(--radius-sm); pointer-events: none; font-variant-numeric: tabular-nums; }
.chart__note { margin-top: var(--space-xl); font-size: var(--text-sm); color: var(--color-ink-1); }
.chart__table { margin-top: var(--space-sm); font-size: var(--text-sm); }
.chart__table summary { cursor: pointer; color: var(--color-accent); width: max-content; }
.chart__table table, .proof__top { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.chart__table th, .chart__table td { text-align: left; padding: 6px 8px 6px 0; border-bottom: var(--rule-hair); font-size: var(--text-xs); }

.proof__top { margin-top: var(--space-2xl); font-size: var(--text-sm); }
.proof__top caption { text-align: left; font-weight: 600; font-size: var(--text-base); letter-spacing: -0.01em; padding-bottom: var(--space-sm); }
.proof__top th { text-align: left; font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-ink-2); padding: 0 var(--space-sm) var(--space-xs) 0; border-bottom: var(--rule-soft); }
.proof__top td { padding: var(--space-sm) var(--space-sm) var(--space-sm) 0; border-bottom: var(--rule-hair); color: var(--color-ink-1); }
.proof__top td:first-child { color: var(--color-ink-0); font-weight: 500; }
.proof__top th:not(:first-child), .proof__top td:not(:first-child) { text-align: right; white-space: nowrap; }
@media (max-width: 30rem) { .proof__top th:nth-child(4), .proof__top td:nth-child(4) { display: none; } }
.proof__source { margin-top: var(--space-md); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-2); }
