/* Torch — website styles. Black, one warm accent, large numbers. */

:root {
  --bg: #000;
  --s1: #0d0d0d;
  --s2: #161616;
  --t1: #fff;
  --t2: rgba(255, 255, 255, 0.7);
  --t3: rgba(255, 255, 255, 0.4);
  --hair: rgba(255, 255, 255, 0.12);
  --ember: #ff6a1a;
  --ember-soft: rgba(255, 106, 26, 0.18);
  --amber: #ffc21a;
  --red: #ff3b2f;

  /* Full width with a comfortable side margin that grows with the screen. */
  --gutter: clamp(16px, 4.5vw, 72px);
  --radius: 20px;
  --radius-ctl: 12px;

  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;

  --spring: cubic-bezier(0.22, 1.12, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--t1);
  font-family: var(--text);
  font-size: clamp(16px, 0.35vw + 15px, 19px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  width: 100%;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

.display, h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(44px, 7.5vw, 120px); line-height: 0.98; font-weight: 800; }
h2 { font-size: clamp(34px, 5vw, 76px); line-height: 1.02; font-weight: 800; }
h3 { font-size: clamp(22px, 1.6vw, 28px); line-height: 1.15; font-weight: 700; }
.lead { color: var(--t2); font-size: clamp(18px, 1.3vw, 24px); max-width: 38ch; margin: 0; }
.eyebrow {
  font-family: var(--display);
  color: var(--ember);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.muted { color: var(--t3); }
.accent { color: var(--ember); }

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--ember);
  text-decoration: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--ember);
  color: #000;
  font-weight: 650;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 40px -10px rgba(255, 106, 26, 0.6);
  transition: transform 0.35s var(--spring), box-shadow 0.35s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 50px -10px rgba(255, 106, 26, 0.75); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; }
.btn.ghost {
  background: transparent;
  color: var(--t1);
  box-shadow: none;
  border: 1px solid var(--hair);
}
.btn.ghost:hover { border-color: rgba(255, 255, 255, 0.3); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom-color: var(--hair);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.nav .wordmark { font-size: 20px; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.nav-links a:not(.btn) {
  color: var(--t2);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}
.nav-links a:not(.btn):hover { color: var(--t1); }
.nav .btn { padding: 10px 18px; font-size: 15px; }

@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(100svh, 1000px);
  display: grid;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 40px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(24px, 4vw, 80px);
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--spring) forwards; }
.hero h1 .line:nth-child(2) span { animation-delay: 0.12s; }
.hero h1 .line:nth-child(3) span { animation-delay: 0.24s; }
.hero .lead { margin-top: 28px; opacity: 0; animation: fade 1s 0.5s ease forwards; }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 40px;
  opacity: 0;
  animation: fade 1s 0.7s ease forwards;
}
.hero-cta .note { color: var(--t3); font-size: 14px; }

.hero-flame {
  position: relative;
  aspect-ratio: 1 / 1.1;
  width: 100%;
  max-height: 82svh;
  justify-self: center;
  cursor: grab;
  touch-action: pan-y;
}
.hero-flame canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-flame .hint {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  color: var(--t3);
  font-size: 13px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0;
  animation: fade 1s 1.6s ease forwards;
}
.hero-glow {
  position: absolute;
  inset: auto -20% -40% auto;
  width: 90vmax;
  height: 90vmax;
  background: radial-gradient(closest-side, rgba(255, 90, 20, 0.16), transparent 70%);
  pointer-events: none;
}
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--t3);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scroll-cue i {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--ember), transparent);
  animation: drip 2.2s ease-in-out infinite;
  transform-origin: top;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-flame { order: -1; max-width: 420px; max-height: 46svh; aspect-ratio: 1 / 1.05; }
  .scroll-cue { display: none; }
}

/* ---------- Sections ---------- */

section { position: relative; }
.section { padding-block: clamp(80px, 12vw, 180px); }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(40px, 6vw, 90px); }
.section-head.center { text-align: center; justify-items: center; }

/* Marquee strip */
.strip {
  border-block: 1px solid var(--hair);
  overflow: hidden;
  white-space: nowrap;
  padding-block: 22px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.strip-track { display: inline-flex; gap: 56px; animation: marquee 38s linear infinite; }
.strip span {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 30px);
  color: var(--t3);
  display: inline-flex;
  align-items: center;
  gap: 56px;
}
.strip span::after { content: "●"; color: var(--ember); font-size: 10px; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 24px);
}
.step {
  position: relative;
  background: var(--s1);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 36px);
  overflow: hidden;
  transition: transform 0.5s var(--spring), border-color 0.3s;
}
.step:hover { transform: translateY(-6px); border-color: rgba(255, 106, 26, 0.35); }
.step .num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  color: var(--ember);
  letter-spacing: 0.1em;
}
.step h3 { margin-top: 10px; }
.step p { color: var(--t2); margin: 10px 0 0; }
.step-art {
  height: clamp(200px, 22vw, 300px);
  margin: 0 calc(-1 * clamp(22px, 2.4vw, 36px)) 24px;
  position: relative;
}
.step-art canvas { width: 100%; height: 100%; display: block; }

@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; }
  .step-art { height: 240px; }
}

/* Phones */
.phones {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 2vw, 32px);
  align-items: center;
}
.phone {
  position: relative;
  border-radius: clamp(26px, 3vw, 48px);
  padding: clamp(5px, 0.5vw, 9px);
  background: linear-gradient(160deg, #2a2a2a, #0b0b0b);
  box-shadow: 0 40px 90px -40px rgba(255, 106, 26, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: transform 0.7s var(--spring);
}
.phone img { border-radius: clamp(21px, 2.5vw, 40px); width: 100%; height: auto; aspect-ratio: 1320 / 2868; object-fit: cover; background: #000; }
.phone figcaption {
  position: absolute;
  left: 0; right: 0; bottom: -44px;
  text-align: center;
  font-size: 14px;
  color: var(--t3);
}
.phones .phone:nth-child(odd) { transform: translateY(40px); }
.phones .phone:nth-child(3) { transform: translateY(-10px) scale(1.06); z-index: 2; }
.phones:hover .phone { transform: translateY(0) scale(1); }
.phones .phone:hover { transform: translateY(-14px) scale(1.04) !important; z-index: 3; }

@media (max-width: 960px) {
  .phones {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter));
    padding: 20px var(--gutter) 70px;
    scrollbar-width: none;
  }
  .phones::-webkit-scrollbar { display: none; }
  .phone { flex: 0 0 min(62vw, 300px); scroll-snap-align: center; transform: none !important; }
}

/* Lineage */
.lineage-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 120px);
  align-items: center;
}
.thread { position: relative; list-style: none; margin: 0; padding: 0; width: 100%; max-width: 560px; justify-self: center; }
.thread li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  position: relative;
  opacity: 0.12;
  transform: translateX(-12px);
  transition: opacity 0.7s ease, transform 0.7s var(--spring);
}
.thread li.lit { opacity: 1; transform: none; }
.thread li::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 50%;
  height: 100%;
  width: 3px;
  background: linear-gradient(var(--from), var(--to));
  border-radius: 2px;
}
.thread li:last-child::before { display: none; }
.thread .node {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  position: relative; z-index: 1;
  background: #000;
  border-radius: 50%;
}
.thread .node svg { width: 26px; height: 32px; filter: drop-shadow(0 0 8px var(--glow)); }
.thread .who { font-weight: 600; }
.thread .who b { font-family: var(--display); margin-right: 10px; }
.thread .where { color: var(--t3); font-size: 14px; }
.thread .when { color: var(--t3); font-size: 13px; }

@media (max-width: 900px) {
  .lineage-grid { grid-template-columns: 1fr; }
}

/* Marks */
.marks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 1.4vw, 20px);
}
.mark {
  background: var(--s1);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 20px 18px 24px;
  text-align: center;
  transition: transform 0.5s var(--spring), border-color 0.3s;
}
.mark:hover { transform: translateY(-6px); border-color: rgba(255, 255, 255, 0.24); }
.mark canvas { width: 100%; max-width: 220px; margin-inline: auto; aspect-ratio: 1 / 1.15; display: block; }
.mark .big {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 2.4vw, 38px);
  margin-top: 8px;
}
.mark p { margin: 2px 0 0; color: var(--t3); font-size: 14px; }

@media (max-width: 1100px) { .marks { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .marks { grid-template-columns: repeat(2, 1fr); } .mark:last-child { grid-column: span 2; } }

/* Numbers */
.numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hair);
}
.numbers > div { padding: clamp(28px, 3vw, 48px) clamp(0px, 2vw, 32px) 0 0; }
.numbers > div + div { border-left: 1px solid var(--hair); padding-left: clamp(20px, 2.5vw, 40px); }
.numbers .n {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(56px, 8vw, 140px);
  line-height: 0.9;
  color: var(--ember);
  white-space: nowrap;
}
.numbers .unit { font-size: 0.42em; margin-left: 0.12em; color: var(--t2); }
.numbers p { color: var(--t2); margin: 14px 0 0; max-width: 28ch; }

@media (max-width: 760px) {
  .numbers { grid-template-columns: 1fr; }
  .numbers > div + div { border-left: 0; border-top: 1px solid var(--hair); padding-left: 0; margin-top: 28px; }
}

/* Price */
.price {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 1.6vw, 24px);
}
.price-card {
  border-radius: var(--radius);
  padding: clamp(28px, 3.4vw, 56px);
  background: var(--s1);
  border: 1px solid var(--hair);
}
.price-card.hot {
  background: radial-gradient(120% 120% at 100% 0%, rgba(255, 106, 26, 0.22), transparent 55%), var(--s1);
  border-color: rgba(255, 106, 26, 0.35);
}
.price-card .amount {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(56px, 7vw, 112px);
  line-height: 1;
  margin: 18px 0 14px;
}
.price-card p { color: var(--t2); margin: 0; max-width: 36ch; }
.price-card ul { margin: 22px 0 0; padding: 0; list-style: none; color: var(--t2); display: grid; gap: 10px; }
.price-card li::before { content: "—"; color: var(--ember); margin-right: 10px; }

@media (max-width: 760px) { .price { grid-template-columns: 1fr; } }

/* Final CTA */
.final {
  text-align: center;
  padding-block: clamp(100px, 14vw, 220px) clamp(80px, 10vw, 160px);
  overflow: hidden;
}
.final .flame-box { width: min(320px, 60vw); aspect-ratio: 1 / 1.1; margin: 0 auto 32px; position: relative; }
.final .flame-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.final h2 { max-width: 16ch; margin-inline: auto; }
.final .lead { margin: 22px auto 0; }
.final .btn { margin-top: 40px; }

/* Footer */
footer {
  border-top: 1px solid var(--hair);
  padding-block: 40px;
  color: var(--t3);
  font-size: 14px;
}
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
footer a { color: var(--t3); text-decoration: none; }
footer a:hover { color: var(--t1); }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s ease, transform 1s var(--spring); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* ---------- Keyframes ---------- */

@keyframes rise { to { transform: translateY(0); } }
@keyframes fade { to { opacity: 1; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero h1 .line span { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .thread li { opacity: 1; transform: none; }
  .strip-track { animation: none; }
}

/* ---------- Legal pages ---------- */

.legal { padding-top: 140px; padding-bottom: 120px; }
.legal article { max-width: 760px; }
.legal h1 { font-size: clamp(44px, 6vw, 84px); margin-bottom: 24px; }
.legal h2 { font-size: clamp(24px, 2.2vw, 32px); margin: 48px 0 12px; }
.legal p, .legal li { color: var(--t2); }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 8px 0; }
.legal strong { color: var(--t1); }
.legal a { color: var(--ember); }
