/* Fairwind splash page.
 * Colors, type and radii come from the Fairwind design tokens.
 * Pages use only these variables, never raw hex, so a token change is one edit. */

:root {
  --g-top: #F7F2E7;
  --g-bot: #D5E5E7;
  --bg: #F5F1E8;
  --surface: #FFFDF9;
  --sunken: #EFE9DC;
  --border: #E2DCCF;
  --border-strong: #CBC2AF;
  --text: #10283A;
  --text-2: #3E5262;
  --text-3: #5D6B75;
  --action: #10283A;
  --on-action: #F5F1E8;
  --action-soft: #DDE6EA;
  --positive: #2D6F78;
  --caution: #974A15;
  --negative: #A3291F;
  --negative-soft: #F6DEDA;
  --sun: #D7792A;
  --mark-swirl: #10283A;
  --mark-hull: #2D6F78;
  --c-high: #2F7A62;
  --c-med: #4A6FA5;
  --c-low: #846B4E;
  --on-fill: #FFFDF9;
  --seg: #CBC2AF;
  --bezel: #10283A;
  --ph-1: #E8DFCF;
  --ph-2: #D8E4E5;
  --ph-3: #E4E1D9;
  --ph-4: #DAE1EA;
  --shadow: 0 1px 2px rgba(16, 40, 58, 0.06), 0 4px 14px rgba(16, 40, 58, 0.07);
  --shadow-lg: 0 2px 4px rgba(16, 40, 58, 0.05), 0 18px 48px rgba(16, 40, 58, 0.14);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --r-sm: 3px;
  --r-md: 12px;
  --r-tile: 14px;
  --r-sheet: 20px;
  --r-full: 999px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --g-top: #0A1A26;
    --g-bot: #123B4B;
    --bg: #0A1A26;
    --surface: #12304A;
    --sunken: #1A3A52;
    --border: #24435C;
    --border-strong: #37566F;
    --text: #F5F1E8;
    --text-2: #C9D3DA;
    --text-3: #A9BCCB;
    --action: #F5F1E8;
    --on-action: #10283A;
    --action-soft: #1C3A52;
    --positive: #7CC7CF;
    --caution: #E8964A;
    --negative: #FF8A7A;
    --negative-soft: #3D1C1C;
    --sun: #E8964A;
    --mark-swirl: #F5F1E8;
    --mark-hull: #7CC7CF;
    --c-high: #8FD1B5;
    --c-med: #9DB6E0;
    --c-low: #CDB28E;
    --on-fill: #0A1A26;
    --seg: #37566F;
    --bezel: #04101A;
    --ph-1: #1E4058;
    --ph-2: #1A3B4A;
    --ph-3: #233F52;
    --ph-4: #1D3A4F;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 6px 18px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 48px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

/* ----------------------------------------------------------------- base */

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

/* Components set their own display; `hidden` must still win. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* The harbor gradient, pinned to the viewport. A fixed layer rather than
 * background-attachment: fixed, which iOS Safari ignores. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--g-top) 0%, var(--g-bot) 100%);
}

h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } }

.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;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: var(--r-md);
  background: var(--action); color: var(--on-action); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

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

.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- the mark */

.mark .sun { stroke: var(--sun); }
.mark .swirl { stroke: var(--mark-swirl); }
.mark .hull { stroke: var(--mark-hull); }

/* --------------------------------------------------------------- header */

.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text);
  font-family: var(--serif); font-size: 26px; letter-spacing: -0.01em;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--r-full);
  background: var(--action); color: var(--on-action);
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* ----------------------------------------------------------------- hero */

.hero { padding: 24px 0 16px; }
.hero + .block { padding-top: 32px; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px; align-items: start;
}
/* Top-aligned beside the phone, which is much taller than the copy; centered,
 * the copy started a third of the way down the screen. */
.hero-copy { padding-top: 40px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 4px; background: var(--sun); }

.hero h1 {
  margin: 18px 0 20px;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(40px, 6vw, 64px); line-height: 1.06; letter-spacing: -0.02em;
  text-wrap: balance;
}
.lede { max-width: 34em; font-size: 19px; line-height: 1.55; color: var(--text-2); }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.hero-cta .note { font-size: 14px; color: var(--text-3); }

@media (max-width: 880px) {
  .hero { padding: 16px 0 8px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { padding-top: 0; }
  .lede { font-size: 18px; }
}

/* ---------------------------------------------------- phone feed mockup */

.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* A phone, not a tablet: 19.5:9 like current iPhones and Pixels, with the camera
 * cutout and the app's tab bar. The feed runs off the bottom as if scrolled. */
.phone {
  width: 100%; max-width: 276px; aspect-ratio: 9 / 19.5; padding: 9px;
  border-radius: 50px; background: var(--bezel); box-shadow: var(--shadow-lg);
  outline: 1px solid var(--border); outline-offset: -1px;
}
.phone-screen {
  position: relative; height: 100%; border-radius: 41px; overflow: hidden;
  background: linear-gradient(180deg, var(--g-top) 0%, var(--g-bot) 100%);
}
.island {
  position: absolute; top: 11px; left: 50%; z-index: 2; transform: translateX(-50%);
  width: 84px; height: 24px; border-radius: 12px; background: var(--bezel);
}
.feed { padding: 50px 12px 0; }
.feed-title {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--serif); font-size: 22px; line-height: 28px; letter-spacing: -0.01em;
}
.feed-sub { margin: 2px 0 10px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.feed-sub strong { color: var(--text); }
.chips { display: flex; gap: 5px; margin-bottom: 10px; align-items: center; }
.chips span.label { font-size: 10px; font-weight: 600; color: var(--text-2); padding-right: 2px; white-space: nowrap; }
.chip {
  flex: 1 1 0; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: 13px; background: var(--surface); box-shadow: var(--shadow);
  font-size: 11px; font-weight: 600;
}
.chip.on { background: var(--action); color: var(--on-action); box-shadow: none; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.tile .photo {
  position: relative; height: 96px;
  display: flex; align-items: center; justify-content: center; color: var(--text-3);
}
.tile .foot { padding: 6px 9px 8px; display: flex; align-items: center; justify-content: space-between; }
.tile .profit { font-size: 18px; line-height: 22px; font-weight: 700; letter-spacing: -0.01em; }
.tile .save {
  position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 12px;
  background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--text);
}

.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; justify-content: space-around; align-items: center;
  padding: 7px 10px 18px; background: var(--surface);
  border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(16, 40, 58, 0.06);
}
.tab {
  width: 72px; height: 44px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 10px; font-weight: 500; color: var(--text-2);
}
.tab.on { background: var(--action); color: var(--on-action); font-weight: 700; }

.ph-1 { background: var(--ph-1); } .ph-2 { background: var(--ph-2); }
.ph-3 { background: var(--ph-3); } .ph-4 { background: var(--ph-4); }

.caption { font-size: 12px; color: var(--text-3); }

/* Confidence badge: solid for High, outlined for Med, dashed for Low. Tiers differ
 * by fill and line as well as hue, so color is never the only signal. */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px 2px 5px; border-radius: 12px;
  background: var(--surface); border: 1.5px solid currentColor;
  font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 0.05em;
}
.tile .badge { position: absolute; left: 6px; top: 6px; font-size: 9px; padding: 1px 6px 1px 4px; }
.tile .badge .bars i { width: 6px; height: 4px; }
.badge .bars { display: flex; gap: 2px; }
.badge .bars i { width: 7px; height: 5px; border-radius: 1px; background: var(--seg); }
.badge.high { background: var(--c-high); border-color: var(--c-high); color: var(--on-fill); }
.badge.high .bars i { background: var(--on-fill); }
.badge.med { color: var(--c-med); }
.badge.med .bars i:nth-child(-n+2) { background: var(--c-med); }
.badge.low { color: var(--c-low); border-style: dashed; }
.badge.low .bars i:first-child { background: var(--c-low); }

.t-high { color: var(--c-high); } .t-med { color: var(--c-med); } .t-low { color: var(--c-low); }
.flag { color: var(--caution); }

/* -------------------------------------------------------------- sections */

section.block { padding: 72px 0; }
.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head h2, .math h2, .signup h2 {
  font-family: var(--serif); font-size: clamp(30px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.015em;
}
.section-head p { margin-top: 14px; color: var(--text-2); font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.step {
  padding: 26px 24px; border-radius: var(--r-sheet); background: var(--surface); box-shadow: var(--shadow);
}
.step .n {
  width: 34px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center;
  background: var(--action-soft); color: var(--text); font-weight: 700; font-size: 15px;
}
.step h3 { margin: 18px 0 8px; font-size: 19px; line-height: 1.3; font-weight: 600; }
.step p { color: var(--text-2); font-size: 16px; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }

.cats { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cats .label { font-size: 14px; color: var(--text-2); margin-right: 4px; }
.cats span.pill {
  padding: 6px 14px; border-radius: var(--r-full); background: var(--surface);
  border: 1px solid var(--border); font-size: 14px; font-weight: 500;
}

/* ----------------------------------------------------- the math section */

.math .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
}
.points { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.points li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.points svg { margin-top: 3px; color: var(--positive); }
.points strong { display: block; font-weight: 600; }
.points span { color: var(--text-2); font-size: 16px; }
@media (max-width: 880px) { .math .wrap { grid-template-columns: 1fr; gap: 40px; } }

.sheet {
  width: 100%; max-width: 460px; justify-self: center;
  border-radius: var(--r-sheet); background: var(--surface); box-shadow: var(--shadow-lg);
  padding: 22px 22px 18px;
}
.sheet .title { font-size: 18px; line-height: 24px; font-weight: 600; }
.sheet .where { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.sheet .headline { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.sheet .big { font-size: 40px; line-height: 44px; font-weight: 700; letter-spacing: -0.02em; }
.wells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.well { border-radius: var(--r-md); background: var(--sunken); padding: 10px 12px; }
.well .k { font-size: 12px; color: var(--text-2); }
.well .v { font-size: 16px; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.adds { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.adds h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.adds dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
.adds dt { color: var(--text-2); }
.adds dd { margin: 0; text-align: right; }
.adds .total { border-top: 1px solid var(--border); padding-top: 8px; font-weight: 700; color: var(--text); }
.comps { margin-top: 14px; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); }
.comps strong { display: block; color: var(--text); font-size: 15px; }
.contact {
  margin-top: 16px; display: flex; align-items: center; justify-content: center; min-height: 46px;
  border-radius: 23px; background: var(--action); color: var(--on-action); font-weight: 600; font-size: 15px;
}
.contact-note { margin-top: 8px; text-align: center; font-size: 12px; color: var(--text-3); }
@media (max-width: 400px) { .well .v { font-size: 14px; } .sheet { padding: 18px 16px 16px; } }

/* --------------------------------------------------------------- sign-up */

.signup .card {
  max-width: 640px; margin: 0 auto; padding: 36px 36px 28px;
  border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg);
}
@media (max-width: 520px) { .signup .card { padding: 26px 18px 20px; } }
.signup .intro { margin: 12px 0 28px; color: var(--text-2); }

form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, fieldset > legend { font-size: 14px; font-weight: 600; color: var(--text); }
.hint { font-size: 13px; color: var(--text-3); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
fieldset > legend { padding: 0; margin-bottom: 8px; }
.optional { font-weight: 400; color: var(--text-3); }

input[type=email], input[type=text], input[inputmode=numeric] {
  width: 100%; height: 50px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text);
  font: 400 16px var(--sans);
}
input::placeholder { color: var(--text-3); opacity: 1; }
input[aria-invalid=true] { border-color: var(--negative); }
.zip { max-width: 160px; }

/* Segmented radio for the phone, and toggle chips for categories. Real inputs,
 * visually hidden, so keyboard and screen readers get native behavior. */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 16px; border-radius: var(--r-full);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 15px; font-weight: 500; user-select: none;
}
.opt input:checked + span { background: var(--action); border-color: var(--action); color: var(--on-action); font-weight: 600; }
.opt input:focus-visible + span { outline: 3px solid var(--positive); outline-offset: 2px; }
.opt .check { display: none; }
.opt input:checked + span .check { display: block; }

.other[hidden] { display: none; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-error {
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--negative-soft); color: var(--negative); font-size: 15px; font-weight: 500;
}
.form-error[hidden] { display: none; }
.field-error { font-size: 13px; color: var(--negative); font-weight: 500; }
.field-error:empty { display: none; }

.submit-row { display: flex; flex-direction: column; gap: 12px; }
.submit-row .btn { width: 100%; min-height: 52px; font-size: 17px; }
.fine { font-size: 13px; color: var(--text-3); text-align: center; }

.done { text-align: center; padding: 8px 0 12px; }
.done[hidden] { display: none; }
.done .ok {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--action-soft); color: var(--positive);
}
.done h2 { font-size: 32px; }
.done p { margin: 12px auto 0; max-width: 30em; color: var(--text-2); }

/* -------------------------------------------------------------------- FAQ */

.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 18px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex-shrink: 0; transition: transform 150ms ease; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { padding: 0 0 20px; color: var(--text-2); max-width: 40em; }

/* ----------------------------------------------------------------- footer */

.site-footer { padding: 40px 0 48px; margin-top: 40px; border-top: 1px solid var(--border-strong); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 20px; font-size: 14px; }
.site-footer nav a { color: var(--text-2); }
.site-footer small { font-size: 14px; color: var(--text-3); }

/* -------------------------------------------------------------- prose pages */

.prose { max-width: 720px; margin: 0 auto; padding: 24px 0 40px; }
.prose h1 { font-family: var(--serif); font-size: clamp(34px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.015em; }
.prose .updated { margin-top: 8px; color: var(--text-3); font-size: 14px; }
.prose h2 { margin: 36px 0 10px; font-size: 21px; font-weight: 600; }
.prose p, .prose li { color: var(--text-2); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 22px; margin: 10px 0 0; }
.prose li + li { margin-top: 6px; }
.prose .card { margin-top: 28px; padding: 28px; border-radius: var(--r-sheet); background: var(--surface); box-shadow: var(--shadow); }
