/* ── hepe: the evil twin ───────────────────────────────
   void      #0a0b0a   near-black, green-cast ground
   crypt     #14171371 surface (unused raw — see --crypt)
   ash       #2b2e28   hairlines, cloak gray
   parchment #cfc8b4   body text, old paper
   bone      #ece5d3   headings
   ember     #c96f3b   burnt orange — the mouth band
   torch     #e5a13d   amber glow — torches, windows
   toad      #7da356   frog green, used sparingly
─────────────────────────────────────────────────────── */

:root {
  --void: #0a0b0a;
  --crypt: #151713;
  --ash: #2b2e28;
  --parchment: #cfc8b4;
  --bone: #ece5d3;
  --ember: #c96f3b;
  --torch: #e5a13d;
  --toad: #7da356;
  --font-display: "Pirata One", "IM Fell English", serif;
  --font-lore: "IM Fell English", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--parchment);
  font-family: var(--font-lore);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ember); color: var(--void); }

a { color: var(--parchment); text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: 3px; }
a:hover { color: var(--torch); }

:focus-visible { outline: 1px solid var(--torch); outline-offset: 3px; }

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  color: var(--bone);
  letter-spacing: 0.01em;
  margin: 0.4rem 0 1.6rem;
}

h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--bone);
  margin-bottom: 0.35rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ember);
}

.lore { font-size: 1.125rem; max-width: 54ch; }
.lore + .lore { margin-top: 1rem; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
.container.narrow { max-width: 760px; }
.section { padding: 6.5rem 0; }

/* ── nav ── */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand-sigil { display: block; }
.brand-word { height: 20px; width: auto; mix-blend-mode: screen; }
.nav-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.nav-links a:hover { text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: 4px; }

/* ── hero ── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 6.5rem 0 3rem;
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 3rem;
}
.hero-word {
  width: min(420px, 88%);
  height: auto;
  mix-blend-mode: screen;
  margin: 1.4rem 0 1.8rem;
}
.incantation {
  font-family: var(--font-lore);
  font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  color: var(--torch);
  line-height: 1.3;
  max-width: 18ch;
}
.incantation span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  animation: conjure 0.9s ease forwards;
}
.incantation span:nth-child(1) { animation-delay: 0.15s; }
.incantation span:nth-child(2) { animation-delay: 0.55s; }
.incantation span:nth-child(3) { animation-delay: 0.95s; }
.incantation span:nth-child(4) { animation-delay: 1.2s; }
.incantation span:nth-child(5) { animation-delay: 1.55s; }
@keyframes conjure { to { opacity: 1; transform: none; } }

.hero-sub { margin-top: 1.1rem; font-size: 1.15rem; }

/* the scrying orb — signature */
.hero-art { position: relative; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 12%;
  background: radial-gradient(closest-side, rgba(125, 163, 86, 0.28), rgba(94, 178, 165, 0.10) 55%, transparent 75%);
  filter: blur(30px);
  animation: scry 5.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scry {
  0%, 100% { opacity: 0.55; }
  38% { opacity: 0.95; }
  52% { opacity: 0.7; }
  71% { opacity: 1; }
}
.hero-art img {
  position: relative;
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(115% 115% at 50% 48%, #000 58%, transparent 88%);
  mask-image: radial-gradient(115% 115% at 50% 48%, #000 58%, transparent 88%);
}

/* ── contract ── */
.contract {
  margin-top: 2.2rem;
  border: 1px solid var(--ash);
  background: var(--crypt);
  padding: 1rem 1.1rem;
  max-width: 34rem;
}
.contract code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--bone);
  word-break: break-all;
  display: block;
}
.contract-actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin-top: 0.8rem; }
.tick { font-family: var(--font-mono); font-size: 0.85em; color: var(--bone); }
.tbtn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ember);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--ember);
}
.tbtn:hover { color: var(--torch); text-decoration-color: var(--torch); }
.contract.small { margin-top: 1rem; }

/* ── tale ── */
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}
.col-art img {
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(120% 120% at 50% 45%, #000 55%, transparent 90%);
  mask-image: radial-gradient(120% 120% at 50% 45%, #000 55%, transparent 90%);
}
.castle {
  max-width: 1280px;
  margin: 4.5rem auto 0;
  padding: 0 1.5rem;
}
.castle img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-mask-image: linear-gradient(#000 78%, transparent 100%), radial-gradient(140% 100% at 50% 40%, #000 70%, transparent 98%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(#000 78%, transparent 100%), radial-gradient(140% 100% at 50% 40%, #000 70%, transparent 98%);
  mask-composite: intersect;
}
.castle figcaption { text-align: center; margin-top: 0.5rem; }

/* ── omens ── */
.omens { list-style: none; margin-top: 1rem; }
.omens li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1.7rem 0;
  border-top: 1px solid var(--ash);
}
.omens li:last-child { border-bottom: 1px solid var(--ash); }
.numeral {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--ember);
  line-height: 1;
}

/* ── summoning ── */
.steps { list-style: none; margin-top: 1rem; display: grid; gap: 2.6rem; }
.steps li { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1.2rem; }
.step-n {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ember);
  border: 1px solid var(--ash);
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.3rem;
}

/* ── footer ── */
.footer {
  border-top: 1px solid var(--ash);
  margin-top: 3rem;
  padding: 4.5rem 1.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.incant-footer { font-style: italic; color: var(--torch); font-size: 1.2rem; }
.footer-addr { font-family: var(--font-mono); font-size: 0.78rem; color: var(--parchment); word-break: break-all; }
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; }
.disclaimer { font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.8; max-width: 64ch; color: #8f8a7b; margin-top: 1rem; }
.colophon { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: #6d685c; }

/* ── reveals ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── responsive ── */
@media (max-width: 860px) {
  .hero { padding-top: 7.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .col-art { max-width: 380px; margin: 0 auto; }
  .section { padding: 4.5rem 0; }
  .nav { padding: 1rem 1.2rem; }
  .nav-links { gap: 1rem; }
}

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .incantation span { animation: none; opacity: 1; transform: none; }
  .hero-art::before { animation: none; opacity: 0.7; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
