/* Parakeet waitlist. Tokens are DESIGN.md's: paper and ink, one spruce accent, clay for problems.
   Flat fills, no shadows, no gradients. Motion is ease-out, under 300 ms, position and opacity only. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #F5F0E6;
  --field: #FBF8F1;
  --ink: #1E1B16;
  --muted: #5F584D;
  --line: rgba(30, 27, 22, .22);
  --accent: #2F5D50;
  --on-accent: #F5F0E6;
  --alert: #9E4526;
  --select: rgba(47, 93, 80, .22);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --serif: ui-serif, "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171512;
    --field: #1E1B17;
    --ink: #EDE7DA;
    --muted: #A59E90;
    --line: rgba(237, 231, 218, .24);
    --accent: #86BBA8;
    --on-accent: #171512;
    --alert: #E08A66;
    --select: rgba(134, 187, 168, .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--select); }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
main { flex: 1; }

.top { padding: .5rem 0 0; }
.wordmark {
  font: 500 1.5rem/1 var(--serif);
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}

/* ---- Hero ---- */
.hero { display: grid; gap: 2.75rem; padding: clamp(2.5rem, 9vh, 5rem) 0 2.5rem; }
h1 {
  font: 450 clamp(2.4rem, 9.2vw, 4.6rem)/1.04 var(--serif);
  letter-spacing: -.025em;
  margin: 0;
  text-wrap: balance;
}
.lede {
  font-size: clamp(1.0625rem, 2.6vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 30rem;
  margin: 1.25rem 0 0;
  text-wrap: pretty;
}

/* ---- Form ---- */
.join { margin-top: 2rem; max-width: 32rem; position: relative; }
.field-label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: .5rem; }
.row { display: grid; gap: .625rem; }
input[type="text"] {
  width: 100%;
  min-height: 3.25rem;
  padding: .75rem 1rem;
  font: inherit;
  font-size: 1rem; /* 16px minimum: iOS Safari zooms smaller fields */
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .15s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
input[type="text"]::placeholder { color: var(--muted); opacity: .75; }
input[type="text"]:hover { border-color: var(--muted); }
input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--alert); }

button {
  min-height: 3.25rem;
  padding: .75rem 1.5rem;
  font: 600 1rem/1 var(--sans);
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .15s var(--ease), transform .15s var(--ease);
  -webkit-appearance: none;
  appearance: none;
  white-space: nowrap;
}
button:hover { opacity: .92; }
button:active { transform: translateY(1px); opacity: .88; }
button[disabled] { cursor: progress; opacity: .6; transform: none; }

.hint { margin: .75rem 0 0; min-height: 1.5em; font-size: .9375rem; color: var(--muted); }
.hint.is-error { color: var(--alert); }
.fine { margin: .5rem 0 0; font-size: .8125rem; line-height: 1.45; color: var(--muted); max-width: 30rem; }
.fine a { color: inherit; }
.check:empty { display: none; }
.check { margin-top: .75rem; }

/* The honeypot: present for bots, absent for people and screen readers. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

form { transition: opacity .18s var(--ease); }
form.is-leaving { opacity: 0; }
.done { opacity: 0; transform: translateY(4px); transition: opacity .28s var(--ease), transform .28s var(--ease); outline: none; }
.done.is-in { opacity: 1; transform: none; }
.done h2 { font: 450 clamp(1.75rem, 6vw, 2.25rem)/1.1 var(--serif); letter-spacing: -.02em; margin: 0; }
.done p { margin: .75rem 0 0; color: var(--muted); font-size: 1.0625rem; max-width: 28rem; }
[hidden] { display: none !important; }

/* ---- The example thread: the product's own voice is the picture ---- */
.thread { margin: 0; display: flex; flex-direction: column; gap: 1rem; align-self: center; width: 100%; max-width: 26rem; padding: 1.25rem 0 0; border-top: 1px solid var(--line); }
.msg { margin: 0; display: flex; flex-direction: column; gap: .125rem; max-width: 85%; }
.msg time { font: .75rem/1.2 var(--mono); color: var(--muted); }
.msg span { font: 450 1.375rem/1.25 var(--serif); letter-spacing: -.01em; text-wrap: pretty; }
.msg.out { align-self: flex-end; text-align: right; }
.msg.out span { color: var(--muted); font-style: italic; }

/* Messages arrive one by one. Everything is in the DOM from the start, so reading, search and no-motion all see it. */
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .28s var(--ease) both; }
.r0 { animation-delay: 0s; } .r1 { animation-delay: .04s; } .r2 { animation-delay: .1s; } .r3 { animation-delay: .16s; }
.msg { animation: rise .28s var(--ease) both; }
.m1 { animation-delay: .7s; } .m2 { animation-delay: 1.9s; } .m3 { animation-delay: 3.4s; } .m4 { animation-delay: 5.7s; }

@keyframes wait { 0% { opacity: 0; } 20% { opacity: 1; } 40% { opacity: .3; } 60% { opacity: 1; } 80% { opacity: .3; } 100% { opacity: 0; } }
.slot { position: relative; }
.typing { position: absolute; left: 0; top: .5rem; margin: 0; display: flex; gap: 5px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: 0; animation: wait 1.4s 4.2s 1 forwards; }
.typing i:nth-child(2) { animation-delay: 4.3s; }
.typing i:nth-child(3) { animation-delay: 4.4s; }

/* ---- Principles ---- */
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.principles li { font: 450 1.375rem/1.3 var(--serif); letter-spacing: -.01em; padding: 1.125rem 0; border-bottom: 1px solid var(--line); }

/* ---- Footer ---- */
.foot { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; font-size: .875rem; color: var(--muted); }
.foot a { color: inherit; }

/* ---- Prose pages ---- */
.prose { max-width: 38rem; padding: clamp(2rem, 7vh, 4rem) 0 3rem; }
.prose h1 { font-size: clamp(2rem, 7vw, 3rem); }
.prose h2 { font: 600 1rem/1.4 var(--sans); margin: 2rem 0 .25rem; }
.prose p { margin: .25rem 0 0; max-width: 34rem; }
.prose .lede { margin-top: 1rem; font-size: 1.125rem; }
code { font: .875em var(--mono); }

/* ---- Wider screens ---- */
@media (min-width: 40rem) {
  .row { grid-template-columns: 1fr auto; }
  .principles { grid-template-columns: repeat(3, 1fr); border-bottom: 0; }
  .principles li { padding: 1.5rem 1.5rem 1.5rem 0; border-bottom: 0; }
  .principles li + li { padding-left: 1.5rem; border-left: 1px solid var(--line); }
}
@media (min-width: 62rem) {
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 5rem; align-items: center; padding-top: clamp(3rem, 12vh, 7rem); }
  .thread { border-top: 0; padding: 0 0 0 3rem; border-left: 1px solid var(--line); max-width: none; align-self: stretch; justify-content: center; }
  .foot { padding-top: 2.5rem; }
  .msg span { font-size: 1.625rem; }
}

/* ---- No motion: everything simply there, loops stopped ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .typing { display: none; }
  .done { transform: none; }
}
