/* ===========================================================================
   Postlad — landing page
   Tokens implement brand/BRAND.md §4. Every text pair here is AA-verified.
   =========================================================================== */

:root {
  --bg:            #FAF7F2;
  --surface:       #FFFFFF;
  --sunken:        #F1ECE3;
  --border:        #E3DBCE;
  --border-strong: #8C8375;
  --text:          #1A1714;
  --muted:         #645A4D;
  --accent:        #B8410F;
  --accent-strong: #8F3009;
  --on-accent:     #FFFFFF;
  --ok:            #0F6B45;

  --term-bg:    #211D18;
  --term-text:  #EDE6DA;
  --term-acc:   #FFA05C;
  --term-dim:   #A2988A;
  --term-edge:  #3A332B;

  --accent-wash: rgba(184, 65, 15, 0.09);
  --shadow: 0 1px 2px rgba(26,23,20,.05), 0 12px 32px -12px rgba(26,23,20,.18);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  --radius: 14px;
  --wrap: 1120px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #121110;
    --surface:       #1B1917;
    --sunken:        #232019;
    --border:        #312D27;
    --border-strong: #6E6558;
    --text:          #F4EFE8;
    --muted:         #A9A093;
    --accent:        #FF9257;
    --accent-strong: #FFB183;
    --on-accent:     #1A1714;
    --ok:            #4FD3A0;

    --term-bg:   #0C0B0A;
    --term-dim:  #8E857A;
    --term-edge: #262220;

    --accent-wash: rgba(255, 146, 87, 0.12);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6);
  }
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: -.03em; line-height: 1.02; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.02em; }
h3 { font-size: 1.125rem; font-weight: 650; letter-spacing: -.01em; }
p  { margin: 0 0 1rem; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-strong); }

code, pre { font-family: var(--font-mono); }

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

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--surface); color: var(--text);
  padding: 10px 16px; border-radius: 8px; border: 1px solid var(--border-strong);
  transition: top .15s;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow, .label {
  font-size: .75rem; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
.micro { font-size: .875rem; color: var(--muted); }
.section-lead {
  font-size: clamp(1.02rem, 2vw, 1.125rem);
  color: var(--muted); max-width: 46em; margin-bottom: 2rem;
}
.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.55; color: var(--muted); max-width: 34em;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .8rem 1.35rem;
  font: inherit; font-weight: 600; line-height: 1.2;
  border-radius: 10px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-quiet {
  padding: .5rem .9rem; font-size: .9375rem;
  border-color: var(--border-strong); color: var(--text);
}
.btn-quiet:hover { border-color: var(--accent); color: var(--accent); }
.btn[disabled] { opacity: .6; cursor: default; }

/* --------------------------------------------------------------- head --- */

.site-head {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
/* the head-only tile, not the full mascot — see BRAND.md §7 on minimum sizes */
.brand-mascot { width: 32px; height: 32px; border-radius: 7px; display: block; }
.brand-mark { width: 116px; height: auto; display: block; }
.brand-dot { fill: var(--accent); }

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

.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: 1fr 1.06fr; }
}

.eyebrow { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.1rem; }
.pip {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.pip-ok { background: var(--ok); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1rem; }

/* ---------------------------------------------------------- demo card --- */

.demo { margin: 0; }
.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.demo-note { margin: .85rem 2px 0; }

.term { background: var(--term-bg); color: var(--term-text); }
.term-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--term-edge);
}
.term-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #4A423A; }
.term-bar .d1 { background: #C9500F; }
.term-title {
  margin-left: auto; font-family: var(--font-mono);
  font-size: .75rem; color: var(--term-dim);
}
.term-body {
  margin: 0; padding: 16px 14px 18px;
  /* the floor keeps the GET line on one row at 390px */
  font-size: clamp(.66rem, 1.5vw, .875rem);
  line-height: 1.75; white-space: pre-wrap; word-break: break-all;
}
.term .dim { color: var(--term-dim); }
.term .cmd { color: var(--term-acc); }
.term .ok  { color: var(--term-text); }
.term .resp { opacity: 0; transition: opacity .25s; }
.term .resp.on { opacity: 1; }
.caret {
  display: inline-block; width: .55em; height: 1.05em;
  background: var(--term-acc); vertical-align: -.18em; margin-left: 1px;
  animation: blink 1.05s steps(1) infinite;
}
.caret.done { animation: none; opacity: 0; }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

.chart-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; padding: 14px 16px 6px;
}
.stream-name { display: block; font-family: var(--font-mono); font-size: .9375rem; }
.readout { text-align: right; }
.live {
  display: flex; align-items: center; justify-content: flex-end; gap: .38rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ok);
}
.value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.unit { font-size: .95rem; font-weight: 600; color: var(--muted); margin-left: 2px; }

.chart { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--border); stroke-width: 1.5; }
.chart .line {
  fill: none; stroke: var(--accent); stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
}
.chart .area { fill: var(--accent-wash); stroke: none; }
.chart .head { fill: var(--accent); stroke: var(--surface); stroke-width: 3.5; }

/* -------------------------------------------------------------- bands --- */

.band { padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid var(--border); }
.band.alt { background: var(--sunken); }

/* ---------------------------------------------------------------steps --- */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1.4rem 1.4rem;
  display: flex; flex-direction: column;
}
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-size: .9rem; font-weight: 700; margin-bottom: .9rem;
}
.step p { color: var(--muted); flex: 1; }
.snip {
  margin: 1rem 0 0; padding: .75rem .85rem;
  background: var(--term-bg); color: var(--term-text);
  border-radius: 9px; font-size: clamp(.7rem, 1.5vw, .8125rem);
  line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
}
.snip .hl { color: var(--term-acc); }

/* ------------------------------------------------------------- table --- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare {
  width: 100%; min-width: 620px;
  border-collapse: separate; border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; font-size: .9375rem;
}
.compare th, .compare td {
  padding: .9rem 1rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.compare thead th {
  background: var(--sunken); font-size: .75rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.band.alt .compare thead th { background: var(--bg); }
.compare tbody th { font-weight: 650; white-space: nowrap; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare tr.us { background: var(--accent-wash); }
.compare tr.us th, .compare tr.us td { color: var(--text); }
.compare .na { color: var(--muted); font-style: italic; }
.tag {
  display: inline-block; margin-left: .4rem; padding: .1rem .45rem;
  border: 1px solid var(--accent); border-radius: 5px;
  font-size: .6875rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent); vertical-align: 2px;
}
.table-note { margin-top: 1rem; max-width: 60em; }

/* ------------------------------------------------------------ promise --- */

.promise-wrap { display: flex; align-items: center; gap: 2.5rem; }
.promise { flex: 1; min-width: 0; }
.promise-lad { width: clamp(110px, 14vw, 160px); height: auto; flex: none; }
@media (max-width: 720px) { .promise-lad { display: none; } }

.ticks { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; gap: .7rem; }
.ticks li { display: flex; align-items: flex-start; gap: .7rem; color: var(--muted); }
.ticks strong { color: var(--text); font-weight: 650; }
.tick {
  flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%;
  background: var(--accent);
  -webkit-mask: var(--tick-svg) center / 13px 13px no-repeat,
                linear-gradient(#000 0 0);
  mask: var(--tick-svg) center / 13px 13px no-repeat, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  --tick-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8.6 6 12.5 14 3.8' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.promise-line {
  margin: 0; padding-top: 1.4rem; border-top: 1px solid var(--border);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem); font-weight: 650; letter-spacing: -.01em;
}

/* ----------------------------------------------------------- waitlist --- */

.wl { margin: 0 0 .5rem; max-width: 560px; }
.wl-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.wl input[type="email"] {
  flex: 1 1 260px; min-width: 0;
  padding: .8rem 1rem; font: inherit;
  color: var(--text); background: var(--surface);
  border: 1.5px solid var(--border-strong); border-radius: 10px;
}
.wl input[type="email"]::placeholder { color: var(--muted); }
.wl input[type="email"]:focus-visible { border-color: var(--accent); }
.wl input[type="email"][aria-invalid="true"] { border-color: var(--accent); }

.hp {
  position: absolute; left: -9999px; top: 0;
  width: 1px; height: 1px; overflow: hidden; opacity: 0;
}

.wl-status { min-height: 1.5rem; font-size: .9375rem; margin: .35rem 0 0; }
.wl-status.err { color: var(--accent); }
.wl-status.ok  { color: var(--ok); font-weight: 600; }

/* --------------------------------------------------------------- foot --- */

.site-foot { border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; }
.foot-inner {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  align-items: baseline; justify-content: space-between;
}
.foot-line { margin: 0; font-weight: 600; }
.foot-meta { margin: 0; color: var(--muted); font-size: .9375rem; }
.foot-meta .sep { margin: 0 .5rem; }

/* ---------------------------------------------------- reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .caret { display: none; }
}
