/* ==========================================================================
   Fire the Past — Rising Journal
   Tokens
   ========================================================================== */
:root {
  --ink:        #14090a;
  --ink-2:      #1c1012;
  --ink-3:      #241518;
  --paper:      #f3e7d2;
  --paper-dim:  #b9a98f;
  --paper-faint: #8b7c68;

  --ash:        #8a7b6c;
  --ash-soft:   rgba(138, 123, 108, .16);
  --ember:      #b5402a;
  --ember-text: #d9694a;
  --ember-soft: rgba(181, 64, 42, .18);
  --flame:      #e2812f;
  --flame-soft: rgba(226, 129, 47, .2);
  --flight:     #f0bb4e;
  --flight-soft:rgba(240, 187, 78, .22);

  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body:    "Newsreader", ui-serif, Georgia, serif;
  --font-mono:    "Space Mono", ui-monospace, SFMono-Regular, monospace;

  --ease-spring: cubic-bezier(.16, 1, .3, 1);
  --container-pad: clamp(1.25rem, 4vw, 3rem);

  --bs-primary: var(--ember);
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container-xl {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

::selection { background: var(--flame); color: var(--ink); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--paper); color: var(--ink); padding: .75rem 1.25rem;
  font-family: var(--font-mono); font-size: 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

/* ==========================================================================
   Grain / texture overlay
   ========================================================================== */
.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ==========================================================================
   Fuse rail — scroll-progress signature
   ========================================================================== */
.fuse-rail {
  position: fixed; left: clamp(1rem, 3vw, 2.25rem); top: 0; bottom: 0;
  width: 2.75rem; z-index: 900;
  display: none;
  align-items: center;
  pointer-events: none;
}
@media (min-width: 992px) { .fuse-rail { display: flex; } }

.fuse-track {
  position: relative; width: 2px; height: min(64vh, 620px);
  background: linear-gradient(to bottom, var(--ash), var(--ember) 34%, var(--flame) 66%, var(--flight));
  opacity: .22;
  border-radius: 2px;
  margin-inline: auto;
}

.fuse-fill {
  position: absolute; left: 0; right: 0; top: 0;
  height: var(--progress, 0%);
  background: linear-gradient(to bottom, var(--ash), var(--ember) 34%, var(--flame) 66%, var(--flight));
  border-radius: 2px;
  box-shadow: 0 0 12px 1px var(--flame);
  transition: height .1s linear;
}

.fuse-spark {
  position: absolute; left: 50%; top: var(--progress, 0%);
  width: 9px; height: 9px; margin-left: -4.5px; margin-top: -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff2d6 0%, var(--flight) 45%, transparent 75%);
  box-shadow: 0 0 10px 3px var(--flight-soft), 0 0 3px 1px #fff2d6;
}

.fuse-tick {
  position: absolute; left: 1.1rem; top: var(--tick);
  transform: translateY(-50%);
  background: none; border: 0; padding: 0;
  pointer-events: auto; cursor: pointer;
}
.fuse-tick span {
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em;
  color: var(--paper-dim); white-space: nowrap;
  opacity: .55;
  transition: opacity .25s var(--ease-spring), color .25s var(--ease-spring);
}
.fuse-tick:hover span, .fuse-tick:focus-visible span { opacity: 1; color: var(--flight); }

.fuse-rail-mobile {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1050;
  background: rgba(243, 231, 210, .08);
}
@media (min-width: 992px) { .fuse-rail-mobile { display: none; } }
.fuse-fill-mobile {
  height: 100%; width: var(--progress, 0%);
  background: linear-gradient(to right, var(--ash), var(--ember) 34%, var(--flame) 66%, var(--flight));
  transition: width .1s linear;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 800;
  background: rgba(20, 9, 10, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(243, 231, 210, .08);
}
.navbar { padding-block: .9rem; }

.brand {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: .02em;
  color: var(--paper);
}
.brand-mark { color: var(--flame); flex-shrink: 0; }

.nav-link {
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .04em;
  color: var(--paper-dim) !important; padding: .4rem .6rem !important;
  position: relative;
  transition: color .2s var(--ease-spring);
}
.nav-link:hover, .nav-link:focus-visible { color: var(--paper) !important; }
.nav-link::after {
  content: ""; position: absolute; left: .6rem; right: .6rem; bottom: .1rem; height: 1px;
  background: var(--flame); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-spring);
}
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }

.btn-nav {
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .03em;
  color: var(--ink); background: var(--paper);
  padding: .55rem 1.1rem; border-radius: 3px;
  display: inline-block;
  box-shadow: 0 1px 0 rgba(0,0,0,.2);
  transition: transform .2s var(--ease-spring), background .2s var(--ease-spring), box-shadow .2s var(--ease-spring);
}
.btn-nav:hover, .btn-nav:focus-visible { background: var(--flight); transform: translateY(-1px); box-shadow: 0 4px 14px -4px var(--flame-soft); }
.btn-nav:active { transform: translateY(0); }

.toggler-bars { display: inline-flex; flex-direction: column; gap: 5px; width: 20px; }
.toggler-bars span { display: block; height: 1.5px; background: var(--paper); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-block: clamp(5rem, 14vw, 9rem) clamp(4rem, 10vw, 6rem);
  background:
    radial-gradient(ellipse 60% 45% at 18% 0%, rgba(181, 64, 42, .16), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(226, 129, 47, .1), transparent 70%),
    var(--ink);
  overflow: hidden;
}

.embers { position: absolute; inset: 0; pointer-events: none; }
.embers span {
  position: absolute; bottom: -5%; width: 3px; height: 3px; border-radius: 50%;
  background: var(--flight);
  box-shadow: 0 0 6px 1px var(--flame-soft);
  opacity: 0;
  animation: rise 9s ease-in infinite;
}
.embers span:nth-child(1) { left: 6%;  animation-delay: 0s;   }
.embers span:nth-child(2) { left: 18%; animation-delay: 1.4s; background: var(--flame); }
.embers span:nth-child(3) { left: 32%; animation-delay: 3.1s; }
.embers span:nth-child(4) { left: 47%; animation-delay: .6s;  background: var(--flame); }
.embers span:nth-child(5) { left: 61%; animation-delay: 4.2s; }
.embers span:nth-child(6) { left: 76%; animation-delay: 2.3s; background: var(--flame); }
.embers span:nth-child(7) { left: 89%; animation-delay: 5.5s; }

@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  8%   { opacity: .8; }
  90%  { opacity: .3; }
  100% { transform: translateY(-92vh) translateX(14px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .embers { display: none; } }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow, .hero-title, .hero-sub, .hero-ctas, .scroll-cue {
  animation: rise-in .8s var(--ease-spring) both;
}
.hero-eyebrow { animation-delay: .05s; }
.hero-title   { animation-delay: .15s; }
.hero-sub     { animation-delay: .32s; }
.hero-ctas    { animation-delay: .46s; }
.scroll-cue   { animation-delay: .6s; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--paper-dim);
  margin-bottom: 1.75rem;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--flame); box-shadow: 0 0 8px 2px var(--flame-soft); }

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.9rem, 8vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.02em;
  margin: 0 0 1.75rem;
  max-width: 14ch;
}
.charred {
  font-style: italic;
  font-weight: 400;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--paper);
  text-stroke: 1.5px var(--paper);
}
@supports not (-webkit-text-stroke: 1px #000) {
  .charred { color: var(--paper-dim); -webkit-text-stroke: 0; }
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--paper-dim);
  max-width: 46ch;
  margin-bottom: 2.5rem;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3.5rem; }

.btn-ember {
  display: inline-flex; align-items: center; gap: .6rem;
  background: linear-gradient(155deg, var(--flame), var(--ember));
  color: #fff5e6;
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .02em;
  padding: .95rem 1.5rem; border-radius: 3px;
  box-shadow: 0 8px 24px -8px rgba(181, 64, 42, .55), inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .25s var(--ease-spring), box-shadow .25s var(--ease-spring), filter .25s var(--ease-spring);
}
.btn-ember:hover, .btn-ember:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(226, 129, 47, .6), inset 0 1px 0 rgba(255,255,255,.2); filter: brightness(1.06); }
.btn-ember:active { transform: translateY(0); filter: brightness(.97); }
.price-tag { opacity: .85; }

.btn-ghost {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(243, 231, 210, .28);
  color: var(--paper);
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .02em;
  padding: .95rem 1.5rem; border-radius: 3px;
  transition: border-color .25s var(--ease-spring), background .25s var(--ease-spring), transform .25s var(--ease-spring);
}
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--flight); background: rgba(240, 187, 78, .06); transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0); }

.scroll-cue {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--paper-faint);
  transition: color .25s var(--ease-spring);
}
.scroll-cue svg { animation: bob 2.2s ease-in-out infinite; }
.scroll-cue:hover, .scroll-cue:focus-visible { color: var(--flight); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }

/* ==========================================================================
   Values
   ========================================================================== */
.values { padding-block: clamp(3.5rem, 8vw, 5.5rem); border-top: 1px solid rgba(243, 231, 210, .08); }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.75rem, 4vw, 3rem); }
@media (max-width: 767px) { .values-grid { grid-template-columns: 1fr; gap: 2.25rem; } }

.value-item { border-left: 1px solid rgba(243, 231, 210, .14); padding-left: 1.25rem; }
.value-mark {
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--flame); margin-bottom: .6rem;
}
.value-title { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; margin-bottom: .6rem; letter-spacing: -.01em; }
.value-copy { color: var(--paper-dim); font-size: 1.04rem; }

/* ==========================================================================
   Chapters
   ========================================================================== */
.chapter { padding-block: clamp(4.5rem, 9vw, 7rem) clamp(3rem, 6vw, 4rem); position: relative; }

.chapter-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.chapter-eyebrow {
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-text, var(--accent));
  margin-bottom: .9rem;
}
.chapter-title {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  letter-spacing: -.01em; margin-bottom: 1rem;
}
.chapter-title em { color: var(--accent); font-style: italic; font-weight: 500; }
.chapter-desc { color: var(--paper-dim); font-size: 1.16rem; max-width: 56ch; }

.chapter-body {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
@media (max-width: 767px) { .chapter-body { grid-template-columns: 1fr; } }
.chapter--reverse .chapter-body { grid-template-columns: 1.15fr 1fr; }
.chapter--reverse .chapter-body > :first-child { order: 2; }
.chapter--reverse .chapter-body > :last-child { order: 1; }
@media (max-width: 767px) {
  .chapter--reverse .chapter-body > :first-child { order: 1; }
  .chapter--reverse .chapter-body > :last-child { order: 2; }
}

/* "Journal page" artifact cards — editorial, not bootstrap-card */
.journal-card {
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
  border: 1px solid rgba(243, 231, 210, .1);
  border-top: 2px solid var(--accent-soft);
  border-radius: 2px;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  box-shadow: 0 1px 1px rgba(0,0,0,.3), 0 18px 40px -22px rgba(0,0,0,.65);
  position: relative;
}
.jc-eyebrow {
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-text, var(--accent)); margin-bottom: .9rem;
}
.jc-title { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; margin-bottom: 1rem; }

.journal-card--quote blockquote {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; margin: 0;
  color: var(--paper);
}

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.checklist li {
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--font-mono); font-size: 1rem; color: var(--paper-dim);
}
.checklist li::before {
  content: ""; flex-shrink: 0; width: 15px; height: 15px; border-radius: 3px;
  border: 1px solid rgba(243, 231, 210, .35);
}
.checklist li.is-checked { color: var(--paper); }
.checklist li.is-checked::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.tracker-bar {
  height: 6px; border-radius: 4px; background: rgba(243, 231, 210, .1);
  overflow: hidden; margin-bottom: .85rem;
}
.tracker-bar span {
  display: block; height: 100%; width: var(--pct, 0%);
  background: linear-gradient(90deg, var(--accent), var(--flight));
  border-radius: 4px;
}
.tracker-caption { font-family: var(--font-mono); font-size: 1rem; color: var(--paper-dim); }

/* Burn divider between chapters — a labeled seam, not an unexplained bar */
.burn-divider {
  position: relative;
  height: clamp(2.5rem, 5vw, 3.5rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: flex; align-items: center; justify-content: center;
}
.burn-divider::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%; height: clamp(2px, .4vw, 3px);
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, var(--ash) 12%, var(--accent) 50%, var(--flight) 88%, transparent);
  opacity: .8;
}
.burn-divider::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 20px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
  filter: blur(10px); opacity: .35;
}
.burn-label {
  position: relative; z-index: 1;
  background: var(--ink);
  padding: .4rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 231, 210, .16);
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--paper-dim);
  white-space: nowrap;
}

/* ==========================================================================
   Testimonial
   ========================================================================== */
.testimonial {
  padding-block: clamp(4.5rem, 10vw, 7rem);
  text-align: center;
  border-top: 1px solid rgba(243, 231, 210, .08);
}
.testimonial-quote {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.4rem, 3.4vw, 2.2rem); line-height: 1.4;
  max-width: 26ch; margin: 0 auto 1.25rem;
}
.testimonial-attr { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .04em; color: var(--paper-faint); }

/* ==========================================================================
   Product
   ========================================================================== */
.product { padding-block: clamp(4rem, 9vw, 6rem) clamp(5rem, 10vw, 7rem); }
.product-eyebrow {
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--flame); margin-bottom: .9rem; text-align: center;
}
.product-heading {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4.5vw, 2.9rem);
  text-align: center; letter-spacing: -.01em; margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.product-heading em { color: var(--flight); font-style: italic; font-weight: 500; }

.product-panel {
  display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  background: linear-gradient(160deg, var(--ink-2), var(--ink-3));
  border: 1px solid rgba(243, 231, 210, .1);
  border-radius: 4px;
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.7);
}
@media (max-width: 767px) { .product-panel { grid-template-columns: 1fr; } }

.product-cover {
  aspect-ratio: 3 / 4;
  border-radius: 3px;
  background: linear-gradient(155deg, var(--ash) 0%, var(--ember) 38%, var(--flame) 68%, var(--flight) 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.4rem;
  box-shadow: 0 20px 50px -18px rgba(226, 129, 47, .45), inset 0 1px 0 rgba(255,255,255,.2);
  color: #1a0e08;
  position: relative;
  overflow: hidden;
}
.product-cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/></svg>");
  mix-blend-mode: overlay; opacity: .18;
}
.pc-days { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; opacity: .75; }
.pc-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.02; letter-spacing: -.01em; }
.pc-sub { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; margin-top: -.4rem; }
.pc-chapters { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .04em; opacity: .8; }

.product-name { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; margin-bottom: 1.1rem; }
.product-features { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; gap: .75rem; }
.product-features li {
  position: relative; padding-left: 1.4rem;
  color: var(--paper-dim); font-size: 1.04rem;
}
.product-features li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--flame);
}

.product-buy { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-weight: 500; font-size: 2rem; }
.price small { font-family: var(--font-mono); font-size: 1rem; color: var(--paper-dim); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding-block: clamp(3rem, 6vw, 4rem);
  border-top: 1px solid rgba(243, 231, 210, .08);
  text-align: center;
}
.footer-tagline { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--paper-dim); margin-bottom: 1.75rem; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.1rem 1.75rem; margin-bottom: 1.75rem; }
.footer-nav a {
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .03em; color: var(--paper-dim);
  transition: color .2s var(--ease-spring);
}
.footer-nav a:hover, .footer-nav a:focus-visible { color: var(--flight); }
.footer-copy { font-family: var(--font-mono); font-size: 1rem; color: var(--paper-faint); }
