:root {
  --bg: #070202;
  --panel: #100606;
  --ink: #fff7f3;
  --muted: #bca7a2;
  --red: #ff2414;
  --deep-red: #8d0904;
  --line: rgba(255,255,255,.14);
  --panic: .18;
  --mx: 70%;
  --my: 20%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); font-family: Inter, Arial, Helvetica, sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
::selection { background: var(--red); color: white; }

.noise { position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .055; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
.cursor-glow { position: fixed; left: var(--mx); top: var(--my); width: 36rem; height: 36rem; transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(circle, rgba(255,36,20,calc(.08 + var(--panic) * .16)), transparent 66%); pointer-events: none; z-index: 1; transition: opacity .3s; }

.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; padding: 0 3.5vw; border-bottom: 1px solid rgba(255,255,255,.09); background: rgba(7,2,2,.72); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: .82rem; font-weight: 900; letter-spacing: .13em; }
.brand img { border-radius: 7px; }
.topbar nav { display: flex; gap: 2rem; color: #cbbab6; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav a:hover { color: white; }
.nav-buy { justify-self: end; padding: .8rem 1.1rem; color: white; background: var(--red); font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 0 28px rgba(255,36,20,.28); }

.section-shell { position: relative; z-index: 2; padding-inline: clamp(1.25rem, 5vw, 5.5rem); }
.hero { min-height: 100svh; display: grid; grid-template-columns: minmax(0,1.02fr) minmax(390px,.98fr); align-items: center; gap: 3vw; padding-top: 8.5rem; padding-bottom: 5rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(7,2,2,.4), rgba(7,2,2,.04)), url('assets/infernal-market-bg.png') center/cover no-repeat; opacity: calc(.58 + var(--panic) * .32); transform: scale(calc(1 + var(--panic) * .035)); transition: opacity .25s, transform .25s; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,2,2,.82) 0%, rgba(7,2,2,.46) 43%, rgba(7,2,2,.08) 76%), linear-gradient(0deg, var(--bg) 0%, transparent 19%); }
.eyebrow, .kicker { color: #e1cbc6; font-size: .75rem; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: .8rem; }
.eyebrow span { width: 2.6rem; height: 2px; background: var(--red); box-shadow: 0 0 12px var(--red); }
h1, h2 { margin: 0; font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; line-height: .88; }
h1 { max-width: 820px; font-size: clamp(4.5rem, 9vw, 9.2rem); }
h1 em { color: var(--red); font-style: normal; text-shadow: 0 0 calc(20px + 36px * var(--panic)) rgba(255,36,20,.48); }
.hero-lede { max-width: 610px; margin: 1.7rem 0 0; color: #dfcfca; font-size: clamp(1.05rem, 1.45vw, 1.28rem); line-height: 1.65; }
.hero-lede strong { color: white; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; padding: .9rem 1.4rem; border: 1px solid transparent; cursor: pointer; font-size: .82rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; transition: transform .2s, background .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--red); box-shadow: 0 0 30px rgba(255,36,20,.35); }
.button-primary:hover { background: #ff493c; box-shadow: 0 0 44px rgba(255,36,20,.52); }
.button-ghost { border-color: rgba(255,255,255,.28); background: rgba(10,2,2,.38); color: white; }
.button-ghost:hover { border-color: white; background: rgba(255,255,255,.07); }
.contract { width: min(100%, 640px); margin-top: 1rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .72rem .85rem; color: #fff; border: 1px solid var(--line); background: rgba(12,3,3,.68); cursor: pointer; text-align: left; }
.contract:hover { border-color: rgba(255,36,20,.8); }
.contract-label { padding: .42rem .55rem; background: rgba(255,36,20,.16); color: #ff695e; font-size: .72rem; font-weight: 900; letter-spacing: .12em; }
.contract code { overflow: hidden; color: #ead9d5; font: 700 .76rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; text-overflow: ellipsis; }
.copy-state { color: #9f8f8b; font-size: .67rem; font-weight: 900; letter-spacing: .12em; }
.verify-note, .tiny { color: #8f7e7a; font-size: .75rem; }

.hero-visual { position: relative; width: min(45vw, 660px); justify-self: center; aspect-ratio: 1; display: grid; place-items: center; }
.mascot { position: relative; z-index: 2; width: 82%; border-radius: 50%; filter: saturate(1.08) drop-shadow(0 0 calc(30px + 30px * var(--panic)) rgba(255,35,20,.48)); transform: rotate(calc((var(--panic) - .18) * -1.8deg)) scale(calc(1 + var(--panic) * .025)); transition: filter .25s, transform .25s; }
.orbit { position: absolute; border: 1px solid rgba(255,57,42,.36); border-radius: 50%; animation: spin 20s linear infinite; }
.orbit::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 16px var(--red); }
.orbit-one { inset: 5%; transform: rotate(25deg); }
.orbit-one::before { top: 12%; left: 12%; }
.orbit-two { inset: 14%; animation-direction: reverse; animation-duration: 13s; }
.orbit-two::before { bottom: 4%; right: 22%; }
.signal-card { position: absolute; z-index: 3; display: grid; gap: .25rem; min-width: 120px; padding: .8rem 1rem; border-left: 2px solid var(--red); background: rgba(8,2,2,.78); backdrop-filter: blur(12px); box-shadow: 0 10px 40px rgba(0,0,0,.28); }
.signal-card span { color: #a99591; font-size: .58rem; letter-spacing: .2em; }
.signal-card strong { font-size: .78rem; letter-spacing: .12em; }
.signal-top { top: 17%; right: 0; }
.signal-bottom { bottom: 15%; left: 0; }
.scroll-cue { position: absolute; left: 5vw; bottom: 1.7rem; display: flex; align-items: center; gap: .8rem; color: #9b8884; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.scroll-cue i { width: 36px; height: 1px; background: #7e6d69; position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--red); animation: scan 1.7s ease-in-out infinite; }

.section-index { padding-top: 2rem; border-top: 1px solid var(--line); color: #897773; font: 800 .7rem/1 ui-monospace, monospace; letter-spacing: .15em; }
.origin { padding-top: 7rem; padding-bottom: 8rem; background: radial-gradient(circle at 80% 50%, rgba(127,8,4,.16), transparent 32%); }
.origin-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin: 5rem 0 3rem; }
.origin-heading h2, .panic h2, .manifesto h2, .summon h2 { font-size: clamp(3.2rem, 7vw, 7rem); }
.origin-heading h2 span, .manifesto h2 span { color: var(--red); }
.lore-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.lore-card { min-height: 340px; padding: clamp(1.5rem,3vw,3rem); background: #0b0303; position: relative; overflow: hidden; }
.lore-card::after { content: attr(data-chapter); position: absolute; right: -1rem; bottom: -2rem; color: rgba(255,255,255,.025); font: 900 9rem/1 Impact, sans-serif; }
.lore-card:hover { background: linear-gradient(145deg, #170505, #0b0303); }
.lore-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,36,20,.46); color: var(--red); box-shadow: inset 0 0 20px rgba(255,36,20,.08); }
.lore-card h3 { margin-top: 5rem; margin-bottom: .8rem; font-size: 1.45rem; text-transform: uppercase; letter-spacing: .02em; }
.lore-card p { max-width: 330px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
blockquote { max-width: 900px; margin: 7rem auto 0; text-align: center; }
blockquote p { margin: 0; font: 400 clamp(1.6rem,3vw,3.2rem)/1.2 Georgia, serif; font-style: italic; }
blockquote cite { display: block; margin-top: 1.3rem; color: #9c8883; font: 800 .68rem/1.3 ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }

.panic { padding-top: 2rem; padding-bottom: 8rem; background: linear-gradient(135deg, #0a0202, #160303 60%, #080202); }
.panic-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(3rem,8vw,9rem); align-items: center; margin-top: 5rem; }
.panic-copy > p:not(.kicker) { max-width: 510px; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.panic-reading { margin-top: 2.5rem; display: flex; justify-content: space-between; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: .75rem; }
.panic-reading span { color: #d7c3bf; font-size: .72rem; font-weight: 900; letter-spacing: .16em; }
.panic-reading strong { color: var(--red); font: 900 clamp(2.5rem,5vw,5rem)/.8 Impact, sans-serif; }
.meter-panel { padding: clamp(1.5rem,4vw,4rem); border: 1px solid rgba(255,36,20,.23); background: linear-gradient(180deg, rgba(255,36,20,.055), rgba(0,0,0,.22)); box-shadow: inset 0 0 70px rgba(255,0,0,calc(var(--panic) * .08)); }
.meter-head { display: flex; justify-content: space-between; color: #ab9691; font-size: .65rem; font-weight: 900; letter-spacing: .13em; }
#panic-range { width: 100%; margin: 2rem 0 1rem; appearance: none; height: 7px; border-radius: 0; background: linear-gradient(90deg, #3f0806, #ff2414); outline: none; }
#panic-range::-webkit-slider-thumb { appearance: none; width: 24px; height: 34px; border: 2px solid white; border-radius: 0; background: var(--red); box-shadow: 0 0 22px rgba(255,36,20,.8); cursor: grab; }
#panic-range::-moz-range-thumb { width: 22px; height: 32px; border: 2px solid white; border-radius: 0; background: var(--red); box-shadow: 0 0 22px rgba(255,36,20,.8); cursor: grab; }
.meter-ticks { display: flex; justify-content: space-between; }
.meter-ticks span { height: 9px; width: 1px; background: #5a4440; }
.confession { min-height: 7rem; display: grid; align-items: center; margin: 2rem 0 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: white; font: 400 clamp(1.3rem,2.3vw,2.2rem)/1.2 Georgia, serif; font-style: italic; }
.meter-panel .button { margin-top: .4rem; }

.manifesto { padding-top: 7rem; padding-bottom: 9rem; }
.manifesto-grid { margin-top: 5rem; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem,9vw,10rem); }
.rules article { display: grid; grid-template-columns: 54px 1fr; gap: 1.5rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.rules article:last-child { border-bottom: 1px solid var(--line); }
.rules b { color: var(--red); font: 900 .76rem/1 ui-monospace, monospace; }
.rules h3 { margin: 0 0 .65rem; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .04em; }
.rules p { margin: 0; color: var(--muted); line-height: 1.65; }

.summon { min-height: 82vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding-top: 8rem; padding-bottom: 8rem; }
.summon-bg { position: absolute; inset: 0; z-index: -2; background: url('assets/infernal-market-bg.png') right center/cover no-repeat; filter: saturate(1.1); opacity: .52; }
.summon::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at center, rgba(7,2,2,.25), var(--bg) 68%); }
.summon .eyebrow { justify-content: center; }
.summon h2 { max-width: 1000px; }
.summon > p:not(.eyebrow) { max-width: 620px; color: #d3beba; line-height: 1.65; }
.summon .hero-actions { justify-content: center; }
.contract.compact { width: min(100%, 590px); }

footer { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr minmax(300px,600px) 1fr; align-items: center; gap: 2rem; padding: 2rem 5vw; border-top: 1px solid var(--line); background: #050101; color: #8c7c78; font-size: .7rem; line-height: 1.5; }
footer p { margin: 0; text-align: center; }
footer > span { justify-self: end; letter-spacing: .12em; }
.link-toast { position: fixed; z-index: 120; left: 50%; bottom: 2rem; transform: translate(-50%, 160%); padding: .85rem 1rem; border: 1px solid rgba(255,36,20,.4); background: #150303; color: white; box-shadow: 0 12px 40px rgba(0,0,0,.45); font-size: .82rem; transition: transform .28s ease; }
.link-toast.show { transform: translate(-50%,0); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(385deg); } }
@keyframes scan { 0% { transform: translateX(-110%); } 100% { transform: translateX(110%); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .reveal { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; padding-inline: 1.25rem; }
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 8rem; }
  .hero-copy { position: relative; z-index: 4; }
  .hero-visual { width: min(92vw,580px); margin-top: -1rem; }
  .hero::after { background: linear-gradient(180deg, rgba(7,2,2,.7) 0%, rgba(7,2,2,.18) 48%, var(--bg) 100%); }
  .scroll-cue { display: none; }
  .origin-heading, .panic-layout, .manifesto-grid { grid-template-columns: 1fr; display: grid; }
  .origin-heading { align-items: start; }
  .lore-grid { grid-template-columns: 1fr; }
  .lore-card { min-height: 260px; }
  .lore-card h3 { margin-top: 3rem; }
  footer { grid-template-columns: 1fr; text-align: center; }
  footer .brand, footer > span { justify-self: center; }
}

@media (max-width: 560px) {
  .topbar { height: 66px; }
  .nav-buy { padding: .7rem .8rem; font-size: .68rem; }
  .hero { padding-top: 7rem; }
  h1 { font-size: clamp(3.8rem,20vw,6rem); }
  .hero-actions .button { width: 100%; }
  .contract { gap: .45rem; }
  .contract code { font-size: .66rem; }
  .hero-visual { width: 108vw; margin-left: -4vw; }
  .signal-card { min-width: 100px; padding: .65rem .7rem; }
  .signal-top { right: 6%; }
  .signal-bottom { left: 7%; }
  .origin, .panic, .manifesto { padding-top: 4.5rem; padding-bottom: 5rem; }
  .origin-heading, .panic-layout, .manifesto-grid { margin-top: 3rem; }
  blockquote { margin-top: 4rem; }
}
