:root {
  --void: #07030f;
  --ink: #12061f;
  --plum: #2a0d45;
  --orchid: #c77dff;
  --neon: #7b2cbf;
  --cyan: #5eead4;
  --horn: #22d3ee;
  --ember: #ff7a18;
  --pumpkin: #ff9f1c;
  --cream: #f6e8d7;
  --mist: rgba(246, 232, 215, 0.72);
  --glass: rgba(18, 6, 31, 0.55);
  --line: rgba(199, 125, 255, 0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(123, 44, 191, 0.35), transparent 55%),
    radial-gradient(800px 480px at 90% 20%, rgba(255, 122, 24, 0.18), transparent 50%),
    radial-gradient(700px 500px at 50% 90%, rgba(34, 211, 238, 0.12), transparent 55%),
    linear-gradient(180deg, #050208 0%, #12061f 40%, #0a0414 100%);
  color: var(--cream);
  font-family: "IM Fell English", serif;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  box-shadow: inset 0 0 180px 40px rgba(0, 0, 0, 0.55);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.fog {
  pointer-events: none;
  position: fixed;
  bottom: -10%;
  left: -20%;
  width: 140%;
  height: 42%;
  z-index: 2;
  filter: blur(28px);
  opacity: 0.35;
}

.fog-1 {
  background: radial-gradient(ellipse at center, rgba(180, 140, 255, 0.28), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate;
}

.fog-2 {
  background: radial-gradient(ellipse at 40% 60%, rgba(255, 140, 40, 0.16), transparent 65%);
  animation: drift 28s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translateX(-6%); }
  to { transform: translateX(6%); }
}

.ghosts { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }

.ghost {
  position: absolute;
  width: 88px;
  opacity: 0.85;
  filter: drop-shadow(0 0 12px rgba(200, 170, 255, 0.35));
  animation: haunt 18s linear infinite;
}

.ghost svg { width: 100%; height: auto; }

.g1 { top: 12%; left: -10%; animation-duration: 26s; width: 72px; }
.g2 { top: 38%; left: -12%; animation-duration: 32s; animation-delay: -8s; width: 110px; }
.g3 { top: 62%; left: -8%; animation-duration: 22s; animation-delay: -4s; width: 64px; }
.g4 { top: 22%; left: -14%; animation-duration: 38s; animation-delay: -16s; width: 96px; }
.g5 { top: 75%; left: -10%; animation-duration: 28s; animation-delay: -12s; width: 54px; }
.g6 { top: 48%; left: -16%; animation-duration: 20s; animation-delay: -6s; width: 80px; }

@keyframes haunt {
  0% { transform: translate3d(0, 0, 0) rotate(-6deg); }
  25% { transform: translate3d(32vw, -28px, 0) rotate(5deg); }
  50% { transform: translate3d(58vw, 18px, 0) rotate(-4deg); }
  75% { transform: translate3d(84vw, -22px, 0) rotate(7deg); }
  100% { transform: translate3d(110vw, 8px, 0) rotate(-3deg); }
}

.bats { position: fixed; inset: 0; pointer-events: none; z-index: 4; }

.bat {
  position: absolute;
  font-size: 1.4rem;
  animation: batfly 16s linear infinite;
  opacity: 0.7;
}

.b1 { top: 18%; left: 8%; animation-duration: 14s; }
.b2 { top: 8%; left: 55%; animation-duration: 18s; animation-delay: -5s; }
.b3 { top: 70%; left: 72%; animation-duration: 12s; animation-delay: -3s; font-size: 1.1rem; }
.b4 { top: 42%; left: 30%; animation-duration: 20s; animation-delay: -9s; }

@keyframes batfly {
  0%, 100% { transform: translate(0, 0) scaleX(1); }
  25% { transform: translate(40px, -30px) scaleX(-1); }
  50% { transform: translate(-20px, 18px) scaleX(1); }
  75% { transform: translate(28px, -12px) scaleX(-1); }
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 6vw;
  background: rgba(7, 3, 15, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: "Creepster", cursive;
  font-size: 1.85rem;
  letter-spacing: 0.04em;
  color: var(--pumpkin);
  text-shadow: 0 0 18px rgba(255, 122, 24, 0.7);
}

.nav nav { display: flex; gap: 1.4rem; }
.nav nav a {
  font-family: "Cinzel Decorative", serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--mist);
}
.nav nav a:hover { color: var(--cyan); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.nav-x,
.nav-buy {
  font-family: "Cinzel Decorative", serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
}

.nav-x {
  border: 1px solid var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(94, 234, 212, 0.22);
}

.nav-buy {
  border: 1px solid var(--pumpkin);
  color: var(--pumpkin);
  box-shadow: 0 0 16px rgba(255, 122, 24, 0.25);
}

.hero {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) 1.05fr;
  gap: 4vw;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 4.5rem 7vw 5rem;
}

.frame {
  position: relative;
  border-radius: 28px;
  padding: 10px;
  background:
    linear-gradient(145deg, rgba(94, 234, 212, 0.55), rgba(123, 44, 191, 0.15) 40%, rgba(255, 122, 24, 0.55));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(123, 44, 191, 0.35);
}

.frame img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  display: block;
}

.frame-glow {
  position: absolute;
  inset: -18px;
  border-radius: 36px;
  background: radial-gradient(circle at 50% 40%, rgba(34, 211, 238, 0.18), transparent 60%);
  z-index: -1;
  animation: pulse 4.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

.photo-caption {
  margin-top: 1rem;
  text-align: center;
  font-style: italic;
  color: var(--mist);
  font-size: 1.05rem;
}

.eyebrow {
  font-family: "UnifrakturMaguntia", cursive;
  font-size: 1.45rem;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(94, 234, 212, 0.45);
}

.hero h1 {
  font-family: "Creepster", cursive;
  font-size: clamp(3.4rem, 8vw, 7.2rem);
  line-height: 0.9;
  color: #ffe8c2;
  text-shadow:
    0 0 12px rgba(255, 159, 28, 0.7),
    0 8px 0 #3b0d5c,
    0 16px 40px rgba(0, 0, 0, 0.6);
  margin: 0.35rem 0 0.4rem;
}

.ticker {
  font-family: "Cinzel Decorative", serif;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orchid);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}

.lead {
  font-size: 1.22rem;
  line-height: 1.55;
  max-width: 38rem;
  color: var(--mist);
  margin-bottom: 1.5rem;
}

.ca-box {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.9rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 1.4rem;
  backdrop-filter: blur(10px);
}

.ca-label {
  font-family: "Cinzel Decorative", serif;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--pumpkin);
}

#ca {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
  color: #efe6ff;
  word-break: break-all;
  flex: 1;
}

#copy-ca {
  border: 0;
  background: linear-gradient(180deg, #ffb347, #ff7a18);
  color: #1a0a00;
  font-family: "Cinzel Decorative", serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.hero-actions, .ritual-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  font-family: "Cinzel Decorative", serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-pump {
  background: linear-gradient(120deg, #ff9f1c, #ff4d6d 55%, #7b2cbf);
  color: #fff8ee;
  box-shadow: 0 10px 30px rgba(255, 77, 109, 0.35);
}

.btn-ghost {
  border: 1px solid rgba(94, 234, 212, 0.55);
  color: var(--cyan);
  background: rgba(8, 20, 24, 0.4);
}

.panel {
  position: relative;
  z-index: 5;
  padding: 5.5rem 7vw;
  scroll-margin-top: 88px;
}

.panel-head { text-align: center; margin-bottom: 2.6rem; }

.panel h2, .finale h2 {
  font-family: "Eater", cursive;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: #ffe4c4;
  margin-top: 0.35rem;
  text-shadow: 0 0 20px rgba(255, 122, 24, 0.35);
}

.lore-grid, .hex-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.card, .hex, .omen, .steps li {
  background: linear-gradient(180deg, rgba(42, 13, 69, 0.55), rgba(7, 3, 15, 0.72));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.card h3, .omen h3, .steps h3 {
  font-family: "Griffy", cursive;
  font-size: 1.55rem;
  color: var(--pumpkin);
  margin-bottom: 0.55rem;
}

.card p, .omen p, .steps p, .hex span {
  color: var(--mist);
  line-height: 1.5;
  font-size: 1.08rem;
}

.hex {
  text-align: center;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.hex-ico { font-size: 1.8rem; }

.hex strong {
  font-family: "Butcherman", cursive;
  font-size: 2rem;
  color: #fff;
  letter-spacing: 0.04em;
}

.hex-grid { grid-template-columns: repeat(4, 1fr); }

.steps {
  list-style: none;
  display: grid;
  gap: 1rem;
  max-width: 820px;
  margin: 0 auto;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
}

.step-n {
  font-family: "Cinzel Decorative", serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--horn);
  min-width: 2.4rem;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
}

.ritual-cta { justify-content: center; margin-top: 2rem; }

.omen-wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.6rem;
  align-items: center;
}

.omen-photo img {
  border-radius: 24px;
  box-shadow: 0 0 40px rgba(123, 44, 191, 0.4);
  border: 1px solid var(--line);
}

.omen-list { display: grid; gap: 1rem; }

.finale {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 5rem 7vw 4rem;
}

.finale p {
  font-family: "UnifrakturMaguntia", cursive;
  font-size: 1.6rem;
  color: var(--orchid);
  margin: 0.6rem 0 1.6rem;
}

footer {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 2rem 7vw 3rem;
  color: rgba(246, 232, 215, 0.55);
  border-top: 1px solid var(--line);
}

.foot-ca {
  margin-top: 0.4rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  word-break: break-all;
}

.reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

#toast {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1b0a2c;
  border: 1px solid var(--orchid);
  color: var(--cream);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  font-family: "Cinzel Decorative", serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
  .hero, .omen-wrap { grid-template-columns: 1fr; }
  .lore-grid, .hex-grid { grid-template-columns: 1fr 1fr; }
  .nav nav { display: none; }
  .hero { padding-top: 2.2rem; min-height: auto; }
}

@media (max-width: 640px) {
  .lore-grid, .hex-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 3.2rem; }
  .nav-x, .nav-buy { padding: 0.45rem 0.7rem; font-size: 0.62rem; }
}
