/* The home page at rotproof.dev, from docs/design/home/home.css. One stylesheet, no scripts. Tokens are the ones in
   docs/BRAND.md and styles.css, and a test keeps them equal. Fonts are the files the other public pages already host. */
:root {
  --paper: #f6f3ec;
  --paper-raised: #ffffff;
  --ink: #1a1d1c;
  --ink-muted: #585d5a;
  --rule: #d8d3c6;
  --proof: #0b5c68;
  --on-proof: #ffffff;
  --proof-tint: #d6e8e8;
  --rot: #ad430e;
  --rot-tint: #fbe9de;
  --font-display: "Newsreader", Georgia, serif;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-12: 48px;
  --radius-sm: 3px;
  --radius-md: 6px;
}

@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/Newsreader-opsz-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/IBMPlexMono-Medium-Latin1.woff2") format("woff2"); }

/* Base (same as the app) */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-padding-top: var(--space-6); }
body { background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; }
h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
a { color: var(--proof); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--proof); outline-offset: 2px; }
strong { font-weight: 600; }
.small { font-size: 14px; line-height: 20px; }
.muted { color: var(--ink-muted); }
.mono { font-family: var(--font-mono); font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }

/* Buttons (same as the app, plus an outline and a large size) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--ink-muted); background: var(--paper-raised); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { color: var(--ink); border-color: var(--ink); }
.btn-primary { background: var(--proof); border-color: var(--proof); color: var(--on-proof); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--on-proof); }
.btn-outline { background: transparent; border-color: var(--proof); color: var(--proof); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-lg { min-height: 52px; padding: 0 var(--space-6); }
.btn-block { width: 100%; }

/* Badges (same as the app) */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.04em; white-space: nowrap; }
.badge-rot { background: var(--rot-tint); color: var(--rot); }
.badge-proof { background: var(--proof-tint); color: var(--proof); }
.badge-muted { background: var(--paper-raised); color: var(--ink-muted); border: 1px solid var(--ink-muted); padding: 1px 7px; }

/* Cards (same as the app) */
.card { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); }
.card-pad { padding: var(--space-6); }

/* Issue card (same as the app) */
.issue { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: var(--space-6); display: flex; flex-direction: column; gap: 12px; }
.issue-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) 12px; }
.issue-since { margin-left: auto; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.issue-url { font-family: var(--font-mono); font-size: 16px; line-height: 24px; font-weight: 500; overflow-wrap: anywhere; }
.appears { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--rule); }
.appears-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.appears-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }

/* Plans (same as the app) */
.plans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.plan { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.plan-name { font-size: 18px; line-height: 26px; font-weight: 600; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.plan-amount { font-size: 32px; line-height: 40px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-per { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.plan-limits { list-style: none; margin: 0; padding: var(--space-4) 0 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: var(--space-2); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.plan-action { padding-top: var(--space-2); }
.fine-print { padding-top: var(--space-6); border-top: 1px solid var(--rule); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.fine-print a { color: var(--ink-muted); }
.fine-print a:hover { color: var(--ink); }

/* Forms, notices and lists: the same rules as app.css, which public pages don't load */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; line-height: 20px; font-weight: 600; }
.input { width: 100%; min-height: 48px; padding: 0 var(--space-4); border: 1px solid var(--ink-muted); border-radius: var(--radius-md); background: var(--paper-raised); color: var(--ink); font: inherit; font-size: 16px; }
.input::placeholder { color: var(--ink-muted); }
.hint { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.notice { padding: var(--space-4); border: 1px solid var(--ink-muted); border-radius: var(--radius-md); background: var(--paper-raised); display: flex; gap: 12px; align-items: flex-start; }
.notice svg { flex: none; width: 20px; height: 20px; margin-top: 3px; }
.notice-title { font-weight: 600; }
.spinner { display: block; width: 24px; height: 24px; border: 2px solid var(--proof-tint); border-top-color: var(--proof); border-radius: 999px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }
.issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.appears-more { font-size: 14px; line-height: 20px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); }
.fact { padding: var(--space-4); background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); }
.fact dt { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.fact dd { margin: 4px 0 0; font-size: 24px; line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rot-text { color: var(--rot); }

/* ---- New for the home page ---- */

/* Page frame */
.skip { position: absolute; left: var(--space-4); top: -100px; z-index: 2; padding: var(--space-2) var(--space-4); background: var(--paper-raised); border: 1px solid var(--ink); border-radius: var(--radius-md); }
.skip:focus { top: var(--space-2); }
.wrap { width: 100%; max-width: 1168px; margin: 0 auto; padding: 0 var(--space-6); }
.region { padding: 96px 0; border-top: 1px solid var(--rule); }
.band { background: var(--paper-raised); }
.region-head { max-width: 720px; margin-bottom: 40px; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-6) var(--space-12); align-items: start; }

/* Type */
.display { font-family: var(--font-display); font-size: 56px; line-height: 60px; font-weight: 500; letter-spacing: -0.015em; }
.h2 { font-family: var(--font-display); font-size: 36px; line-height: 44px; font-weight: 500; letter-spacing: -0.01em; }
.h2-lg { font-size: 48px; line-height: 52px; letter-spacing: -0.015em; }
.h3 { font-size: 18px; line-height: 26px; font-weight: 600; }
.lede { font-size: 20px; line-height: 32px; }

/* Top bar */
.site-bar { border-bottom: 1px solid var(--rule); }
.site-bar-inner { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-4); }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-display); font-size: 26px; line-height: 32px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.wordmark:hover { color: var(--ink); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.site-nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.site-nav-link:hover { background: var(--paper-raised); color: var(--ink); }
.site-nav .btn { margin-left: var(--space-2); }

/* Hero */
.hero { padding: 88px 0 96px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); gap: 64px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: var(--space-6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: var(--space-2); }
.shot-cap { margin-top: 12px; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.shot-link { font-family: var(--font-mono); font-size: 14px; line-height: 22px; color: var(--proof); text-decoration: underline; overflow-wrap: anywhere; }

/* No false alarms: the second check, as three steps */
.recheck { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--space-12); }
.recheck-step { position: relative; padding-top: 64px; display: flex; flex-direction: column; gap: 12px; }
.recheck-step::before { content: ""; position: absolute; top: 20px; left: 40px; right: calc(-1 * var(--space-12)); border-top: 1px solid var(--ink-muted); }
.recheck-step:last-child::before { display: none; }
.recheck-n { position: absolute; top: 0; left: 0; width: 40px; height: 40px; border: 1px solid var(--ink); border-radius: var(--radius-sm); background: var(--paper-raised); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 16px; font-weight: 500; }
.recheck-step:last-child .recheck-n { background: var(--ink); color: var(--paper); }
.recheck-say { font-family: var(--font-display); font-size: 28px; line-height: 36px; font-weight: 500; letter-spacing: -0.005em; }
.recheck-eg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-family: var(--font-mono); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.recheck-after { max-width: 720px; margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--rule); }

/* What it checks */
.checks { margin: 0; border-top: 1px solid var(--rule); }
.check-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-2) var(--space-6); align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.check-row dt, .check-row dd { margin: 0; }
.check-row dd { font-size: 18px; line-height: 28px; }

/* What you get */
.gets { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-12); align-items: start; }
.get { display: flex; flex-direction: column; gap: var(--space-4); }
.mail { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); }
.mail-head { margin: 0; padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px var(--space-4); font-size: 14px; line-height: 22px; }
.mail-head dt { color: var(--ink-muted); }
.mail-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-subject { font-size: 16px; line-height: 24px; font-weight: 600; }
.mail-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.mail-label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-muted); }
.mail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.mail-item { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: var(--space-4); border-bottom: 1px solid var(--rule); }
.mail-list:last-child .mail-item:last-child { padding-bottom: 0; border-bottom: 0; }
.code { padding: var(--space-4); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 13px; line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere; }
.code code { font: inherit; }
.code-label { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.04em; color: var(--ink-muted); }

/* How it works */
.how-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.how-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-6); align-items: start; padding: var(--space-6) 0; border-bottom: 1px solid var(--rule); }
.how-n { width: 40px; height: 40px; border: 1px solid var(--ink-muted); border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 16px; font-weight: 500; }
.how-step p { font-size: 18px; line-height: 28px; padding-top: 6px; }

/* Plans */
.plans-notes { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.plans-notes .fine-print { margin-top: var(--space-4); }

/* Questions. Not in the design: added for search and AI answers, in the page's own style. */
.faq { margin: 0; border-top: 1px solid var(--rule); }
.faq-row { display: flex; flex-direction: column; gap: var(--space-2); padding: 20px 0; border-bottom: 1px solid var(--rule); }
.faq-row dt, .faq-row dd { margin: 0; }

/* Closing call to action */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6); }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: var(--space-12) 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.site-foot-inner { display: flex; flex-direction: column; gap: var(--space-4); }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-6); }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.site-foot a:hover { color: var(--proof); }

/* The free scan at /scan, from docs/design/home/scan*.html */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page-main { flex: 1; }
.wrap-narrow { max-width: 728px; }
.scan { padding: 72px 0 96px; }
.scan-stack { display: flex; flex-direction: column; gap: var(--space-6); }
.scan .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.scan-site { font-family: var(--font-mono); font-size: 16px; line-height: 24px; font-weight: 500; overflow-wrap: anywhere; }
.scan-form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.scan-form .field { width: 100%; }
.input[aria-invalid="true"] { border: 2px solid var(--ink); }
.turnstile:empty { display: none; }
.mark { width: 48px; height: 48px; border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center; background: var(--paper-raised); border: 1px solid var(--rule); color: var(--ink); }
.mark-proof { background: var(--proof-tint); border-color: var(--proof-tint); color: var(--proof); }
.mark svg { width: 24px; height: 24px; }
.scan-progress { font-size: 24px; line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.issue-fix { padding: 12px; background: var(--paper); border-radius: var(--radius-sm); font-size: 14px; line-height: 22px; }
.invite { padding: var(--space-6); background: var(--paper-raised); border: 1px solid var(--ink); border-radius: var(--radius-md); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-6); }
.invite-text { flex: 1 1 320px; font-size: 18px; line-height: 28px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-6); }
.link-action { display: inline-flex; align-items: center; min-height: 44px; }
.check-row dt { font-weight: 600; }

@media (max-width: 960px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-12); }
  .gets { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .wrap { padding: 0 var(--space-4); }
  .region { padding: 56px 0; }
  .region-head { margin-bottom: var(--space-6); }
  .hero { padding: 40px 0 56px; }
  .display { font-size: 38px; line-height: 44px; }
  .h2 { font-size: 28px; line-height: 36px; }
  .h2-lg { font-size: 34px; line-height: 40px; }
  .lede { font-size: 18px; line-height: 28px; }
  .site-bar-inner { min-height: 64px; }
  .wordmark { font-size: 24px; }
  .site-nav { gap: 0; }
  .site-nav-link { padding: 0 var(--space-2); }
  .site-nav .btn { margin-left: 4px; padding: 0 12px; }
  .issue { padding: var(--space-4); }
  .issue-url { font-size: 14px; line-height: 22px; }
  .issue-since { margin-left: 0; width: 100%; }
  .recheck { grid-template-columns: minmax(0, 1fr); gap: var(--space-6) 0; }
  .recheck-step { padding-top: 0; padding-left: 56px; min-height: 40px; }
  .recheck-step::before { top: 40px; bottom: calc(-1 * var(--space-6)); left: 20px; right: auto; border-top: 0; border-left: 1px solid var(--ink-muted); }
  .recheck-say { font-size: 24px; line-height: 32px; padding-top: 4px; }
  .recheck-after { margin-top: var(--space-6); }
  .check-row { grid-template-columns: minmax(0, 1fr); padding: var(--space-4) 0; }
  .check-row dd { font-size: 16px; line-height: 26px; }
  .mail-head { padding: var(--space-4); }
  .mail-body { padding: var(--space-4); }
  .card-pad { padding: var(--space-4); }
  .code { padding: 12px; font-size: 12px; line-height: 20px; }
  .how-step { gap: var(--space-4); padding: var(--space-4) 0; }
  .how-step p { font-size: 16px; line-height: 26px; padding-top: 7px; }
  .scan { padding: 40px 0 56px; }
  .invite { padding: var(--space-4); }
  .invite-text { font-size: 16px; line-height: 26px; }
}

@media (max-width: 560px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn { flex: 1 1 100%; }
  .cta .btn { width: 100%; }
  .scan-form .btn { width: 100%; }
  .invite .btn { width: 100%; }
  .scan .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
