/* Ember — landing page.
   Brand type: Inferi (headlines), Afacad (body), Pitch Sans (details). Inferi and Pitch Sans are
   licensed; drop their webfonts in /public/fonts and add @font-face rules — until then Newsreader
   and DM Mono (Google Fonts) stand in. */

:root {
  --coal: #191817;
  --coal-2: #211f1e;
  --coal-3: #2b2927;
  --steam: #f9f5ef;
  --steam-70: rgba(249, 245, 239, .72);
  --steam-50: rgba(249, 245, 239, .52);
  --steam-20: rgba(249, 245, 239, .2);
  --steam-12: rgba(249, 245, 239, .12);
  --heat: #ff1e00;
  --deep-heat: #3a211f;
  --cold: #0086ff;
  --deep-cold: #252c2d;
  --err: #ff8a73;

  --serif: 'Inferi', 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Afacad', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --mono: 'Pitch Sans', 'DM Mono', ui-monospace, 'SF Mono', monospace;

  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-color: #4a4643 var(--coal); }
body {
  margin: 0;
  background: var(--coal);
  color: var(--steam);
  font: 400 18px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 300; margin: 0; letter-spacing: -.015em; text-wrap: balance; }
h1 em, h2 em { font-style: italic; }
p { margin: 0; }
::selection { background: var(--steam); color: var(--coal); }

/* Film grain over everything — the "veil of steam" texture from the graphic style. */
body::after {
  content: '';
  position: fixed; inset: -50%;
  z-index: 100; pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

.detail {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .26em;
  text-transform: uppercase;
  line-height: 1.6;
}
.lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; color: var(--steam-70); max-width: 34em; }

/* ───────── Top bar + tabs ───────── */
.bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: clamp(20px, 3vw, 36px) var(--gutter);
}
.bar__brand { position: relative; display: inline-flex; align-items: flex-start; text-decoration: none; }
.bar__brand .tm {
  font-family: var(--sans);
  font-size: clamp(11px, 1.2vw, 15px);
  line-height: 1;
  margin: .12em 0 0 .28em;
  letter-spacing: 0;
  color: var(--steam-70);
}

.wordmark { display: block; width: clamp(96px, 10vw, 132px); height: auto; aspect-ratio: 801 / 214; fill: var(--steam); }
.page-home .bar { justify-content: center; }
.tabs { display: flex; gap: clamp(18px, 3vw, 40px); }
.tabs a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--steam-70); text-decoration: none;
  padding: 10px 0; border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.tabs a:hover { color: var(--steam); }
.tabs a[aria-current="page"] { color: var(--steam); border-bottom-color: var(--steam); }
.tabs a:focus-visible { outline: 1px solid var(--steam); outline-offset: 4px; }

/* ───────── Home: one screen, centred like the icon's thresholds ───────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(88px, 12.6vh, 150px) 0 clamp(30px, 4.4vh, 80px);
  isolation: isolate; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  filter: brightness(.5) contrast(1.05);
  transform: scale(1.06);
  animation: settle 2.4s var(--ease) both;
}
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background:
    /* Keep the threshold mark as a faint presence behind the type; text sits on near-coal. */
    radial-gradient(ellipse 58% 60% at 50% 50%, rgba(25,24,23,.78) 0%, rgba(25,24,23,.55) 55%, rgba(25,24,23,.12) 100%),
    linear-gradient(180deg, rgba(25,24,23,.5) 0%, rgba(25,24,23,0) 18%, rgba(25,24,23,0) 80%, rgba(25,24,23,.7) 100%);
}
@keyframes settle { from { transform: scale(1.14); opacity: 0; } to { transform: scale(1.06); opacity: 1; } }

.steam { position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen; }
.steam i {
  position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(249,245,239,.13), rgba(249,245,239,0));
  filter: blur(30px);
  animation: drift 26s ease-in-out infinite alternate;
}
.steam i:nth-child(1) { width: 60vw; height: 40vw; left: 30%; top: 10%; }
.steam i:nth-child(2) { width: 45vw; height: 35vw; left: 55%; top: 45%; animation-duration: 34s; animation-delay: -12s; }
.steam i:nth-child(3) { width: 50vw; height: 30vw; left: -5%; top: 55%; animation-duration: 40s; animation-delay: -6s; opacity: .7; }
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-6vw, -4vh, 0) scale(1.15); }
  100% { transform: translate3d(4vw, -9vh, 0) scale(.95); }
}

.hero__inner {
  width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero__inner > * { animation: rise 1.2s var(--ease) both; }
.hero__inner > :nth-child(2) { animation-delay: .08s; }
.hero__inner > :nth-child(3) { animation-delay: .2s; }
.hero__inner > :nth-child(4) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.hero h1 {
  font-size: clamp(44px, min(5.8vw, 8.2vh), 92px);
  line-height: 1; letter-spacing: -.02em;
  margin-bottom: clamp(14px, 2vh, 22px);
}
.hero .lede { color: rgba(249, 245, 239, .82); max-width: 31em; margin: 0 auto; }

/* Countdown: set as type, not a widget. Hairlines echo the icon's threshold lines. */
.drop { margin: clamp(28px, 5.4vh, 76px) 0 clamp(26px, 4.8vh, 66px); }
.drop__title {
  font: 400 clamp(16px, 1.3vw, 18px)/1.4 var(--sans); letter-spacing: 0;
  color: rgba(249, 245, 239, .82); margin-bottom: clamp(12px, 1.8vh, 18px);
}
.drop__clock { display: flex; justify-content: center; }
.drop__clock span {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 clamp(18px, 2.8vw, 40px);
}
.drop__clock span + span { border-left: 1px solid var(--steam-20); }
.drop__clock b {
  font: 400 clamp(44px, min(5vw, 7vh), 76px)/1 var(--sans);
  font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.01em; color: var(--steam);
}
.drop__clock small { margin-top: 8px; font: 400 14px/1 var(--sans); letter-spacing: .02em; color: var(--steam-70); }
.drop__live { font: 400 clamp(26px, 2.6vw, 36px)/1.2 var(--serif); color: var(--steam); }
.drop__note { margin-top: clamp(14px, 2vh, 20px); font-size: 16px; color: var(--steam-70); }

/* ───────── Open form fields ───────── */
.signup { width: min(680px, 100%); text-align: left; }
.fields { display: grid; grid-template-columns: 1fr 1fr 124px; gap: clamp(12px, 2vh, 20px) 28px; }
.field { position: relative; }
label {
  display: block; margin-bottom: 2px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(249, 245, 239, .88);
}
input {
  width: 100%;
  font: 400 20px/1.3 var(--sans);
  color: var(--steam); caret-color: var(--steam);
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(249, 245, 239, .3); border-radius: 0;
  padding: 9px 0 11px;
  outline: none;
  transition: border-color .25s var(--ease);
}
input::placeholder { color: rgba(249, 245, 239, .62); }
input:hover { border-bottom-color: var(--steam-50); }
input:focus { border-bottom-color: var(--steam); }
input[aria-invalid="true"] { border-bottom-color: var(--err); }
input:-webkit-autofill,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--steam);
  -webkit-box-shadow: 0 0 0 1000px #262423 inset;
  transition: background-color 9999s;
}
.err { color: var(--err); font-size: 13.5px; margin-top: 6px; }
.err:empty { display: none; }
.err--form { margin-top: 14px; text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.submit { margin-top: clamp(22px, 3.5vh, 40px); display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  padding: 20px 28px; min-width: 280px;
  font: 500 13px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase;
  color: var(--coal); background: var(--steam);
  border: 0; border-radius: 0; cursor: pointer; text-decoration: none;
  position: relative; overflow: hidden;
  transition: transform .2s var(--ease), background-color .3s var(--ease);
}
.btn::before { /* ember warmth rising from below on hover */
  content: ''; position: absolute; inset: auto -20% -140% -20%; height: 200%;
  background: radial-gradient(closest-side, rgba(255,30,0,.22), transparent);
  transform: translateY(30%); opacity: 0;
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.btn:hover::before { opacity: 1; transform: none; }
.btn:active { transform: scale(.99); }
.btn:focus-visible { outline: 1px solid var(--steam); outline-offset: 4px; }
.btn__label, .btn__arrow { position: relative; }
.btn__arrow { width: 20px; height: 20px; transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"] .btn__arrow { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.fine a { color: rgba(249,245,239,.7); text-underline-offset: 3px; }
.fine a:hover { color: var(--steam); }
.proof { margin-top: clamp(16px, 2.4vh, 26px); font-size: 17px; line-height: 1.5; color: var(--steam-70); text-align: center; }

.fine { font-size: 12px; line-height: 1.5; color: rgba(249, 245, 239, .52); max-width: 46em; margin: 11px auto 0; text-align: center; }

.done { outline: none; animation: rise .9s var(--ease) both; display: flex; flex-direction: column; align-items: center; max-width: 34em; }
.done__icon { width: 64px; height: auto; aspect-ratio: 302/165; fill: var(--steam); margin-bottom: 26px; }
.done .lede { color: var(--steam); font-size: clamp(20px, 1.8vw, 24px); }
.done__links { margin-top: 30px; display: flex; gap: 28px; }
.done__links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--steam-70); text-decoration: none; border-bottom: 1px solid var(--steam-20); padding-bottom: 6px;
  transition: color .2s, border-color .2s;
}
.done__links a:hover { color: var(--steam); border-bottom-color: var(--steam); }

/* ───────── Sub pages ───────── */
.page-sub main { padding-top: clamp(120px, 16vh, 170px); }
.page-title, .statement__title, .closer h2, .about h2 { font-size: clamp(38px, 5vw, 72px); line-height: 1.02; }
.page-title { max-width: 11em; margin-bottom: clamp(48px, 6vw, 80px); }

.ritual { padding-bottom: clamp(80px, 10vw, 140px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.6vw, 40px); }
.step:nth-child(2) { margin-top: clamp(0px, 6vw, 90px); }
.step:nth-child(3) { margin-top: clamp(0px, 12vw, 180px); }
.step__img { margin: 0 0 26px; aspect-ratio: 3 / 4; overflow: hidden; background: var(--coal-2); }
.step__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.6s var(--ease); }
.step:hover .step__img img { transform: scale(1.09); }
.step__num { color: var(--steam-50); margin-bottom: 14px; }
.step h2 { font-size: clamp(26px, 2.3vw, 34px); line-height: 1.1; margin-bottom: 10px; }
.step p:last-child { color: var(--steam-70); max-width: 26em; }

.page-sub main:has(.statement) { padding-top: 0; }
.statement { position: relative; padding: clamp(170px, 22vw, 260px) 0 clamp(110px, 14vw, 190px); isolation: isolate; overflow: hidden; }
.statement__media { position: absolute; inset: 0; z-index: -1; }
.statement__media img { width: 100%; height: 100%; object-fit: cover; filter: blur(2px) grayscale(1) brightness(.75); transform: scale(1.04); }
.statement__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(25,24,23,.6) 0%, rgba(25,24,23,.5) 60%, var(--coal) 100%),
              linear-gradient(90deg, rgba(25,24,23,.8), rgba(25,24,23,.1));
}
.statement__title { color: var(--steam-50); margin-bottom: 30px; }
.statement__title em { font-style: normal; color: var(--steam); }

.about { padding: clamp(60px, 8vw, 120px) 0; }
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
.about__img { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about h2 { margin-bottom: 28px; }
.about p { color: var(--steam-70); font-size: clamp(18px, 1.5vw, 20px); max-width: 32em; }
.about p + p { margin-top: 18px; }

.closer { padding: clamp(80px, 10vw, 140px) 0; text-align: center; border-top: 1px solid var(--steam-12); }
.closer__inner { display: flex; flex-direction: column; align-items: center; }
.closer__icon { width: 70px; height: auto; aspect-ratio: 302/165; fill: var(--steam); margin-bottom: 36px; }
.closer h2 { margin-bottom: 36px; }

.foot { border-top: 1px solid var(--steam-12); padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); }
.foot__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; flex-wrap: wrap; color: var(--steam-50); }
.foot__copy { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.foot__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 28px); }
.foot__links a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--steam-50); text-decoration: none;
  transition: color .2s;
}
.foot__links a:hover { color: var(--steam); }
.foot__links a:focus-visible { outline: 1px solid var(--steam); outline-offset: 4px; }
.foot__ig { display: inline-flex; }
.foot__ig svg { width: 16px; height: 16px; display: block; }

/* Home: hero and footer split one screen, so the footer is in view without scrolling. */
body.page-home { display: flex; flex-direction: column; min-height: 100svh; }
.page-home .hero { flex: 1 0 auto; min-height: 0; }
.page-home .foot { flex: 0 0 auto; position: relative; z-index: 10; }

/* ───────── Reveal ───────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in, .no-io .reveal { opacity: 1; transform: none; }
.steps .reveal:nth-child(2) { transition-delay: .1s; }
.steps .reveal:nth-child(3) { transition-delay: .2s; }

/* ───────── Responsive ───────── */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 56px; }
  .step:nth-child(n) { margin-top: 0; }
  .step__img { aspect-ratio: 4 / 3; }
  .about__grid { grid-template-columns: 1fr; }
  .about__img { aspect-ratio: 4 / 3; }
  .hero__media img { object-position: 50% 42%; }
  .hero__media::after {
    background:
      linear-gradient(180deg, rgba(25,24,23,.5) 0%, rgba(25,24,23,.72) 30%, rgba(25,24,23,.8) 60%, rgba(25,24,23,.88) 100%);
  }
}
/* Below this the three-across row gets cramped, so stack the fields. */
@media (max-width: 680px) {
  .fields { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .bar { padding-top: 18px; }
  .tabs { gap: 16px; }
  .tabs a { font-size: 11px; letter-spacing: .16em; }
  .tabs a[aria-current="page"]:first-child { display: none; } /* "Join" is redundant on the join page */
  .hero { justify-content: flex-start; padding-top: 92px; padding-bottom: 28px; }
  .hero h1 { font-size: clamp(40px, 11.4vw, 54px); margin-bottom: 12px; }
  .lede { font-size: 17px; }
  .drop { margin: 24px 0 22px; }
  .drop__title { font-size: 15px; margin-bottom: 10px; }
  .drop__clock span { padding: 0 clamp(10px, 3.6vw, 16px); }
  .drop__clock b { font-size: clamp(32px, 10vw, 40px); }
  .drop__clock small { font-size: 12px; margin-top: 6px; }
  .drop__note { font-size: 14.5px; margin-top: 12px; }
  .fields { grid-template-columns: 1fr; gap: 8px; }
  .submit { margin-top: 20px; gap: 12px; }
  .btn { width: 100%; min-width: 0; }
  .foot { padding: 18px 0 calc(18px + env(safe-area-inset-bottom)); }
  .foot__inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .foot__copy { font-size: 10px; }
  .foot__links { gap: 18px; }
  .foot__links a { font-size: 10px; }
  .btn--inline { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}


/* ---- Legal pages (privacy, terms) ---------------------------------- */
body.page-legal { display: flex; flex-direction: column; min-height: 100svh; background: var(--coal); }
.page-legal .bar { position: static; justify-content: center; padding-top: clamp(20px, 3vw, 36px); }
.legal { flex: 1 0 auto; width: min(760px, 100%); padding: clamp(32px, 6vh, 64px) var(--gutter) clamp(56px, 9vh, 96px); }
.legal h1 { font: 300 clamp(34px, 5vw, 52px)/1.1 var(--serif); letter-spacing: -.01em; }
.legal__date { margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--steam-50); }
.legal h2 { margin-top: clamp(30px, 4.4vh, 44px); font: 500 17px/1.3 var(--sans); letter-spacing: .01em; color: var(--steam); }
.legal p, .legal li { margin-top: 14px; font-size: 16px; line-height: 1.65; color: var(--steam-70); }
.legal ul { margin-top: 6px; padding-left: 1.15em; }
.legal li { margin-top: 8px; }
.legal li::marker { color: var(--steam-50); }
.legal strong { color: var(--steam); font-weight: 500; }
.legal a { color: var(--steam); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal a:hover { text-decoration-color: var(--steam-50); }
.legal__back { margin-top: clamp(40px, 6vh, 64px); padding-top: 24px; border-top: 1px solid var(--steam-12); }
.legal__back a { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--steam-50); }
.legal__back a:hover { color: var(--steam); }
