/* ============ The BurnFrost Journal ============ */

:root {
  --paper: #f4f5f4;
  --ink: #121516;
  --ink-soft: #4c5557;
  --navy: #0f2343;
  --ice: #9bbfe5;
  --glacial: #1d3a42;
  --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; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}
::selection { background: var(--ice); color: var(--navy); }

/* ---------- chrome ---------- */
.brandmark {
  position: fixed; top: 28px; left: 36px; z-index: 60;
  font-family: var(--display); font-size: 21px;
  mix-blend-mode: difference; color: #fff; text-decoration: none;
}
.brandmark .j { font-style: italic; }
.pagenav {
  position: fixed; top: 30px; right: 36px; z-index: 60;
  display: flex; gap: 26px; mix-blend-mode: difference;
}
.pagenav a {
  font-family: var(--mono); font-size: 11px; 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; }

.foot-nav {
  margin: clamp(40px, 6vh, 60px) auto 0;
  display: flex; gap: clamp(16px, 2.4vw, 30px); flex-wrap: wrap; justify-content: center;
}
.foot-nav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; position: relative; padding-bottom: 4px;
  transition: color .35s;
}
.foot-nav a::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);
}
.foot-nav a:hover { color: var(--ink); }
.foot-nav a:hover::after { transform: scaleX(1); }

/* ---------- reveals ---------- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-lux), transform 1.1s var(--ease-lux); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- masthead ---------- */
.masthead {
  min-height: 72vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px clamp(22px, 6vw, 90px) 0;
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.mast-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--ink-soft);
  display: flex; align-items: center; gap: 14px;
}
/* masthead eyebrow: no leading rule */
.masthead h1 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(38px, 5vw, 76px);
  line-height: .98; letter-spacing: -.018em;
  margin: 22px 0 26px; text-wrap: balance;
}
.masthead h1 em { font-style: italic; color: var(--glacial); }
.mast-sub {
  font-size: clamp(15px, 1.25vw, 17px); line-height: 1.7;
  color: var(--ink-soft); max-width: 52ch; text-wrap: pretty;
}
.mast-rule {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid rgba(18,21,22,.2);
  padding-bottom: 14px; margin-top: clamp(36px, 6vh, 70px);
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ---------- article index ---------- */
.index {
  max-width: 1280px; margin: 0 auto;
  padding: 0 clamp(22px, 6vw, 90px) clamp(60px, 9vh, 120px);
}
.post {
  display: grid;
  grid-template-columns: 72px 1fr 200px;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(26px, 4vh, 44px) 0;
  border-bottom: 1px solid rgba(18,21,22,.14);
  align-items: baseline;
  text-decoration: none; color: inherit;
  position: relative;
  cursor: pointer;
}
.post .pnum {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  color: var(--ink-soft);
  transition: color .4s;
}
.post h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(24px, 3vw, 44px); line-height: 1.12;
  letter-spacing: -.01em; text-wrap: balance;
  transition: transform .6s var(--ease-lux), color .4s;
}
.post p {
  margin-top: 12px; font-size: 14px; line-height: 1.65;
  color: var(--ink-soft); max-width: 62ch; text-wrap: pretty;
}
.post .pmeta {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
  display: flex; flex-direction: column; gap: 8px; text-align: right;
}
.post .tag { color: var(--glacial); }
.post::after {
  content: "→";
  position: absolute; right: -6px; top: 50%;
  font-size: 20px; color: var(--glacial);
  opacity: 0; transform: translate(-14px, -50%);
  transition: opacity .45s, transform .55s var(--ease-lux);
}
.post:hover::after { opacity: 1; transform: translate(0, -50%); }
.post:hover h2 { transform: translateX(10px); color: var(--glacial); }
.post:hover .pnum { color: var(--glacial); }

/* ---------- testimonial wall: "Second opinions" ---------- */
.wall {
  background: var(--navy); color: #f2eee8;
  padding: clamp(70px, 11vh, 130px) 0 clamp(80px, 12vh, 140px);
  overflow: hidden;
}
.wall-head {
  max-width: 1280px; margin: 0 auto;
  padding: 0 clamp(22px, 6vw, 90px);
  margin-bottom: clamp(44px, 7vh, 80px);
}
.wall-head .mast-eyebrow { color: rgba(242,238,232,.55); }
.wall-head h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(40px, 5.4vw, 86px); line-height: 1.02;
  letter-spacing: -.015em; margin-top: 18px; text-wrap: balance;
}
.wall-head h2 em { font-style: italic; color: var(--ice); }
.wall-head p {
  margin-top: 18px; font-size: 15px; line-height: 1.7;
  color: rgba(242,238,232,.6); max-width: 52ch; text-wrap: pretty;
}

/* featured letter */
.letter {
  max-width: 820px; margin: 0 auto clamp(50px, 8vh, 90px);
  padding: clamp(30px, 4vw, 56px);
  background: #f2eee8; color: var(--navy);
  border-radius: 6px;
  box-shadow: 0 50px 90px rgba(0,0,0,.4);
  position: relative;
  transform: rotate(-.6deg);
}
.letter .seal { width: 40px; height: 40px; color: var(--navy); position: absolute; top: 26px; right: 28px; }
.letter .seal circle { fill: none; stroke: currentColor; }
.letter .seal text { fill: currentColor; font-family: var(--display); }
.letter .l-eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(15,35,67,.5);
}
.letter blockquote {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(20px, 2.3vw, 30px); line-height: 1.42;
  letter-spacing: -.005em; margin-top: 20px; text-wrap: pretty;
}
.letter .l-sig {
  margin-top: 26px; display: flex; justify-content: space-between;
  align-items: baseline; gap: 16px; flex-wrap: wrap;
}
.letter .l-name { font-family: var(--display); font-style: italic; font-size: 19px; }
.letter .l-role {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(15,35,67,.55);
}

/* marquee rows */
.t-row { display: flex; overflow: hidden; margin-top: 22px; }
.t-track {
  display: flex; gap: 22px; padding-right: 22px;
  animation: marquee var(--mq-t, 60s) linear infinite;
  will-change: transform;
}
.t-row[data-dir="rtl"] .t-track { animation-direction: reverse; }
.t-row:hover .t-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .t-row { overflow-x: auto; }
  .t-track { animation: none; }
}
.t-card {
  flex: none; width: clamp(280px, 30vw, 400px);
  padding: 26px 28px 22px;
  border: 1px solid rgba(242,238,232,.2);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(242,238,232,.04);
}
.t-card.doc { background: rgba(155,191,229,.1); border-color: rgba(155,191,229,.35); }
.t-card blockquote {
  font-family: var(--display); font-weight: 300;
  font-size: 17.5px; line-height: 1.5; text-wrap: pretty;
}
.t-card .t-who {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  border-top: 1px solid rgba(242,238,232,.16); padding-top: 14px;
}
.t-card .t-name { font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.t-card .t-role {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(242,238,232,.55); text-align: right;
}
.t-card.doc .t-role { color: var(--ice); }
.t-card .t-role a, .letter .l-role a {
  color: inherit; text-decoration: underline; text-underline-offset: 3px;
}
/* ---------- the reality check (India pulse) ---------- */
.pulse {
  background: var(--navy); color: #f2eee8;
  padding: clamp(70px, 11vh, 130px) 0;
  border-top: 1px solid rgba(242,238,232,.12);
}
.pulse-wrap {
  max-width: 1280px; margin: 0 auto;
  padding: 0 clamp(22px, 6vw, 90px);
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(40px, 6vw, 100px); align-items: center;
}
.pulse .mast-eyebrow { color: rgba(242,238,232,.55); }
.pulse h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(38px, 4.8vw, 76px); line-height: 1.04;
  letter-spacing: -.015em; margin-top: 18px; text-wrap: balance;
}
.pulse h2 em { font-style: italic; color: var(--ice); }
.pulse-lede {
  margin-top: 18px; font-size: 15px; line-height: 1.7;
  color: rgba(242,238,232,.62); max-width: 50ch; text-wrap: pretty;
}
.pulse-count { margin-top: clamp(30px, 5vh, 52px); display: block; }
.pc-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ice); display: block; margin-bottom: 8px;
}
.pc-num {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(64px, 6.5vw, 104px); line-height: 1;
  font-variant-numeric: tabular-nums; display: inline-block;
}
.pc-num.tick { animation: pcTick 1.1s var(--ease-lux); }
@keyframes pcTick {
  0% { color: #e8895a; transform: translateY(2px); }
  100% { color: #f2eee8; transform: none; }
}
.pulse-stats { margin-top: 30px; border-top: 1px solid rgba(242,238,232,.2); max-width: 460px; }
.ps-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 12px 0; border-bottom: 1px solid rgba(242,238,232,.12);
}
.ps-v { font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: -.01em; white-space: nowrap; }
.ps-k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(242,238,232,.5); text-align: right;
}
.pulse-src {
  margin-top: 18px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .04em; color: rgba(242,238,232,.42); line-height: 2;
}
.pulse-src a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.pulse-cta {
  display: inline-block; margin-top: 26px; text-decoration: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ice);
  border-bottom: 1px solid rgba(155,191,229,.4); padding-bottom: 4px;
  transition: border-color .3s, color .3s;
}
.pulse-cta:hover { color: #fff; border-bottom-color: #fff; }
.pulse-map { margin: 0; }
.map-cap {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(242,238,232,.45);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #e8895a; flex: none;
  animation: liveDot 2.2s ease-in-out infinite;
}
@keyframes liveDot { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.pulse-map svg { width: 100%; height: auto; display: block; margin-top: 16px; }
.pulse-map figcaption {
  margin-top: 12px; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .04em; color: rgba(242,238,232,.38); line-height: 1.9; text-wrap: pretty;
}
.dotIN { fill: rgba(242,238,232,.15); transition: fill 2.6s ease; }
.dotIN.lit { fill: rgba(155,191,229,.55); }
.dotIN.flare { fill: #e8895a; transition: fill .15s ease; }
.ping-ring {
  fill: none; stroke: #e8895a; stroke-width: 1.1;
  transform-box: fill-box; transform-origin: center;
  animation: pingRing 2.6s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes pingRing {
  0% { transform: scale(.4); opacity: .95; }
  100% { transform: scale(6.5); opacity: 0; }
}
@media (max-width: 900px) {
  .pulse-wrap { grid-template-columns: 1fr; gap: 48px; }
  .pulse-map { max-width: 420px; }
  .ps-row { gap: 12px; }
}

/* guidance strip: one lane, scroll-snap, edge fades */
.strip-cue {
  max-width: 1280px; margin: 30px auto 0;
  padding: 0 clamp(22px, 6vw, 90px); text-align: right;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(242,238,232,.4);
}
.t-strip {
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; margin-top: 12px; outline: none;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.t-strip::-webkit-scrollbar { display: none; }
.t-lane { display: flex; gap: 22px; padding: 4px clamp(40px, 7vw, 110px); width: max-content; }
.t-strip .t-card { scroll-snap-align: center; }

.wall-note {
  text-align: center; margin-top: 40px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(242,238,232,.4);
}

/* ---------- close ---------- */
.j-close {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(80px, 13vh, 150px) clamp(22px, 6vw, 90px);
  text-align: center;
}
.j-close h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(38px, 5vw, 76px); letter-spacing: -.015em; line-height: 1.05;
}
.j-close h2 em { font-style: italic; color: var(--glacial); }
.j-close p { margin: 20px auto 0; max-width: 50ch; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.j-actions { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.btn {
  padding: 15px 28px; border-radius: 99px; text-decoration: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid rgba(18,21,22,.35); color: var(--ink);
  transition: background .45s, color .45s;
}
.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); }
.j-footer {
  border-top: 1px solid rgba(18,21,22,.14);
  margin-top: clamp(40px, 7vh, 80px); padding-top: 22px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  color: var(--ink-soft); text-align: left; line-height: 1.9;
}

/* ---------- edit-mode chrome ---------- */
[data-bf-hidden] { display: none !important; }
body.et-editing [data-bf-hidden] { display: revert !important; opacity: .22; filter: grayscale(1); }
body.et-editing [data-tid] {
  outline: 1px dashed rgba(155,191,229,0); outline-offset: 4px; border-radius: 2px;
  transition: outline-color .2s; cursor: text;
}
body.et-editing [data-tid]:hover { outline-color: rgba(125,170,200,.95); }
body.et-editing [data-tid]:focus { outline: 1.5px solid var(--ice); }
body.et-editing .t-track { animation-play-state: paused; }
.et-pill {
  position: fixed; left: 36px; bottom: 30px; z-index: 90;
  padding: 11px 20px; border-radius: 99px; cursor: pointer;
  border: 1px solid rgba(18,21,22,.35); background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  transition: background .35s, color .35s;
  white-space: nowrap;
}
.et-pill:hover, .et-pill.active { background: var(--ink); color: var(--paper); }
.et-reset { display: none; left: 36px; bottom: 78px; }
body.et-editing .et-reset { display: block; }
.et-x {
  position: fixed; z-index: 95; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(18,21,22,.35); background: var(--paper); color: var(--ink);
  font: 14px/1 var(--sans); cursor: pointer; display: none;
  align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.et-x:hover { background: var(--ink); color: var(--paper); }
body.et-editing .et-x.on { display: flex; }

/* ---------- burn book hub ---------- */
.emerg-hub {
  max-width: 1280px; margin: 0 auto;
  padding: 0 clamp(22px, 6vw, 90px);
}
.emerg-hub .inner {
  border: 1px solid rgba(184,81,28,.28); border-radius: 10px;
  background: rgba(184,81,28,.05);
  padding: 16px 22px;
  display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap;
}
.emerg-hub b {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: #b8511c; flex: none; font-weight: 500;
}
.emerg-hub p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; flex: 1; min-width: 260px; text-wrap: pretty; margin: 0; }
.cat {
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--glacial);
  margin: 52px 0 18px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(18,21,22,.16);
  display: flex; justify-content: space-between; align-items: baseline;
}
.cat .n { opacity: .5; letter-spacing: .08em; }
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.bb-card {
  background: var(--paper); padding: 26px 24px 22px;
  border: 1px solid rgba(18,21,22,.14); border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: background .3s, border-color .3s, transform .4s var(--ease-lux);
  position: relative;
  min-height: 180px; display: flex; flex-direction: column;
}
.bb-card:hover { background: #fff; border-color: rgba(29,58,66,.35); transform: translateY(-2px); }
.bb-card .tagrow {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft);
}
.bb-card .pill {
  padding: 4px 10px; border-radius: 30px; border: 1px solid rgba(29,58,66,.3);
  color: var(--glacial); background: rgba(111,168,184,.07);
}
.bb-card h3 {
  font-family: var(--display); font-weight: 300; font-size: 21.5px;
  line-height: 1.18; letter-spacing: -.008em; margin-bottom: 10px; text-wrap: balance;
}
.bb-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin-top: auto; text-wrap: pretty; }
.bb-card .arrow {
  margin-top: 14px; font-size: 14px; color: var(--glacial);
  opacity: 0; transform: translateX(-6px); transition: all .35s var(--ease-lux);
}
.bb-card:hover .arrow { opacity: 1; transform: none; }

/* ---------- invisible expanded touch targets ---------- */
.pagenav a, .brandmark, .btn { position: relative; }
.pagenav a::after, .brandmark::after {
  content: ""; position: absolute; left: -10px; right: -10px; top: -12px; bottom: -12px;
}
.btn::after { content: ""; position: absolute; left: 0; right: 0; top: -3px; bottom: -3px; }
.et-pill::after, .et-x::after { content: ""; position: absolute; left: -6px; right: -6px; top: -6px; bottom: -6px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .brandmark { left: 20px; top: 20px; font-size: 18px; }
  .pagenav { right: 16px; top: 24px; gap: 14px; }
  .pagenav a { font-size: 10px; letter-spacing: .12em; }
  .masthead { min-height: 58vh; padding-top: 100px; }
  .post { grid-template-columns: 1fr; gap: 10px; }
  .post .pnum { order: -1; }
  .post .pmeta { flex-direction: row; gap: 16px; text-align: left; }
  .post::after { display: none; }
  .letter { margin-left: 22px; margin-right: 22px; }
  .et-pill { left: 20px; bottom: 20px; }
  .et-reset { left: 20px; bottom: 66px; }
}
