/* ══════════════════════════════════════════════════════════════════
   KAIROGLYPH — The Celestial Forge
   Fire & clay brand page. Marble/parchment + fired-indigo + gold,
   ember accents. Anchored to the Zodiac Federation visual language.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --void: #05050d;
  --abyss: #090912;
  --surface: #0e0e1a;

  --paper: #efe7d5;         /* parchment ground */
  --paper-2: #e7dcc4;
  --paper-edge: #d8c9a8;
  --ink: #241d12;           /* deep ink on parchment */
  --ink-dim: #6b5c40;
  --ink-faint: #a2906a;

  --text: #ddd6c8;          /* light text on dark */
  --dim: #9a92a6;
  --dim2: #575169;

  --gold: #c4a35a;
  --gold-bright: #d8bd72;
  --gold-deep: #8a6d2b;
  --silver: #cbd5e1;
  --lunar: #7d83e8;
  --lunar-bright: #a5b4fc;
  --indigo-deep: #4338ca;
  --ember: #d2603a;
  --ember-bright: #ef8b4a;
  --sun: #e8a94e;

  --el-fire: #d2603a;
  --el-earth: #b98a3e;
  --el-air: #8a90ea;
  --el-water: #6fb0c4;

  --display: 'Cinzel', Georgia, serif;
  --serif: 'EB Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.65,.02,.22,1);

  --fire: 0.45;             /* driven by Tweaks */
  --accent: var(--gold);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(ellipse 70% 55% at 50% 8%, #14132a 0%, transparent 55%),
    radial-gradient(ellipse 120% 80% at 50% 100%, #17122c 0%, transparent 62%),
    linear-gradient(180deg, #06060f 0%, #05050d 60%, #04040a 100%);
  color: var(--text);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--gold-bright); }
em { font-style: italic; color: var(--gold-bright); }

/* drifting starfield + grain (fixed behind everything) */
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.7;
  background:
    radial-gradient(1.4px 1.4px at 12% 22%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 28% 68%, rgba(196,163,90,0.6), transparent),
    radial-gradient(1.2px 1.2px at 52% 14%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 70% 50%, rgba(188,208,230,0.55), transparent),
    radial-gradient(1.3px 1.3px at 84% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 90% 78%, rgba(208,137,191,0.5), transparent),
    radial-gradient(1px 1px at 40% 88%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.1px 1.1px at 8% 80%, rgba(224,122,95,0.5), transparent);
}
body.motion .stars { animation: twinkle 9s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 0.82; } }
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── top chrome ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 30px;
  background: linear-gradient(180deg, rgba(5,5,13,0.72) 0%, transparent 100%);
  backdrop-filter: blur(2px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-seal { width: 34px; height: 34px; display: block; flex: none; }
.brand-txt { line-height: 1.05; }
.brand-txt .n { display: block; font-family: var(--display); font-weight: 700; font-size: 0.98rem; letter-spacing: 0.16em; color: var(--paper); text-transform: uppercase; }
.brand-txt .s { display: block; font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.32em; color: var(--gold); text-transform: uppercase; margin-top: 4px; }
.topnav { display: flex; align-items: center; gap: 26px; }
.topnav a { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.topnav a:hover { color: var(--gold-bright); }
.topnav .cta-mini { color: var(--gold); border: 1px solid var(--line, rgba(196,163,90,0.4)); border-radius: 2px; padding: 8px 14px; }
.topnav .cta-mini:hover { background: rgba(196,163,90,0.12); color: var(--gold-bright); }
@media (max-width: 780px) { .topnav a:not(.cta-mini) { display: none; } }

/* ══ generic bands ══ */
main { position: relative; z-index: 2; }
.band { position: relative; padding: clamp(80px, 11vw, 160px) 0; }
.wrap { width: min(1180px, 90vw); margin: 0 auto; position: relative; }

.band.parchment {
  background:
    radial-gradient(120% 80% at 50% -10%, #f4ecda 0%, var(--paper) 46%, var(--paper-2) 100%);
  color: var(--ink);
  border-top: 1px solid rgba(138,109,43,0.28);
  border-bottom: 1px solid rgba(138,109,43,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 0 120px rgba(138,109,43,0.10);
}
.band.parchment::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.band.parchment::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 160px rgba(80,58,20,0.14);
}
.band.dark { background: transparent; color: var(--text); }

/* kickers + titles */
.kicker { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 26px; }
.kicker .rule { width: 40px; height: 1px; background: currentColor; opacity: 0.6; }
.kicker.light { color: var(--gold); }

h2 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: 0.005em; }
.section-title { font-size: clamp(1.9rem, 4vw, 3.1rem); max-width: 16ch; }
.section-title.light { color: var(--paper); }
.section-intro { font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.55; max-width: 60ch; margin-top: 20px; color: var(--ink-dim); }
.section-intro.light { color: var(--dim); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ══════════════════════ HERO ══════════════════════ */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(10px, 2.2vh, 30px);
  overflow: hidden; padding: 100px 20px 48px;
}
.hero-stage {
  position: relative; flex: 0 0 auto; z-index: 1;
  width: min(58vmin, 46vh, 440px); aspect-ratio: 1;
}
.wheel-scene { position: absolute; inset: 0; perspective: 1500px; }
.wheel-plane {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(var(--tiltX, 18deg));
  transition: transform 900ms var(--ease);
}
.dial-clicks { position: absolute; inset: 6%; transform: rotate(0deg); will-change: transform; }
.wheel-spin { position: absolute; inset: 0; }
body.motion .wheel-spin { animation: spin 240s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-disc { position: absolute; inset: 0; }
.hero-disc svg { width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.55)); }
/* forge flash — the firing pop on spark impact */
.forge-flash { position: absolute; left: 50%; top: 50%; width: 60%; aspect-ratio: 1;
  transform: translate(-50%,-50%) scale(0.3); border-radius: 50%; pointer-events: none; z-index: 2; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,249,235,0.95) 0%, rgba(239,139,74,0.6) 32%, rgba(210,96,58,0.22) 55%, transparent 72%); }
.forge-flash.go { animation: forgeFlash 900ms cubic-bezier(.2,.6,.2,1); }
@keyframes forgeFlash {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(0.25); }
  20% { opacity: 1; transform: translate(-50%,-50%) scale(0.85); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.55); }
}

/* ember heat from within / around the disc */
.ember-bloom {
  position: absolute; inset: 0; margin: auto; width: 152%; height: 152%; border-radius: 50%;
  background: radial-gradient(circle at 50% 54%,
    rgba(239,139,74,0.9) 0%, rgba(210,96,58,0.5) 26%, rgba(120,40,20,0.2) 46%, transparent 66%);
  opacity: calc(var(--fire) * 0.62); filter: blur(12px); pointer-events: none;
  mix-blend-mode: screen;
}
body.motion .ember-bloom { animation: emberFlicker 5.5s ease-in-out infinite alternate; }
@keyframes emberFlicker {
  0% { opacity: calc(var(--fire) * 0.44); transform: scale(0.985); }
  100% { opacity: calc(var(--fire) * 0.72); transform: scale(1.03); }
}

/* wet-clay specular sheen drifting over the disc */
.clay-sheen {
  position: absolute; inset: 6%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side at 38% 30%, rgba(255,247,230,0.28), transparent 60%);
  mix-blend-mode: screen; opacity: 0.5;
}
body.motion .clay-sheen { animation: sheenDrift 13s ease-in-out infinite alternate; }
@keyframes sheenDrift {
  0% { background-position: 0% 0%; opacity: 0.34; }
  100% { background-position: 40% 30%; opacity: 0.6; }
}

/* rising ember motes (dir 2) */
.ember-motes { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .8s ease; }
.mote { position: absolute; bottom: 34%; width: 3px; height: 3px; border-radius: 50%;
  background: var(--ember-bright); box-shadow: 0 0 6px var(--ember-bright); }
body.motion .mote { animation: moteRise var(--md, 6s) ease-in var(--mdl, 0s) infinite; }
@keyframes moteRise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: translateY(-260px) translateX(var(--mx, 12px)) scale(0.4); opacity: 0; }
}

/* engraved caption ring for the "Assay Seal" (dir 3) */
.caption-ring { position: absolute; inset: -7%; opacity: 0; transition: opacity .7s ease; }
.caption-ring svg { width: 100%; height: 100%; }
body.motion .caption-ring.on { animation: spinRev 160s linear infinite; }
@keyframes spinRev { to { transform: rotate(-360deg); } }

/* the descending gold spark */
.spark { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 3; pointer-events: none; opacity: 0; }
.spark-head { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px 2px var(--gold-bright), 0 0 22px 6px rgba(216,189,114,0.7); }
.spark-trail { position: absolute; left: -1px; bottom: 0; width: 2px; height: 46px;
  background: linear-gradient(180deg, transparent, var(--gold-bright)); transform: translateY(-46px); opacity: 0.8; }
.spark.dropping { animation: sparkDrop 950ms cubic-bezier(.5,.08,.3,1) forwards; }
@keyframes sparkDrop {
  0% { transform: translateY(-42vh) scale(0.6); opacity: 0; }
  18% { opacity: 1; }
  84% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(0) scale(0.2); opacity: 0; }
}
.spark-strike { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border-radius: 50%; border: 1.5px solid var(--gold-bright); opacity: 0; z-index: 2; pointer-events: none; }
.spark-strike.go { animation: strike 760ms ease-out forwards; }
@keyframes strike {
  0% { opacity: 0; transform: scale(0.3); }
  14% { opacity: 0.95; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(4.2); }
}

/* hero copy */
.hero-copy { position: relative; z-index: 5; text-align: center; pointer-events: none; }
.eyebrow { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 6.4vw, 4.8rem); letter-spacing: 0.09em; color: var(--paper); line-height: 1;
  text-shadow: 0 2px 40px rgba(0,0,0,0.6), 0 0 60px rgba(196,163,90,0.14); }
.hero-line { font-family: var(--serif); font-style: italic; font-size: clamp(1rem, 1.7vw, 1.34rem); color: var(--text); margin-top: 16px; max-width: 30ch; margin-inline: auto; line-height: 1.5; }
.hero-tag { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--dim); margin-top: 14px; }

/* direction switch */
.dir-switch { position: relative; z-index: 6; flex: 0 0 auto;
  display: flex; gap: 8px; background: rgba(9,9,18,0.6); border: 1px solid rgba(196,163,90,0.22);
  border-radius: 3px; padding: 5px; backdrop-filter: blur(6px); }
.dir-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
  background: none; border: 0; padding: 9px 15px; border-radius: 2px; color: var(--dim); transition: all .3s ease; }
.dir-btn b { font-family: var(--display); font-size: 0.86rem; letter-spacing: 0.08em; color: var(--dim); transition: color .3s ease; }
.dir-btn span { font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.2em; text-transform: uppercase; }
.dir-btn:hover { color: var(--text); }
.dir-btn.is-on { background: rgba(196,163,90,0.14); color: var(--gold-bright); }
.dir-btn.is-on b { color: var(--gold-bright); }

/* scroll cue */
.scroll-cue { position: relative; z-index: 6; margin-top: clamp(4px, 1.5vh, 16px);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--dim2); }
.scroll-line { width: 1px; height: 34px; background: linear-gradient(180deg, var(--gold), transparent); }
body.motion .scroll-line { animation: scrollPulse 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes scrollPulse { 0%,100% { opacity: 0.4; transform: scaleY(0.7); } 50% { opacity: 1; transform: scaleY(1); } }

/* ── per-direction hero treatments ── */
.hero-stage[data-dir="1"] { --tiltX: 17deg; }
.hero-stage[data-dir="2"] { --tiltX: 23deg; }
.hero-stage[data-dir="2"] .ember-bloom { opacity: calc(var(--fire) * 1.05); }
.hero-stage[data-dir="2"] .ember-motes { opacity: 1; }
.hero-stage[data-dir="2"]::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(120% 90% at 50% 62%, transparent 40%, rgba(60,18,6,0.5) 100%);
}
.hero-stage[data-dir="3"] { --tiltX: 6deg; }
.hero-stage[data-dir="3"] .ember-bloom { opacity: calc(var(--fire) * 0.24); }
.hero-stage[data-dir="3"] .caption-ring { opacity: 1; }
.hero-stage[data-dir="3"] .clay-sheen { opacity: 0.7; }

/* ══════════════════════ EXPLAINER ══════════════════════ */
.explainer .wrap { text-align: center; }
.explainer .kicker { justify-content: center; }
.explainer .lede { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.8rem); line-height: 1.25; letter-spacing: 0.004em; max-width: 22ch; margin: 0 auto; color: var(--ink); }
.explainer .sub { font-size: clamp(1.02rem, 1.5vw, 1.24rem); line-height: 1.6; max-width: 62ch; margin: 34px auto 0; color: var(--ink-dim); }

/* ══════════════════════ THE MARK ══════════════════════ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.mark h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); color: var(--paper); max-width: 14ch; }
.mark p { font-size: 1.14rem; line-height: 1.6; color: var(--text); margin-top: 22px; max-width: 46ch; }
.mark-notes { list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.mark-notes li { font-family: var(--serif); font-size: 1rem; color: var(--dim); padding-left: 18px; position: relative; }
.mark-notes li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border: 1px solid var(--gold); transform: rotate(45deg); }
.mark-notes b { color: var(--gold-bright); font-weight: 600; letter-spacing: 0.02em; }
.col-art { display: flex; gap: 26px; align-items: flex-end; justify-content: center; }
.emblem-frame { text-align: center; }
.emblem-frame .emblem-disc { width: 240px; height: 240px; }
.emblem-frame.die .emblem-disc { width: 150px; height: 150px; }
.emblem-frame figcaption { font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim2); margin-top: 16px; }
.emblem-frame.die .emblem-disc {
  border-radius: 50%; background: radial-gradient(circle at 42% 36%, #cbb88f, #9c8355 70%, #7a6238);
  box-shadow: inset 0 3px 10px rgba(255,255,255,0.4), inset 0 -6px 16px rgba(60,42,14,0.6), 0 14px 34px rgba(0,0,0,0.5);
  display: grid; place-items: center; padding: 14px;
}
.emblem-frame.die .emblem-disc svg { filter: grayscale(1) brightness(0.42) contrast(1.2); mix-blend-mode: multiply; opacity: 0.9; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } .col-art { order: -1; } }

/* ══════════════════════ FIRE & CLAY ══════════════════════ */
.fc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; margin-top: 54px;
  background: rgba(138,109,43,0.28); border: 1px solid rgba(138,109,43,0.28); }
.fc-card { background: linear-gradient(180deg, #f2ead8, #ece0c8); padding: 30px 26px 34px; display: flex; flex-direction: column; }
.fc-viz { width: 100%; height: 148px; display: grid; place-items: center; margin-bottom: 22px; }
.fc-viz svg, .fc-viz .fc-svg { width: 148px; height: 148px; }
.fc-num { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-deep); }
.fc-title { font-family: var(--display); font-size: 1.12rem; font-weight: 600; color: var(--ink); margin: 10px 0 10px; line-height: 1.2; }
.fc-body { font-size: 0.98rem; line-height: 1.5; color: var(--ink-dim); }

/* ══════════════════════ ANATOMY ══════════════════════ */
.plate { display: grid; grid-template-columns: 320px 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; margin-top: 54px; }
.plate-assembled { text-align: center; }
.assembled-disc { width: 300px; height: 300px; margin: 0 auto; }
.assembled-disc svg { width: 100%; height: 100%; filter: drop-shadow(0 18px 40px rgba(60,42,14,0.4)); }
.plate-caption { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-deep); margin-top: 18px; }
.plate-layers { display: flex; flex-direction: column; }
.layer-row { display: grid; grid-template-columns: 92px 1fr; gap: 20px; align-items: center; padding: 22px 0; border-top: 1px solid rgba(138,109,43,0.3); }
.layer-row:last-child { border-bottom: 1px solid rgba(138,109,43,0.3); }
.layer-viz { width: 82px; height: 82px; display: grid; place-items: center; }
.layer-viz svg { width: 82px; height: 82px; }
.layer-meta .lm-label { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink); font-weight: 500; }
.layer-meta .lm-body { font-size: 1rem; line-height: 1.45; color: var(--ink-dim); margin-top: 6px; }
.layer-meta .lm-body b { color: var(--gold-deep); }
@media (max-width: 760px) { .plate { grid-template-columns: 1fr; } .assembled-disc { width: 240px; height: 240px; } }

/* ══════════════════════ KILN ══════════════════════ */
.kiln-banner { position: relative; margin-top: 62px; height: clamp(300px, 42vw, 460px); overflow: hidden;
  border-top: 1px solid rgba(196,163,90,0.25); border-bottom: 1px solid rgba(196,163,90,0.25);
  background: radial-gradient(120% 140% at 50% 120%, rgba(120,44,16,0.5) 0%, transparent 55%), #06060f; }
.kiln-slot { position: absolute; inset: 0; opacity: 0.5; }
.kiln-slot image-slot { width: 100%; height: 100%; }
.kiln-flue { position: absolute; left: 50%; top: -10%; transform: translateX(-50%); width: 40%; height: 120%;
  background: radial-gradient(closest-side at 50% 100%, rgba(239,139,74,calc(var(--fire)*0.5)) 0%, transparent 72%);
  filter: blur(14px); pointer-events: none; }
.kiln-shelf { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: clamp(22px, 4vw, 60px); padding: 0 6%; }
.kiln-disc { position: relative; flex: 0 0 auto; }
.kiln-disc svg { display: block; filter: drop-shadow(0 14px 30px rgba(0,0,0,0.55)); }
.kiln-disc .heat { position: absolute; inset: 8%; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 56%, rgba(239,139,74,0.95), rgba(210,96,58,0.35) 45%, transparent 68%);
  opacity: calc(var(--fire) * var(--hf, 1)); }
body.motion .kiln-disc .heat { animation: heatPulse var(--hp, 4s) ease-in-out infinite alternate; }
@keyframes heatPulse { from { opacity: calc(var(--fire) * var(--hf,1) * 0.6); } to { opacity: calc(var(--fire) * var(--hf,1) * 1.1); } }
.kiln-sparks { position: absolute; inset: 0; pointer-events: none; }
.kspark { position: absolute; bottom: 30%; width: 2.5px; height: 2.5px; border-radius: 50%; background: var(--ember-bright); box-shadow: 0 0 5px var(--ember-bright); opacity: 0; }
body.motion .kspark { animation: krise var(--kd, 5s) ease-in var(--kdl, 0s) infinite; }
@keyframes krise { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 0.9; } 100% { transform: translateY(-320px) translateX(var(--kx,0)); opacity: 0; } }

/* ══════════════════════ SPARK HANDOFF ══════════════════════ */
.handoff { position: relative; margin-top: 60px; display: grid; grid-template-columns: 300px 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; min-height: 420px; }
.handoff-core { position: relative; text-align: center; z-index: 3; }
.core-disc { width: 260px; height: 260px; margin: 0 auto; position: relative; }
.core-disc svg { width: 100%; height: 100%; filter: drop-shadow(0 0 40px rgba(216,189,114,0.28)); }
.core-label { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-top: 18px; }
.handoff-arcs { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.handoff-arcs path { fill: none; stroke: rgba(196,163,90,0.4); stroke-width: 1.4; stroke-dasharray: 5 7; }
.handoff-arcs .travel { stroke: var(--gold-bright); stroke-width: 2.4; stroke-dasharray: 3 220; filter: drop-shadow(0 0 5px var(--gold-bright)); }
body.motion .handoff-arcs .travel { animation: travel 4.5s linear infinite; }
@keyframes travel { to { stroke-dashoffset: -223; } }
.handoff-worlds { display: flex; flex-direction: column; gap: 26px; z-index: 3; }
.world { display: flex; align-items: center; gap: 22px; }
.world-disc { flex: 0 0 auto; width: 108px; height: 108px; border-radius: 50%; overflow: hidden; position: relative;
  border: 1px solid rgba(196,163,90,0.4); background: #0a0a16; box-shadow: inset 0 0 30px rgba(0,0,0,0.7), 0 8px 24px rgba(0,0,0,0.5); display: grid; place-items: center; }
.world-disc image-slot, .world-disc svg { width: 100%; height: 100%; }
.world-meta .w-arrow { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.world-meta .w-name { font-family: var(--display); font-size: 1.16rem; color: var(--paper); margin: 4px 0 4px; }
.world-meta .w-body { font-size: 0.98rem; color: var(--dim); line-height: 1.45; max-width: 34ch; }
@media (max-width: 780px) { .handoff { grid-template-columns: 1fr; } .handoff-arcs { display: none; } }

/* ══════════════════════ MARKETPLACE ══════════════════════ */
.tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; margin-top: 50px; }
.tile { background: linear-gradient(180deg, #12121f, #0a0a14); border: 1px solid rgba(196,163,90,0.24); border-radius: 4px; padding: 22px; box-shadow: 0 18px 40px rgba(0,0,0,0.35); transition: transform .4s var(--ease), border-color .4s ease; }
.tile:hover { transform: translateY(-6px); border-color: rgba(196,163,90,0.5); }
.tile-disc { width: 100%; aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 18px; }
.tile-disc svg { width: 92%; height: 92%; }
.tile-id { font-family: var(--display); font-size: 1.05rem; color: var(--paper); letter-spacing: 0.04em; }
.tile-sub { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-top: 8px; display: flex; justify-content: space-between; }
.tile-cap { font-family: var(--serif); font-style: italic; font-size: 0.96rem; color: var(--dim); margin-top: 14px; line-height: 1.45; }
.tile-assay { height: 6px; border-radius: 3px; margin-top: 16px; background: linear-gradient(90deg, var(--silver), var(--gold-bright)); position: relative; }
.tile-assay::after { content: ""; position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--paper); left: var(--pure, 95%); box-shadow: 0 0 6px rgba(255,255,255,0.6); }

/* ══════════════════════ FORGE / FOOTER ══════════════════════ */
.forge { text-align: center; overflow: hidden; }
.forge-wrap { display: flex; flex-direction: column; align-items: center; }
.forge-mark { width: 120px; height: 120px; margin-bottom: 30px; opacity: 0.95; }
.forge h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); color: var(--paper); max-width: 16ch; }
.forge p { font-size: 1.16rem; color: var(--dim); margin-top: 18px; max-width: 44ch; }
.forge-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 38px; }
.btn-forge { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: #120c04;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold)); padding: 16px 30px; border-radius: 3px;
  box-shadow: 0 10px 30px rgba(196,163,90,0.3); transition: transform .3s ease, box-shadow .3s ease; }
.btn-forge:hover { transform: translateY(-3px); color: #120c04; box-shadow: 0 16px 40px rgba(196,163,90,0.45); }
.btn-ghost { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(196,163,90,0.4); padding: 16px 26px; border-radius: 3px; transition: all .3s ease; }
.btn-ghost:hover { background: rgba(196,163,90,0.1); }
.letterpress { margin-top: 48px; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--gold-deep); padding: 12px 22px; border: 1px solid rgba(196,163,90,0.25);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.25)); border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(196,163,90,0.14), inset 0 -2px 6px rgba(0,0,0,0.5); }

/* ══════════════════════ TWEAKS ══════════════════════ */
.tweaks { position: fixed; right: 20px; bottom: 20px; z-index: 200; width: 250px;
  background: rgba(10,10,20,0.92); border: 1px solid rgba(196,163,90,0.3); border-radius: 6px;
  backdrop-filter: blur(10px); box-shadow: 0 20px 60px rgba(0,0,0,0.6); font-family: var(--sans); overflow: hidden; }
.tweaks[hidden] { display: none; }
.tweaks-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  border-bottom: 1px solid rgba(196,163,90,0.2); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }
.tweaks-close { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 0.8rem; }
.tweaks-close:hover { color: var(--gold-bright); }
.tweaks-body { padding: 16px 14px; display: flex; flex-direction: column; gap: 18px; }
.tw-group { display: flex; flex-direction: column; gap: 9px; }
.tw-label { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); display: flex; justify-content: space-between; }
.tw-label span { color: var(--gold); }
.tw-radio { display: flex; gap: 5px; }
.tw-radio button { flex: 1; padding: 8px 6px; background: rgba(255,255,255,0.04); border: 1px solid rgba(196,163,90,0.18); border-radius: 3px;
  color: var(--dim); font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: all .25s ease; }
.tw-radio button:hover { color: var(--text); }
.tw-radio button.is-on { background: rgba(196,163,90,0.16); border-color: rgba(196,163,90,0.5); color: var(--gold-bright); }
.tw-swatches { display: flex; gap: 8px; }
.tw-swatches button { width: 30px; height: 30px; border-radius: 50%; background: var(--sw); border: 2px solid transparent; cursor: pointer; transition: transform .2s ease, border-color .2s ease; }
.tw-swatches button:hover { transform: scale(1.1); }
.tw-swatches button.is-on { border-color: var(--paper); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; background: rgba(196,163,90,0.25); border-radius: 3px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--gold-bright); cursor: pointer; box-shadow: 0 0 8px rgba(216,189,114,0.6); }
input[type=range]::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: var(--gold-bright); cursor: pointer; }

/* ══════════════════════ MOTION SAFETY ══════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  * { animation: none !important; }
}
