/* ------------------------------------------------------------------
   Ornova: "field guide" look. Warm paper, ink, one saffron accent
   (the kinglet's crown). All colors and sizes are named tokens here.
   ------------------------------------------------------------------ */

/* Self-hosted fonts (SIL Open Font License, see fonts/OFL-*.txt).
   Served from our own site, so visitors never contact a third party. */
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-300-normal.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #f3efe6;
  --ink: #1b1a16;
  --muted: #6e695e;
  --faint: #a29c8f;
  --line: #dad3c4;
  --crown: #b8741a;          /* saffron, for marks and the curve */
  --crown-ink: #8f560b;      /* darker saffron, readable as text on paper */
  --grain-opacity: 0.06;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --page: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --margin-col: 168px;       /* left column for field-note labels */
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #13130f;
    --ink: #ece6d8;
    --muted: #a19a8b;
    --faint: #6c665a;
    --line: #2d2b25;
    --crown: #e3a443;
    --crown-ink: #e8b25c;
    --grain-opacity: 0.08;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper grain: a faint noise texture over everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--crown); color: var(--paper); }

a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--crown); }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Draft banner ---------- */
.draft-banner {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 7px var(--gutter);
  color: var(--crown-ink);
  border-bottom: 1px dashed var(--crown);
}

/* ---------- Layout frame ---------- */
.frame { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

/* Wordmark: "Ornova" with a small crown stroke over the O. */
.wordmark {
  position: relative;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding-top: 6px;
}
.wordmark::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 15px;
  height: 3px;
  border-radius: 2px;
  background: var(--crown);
}

.site-header .mono { color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: var(--margin-col) 1fr;
  gap: 0 32px;
  padding: clamp(112px, 19vw, 236px) 0 clamp(72px, 10vw, 128px);
}

.notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 18px;
  color: var(--muted);
}
.notes .num { color: var(--crown-ink); }

.hero-body { position: relative; z-index: 1; max-width: 700px; }

h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 36px;
}
h1 em { font-style: italic; font-weight: 400; color: var(--crown-ink); }

.lede {
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 48px;
}

.hero-home { padding-bottom: clamp(48px, 6vw, 80px); }

/* The glide path: one thin curve across the top of the hero, coming in to land. */
.glide {
  position: absolute;
  left: 0;
  right: 0;
  top: clamp(20px, 3.5vw, 44px);
  width: 100%;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.glide .axis, .glide .tick { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.glide .path {
  fill: none;
  stroke: var(--crown);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.6s cubic-bezier(.6, .05, .25, 1) .5s forwards;
}
.glide .bird { fill: var(--crown); opacity: 0; animation: land .5s ease-out 2.9s forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes land { to { opacity: 1; } }

/* ---------- Coming soon (replaces the waitlist until it's switched on) ---------- */
.soon { max-width: 520px; padding-top: 20px; border-top: 1px solid var(--ink); }
.soon .label { display: block; color: var(--crown-ink); margin-bottom: 8px; }
.soon p { margin: 0; font-size: 19px; color: var(--muted); }
.soon a { color: var(--ink); text-decoration-color: var(--crown); }

/* ---------- Waitlist (parked; see legal-drafts/waitlist/) ---------- */
.waitlist {
  display: flex;
  align-items: stretch;
  max-width: 520px;
  border-bottom: 1px solid var(--ink);
  transition: border-color .2s;
}
.waitlist:focus-within { border-bottom-color: var(--crown); }

.waitlist input {
  flex: 1;
  min-width: 0;
  font-family: var(--serif);
  font-size: 21px;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
}
.waitlist input::placeholder { color: var(--faint); font-style: italic; }

.waitlist button {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0 0 0 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.waitlist button .arrow { display: inline-block; transition: transform .25s ease; color: var(--crown-ink); }
.waitlist button:hover .arrow,
.waitlist button:focus-visible .arrow { transform: translateX(5px); }
.waitlist button:focus-visible { outline: 2px solid var(--crown); outline-offset: 4px; }

.fine-print { font-size: 15px; color: var(--muted); margin: 14px 0 0; max-width: 520px; }

/* ---------- Principles ("field notes") ---------- */
.principles {
  display: grid;
  grid-template-columns: var(--margin-col) repeat(3, 1fr);
  gap: 0 32px;
  padding: 56px 0 clamp(80px, 10vw, 128px);
  border-top: 1px solid var(--line);
}
.principles > .mono { color: var(--muted); padding-top: 6px; }

.note { position: relative; padding-left: 20px; border-left: 1px solid var(--line); }
.note .num { display: block; color: var(--crown-ink); margin-bottom: 18px; }
.note h2 { font-weight: 400; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 12px; }
.note p { color: var(--muted); font-size: 17px; margin: 0; }

/* ---------- Navigation ---------- */
.nav { display: flex; gap: 24px; }
.nav a, .byline { color: var(--muted); text-decoration: none; }
.nav a:hover, .byline:hover { color: var(--ink); }

/* ---------- Products (company home) ---------- */
.products,
.contact {
  display: grid;
  grid-template-columns: var(--margin-col) 1fr;
  gap: 0 32px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.products .label, .contact .label { color: var(--muted); padding-top: 6px; }

.product {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: baseline;
  gap: 8px 24px;
  padding: 28px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.product .num { color: var(--crown-ink); }
.product-name { font-size: clamp(36px, 5vw, 56px); font-weight: 300; letter-spacing: -0.02em; line-height: 1; }
.product-desc { grid-column: 2 / 4; color: var(--muted); font-size: 18px; max-width: 34em; }
.product-link { grid-column: 3; grid-row: 1; color: var(--ink); white-space: nowrap; }
.product-link .arrow { display: inline-block; color: var(--crown-ink); transition: transform .25s ease; }
.product:hover .product-link .arrow,
.product:focus-visible .product-link .arrow { transform: translateX(5px); }
.product:hover .product-name { color: var(--crown-ink); }
.product:focus-visible { outline: 2px solid var(--crown); outline-offset: 6px; }

.contact { padding-bottom: clamp(80px, 10vw, 128px); }
.contact-line { color: var(--muted); margin: 0 0 6px; }
.contact-email { font-size: clamp(26px, 3.4vw, 36px); font-weight: 300; letter-spacing: -0.01em; text-decoration-color: var(--crown); }

.footer-links { display: flex; gap: 24px; }

/* ---------- Statement, updates strip, FAQ ---------- */
.statement, .updates-strip, .faq {
  display: grid;
  grid-template-columns: var(--margin-col) 1fr;
  gap: 0 32px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.statement .label, .updates-strip .label, .faq .label { color: var(--muted); padding-top: 6px; }
.statement-text {
  font-weight: 300; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -0.02em;
  margin: 0 0 20px; max-width: 18em;
}
.statement-body { color: var(--muted); max-width: 36em; margin: 0; }

.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a {
  display: grid; grid-template-columns: 200px 1fr; gap: 4px 24px; align-items: baseline;
  padding: 18px 0; text-decoration: none; color: var(--ink);
}
.post-list .post-date { color: var(--muted); }
.post-list .post-title { font-size: 22px; }
.post-list a:hover .post-title { color: var(--crown-ink); }
.more { display: inline-block; margin-top: 16px; text-decoration: none; color: var(--ink); }
.more .arrow { display: inline-block; color: var(--crown-ink); transition: transform .25s ease; }
.more:hover .arrow { transform: translateX(5px); }

.faq { padding-bottom: clamp(80px, 10vw, 128px); }
.faq dl { margin: 0; border-top: 1px solid var(--ink); }
.faq dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 4px 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.faq dt { font-size: 20px; }
.faq dd { margin: 0; color: var(--muted); font-size: 17px; }

/* Long-form prose (posts, careers) */
.doc .prose { max-width: 640px; }
.doc .prose h2 { margin-top: 36px; }
.doc .body p.lede-sm { font-size: 22px; line-height: 1.45; color: var(--ink); margin-bottom: 24px; }
.doc .body p.back { font-size: 12px; margin-top: 40px; }
.doc .body p.back a { text-decoration: none; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Long-form pages (privacy notice) ---------- */
.doc {
  display: grid;
  grid-template-columns: var(--margin-col) minmax(0, 680px);
  gap: 0 32px;
  padding: clamp(56px, 9vw, 112px) 0 96px;
}
.doc-title h1 { font-size: clamp(40px, 6vw, 68px); margin-bottom: 20px; }
.doc-meta { color: var(--muted); margin: 0 0 48px; }
.doc section { display: contents; }
.doc .sec { color: var(--crown-ink); padding-top: 9px; }
.doc h2 { font-weight: 400; font-size: 26px; letter-spacing: -0.01em; margin: 0 0 12px; }
.doc .body { margin-bottom: 44px; }
.doc .body p, .doc .body li { color: var(--ink); font-size: 18px; }
.doc .body p { margin: 0 0 14px; }
.doc .body ul { margin: 0 0 14px; padding-left: 1.1em; }
.doc .body li { margin-bottom: 6px; }
.doc .body li::marker { color: var(--crown); }

.doc .summary { border-left: 2px solid var(--crown); padding-left: 20px; }
.doc .todo { font-family: var(--mono); font-size: 13px; color: var(--crown-ink); }
.doc .body p.version { font-size: 12px; color: var(--muted); margin-top: 28px; }

.table-wrap { overflow-x: auto; margin: 4px 0 20px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 16px; }
.doc th {
  font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); text-align: left;
  padding: 0 14px 10px 0; border-bottom: 1px solid var(--ink);
}
.doc td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc td:first-child { width: 36%; }

.callout {
  border: 1px dashed var(--crown);
  padding: 16px 18px;
  margin: 0 0 48px;
  font-size: 16px;
  color: var(--muted);
}
.callout strong { color: var(--crown-ink); font-weight: 500; }

/* ---------- Load-in: one calm, staggered reveal ---------- */
.reveal { opacity: 0; transform: translateY(10px); animation: rise .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.reveal.d1 { animation-delay: .05s; }
.reveal.d2 { animation-delay: .18s; }
.reveal.d3 { animation-delay: .32s; }
.reveal.d4 { animation-delay: .46s; }
.reveal.d5 { animation-delay: .7s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .glide .path, .glide .bird { animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .hero, .principles, .doc, .products, .contact, .statement, .updates-strip, .faq { grid-template-columns: minmax(0, 1fr); }
  .statement .label, .updates-strip .label, .faq .label { padding: 0 0 16px; }
  .post-list a, .faq dl > div { grid-template-columns: minmax(0, 1fr); }
  .products .label, .contact .label { padding: 0 0 16px; }
  .product { grid-template-columns: minmax(0, 1fr); }
  .product-desc, .product-link { grid-column: 1; grid-row: auto; }
  .hero-body { min-width: 0; }
  .notes { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; padding: 0 0 28px; }
  .principles { gap: 36px; }
  .principles > .mono { padding-top: 0; }
  .doc .sec { padding-top: 0; margin-bottom: 6px; }
}

/* Hidden on screen but still read by screen readers. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
