/* ============ BurnFrost for Institutions · v2 ============ */

:root {
  --paper: #f4f5f4;
  --card: #fbfbfa;
  --ink: #121516;
  --coal: #0e1114;
  --ink-soft: #4c5557;
  --ink-body: #2a3438;
  --navy: #0f2343;
  --night: #0b1426;
  --ice: #9bbfe5;
  --ice-wash: #e7eef1;
  --glacial: #1d3a42;
  --accent: #6fa8b8;
  --ember: #b8511c;
  --ember-bright: #e8895a;
  --gold: #d9b36a;
  --bone: #f2eee8;
  --line: rgba(18, 21, 22, .14);
  --display: "Newsreader", serif;
  --sans: "Archivo", sans-serif;
  --mono: "Spline Sans Mono", monospace;
  --ease-lux: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--ice); color: var(--navy); }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(22px, 6vw, 90px); }

/* ---------- chrome ---------- */
.brandmark {
  position: fixed; top: 26px; left: 36px; z-index: 60;
  font-family: var(--display); font-size: 19px;
  mix-blend-mode: difference; color: #fff; text-decoration: none;
}
.brandmark sup { font-size: .5em; }
.pagenav {
  position: fixed; top: 28px; right: 36px; z-index: 60;
  display: flex; gap: 24px; mix-blend-mode: difference;
}
.pagenav a {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: #fff; text-decoration: none;
  opacity: .75; transition: opacity .3s;
  padding-bottom: 3px; border-bottom: 1px solid transparent;
}
.pagenav a:hover { opacity: 1; border-bottom-color: #fff; }
.pagenav a.here { opacity: 1; border-bottom-color: #fff; }
.float-cta {
  position: fixed; right: 26px; bottom: 26px; z-index: 70;
  padding: 14px 26px; border-radius: 99px; text-decoration: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid #fff; color: #fff; mix-blend-mode: difference;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .6s var(--ease-lux), transform .6s var(--ease-lux), background .4s;
}
body.show-cta .float-cta { opacity: 1; transform: none; pointer-events: auto; }
.float-cta:hover { background: #fff; color: #000; }

/* ---------- reveals ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-lux), transform 1.05s var(--ease-lux); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; scroll-snap-type: none; }
}

/* snap chapters */
.hero, .diwali, .provenance, .cobrand, .onboard, .inst-close { scroll-snap-align: start; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--ink-soft);
  display: flex; align-items: center; gap: 14px;
}
/* eyebrow: no leading rule */
h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(34px, 4.2vw, 64px); line-height: 1.05;
  letter-spacing: -.015em; text-wrap: balance;
}
.lede {
  font-size: clamp(15px, 1.25vw, 17px); line-height: 1.7;
  color: var(--ink-soft); max-width: 52ch; text-wrap: pretty;
}
.btn {
  display: inline-block; padding: 16px 30px; border-radius: 99px; text-decoration: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid var(--ink); color: var(--ink); white-space: nowrap;
  transition: background .4s, color .4s, border-color .4s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--glacial); border-color: var(--glacial); }

/* ================= S1 · HERO — the ember field ================= */
.hero {
  position: relative; overflow: hidden;
  background: var(--bone); color: var(--navy);
  min-height: 100svh; display: flex; align-items: center;
  padding: 120px clamp(22px, 6vw, 90px) 80px;
}
.hero-inner {
  width: 100%; max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.02fr .98fr;
  gap: clamp(34px, 6vw, 92px); align-items: center;
}
.hero-copy { position: relative; }
.expo-tag[hidden] { display: none; }
.expo-tag {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px;
  padding: 8px 15px; border-radius: 99px; text-decoration: none;
  background: var(--navy); color: var(--bone);
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
}
.expo-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 0 0 rgba(155,191,229,.6); animation: erPulse 2.2s infinite; }
@keyframes erPulse { 0%{box-shadow:0 0 0 0 rgba(155,191,229,.55)} 70%{box-shadow:0 0 0 7px rgba(155,191,229,0)} 100%{box-shadow:0 0 0 0 rgba(155,191,229,0)} }
.hero-set { position: relative; }
.hero-set img {
  display: block; width: 100%; border-radius: 6px;
  box-shadow: 0 50px 90px rgba(15,35,67,.22), 0 12px 30px rgba(15,35,67,.12);
}
.hero-set figcaption {
  margin-top: 15px; text-align: right;
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-soft);
}
/* the label's ember gradient, breathing at the base */
.hero .ember-field {
  position: absolute; left: 0; right: 0; bottom: 0; height: 52vh; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 118%,
    rgba(236, 116, 36, .5) 0%, rgba(184, 81, 28, .26) 42%, rgba(14, 17, 20, 0) 72%);
  animation: emberBreath 9s ease-in-out infinite;
}
/* firelight shader canvas (WebGL) over the static gradient fallback */
#emberglow {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56vh;
  width: 100%; pointer-events: none; display: block;
}
.hero.glow-on .ember-field { background: none; }

/* embers rising off the heat — the shimmer, made visible */
.hero .ember-motes { position: absolute; left: 0; right: 0; bottom: 0; height: 60vh; pointer-events: none; overflow: hidden; }
.hero .ember-motes span {
  position: absolute; bottom: -12px; border-radius: 50%;
  background: radial-gradient(circle, #ffe1b3 0%, rgba(232, 137, 90, .85) 35%, rgba(232, 137, 90, 0) 72%);
  opacity: 0;
  animation: moteRise var(--dur, 8s) linear var(--delay, 0s) infinite;
}
@keyframes moteRise {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  8% { opacity: var(--peak, .85); }
  60% { opacity: calc(var(--peak, .85) * .55); }
  100% { transform: translate(var(--swx, 0px), -56vh) scale(.45); opacity: 0; }
}
/* the horizon itself wavers — a soft mirage line */
.hero .ember-field::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(236, 140, 60, .65) 18%, rgba(255, 210, 150, .9) 50%, rgba(236, 140, 60, .65) 82%, transparent);
  filter: blur(1px);
  animation: mirage 5.5s ease-in-out infinite;
}
@keyframes mirage {
  0%, 100% { transform: scaleX(1) translateY(0); opacity: .8; }
  30% { transform: scaleX(1.025) translateY(-1.5px); opacity: 1; }
  62% { transform: scaleX(.985) translateY(.5px); opacity: .7; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .ember-motes { display: none; }
  .hero .ember-field::after { animation: none; }
}
@keyframes emberBreath { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero .ember-field, .hero .ember-streaks { animation: none; } }
.hero > * { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--ink-soft); }
.hero h1 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(54px, 7.2vw, 118px); line-height: .98;
  letter-spacing: -.025em; margin: 22px 0 24px; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { color: var(--ink-body); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.btn.bone { border-color: var(--bone); color: var(--bone); }
.btn.bone:hover { background: var(--bone); color: var(--coal); }
.btn.bone-solid { background: var(--bone); border-color: var(--bone); color: var(--coal); }
.btn.bone-solid:hover { background: var(--ember-bright); border-color: var(--ember-bright); color: var(--coal); }
.trust-row {
  display: flex; gap: 10px 26px; flex-wrap: wrap; margin-top: 40px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.trust-row span { display: flex; align-items: center; gap: 8px; }
.trust-row span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

/* ================= S2 · WHO band (marquee) ================= */
.who-band {
  background: var(--bone); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 22px 0;
}
.who-track {
  display: flex; gap: 0; width: max-content;
  animation: whoScroll 46s linear infinite;
}
.who-band:hover .who-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .who-track { animation: none; } }
@keyframes whoScroll { to { transform: translateX(-50%); } }
.who-track span {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(17px, 1.9vw, 24px); letter-spacing: -.005em;
  color: var(--ink-body); white-space: nowrap;
  display: flex; align-items: center;
}
.who-track span::after {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ember); opacity: .65;
  margin: 0 clamp(18px, 2.4vw, 34px);
}

/* ================= S3 · DIWALI ================= */
.diwali {
  position: relative; background: var(--night); color: var(--bone);
  min-height: 100svh;
  display: flex; align-items: center;
  padding: clamp(70px, 10vh, 110px) 0;
  overflow: hidden;
}
#fireworks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.diwali .wrap { position: relative; z-index: 2; }
.diwali .eyebrow { color: rgba(242,238,232,.6); }
.diwali h2 { font-size: clamp(40px, 5.2vw, 80px); margin-top: 20px; }
.diwali h2 em { font-style: italic; color: var(--gold); }
.diwali .lede { color: rgba(242,238,232,.66); margin-top: 20px; }
.diwali .lede + .lede { margin-top: 14px; }
.diwali-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(36px, 6vw, 90px); align-items: center;
}
.btn.gold { border-color: var(--gold); color: var(--gold); }
.btn.gold:hover { background: var(--gold); color: var(--night); }
.diwali-cta { display: inline-block; margin-top: 34px; }
.gift-float {
  justify-self: center; text-align: center;
  width: min(360px, 82%);
  animation: giftBob 9s ease-in-out infinite;
}
@keyframes giftBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
@media (prefers-reduced-motion: reduce) { .gift-float { animation: none; } }
.gift-float img {
  display: block; width: 100%; border-radius: 6px;
  box-shadow: 0 44px 72px rgba(0, 0, 0, .5), 0 10px 26px rgba(0,0,0,.34);
  transition: transform .8s var(--ease-lux);
}
.gift-float:hover img { transform: scale(1.02) rotate(.5deg); }
.gift-float figcaption {
  padding-top: 18px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(242,238,232,.45);
}

/* ================= S4 · PROVENANCE ================= */
.provenance {
  background: var(--ice-wash);
  min-height: 100svh; display: flex; align-items: center;
  padding: clamp(70px, 10vh, 110px) 0;
}
.provenance .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 6vw, 90px); align-items: center; width: 100%; }
.provenance .lede { margin-top: 20px; }
.prov-says {
  margin-top: 30px; padding: 4px 0 4px 22px; border-left: 1px solid rgba(18,21,22,.3);
  font-family: var(--display); font-weight: 300; font-style: italic;
  font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-body);
  max-width: 42ch; text-wrap: pretty;
}
.prov-ledger {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(22px, 2.6vw, 36px);
  box-shadow: 0 30px 60px rgba(18, 40, 46, .08);
}
.pl-row {
  display: grid; grid-template-columns: minmax(120px, 150px) 1fr; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid rgba(18,21,22,.08); align-items: baseline;
}
.pl-row:last-child { border-bottom: none; }
.pl-row .k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.pl-row .v { font-size: 13.5px; color: var(--ink-body); }
.pl-row .v.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }

/* ================= S5 · CO-BRANDING carousel ================= */
.cobrand {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(60px, 8vh, 100px) 0;
  overflow: hidden;
}
.cobrand .head { max-width: 1280px; margin: 0 auto; padding: 0 clamp(22px, 6vw, 90px); }
.cobrand .lede { margin-top: 18px; }
.mock-band { margin-top: clamp(40px, 6vh, 64px); overflow: hidden; }
.mock-track {
  display: flex; align-items: center; gap: clamp(22px, 3vw, 44px);
  width: max-content; padding: 30px 0;
  animation: mockDrift 70s linear infinite;
}
.mock-band:hover .mock-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .mock-track { animation: none; } }
@keyframes mockDrift { to { transform: translateX(-50%); } }
.mock-card {
  flex: none;
  animation: mockBob 7.5s ease-in-out infinite;
}
.mock-card:nth-child(odd) { transform: rotate(-1.4deg); }
.mock-card:nth-child(even) { transform: rotate(1.2deg); animation-delay: 1.4s; }
.mock-card:nth-child(3n) { animation-delay: 2.6s; }
@keyframes mockBob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}
@media (prefers-reduced-motion: reduce) { .mock-card { animation: none; } }
.mock-card img {
  display: block; height: clamp(160px, 24vh, 230px); width: auto;
  filter: drop-shadow(0 26px 32px rgba(18, 40, 46, .25));
}
.cobrand .note {
  margin-top: clamp(28px, 4vh, 40px); text-align: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ================= S6 · FORM ================= */
.onboard {
  background: var(--paper);
  min-height: 100svh; display: flex; align-items: center;
  padding: clamp(60px, 8vh, 110px) 0;
  scroll-margin-top: 0; border-top: 1px solid var(--line);
}
.onboard .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 100px); align-items: center; width: 100%; }
.onboard-intro h2 { margin-top: 20px; }
.onboard-intro .lede { margin-top: 18px; }
.onboard-facts { margin-top: 34px; border-top: 1px solid var(--line); max-width: 400px; }
.of-row {
  display: grid; grid-template-columns: 130px 1fr; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.of-row .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.of-row .v { font-size: 13.5px; }
.of-row .v a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.ob-form {
  position: relative; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(28px, 3.2vw, 48px);
  box-shadow: 0 36px 80px rgba(18, 40, 46, .1);
  overflow: hidden;
}
.f-label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-soft);
  display: block; margin: 28px 0 8px;
}
.f-label:first-child { margin-top: 0; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.ob-form input, .ob-form select, .ob-form textarea {
  width: 100%; padding: 13px 2px; border: 0; outline: none;
  border-bottom: 1px solid rgba(18,21,22,.22);
  background: transparent; color: var(--ink);
  font: 15px var(--sans); border-radius: 0;
  transition: border-color .35s;
}
.ob-form select { cursor: pointer; appearance: none; }
.f-field { position: relative; }
.f-field::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--glacial); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease-lux);
}
.f-field:focus-within::after { transform: scaleX(1); }
.f-field.err input, .f-field.err select { border-bottom-color: #b5443a; }
.f-label .opt { font-style: normal; text-transform: none; letter-spacing: .04em; color: var(--ink-soft); opacity: .72; }
.f-field.sel::before {
  content: "↓"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--ink-soft); pointer-events: none;
}
.ob-form textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.ob-submit {
  margin-top: 34px; width: 100%; padding: 17px 26px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  transition: background .4s, border-color .4s, transform .25s var(--ease-lux);
}
.ob-submit:hover { background: var(--glacial); border-color: var(--glacial); transform: translateY(-1px); }
.ob-foot { margin-top: 14px; text-align: center; font-size: 12px; color: var(--ink-soft); }
.ob-foot a { color: var(--glacial); }

.ob-done {
  position: absolute; inset: 0; z-index: 5;
  background: var(--navy); color: var(--bone);
  display: grid; place-items: center; text-align: center;
  padding: clamp(26px, 3vw, 44px);
  opacity: 0; pointer-events: none; transition: opacity .7s var(--ease-lux);
}
.ob-form.sent .ob-done { opacity: 1; pointer-events: auto; }
.ob-done .seal { width: 64px; height: 64px; margin: 0 auto 18px; color: var(--bone); }
.ob-done .seal circle { fill: none; stroke: currentColor; }
.ob-form.sent .ob-done .seal circle {
  stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: sealDraw 1.4s var(--ease-lux) .2s forwards;
}
@keyframes sealDraw { to { stroke-dashoffset: 0; } }
.ob-done .seal text { fill: currentColor; font-family: var(--display); }
.ob-done h3 { font-family: var(--display); font-weight: 300; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.01em; }
.ob-done p { margin-top: 12px; font-size: 13.5px; color: rgba(242,238,232,.7); max-width: 40ch; line-height: 1.7; text-wrap: pretty; }
.ob-done-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }
.ob-done-actions a, .ob-done-actions button {
  padding: 13px 22px; border-radius: 99px; cursor: pointer; text-decoration: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid rgba(242,238,232,.5); background: transparent; color: var(--bone);
  transition: background .35s, color .35s;
}
.ob-done-actions a:hover, .ob-done-actions button:hover { background: var(--bone); color: var(--navy); }
.ob-done-actions .primary { background: var(--bone); color: var(--navy); }
.ob-done-actions .primary:hover { background: var(--ice); }

/* ---------- close ---------- */
.inst-close {
  background: var(--ink); color: var(--bone);
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(60px, 8vh, 100px) 0 50px;
}
.inst-close h2 { text-align: center; }
.inst-close h2 em { font-style: italic; color: var(--ice); }
.inst-close .sub { text-align: center; margin: 18px auto 0; color: rgba(242,238,232,.6); font-size: 14.5px; max-width: 48ch; line-height: 1.7; }
.inst-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.btn.ghost-light { border-color: rgba(242,238,232,.55); color: var(--bone); }
.btn.ghost-light:hover { background: var(--bone); color: var(--ink); }
.inst-footer {
  margin-top: clamp(50px, 8vh, 90px); border-top: 1px solid rgba(242,238,232,.18);
  padding-top: 24px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  color: rgba(242,238,232,.55); line-height: 1.9;
}
.inst-footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
.inst-footer a { color: var(--bone); text-decoration: none; text-transform: uppercase; letter-spacing: .16em; border-bottom: 1px solid transparent; transition: border-color .3s; }
.inst-footer a:hover { border-bottom-color: var(--bone); }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-inner, .diwali-grid, .provenance .wrap, .onboard .wrap { grid-template-columns: 1fr; }
  .hero-set { max-width: 440px; justify-self: start; }
  .brandmark { left: 20px; top: 20px; font-size: 17px; }
  .pagenav { right: 16px; top: 22px; gap: 13px; }
  .pagenav a { font-size: 9px; letter-spacing: .1em; }
  .hero { padding-top: 130px; }
  .hero h1 { font-size: clamp(50px, 13vw, 80px); }
  .gift-frame { width: min(280px, 76%); }
  .f-grid { grid-template-columns: 1fr; }
  .float-cta { right: 16px; bottom: 16px; padding: 12px 18px; font-size: 10px; }
  .mock-card img { height: 150px; }
}
