/* ==========================================================================
   PourOverAI — design system
   Palette is roast-derived: warm near-black ground, unbleached-paper ink,
   amber used only where light passes through liquid. Never as a flat fill.
   ========================================================================== */

:root {
  /* colour */
  --void:      #0A0807;
  --void-2:    #0E0B0A;
  --grounds:   #17130F;
  --filter:    #EDE6DB;
  --ash:       #8E8378;
  --ash-dim:   #6A6058;
  --extract:   #C97B2C;
  --extract-lt:#E8A75C;
  --line:      rgb(237 230 219 / 0.10);
  --line-2:    rgb(237 230 219 / 0.18);

  /* type */
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body:    "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-display: clamp(3.1rem, 8.2vw, 8.25rem);
  --fs-h2:      clamp(2rem, 4.2vw, 3.75rem);
  --fs-h3:      clamp(1.2rem, 1.5vw, 1.5rem);
  --fs-lede:    clamp(1.05rem, 1.25vw, 1.3rem);
  --fs-body:    clamp(0.975rem, 1vw, 1.0625rem);
  --fs-mono:    0.7rem;

  /* space */
  --gutter:  clamp(1.25rem, 5vw, 4.5rem);
  --section: clamp(5.5rem, 11vw, 11rem);
  --maxw:    1320px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--filter);
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--extract); color: var(--void); }

:where(a, button, summary, details):focus-visible {
  outline: 1px solid var(--extract-lt);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip {
  position: fixed; top: 0; left: 0; z-index: 200;
  padding: .75rem 1.25rem; background: var(--filter); color: var(--void);
  font: 500 .85rem/1 var(--body);
  transform: translateY(-120%);
}
.skip:focus { transform: none; }

/* ------------------------------------------------------------- layout -- */
.wrap {
  width: 100%; max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 900px; }

.section { padding-block: var(--section); position: relative; }
.section--edge { border-top: 1px solid var(--line); background: var(--void-2); }

/* -------------------------------------------------------------- type -- */
.display {
  font-family: var(--display);
  font-size: var(--fs-display);
  font-weight: 350;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  line-height: .93;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.display span { display: block; }
.display__quiet { color: var(--ash); font-style: italic; font-weight: 300; }
.display--sm { font-size: var(--fs-h2); letter-spacing: -0.03em; }

.h2 {
  font-family: var(--display);
  font-size: var(--fs-h2);
  font-weight: 350;
  font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
  line-height: 1.02;
  letter-spacing: -0.028em;
  max-width: 20ch;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ash-dim);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .85em;
}
.eyebrow i { width: 14px; height: 1px; background: var(--line-2); display: inline-block; }

.lede {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--ash);
  max-width: 56ch;
  text-wrap: pretty;
}

.head { margin-bottom: clamp(3rem, 5vw, 4.75rem); }
.head .eyebrow { margin-bottom: 1.5rem; }
.head__note {
  margin-top: 1.75rem;
  color: var(--ash);
  max-width: 52ch;
  text-wrap: pretty;
}

/* ------------------------------------------------------------ buttons -- */
.btn {
  --btn-fg: var(--filter);
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95rem 1.65rem;
  border: 1px solid var(--line-2);
  color: var(--btn-fg);
  font-size: .925rem; font-weight: 500; letter-spacing: -.005em;
  border-radius: 999px;
  transition: border-color .45s var(--ease), color .45s var(--ease), background-color .45s var(--ease), transform .45s var(--ease);
}
.btn:hover { border-color: var(--filter); transform: translateY(-1px); }
.btn--accent { border-color: rgb(201 123 44 / .55); color: var(--extract-lt); }
.btn--accent:hover { border-color: var(--extract); background: rgb(201 123 44 / .09); color: var(--extract-lt); }
.btn--ghost { color: var(--ash); }
.btn--ghost:hover { color: var(--filter); }
.btn--sm { padding: .6rem 1.1rem; font-size: .85rem; }

/* --------------------------------------------------------- scroll rule -- */
.pourline {
  position: fixed; inset-block: 4.75rem 0; left: 0; width: 1px; z-index: 80;
  background: var(--line);
  pointer-events: none;
}
.pourline__fill {
  display: block; width: 100%; height: 0;
  background: linear-gradient(180deg, transparent, rgb(201 123 44 / .55) 40%, var(--extract));
  transform-origin: top;
}
@media (max-width: 860px) { .pourline { display: none; } }

/* ---------------------------------------------------------------- nav -- */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  transition: background-color .5s var(--ease), border-color .5s var(--ease), backdrop-filter .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgb(10 8 7 / .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 1.15rem var(--gutter);
  display: flex; align-items: center; gap: 2rem;
}
.mark { display: inline-flex; align-items: center; gap: .6rem; }
.mark__glyph { width: 22px; height: 22px; color: var(--extract-lt); flex: none; }
.mark__word {
  font-family: var(--display);
  font-variation-settings: "opsz" 24, "SOFT" 0, "WONK" 0;
  font-size: 1.06rem; font-weight: 500; letter-spacing: -.02em;
}
.mark__word em { font-style: normal; color: var(--extract-lt); }

.nav__links { margin-left: auto; display: flex; gap: 2rem; }
.nav__links a {
  font-size: .875rem; color: var(--ash);
  transition: color .35s var(--ease);
  position: relative;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav__links a:hover { color: var(--filter); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle { display: none; margin-left: auto; padding: .5rem; }
.nav__toggle span { display: block; width: 22px; height: 1px; background: var(--filter); }
.nav__toggle span + span { margin-top: 6px; }
.nav__drawer { display: none; }

@media (max-width: 860px) {
  .nav__links, .nav .btn--sm { display: none; }
  .nav__toggle { display: block; }
  .nav__drawer {
    display: grid; gap: .35rem;
    padding: .5rem var(--gutter) 1.6rem;
    background: rgb(10 8 7 / .96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .nav__drawer[hidden] { display: none; }
  .nav__drawer a { padding: .7rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
}

/* --------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: clamp(7rem, 16vh, 11rem);
  padding-bottom: 0;
  overflow: hidden;
}
.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.hero__canvas.is-live { opacity: 1; }
.hero__veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(110% 70% at 78% 26%, rgb(201 123 44 / .11), transparent 64%),
    linear-gradient(180deg, var(--void) 0%, rgb(10 8 7 / .72) 7%, transparent 26%, transparent 58%, var(--void) 96%);
}
.hero__inner {
  position: relative; z-index: 2;
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}
@media (max-width: 900px) {
  /* the stream shares the frame with the headline, so back the text with ground */
  .hero__veil {
    background:
      radial-gradient(90% 50% at 88% 30%, rgb(201 123 44 / .09), transparent 66%),
      linear-gradient(90deg, var(--void) 0%, rgb(10 8 7 / .92) 52%, rgb(10 8 7 / .35) 88%, transparent 100%),
      linear-gradient(180deg, var(--void) 0%, rgb(10 8 7 / .7) 8%, transparent 24%, transparent 62%, var(--void) 96%);
  }
}
.hero .eyebrow { margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.hero .display { margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.hero .lede { margin-bottom: clamp(2.25rem, 3.5vw, 3rem); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .85rem; }

.spec {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--maxw);
  margin-inline: auto;
  width: 100%;
  padding-inline: var(--gutter);
}
.spec__item { padding: 1.6rem 0 1.75rem; }
.spec__item + .spec__item { border-left: 1px solid var(--line); padding-left: clamp(1rem, 3vw, 2.5rem); }
.spec dt {
  font-family: var(--mono); font-size: var(--fs-mono);
  letter-spacing: .18em; text-transform: uppercase; color: var(--ash-dim);
  margin-bottom: .55rem;
}
.spec dd { font-size: .95rem; color: var(--filter); }
@media (max-width: 720px) {
  .spec { grid-template-columns: 1fr; }
  .spec__item + .spec__item { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .spec__item { padding-block: 1.05rem; }
}

/* -------------------------------------------------------------- steps -- */
.steps { border-top: 1px solid var(--line); }
.step {
  display: grid;
  grid-template-columns: 3rem 8.5rem minmax(0, 1fr);
  gap: clamp(1rem, 2.4vw, 2.25rem);
  padding-block: clamp(2.25rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  transition: background-color .6s var(--ease);
}
.step:hover { background: rgb(237 230 219 / .012); }
.step__idx {
  font-family: var(--mono); font-size: var(--fs-mono);
  letter-spacing: .18em; color: var(--ash-dim); padding-top: .5rem;
}
.step__stage {
  font-family: var(--display);
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 1;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 350; font-style: italic;
  color: var(--extract-lt);
  letter-spacing: -.02em;
  padding-top: .1rem;
}
.step__body h3 {
  font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.015em;
  margin-bottom: .7rem;
}
.step__body p { color: var(--ash); max-width: 62ch; text-wrap: pretty; }
@media (max-width: 760px) {
  .step { grid-template-columns: 3.25rem minmax(0, 1fr); gap: 1rem 1.25rem; }
  .step__stage { grid-column: 2; padding-top: 0; margin-bottom: -.35rem; }
  .step__body { grid-column: 2; }
}

/* -------------------------------------------------------------- cards -- */
.grid {
  display: grid;
  /* four cards, so hold a 2x2 block rather than letting one orphan a row */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--void-2);
  padding: clamp(2rem, 3.2vw, 3rem);
  display: flex; flex-direction: column;
  transition: background-color .6s var(--ease);
}
.card:hover { background: var(--grounds); }
.card__title {
  font-family: var(--display);
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 400; letter-spacing: -.025em;
  margin-bottom: 1.1rem;
}
.card__body { color: var(--ash); margin-bottom: 2rem; text-wrap: pretty; }
.card__spec {
  margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: var(--fs-mono);
  letter-spacing: .16em; text-transform: uppercase; color: var(--ash-dim);
  display: flex; flex-wrap: wrap; align-items: center; gap: .75em;
}
.card__spec i { width: 3px; height: 3px; border-radius: 50%; background: var(--ash-dim); display: inline-block; }

/* -------------------------------------------------------------- tiers -- */
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}
.tier {
  border: 1px solid var(--line);
  padding: clamp(1.85rem, 2.8vw, 2.6rem);
  display: flex; flex-direction: column;
  transition: border-color .6s var(--ease);
}
.tier:hover { border-color: var(--line-2); }
.tier--lead { border-color: rgb(201 123 44 / .32); background: rgb(201 123 44 / .035); }
.tier--lead:hover { border-color: rgb(201 123 44 / .5); }
.tier__meta {
  font-family: var(--mono); font-size: var(--fs-mono);
  letter-spacing: .16em; text-transform: uppercase; color: var(--ash-dim);
  display: flex; align-items: center; gap: .75em; margin-bottom: 1.5rem;
}
.tier__meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--ash-dim); display: inline-block; }
.tier__title {
  font-family: var(--display);
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 0;
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
  font-weight: 400; letter-spacing: -.025em; margin-bottom: .9rem;
}
.tier--lead .tier__title { color: var(--extract-lt); }
.tier__body { color: var(--ash); margin-bottom: 1.75rem; text-wrap: pretty; }
.tier__list { margin-top: auto; display: grid; gap: .7rem; }
.tier__list li {
  position: relative; padding-left: 1.4rem;
  font-size: .925rem; color: var(--ash);
}
.tier__list li::before {
  content: ""; position: absolute; left: 0; top: .82em;
  width: 6px; height: 1px; background: var(--extract);
}

/* ---------------------------------------------------------------- faq -- */
.faq { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer;
  padding-block: 1.55rem;
  display: flex; align-items: center; gap: 1.5rem;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  font-weight: 500; letter-spacing: -.012em;
  transition: color .4s var(--ease);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary span { flex: 1; }
.qa summary i {
  flex: none; width: 12px; height: 12px; position: relative;
}
.qa summary i::before, .qa summary i::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  background: var(--extract-lt);
  transition: transform .45s var(--ease), opacity .45s var(--ease);
}
.qa summary i::before { width: 12px; height: 1px; }
.qa summary i::after  { width: 1px; height: 12px; }
.qa[open] summary i::after { transform: scaleY(0); opacity: 0; }
.qa[open] summary { color: var(--filter); }
.qa:not([open]) summary:hover { color: var(--filter); }
.qa__body { padding-bottom: 1.7rem; padding-right: clamp(0rem, 6vw, 4rem); }
.qa__body p { color: var(--ash); text-wrap: pretty; }
.qa__body a { color: var(--extract-lt); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ contact -- */
.contact { border-top: 1px solid var(--line); overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 60%;
  background: radial-gradient(70% 100% at 50% 0%, rgb(201 123 44 / .10), transparent 70%);
  pointer-events: none;
}
.contact__inner { position: relative; max-width: 780px; }
.contact .eyebrow { margin-bottom: 1.5rem; }
.contact .display { margin-bottom: 1.6rem; }
.contact .lede { margin-bottom: 2.5rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 1.5rem; }
.contact__note {
  font-family: var(--mono); font-size: var(--fs-mono);
  letter-spacing: .16em; text-transform: uppercase; color: var(--ash-dim);
}

/* ------------------------------------------------------------- footer -- */
.foot { border-top: 1px solid var(--line); background: var(--void-2); }
.foot__inner {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  padding-block: clamp(3.5rem, 6vw, 5rem) clamp(2.5rem, 4vw, 3.5rem);
}
.foot__line { margin-top: 1.1rem; color: var(--ash-dim); font-size: .9rem; max-width: 26ch; }
.foot__col { display: flex; flex-direction: column; gap: .7rem; }
.foot__col h4 {
  font-family: var(--mono); font-size: var(--fs-mono); font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ash-dim);
  margin-bottom: .5rem;
}
.foot__col a, .foot__col span { font-size: .925rem; color: var(--ash); }
.foot__col a { transition: color .35s var(--ease); width: fit-content; }
.foot__col a:hover { color: var(--filter); }
.foot__base {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem 2rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  font-family: var(--mono); font-size: var(--fs-mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--ash-dim);
}
@media (max-width: 860px) {
  .foot__inner { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}

/* --------------------------------------------------------- legal pages -- */
.legal { padding-top: clamp(8rem, 16vh, 12rem); padding-bottom: var(--section); }
.legal__head { margin-bottom: clamp(3rem, 5vw, 4.5rem); }
.legal__head .eyebrow { margin-bottom: 1.25rem; }
.legal__head h1 {
  font-family: var(--display);
  font-size: var(--fs-h2); font-weight: 350;
  font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
  line-height: 1.02; letter-spacing: -.028em; margin-bottom: 1.25rem;
}
.legal__meta {
  font-family: var(--mono); font-size: var(--fs-mono);
  letter-spacing: .16em; text-transform: uppercase; color: var(--ash-dim);
  display: flex; flex-wrap: wrap; gap: .85em; align-items: center;
}
.legal__meta i { width: 14px; height: 1px; background: var(--line-2); display: inline-block; }

.prose { max-width: 72ch; }
.prose h2 {
  font-family: var(--display);
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 400;
  letter-spacing: -.022em; line-height: 1.15;
  margin-top: clamp(2.75rem, 4.5vw, 4rem); margin-bottom: 1rem;
  padding-top: clamp(2.75rem, 4.5vw, 4rem);
  border-top: 1px solid var(--line);
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 {
  font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em;
  margin-top: 2rem; margin-bottom: .6rem;
}
.prose p, .prose li { color: var(--ash); text-wrap: pretty; }
.prose p + p { margin-top: 1rem; }
.prose ul { margin-top: 1rem; display: grid; gap: .65rem; }
.prose ul li { position: relative; padding-left: 1.4rem; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .68em;
  width: 6px; height: 1px; background: var(--extract);
}
.prose a { color: var(--extract-lt); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--filter); font-weight: 500; }
.prose .callout {
  margin-top: 1.5rem; padding: 1.35rem 1.5rem;
  border: 1px solid var(--line); background: var(--void-2);
}
.prose .callout p { color: var(--ash); }

/* -------------------------------------------------------- reveal state -- */
.js-anim .r,
.js-anim .reveal { opacity: 0; }

/* headline lines are masked, then the inner span rises out of the mask */
.display .line { overflow: hidden; padding-bottom: .09em; }
.line__in { display: block; will-change: transform; }

/* height animation needs a clipped box */
.qa__body { overflow: hidden; }

/* fixed nav must not sit on top of anchored headings */
section[id] { scroll-margin-top: 5.5rem; }

.nav__toggle.is-open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle.is-open span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }
.nav__toggle span { transition: transform .4s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim .r, .js-anim .reveal { opacity: 1; transform: none; filter: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
