/* ============================================================
   HausAI — waitlist landing page
   System: "the reviewer's red pen" — cool document paper,
   spruce ink, one regulatory red spent only on findings & citations.
   ============================================================ */

/* ---------- fonts (self-hosted) ----------
   One variable file per family. Both downloads carry a full weight axis
   (Newsreader wght 200..800 plus opsz 6..72, IBM Plex Sans wght 100..700),
   so one range declaration covers 400/500/600 instead of three
   byte-identical copies. The -400 in each filename is the download's
   default instance, not the file's limit. */
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader-400-latin.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibmplexsans-400-latin.woff2') format('woff2');
  font-weight: 100 700; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --paper: #f4f6f3;
  --card: #fdfdfb;
  --ink: #1c2a25;
  --ink-2: #4a5b53;
  --ink-deep: #0f1a15;
  --on-deep: #e8eeea;
  --on-deep-2: #a9bab1;
  --flag: #c1351f;
  --rule: rgba(28, 42, 37, 0.18);
  --rule-deep: rgba(232, 238, 234, 0.16);
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, Menlo, monospace;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(193, 53, 31, 0.18); }

/* Headings get balanced ragging, running text avoids orphans. Progressive
   enhancement: browsers without text-wrap just render normally. */
.hero h1, .section h2, .frow h3, .waitlist h2 { text-wrap: balance; }
.lede, .section-body, .frow p, .waitlist-copy p, .fart-quote, .spec dd { text-wrap: pretty; }

img, svg { display: inline-block; vertical-align: middle; }

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

/* ---------- top bar ---------- */
.topbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.doc-glyph { width: 14px; height: 14px; color: var(--ink); }

.navlink {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 5px;
}
.navlink:hover { text-decoration-color: var(--flag); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  border-radius: 2px;
  padding: 14px 28px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--ink-deep); }
.btn:focus-visible,
.navlink:focus-visible,
input:focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: 3px;
}
input:focus-visible { outline-offset: 2px; }

.btn:disabled { opacity: 0.55; cursor: default; }

/* ---------- shared section chrome ---------- */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) clamp(20px, 5vw, 48px);
  border-top: 1px solid var(--rule);
}

.section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 2.4vw + 0.8rem, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  max-width: 24ch;
}

.section-body {
  margin-top: 20px;
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.125rem);
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 58ch;
}

/* ---------- hero ---------- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) clamp(20px, 5vw, 48px) clamp(72px, 9vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 5vw + 0.5rem, 4.35rem);
  line-height: 1.04;
  letter-spacing: -0.018em;
}

.lede {
  margin-top: 24px;
  font-size: clamp(1.05rem, 0.5vw + 0.95rem, 1.2rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 32em;
}

.hero .btn { margin-top: 36px; }

/* ---------- document artifact ---------- */
.docstack { position: relative; }

.doc-under {
  position: absolute;
  inset: -14px -12px auto auto;
  height: 60%;
  width: 88%;
  background: #e9ece7;
  border: 1px solid var(--rule);
  border-radius: 3px;
  transform: rotate(2.2deg);
}

.doc-main {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 26px 24px 22px;
  box-shadow: 0 1px 2px rgba(15, 26, 21, 0.05), 0 16px 40px -24px rgba(15, 26, 21, 0.3);
}

.doc-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.doc-body {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 0.94rem;
  line-height: 1.58;
  color: var(--ink);
}

.finding {
  margin-top: 18px;
  border-left: 2px solid var(--flag);
  padding-left: 14px;
}

.finding-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--flag);
  margin-bottom: 8px;
  animation: pin-drop 0.5s 0.15s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.finding-label svg { width: 12px; height: 12px; flex: none; color: var(--ink); }

.mark-hit {
  background-image: linear-gradient(rgba(193, 53, 31, 0.16), rgba(193, 53, 31, 0.16));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: sweep 0.7s 0.55s ease-out both;
}

.cite-chip {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 3px 9px;
  animation: chip-in 0.45s 1.1s ease-out both;
}

.doc-foot { margin-top: 20px; }
.doc-foot span {
  display: block;
  height: 3px;
  background: rgba(28, 42, 37, 0.1);
  border-radius: 1px;
}
.doc-foot span + span { margin-top: 8px; }
.doc-foot span:nth-child(2) { width: 84%; }
.doc-foot span:nth-child(3) { width: 62%; }

@keyframes pin-drop {
  from { opacity: 0; transform: translateY(-7px); }
  to   { opacity: 1; transform: none; }
}
@keyframes sweep {
  from { background-size: 0% 100%; }
  to   { background-size: 100% 100%; }
}
@keyframes chip-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- problem: the day ruler ---------- */
.ruler { margin-top: clamp(52px, 7vw, 88px); }

.ruler-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
}
.ruler-track::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--rule);
}

.tick {
  position: relative;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-align: center;
}
.tick i {
  display: block;
  width: 1px;
  height: 10px;
  margin: 0 auto 8px;
  background: rgba(28, 42, 37, 0.35);
}
.tick em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  margin-top: 3px;
  color: var(--ink-2);
}

.tick.t7 { color: var(--flag); }
.tick.t7 i { background: var(--flag); width: 2px; height: 14px; margin-top: -4px; }
.tick.t7 em { color: var(--flag); }

/* ---------- features: report line items ---------- */
.features { padding-bottom: clamp(48px, 6vw, 72px); }

.frow {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(36px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--rule);
}
.frow:last-child { border-bottom: none; }

.frow h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 1.2vw + 1rem, 1.7rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.frow p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 46ch;
}

/* per-feature artifacts — left edges line up as a third column, so the
   ragged widths of the chips / quote / numbers don't read as accidental */
.fart { justify-self: start; text-align: left; }

.zone {
  display: block;
  width: fit-content;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 2px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
}
.zone + .zone { margin-top: 8px; }
/* Red is this page's single "flagged" signal, so only the fire zone carries
   it. A second hue for flood implied a fire/flood/seismic legend the page
   never gives — the other chips stay neutral ink. */
.zone.z-fire { color: var(--flag); border-color: rgba(193, 53, 31, 0.4); }

.fart-cite {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.fart-quote {
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
  border-left: 1px solid var(--rule);
  padding-left: 14px;
  max-width: 30ch;
}

.fart-nums .num {
  display: block;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--ink);
}
.fart-nums .num em {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  margin-bottom: 2px;
}
.fart-nums .delta {
  display: inline-block;
  margin-top: 12px;
  padding-top: 6px;
  border-top: 2px solid rgba(193, 53, 31, 0.35);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--flag);
}

/* ---------- tech: the claim, with the Claude spec beside it ---------- */
.tech-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}

.tech .section-body { max-width: 44ch; }

.spec {
  border-top: 1px solid var(--rule);
  margin-top: 6px;
}
.spec-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 2px 20px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.spec dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.spec dd {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
}

/* ---------- waitlist ---------- */
.waitlist {
  background: var(--ink-deep);
  color: var(--on-deep);
}

.waitlist-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) clamp(20px, 5vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
}

.waitlist h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 3.4vw + 0.6rem, 3rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: #f2f5f2;
}

.waitlist-copy p {
  margin-top: 16px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--on-deep-2);
  max-width: 30em;
}

.wl-form { position: relative; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--on-deep-2);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: rgba(232, 238, 234, 0.06);
  border: 1px solid rgba(232, 238, 234, 0.22);
  border-radius: 2px;
  color: #f2f5f2;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 12px 14px;
}
.field input::placeholder { color: rgba(169, 186, 177, 0.55); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

.btn-solid {
  width: 100%;
  margin-top: 4px;
  background: #f2f5f2;
  color: var(--ink);
}
.btn-solid:hover { background: #ffffff; }

.form-note {
  margin-top: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--on-deep-2);
}
.form-note a { color: var(--on-deep); }

/* --flag is a dark red: on the ink band it lands near 2.6:1, under the 3:1
   bar for a focus indicator, so controls in this section ring in paper. */
.waitlist input:focus-visible,
.waitlist .btn-solid:focus-visible { outline-color: #f2f5f2; }

.field input[aria-invalid="true"] {
  border-color: rgba(193, 53, 31, 0.9);
  background: rgba(193, 53, 31, 0.08);
}

.form-ok {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  color: #f2f5f2;
}

/* ---------- footer ---------- */
.footer {
  background: var(--ink-deep);
  border-top: 1px solid var(--rule-deep);
  padding: 30px clamp(20px, 5vw, 48px) 44px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.footer p {
  font-size: 0.78rem;
  line-height: 1.6;
  color: #9fb0a7;
}

/* The informational-only notice is a printed notice, not fine print: ruled
   like a margin note so a skimming reviewer cannot miss it. */
.footer .notice {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.5;
  color: #cdd9d2;
  max-width: 62ch;
  border-left: 2px solid var(--rule-deep);
  padding-left: 16px;
}

.footer .contact { margin-top: 24px; font-size: 0.9rem; color: #e8eeea; }
.footer .contact a { text-decoration-color: var(--rule-deep); text-underline-offset: 4px; }
.footer .contact a:hover { text-decoration-color: #f2f5f2; }

.footer .copyright { margin-top: 10px; color: #9fb0a7; }
.footer a { color: inherit; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .docstack { max-width: 480px; }

  .frow {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
  }
  .fart { justify-self: start; }
  .fart-quote { max-width: none; }

  .waitlist-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .tech-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

@media (max-width: 560px) {
  .tick { font-size: 0.62rem; }
  .tick em { font-size: 0.62rem; max-width: 68px; }
  .doc-main { padding: 20px 16px 18px; }
  .ruler-track { padding-top: 8px; }
  .spec-row { grid-template-columns: 1fr; gap: 3px; padding: 12px 0; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .finding-label, .mark-hit, .cite-chip { animation: none; }
}
