/* Bluesheet landing page — Direction A, "The Sheet".
   Palette, type, and component patterns carried down from
   site/docs/reference/direction-a.html (source of truth). No new colors,
   no new fonts. Contrast pairs reused from the reference:
     ink (#17233c) on paper (#dbe7f2)      ~14:1  (reused: h1/h2, wordmark)
     ink-soft (#2d3b52) on paper (#dbe7f2) ~10:1  (reused: body copy)
   Both far exceed the AA 4.5:1 floor for normal text.

   Font faces live in this file so the page has exactly ONE render-blocking stylesheet.
   OFL license texts are in assets/fonts/OFL-*.txt.
   font-display, by face (measured on 2026-09-20, Lighthouse mobile):
   - Source Serif 4 (body; the hero subhead is the LCP element): `optional`. The LCP text
     never waits on, or is resized by, a late font. A first visit on a slow link keeps the
     Georgia fallback for that page view.
   - Fraunces (headlines) and Courier Prime (labels): `swap`. These two carry the approved
     look, so a first-time visitor must see them. Cost: CLS about 0.03 when they arrive
     (gate is 0.1).
   No font preload: it competed with this stylesheet on a slow link and made first paint later.
*/
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/courier-prime-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/courier-prime-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/fraunces-variable-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: optional;
  src: url(/assets/fonts/source-serif-4-variable-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #dbe7f2;
  --paper-line: rgba(23, 35, 60, 0.06);
  --card: #eef4fa;
  --ink: #17233c;
  --ink-soft: #2d3b52;
  --rule: #a9c3de;
  --border: #93aecb;
  --stamp: #46587a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--paper-line) 31px 32px);
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  margin: 0;
}

h3 {
  font-size: 1.15rem;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--stamp);
  outline-offset: 2px;
}

.tag {
  font-family: 'Courier Prime', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 10px;
}

/* ── top bar ─────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.topbar-cta {
  font-family: 'Courier Prime', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding: 12px 2px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.topbar-cta:hover {
  color: var(--stamp);
  border-color: var(--stamp);
}

/* ── hero ────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 4vw, 48px) 56px;
  max-width: 1160px;
  margin: 0 auto;
  align-items: start;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
  }
}

/* Grid/flex items default to a min-width of "auto" (their content's
   min-content size), which can force a track wider than its container and
   overflow the viewport at narrow widths. Reset to 0 on every item that
   holds wrapping text/inputs, matching the well-known "grid blowout" fix. */
.hero > *,
.ea-grid > *,
.form-row > .field,
.steps-grid > .step {
  min-width: 0;
}

.hero-text h1 {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 16ch;
}

.subhead {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 22px;
}

.proof {
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--rule);
  padding-left: 12px;
  margin: 0 0 24px;
  max-width: 42ch;
}

/* ── shared form styles (starter field + real form) ─────────────────── */
form.signup {
  margin: 0 0 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  flex: 1 1 240px;
}

.field label {
  font-family: 'Courier Prime', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .field {
    flex: 0 0 auto;
  }
}

input[type='email'],
input[type='text'],
select {
  width: 100%;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
  padding: 13px 14px;
  min-height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
}

input[type='email']:focus,
input[type='text']:focus,
select:focus {
  outline: 3px solid var(--stamp);
  outline-offset: 1px;
}

button.submit {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 22px;
  min-height: 44px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--card);
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
}

button.submit:hover {
  background: var(--stamp);
  border-color: var(--stamp);
}

button.submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.fineprint {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 12px 0 0;
}

.fineprint a {
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

/* Honeypot: hidden from sighted users AND assistive tech, out of tab order. */
.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-turnstile {
  margin: 4px 0 16px;
}

#ea-status {
  font-size: 0.9rem;
  min-height: 1.4em;
  margin: 10px 0 0;
}

#ea-status.err {
  color: var(--stamp);
  font-weight: 600;
}

.early-access-confirmation p:first-child {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 6px;
}

/* ── hero report-card visual ─────────────────────────────────────────── */
.hero-visual {
  display: flex;
  justify-content: center;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 22px 44px rgba(23, 35, 60, 0.14);
  padding: 30px 24px 24px;
  overflow: hidden;
}

.sheet-perf {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  background-image: radial-gradient(circle, var(--paper) 0 4px, transparent 4.5px);
  background-size: 18px 18px;
  background-position: 9px center;
}

.sheet-stamp {
  position: absolute;
  top: 24px;
  right: 22px;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  font-family: 'Courier Prime', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  padding: 4px 9px;
  border-radius: 2px;
  transform: rotate(-8deg);
  /* No opacity here: a faded stamp failed AA contrast (2.69:1). Full --stamp on the card is about 6:1. */
}

.sheet-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.sheet-eyebrow {
  font-family: 'Courier Prime', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.sheet-client {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}

.sheet-divider {
  height: 1px;
  background: var(--rule);
  margin: 10px 0 14px;
}

.sheet-unit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sheet-unit-id {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  margin-right: 10px;
}

.sheet-unit-desc {
  font-family: 'Courier Prime', monospace;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.sheet-chip,
.fact-chip {
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: 'Courier Prime', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  padding: 5px 9px;
  border-radius: 2px;
  white-space: nowrap;
  display: inline-block;
}

.sheet-photo {
  margin-top: 16px;
  height: 92px;
  border: 1.5px dashed var(--border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
}

.sheet-photo span {
  font-family: 'Courier Prime', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.sheet-lines {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sheet-lines span {
  height: 1px;
  background: var(--rule);
  display: block;
}

.sheet-lines span:last-child {
  width: 55%;
}

.sheet-cta {
  margin-top: 18px;
  background: var(--ink);
  color: var(--card);
  text-align: center;
  padding: 12px;
  border-radius: 3px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ── generic section rhythm ──────────────────────────────────────────── */
.section {
  border-top: 1px solid var(--rule);
  padding: clamp(40px, 6vw, 64px) clamp(20px, 4vw, 48px);
  max-width: 1160px;
  margin: 0 auto;
}

.section h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  max-width: 22ch;
  margin-bottom: 14px;
}

.section > p,
.split-copy > p {
  font-size: 1.125rem;
  max-width: 46ch;
}

/* ── problem/fix: two-column split on desktop, single column under 900px ─
   Grid items default min-width:auto (content-based), which can force a
   track wider than its container — reset to 0, same "grid blowout" fix
   used on .hero/.ea-grid/.steps-grid above. */
.section.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 900px) {
  .section.split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }
}

.section.split > * {
  min-width: 0;
}

/* ── problem: work-order rows (ruled, mono, a small checkbox per row) ──── */
.work-order {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 52ch;
}

.work-order li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: 'Courier Prime', monospace;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.work-order li:first-child {
  border-top: 1px solid var(--rule);
}

.wo-box {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}

/* ── fix: fact chips + the field card checklist ──────────────────────── */
.fact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.field-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: clamp(18px, 3vw, 26px);
  max-width: 52ch;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  font-family: 'Courier Prime', monospace;
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist li::before {
  content: '\2022';
  color: var(--ink);
  margin-right: 8px;
}

/* ── how it works: numbered steps ────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

.step {
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}

.step-number {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--stamp);
  display: block;
  margin-bottom: 8px;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  font-size: 1rem;
  color: var(--ink-soft);
}

/* ── sample report ───────────────────────────────────────────────────────
   Phone (base): a horizontal scroll-snap row. Each card is its own
   `overflow-x: auto` scroll container — nothing outside it ever needs to
   grow past the viewport, so this cannot create page-level horizontal
   overflow no matter how wide the three cards are combined; the row
   scrolls inside itself and `document.documentElement.scrollWidth` stays
   at the viewport width. Keyboard users can Tab to the row (`tabindex=0`)
   and scroll it with arrow keys; touch users swipe; no JS anywhere here.
   Desktop (≥900px): the row becomes a static, always-visible fanned
   overlap (no scrolling, no hover/focus required to see any card) — the
   Superpower-reference "fanned report" look, cover in front-left. */
.sample-frames {
  display: flex;
  gap: 16px;
  margin: 32px 0 28px;
  padding: 6px 6px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.sample-frame {
  display: block;
  flex: 0 0 78vw;
  max-width: 320px;
  scroll-snap-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 14px 30px rgba(23, 35, 60, 0.12);
  padding: 10px;
  text-decoration: none;
}

.sample-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

@media (min-width: 900px) {
  .sample-frames {
    overflow-x: visible;
    scroll-snap-type: none;
    justify-content: center;
    padding: 28px 6px 14px;
  }

  .sample-frame {
    flex: 0 0 300px;
    max-width: 300px;
    position: relative;
    transition: none;
  }

  .sample-frame:nth-child(1) {
    transform: rotate(-4deg);
    z-index: 3;
  }

  .sample-frame:nth-child(2) {
    margin-left: -50px;
    transform: rotate(1deg);
    z-index: 2;
  }

  .sample-frame:nth-child(3) {
    margin-left: -50px;
    transform: rotate(4deg);
    z-index: 1;
  }

  .sample-frame:hover,
  .sample-frame:focus-visible {
    z-index: 4;
  }
}

.pdf-link {
  font-family: 'Courier Prime', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding: 4px 2px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.pdf-link:hover {
  color: var(--stamp);
  border-color: var(--stamp);
}

/* ── early access ─────────────────────────────────────────────────────── */
.ea-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 24px;
}

@media (min-width: 860px) {
  .ea-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
  }
}

.ea-copy p {
  font-size: 1.05rem;
  max-width: 42ch;
}

.ea-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: clamp(20px, 4vw, 32px);
}

/* ── footer ──────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px clamp(20px, 4vw, 48px) 40px;
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.site-footer a {
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.site-footer .copyright {
  width: 100%;
  font-size: 0.82rem;
  margin-top: 6px;
}

/* ── reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* ── 404 page ─────────────────────────────────────────────────────────── */
.not-found {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) clamp(20px, 4vw, 48px);
  text-align: left;
}

.not-found h1 {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem);
  margin-bottom: 16px;
}

/* ── privacy page ─────────────────────────────────────────────────────── */
.privacy-page {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) clamp(20px, 4vw, 48px) 80px;
}

.privacy-page h1 {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.3rem);
  margin-bottom: 8px;
}

.privacy-page h2 {
  font-size: 1.2rem;
  margin: 28px 0 8px;
}

.privacy-page .updated {
  font-family: 'Courier Prime', monospace;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
  display: block;
}

.privacy-page ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

.privacy-page a {
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

.back-link {
  font-family: 'Courier Prime', monospace;
  font-size: 0.85rem;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  text-decoration: none;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}
