/* =========================================================================
   Open Humans — open-humans.com marketing site
   Warm-editorial, local-first sovereignty direction.
   Theme tokens live here at the top; copy lives in index.html.
   ========================================================================= */

:root {
  /* palette */
  --bg:        #FAF8F4;  /* warm paper canvas */
  --ink:       #1A1714;  /* warm near-black */
  --ink-2:     #5C5650;  /* muted secondary text */
  --line:      #E8E2D8;  /* hairline borders */
  --card:      #F1ECE3;  /* half-tone panel fill */
  --surface:   #FFFFFF;  /* floated product shots */
  --accent:    #C24E25;  /* terracotta — the one accent (fills/buttons; ≥4.5:1 white-on) */
  --accent-2:  #A8431F;  /* deeper terracotta — accent TEXT on light + hover */
  --trust:     #2E6B4F;  /* trust-green — keys & 'available' only */
  --soon:      #A39A8C;  /* greyed taupe — decorative status DOT/fills only (low contrast) */
  --soon-text: #6B6256;  /* legible muted taupe — for 'coming soon' TEXT (passes AA) */

  /* type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* rhythm */
  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section: clamp(5rem, 10vw, 8rem);
  --radius: 14px;
  --shadow: 0 18px 40px -22px rgba(60, 40, 24, 0.30);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem); /* 17–19px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 520; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.mono { font-family: var(--mono); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .55rem .9rem; border-radius: 8px;
  transition: top .15s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

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

/* ---------- shared bits ---------- */
.eyebrow {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-2); font-weight: 600; margin-bottom: 1.1rem;
}
.section-h { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
.center { text-align: center; }
.body-lg { color: var(--ink-2); font-size: 1.0625rem; max-width: 46ch; }
.caption { color: var(--ink-2); font-size: .95rem; margin-top: 1rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.4rem; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: background .12s ease, transform .12s ease, border-color .12s ease, color .12s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-2); transform: translateY(-1px); }

/* status dots */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--soon); }
.status-dot.ok { background: var(--trust); }
.status-dot.trust { background: var(--trust); }

/* engine tag / pills */
.engine-tag {
  font-size: .72rem; padding: .15rem .5rem; border-radius: 6px;
  background: rgba(26,23,20,.05); color: var(--ink-2); border: 1px solid var(--line);
}
.pill {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
  padding: .25rem .55rem; border-radius: 999px; white-space: nowrap;
}
.pill.avail { background: rgba(200,85,43,.10); color: var(--accent-2); }
.pill.soon-pill { background: rgba(163,154,140,.16); color: var(--soon-text); }

/* device card (product shots) */
.device-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem; width: 100%;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-weight: 600; }
.brand:hover { color: var(--ink); }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-name { font-family: var(--serif); font-size: 1.18rem; letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { color: var(--ink-2); font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta {
  color: #fff; background: var(--accent); padding: .5rem 1rem; border-radius: 9px;
}
.site-nav .nav-cta:hover { background: var(--accent-2); color: #fff; }

/* ---------- 1 · hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; padding-top: clamp(3.5rem, 8vw, 6rem); padding-bottom: var(--section);
}
.hero h1 { font-size: clamp(2.75rem, 6vw, 5rem); font-weight: 520; margin-bottom: 1.4rem; }
.hero .lede { color: var(--ink-2); font-size: 1.15rem; max-width: 40ch; margin-bottom: 2rem; }
.hero .lede strong { color: var(--ink); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* hero / shared chat visual */
.member-row { display: flex; align-items: center; gap: .7rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.avatar {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: .9rem;
  font-family: var(--sans);
}
.avatar.a1 { background: #C8552B; }
.avatar.a2 { background: #2E6B4F; }
.avatar.a3 { background: #6B5BA8; }
.avatar.a4 { background: #B07A2E; }
.member-meta { display: flex; flex-direction: column; gap: .2rem; margin-right: auto; }
.member-name { font-weight: 600; font-size: .95rem; }
.mic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(200,85,43,.10); }
.mic-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: breathe 1.6s ease-in-out infinite; }

.bubble {
  display: flex; align-items: center; gap: .6rem; margin-top: .9rem;
  padding: .7rem .9rem; border-radius: 12px; font-size: .92rem; max-width: 92%;
}
.bubble.in { background: var(--card); }
.bubble.out { background: rgba(200,85,43,.08); margin-left: auto; }
.bubble-text { color: var(--ink); }
.wave { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.wave i { width: 3px; height: 6px; border-radius: 2px; background: var(--accent); animation: wave 1s ease-in-out infinite; }
.wave i:nth-child(2){ animation-delay: .1s } .wave i:nth-child(3){ animation-delay: .2s }
.wave i:nth-child(4){ animation-delay: .3s } .wave i:nth-child(5){ animation-delay: .4s }
.wave i:nth-child(6){ animation-delay: .5s } .wave i:nth-child(7){ animation-delay: .6s }
.wave.static i { animation: none; }
.wave.static i:nth-child(odd){ height: 12px } .wave.static i:nth-child(3n){ height: 16px }
.typing { display: inline-flex; gap: 3px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .5; animation: blink 1.2s infinite; }
.typing i:nth-child(2){ animation-delay: .2s } .typing i:nth-child(3){ animation-delay: .4s }

/* ---------- 2 · problem ---------- */
.problem { text-align: center; padding-block: var(--section); }
.problem p {
  font-family: var(--serif); font-size: clamp(1.4rem, 2.8vw, 2.1rem); line-height: 1.4;
  font-weight: 400; max-width: 22ch; margin-inline: auto;
}
@media (min-width: 768px) { .problem p { max-width: 28ch; } }

/* ---------- 3 · moment ---------- */
.moment { padding-bottom: var(--section); text-align: center; }
.moment .section-h { margin-bottom: 2.6rem; }
.vignettes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.vignette {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.4rem; text-align: left;
}
.v-scene { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-2); font-weight: 600; }
.v-quote { font-family: var(--serif); font-size: 1.2rem; line-height: 1.35; margin-top: .8rem; }
.moment-foot { color: var(--ink-2); margin-top: 2rem; }

/* ---------- split blocks (4, 6, 8) ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem);
  align-items: center; padding-block: var(--section);
}
.split.reverse .split-copy { order: 2; }
.split .section-h { margin-bottom: 1.2rem; }

.audio-shot .bubble.in { position: relative; }
.replay { border: none; background: var(--accent); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; padding: 0; }
.dur { font-size: .78rem; color: var(--ink-2); margin-left: auto; }
.status-line { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; font-size: .9rem; color: var(--ink-2); }

.fleet-list { display: flex; flex-direction: column; gap: .55rem; }
.fleet-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 10px; background: var(--card); }
.fleet-item .fi-name { font-weight: 600; font-size: .95rem; margin-right: auto; }

/* byok */
.byok-card { display: flex; flex-direction: column; gap: 1rem; }
.key-slot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .85rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.ks-label { font-size: .72rem; color: var(--ink-2); }
.ks-value { font-size: .9rem; margin-left: auto; letter-spacing: .02em; min-width: 0; overflow-wrap: anywhere; word-break: break-all; }
.ks-lock { color: var(--trust); display: inline-flex; }
.ks-stays { display: flex; align-items: center; gap: .5rem; font-size: .92rem; color: var(--trust); font-weight: 500; }
.ks-never { list-style: none; padding: 0; margin: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.ks-never .strike { color: var(--ink-2); font-size: .9rem; position: relative; }
.ks-never .strike::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 1.5px; background: var(--accent); transform: rotate(-6deg); }

/* ---------- 7 · swap the chip ---------- */
.swap { padding-block: var(--section); }
.swap-lede { color: var(--ink-2); max-width: 58ch; margin: 1.2rem auto 2.6rem; }
.swap-visual { display: flex; justify-content: center; }
.swap-card { max-width: 420px; }
.swap-card .bubble.out { margin-left: 0; }
.engine-select {
  display: flex; align-items: center; gap: .6rem; margin-top: 1rem;
  padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
.es-label { font-size: .8rem; color: var(--ink-2); }
.es-chip {
  position: relative; display: inline-grid; min-width: 84px; height: 1.4em; margin-right: auto;
}
.es-opt {
  grid-area: 1 / 1; font-size: .9rem; color: var(--accent-2); font-weight: 500;
  opacity: 0; transform: translateY(4px); transition: opacity .5s ease, transform .5s ease;
}
.es-opt.is-active { opacity: 1; transform: none; }
.es-caret { color: var(--ink-2); }

/* ---------- 5 · pillars ---------- */
.pillars { padding-bottom: var(--section); }
.pillars .section-h { margin-bottom: 2.8rem; }
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.4rem; }
.p-icon { display: inline-flex; width: 40px; height: 40px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); padding: 9px; margin-bottom: 1rem; }
.p-icon svg { width: 100%; height: 100%; }
.pillar h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.pillar p { color: var(--ink-2); font-size: .96rem; }

/* ---------- 9 · products ---------- */
.products { padding-block: var(--section); }
.products-intro { max-width: 52ch; margin-bottom: 2.6rem; }
.products-intro .section-h { margin-bottom: 1rem; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.product-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.5rem; display: flex; flex-direction: column; gap: .9rem;
}
.product-card.featured { background: var(--surface); border-color: rgba(200,85,43,.35); box-shadow: var(--shadow); }
.product-card.soon { opacity: 1; } /* don't dim live text — distinction comes from no-shadow + muted pill/link */
.pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.pc-head h3 { font-size: 1.5rem; }
.product-card p { color: var(--ink-2); font-size: .98rem; flex: 1; }
.pc-link { font-weight: 600; font-size: .95rem; color: var(--accent-2); }
.pc-link.muted { color: var(--soon-text); }

/* ---------- 10 · billing ---------- */
.billing { padding-bottom: var(--section); }
.billing .section-h { margin-bottom: 2.8rem; }
.ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: start; }
.rung { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem 1.5rem; position: relative; }
.rung.emphasized { background: var(--surface); border-color: rgba(200,85,43,.35); box-shadow: var(--shadow); }
.rung-n { font-size: .85rem; color: var(--accent-2); font-weight: 600; }
.rung h3 { font-size: 1.3rem; margin: .6rem 0 .5rem; }
.rung p { color: var(--ink-2); font-size: .96rem; }
.rung p strong { color: var(--ink); }
.rung-badge {
  position: absolute; top: 1.1rem; right: 1.1rem; font-size: .66rem; text-transform: uppercase;
  letter-spacing: .08em; font-weight: 600; color: var(--trust); background: rgba(46,107,79,.10);
  padding: .25rem .55rem; border-radius: 999px;
}
.billing-foot { text-align: center; color: var(--ink-2); margin-top: 2.4rem; font-size: .98rem; }

/* ---------- 11 · cta band ---------- */
.cta-band { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: var(--section); }
.cta-inner { text-align: center; max-width: 640px; }
.cta-inner .section-h { margin-bottom: 1rem; }
.cta-inner .body-lg { margin-inline: auto; margin-bottom: 2rem; }
.ea-form { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.ea-form input {
  font: inherit; font-size: 1rem; padding: .8rem 1.1rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  min-width: 280px; flex: 1 1 280px; max-width: 360px;
}
.ea-form input::placeholder { color: #6E665C; }
.ea-form input.invalid { border-color: var(--accent); }
.ea-status { min-height: 1.4em; margin-top: 1rem; font-size: .95rem; font-weight: 500; }
.ea-status.ok { color: var(--trust); }
.ea-status.err { color: var(--accent-2); }
.ea-micro { color: var(--ink-2); font-size: .85rem; margin-top: 1rem; }

/* ---------- footer ---------- */
.site-footer { padding-top: clamp(3rem, 6vw, 4.5rem); padding-bottom: 2.5rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.footer-brand { display: flex; gap: .8rem; max-width: 30ch; }
.footer-brand .brand-mark { color: var(--accent); margin-top: .2rem; }
.manifesto { color: var(--ink-2); font-size: .95rem; }
.footer-links { display: flex; flex-direction: column; gap: .7rem; }
.footer-links a { color: var(--ink); font-weight: 500; font-size: .95rem; display: flex; align-items: center; gap: .5rem; }
.footer-links a.muted { color: var(--ink-2); }
.footer-links .tag { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--soon-text); border: 1px solid var(--line); padding: .1rem .4rem; border-radius: 999px; }
.footer-links .tag.avail { color: var(--accent-2); border-color: rgba(200,85,43,.3); }
.footer-base { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-top: 1.5rem; color: var(--ink-2); font-size: .82rem; }
.footer-note { max-width: 52ch; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .4s ease-out, transform .4s ease-out; }
.reveal.in-view { opacity: 1; transform: none; }

/* =========================================================================
   responsive
   ========================================================================= */
@media (max-width: 1024px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .site-nav { gap: 1rem; }
  .site-nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero-visual { order: 2; }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split .split-visual, .split.reverse .split-copy, .split.reverse .split-visual { order: 0; }
  .split .split-copy { order: -1; }
  .vignettes { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: 1fr; }
  .rung.emphasized { order: -1; }
  .footer-base { flex-direction: column; gap: .6rem; }
}
@media (max-width: 480px) {
  .pillar-grid { grid-template-columns: 1fr; }
  .ea-form input { min-width: 0; }
}

/* =========================================================================
   reduced motion — hard off
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .es-opt { opacity: 0; }
  .es-opt.is-active { opacity: 1; transform: none; }
}

/* keyframes */
@keyframes breathe { 0%,100% { transform: scale(.7); opacity: .55; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes wave { 0%,100% { height: 5px; } 50% { height: 15px; } }
@keyframes blink { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
