/* DemonSlayer — one-page chronicle + domain offer */
:root {
  --bg: #070605;
  --bg-2: #0e0b09;
  --bg-3: #16100c;
  --ink: #f0e4d0;
  --ink-dim: #c4b49a;
  --muted: #8d7f6c;
  --gold: #e4b449;
  --gold-2: #f6d889;
  --ember: #e85d04;
  --ember-2: #ff8c3a;
  --rule: rgba(228, 180, 73, 0.3);
  --max: 40.5rem;
  --wide: 74rem;
  --header-h: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  font-size: 1.2rem;
  line-height: 1.75;
  min-width: 320px;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #fff4d6; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
::selection { background: rgba(232, 93, 4, 0.45); color: #fff7e6; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--gold);
  color: #1a1008;
  padding: 0.5rem 0.9rem;
  z-index: 100;
  font-family: Cinzel, serif;
  font-size: 0.85rem;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(calc(100% - 2.4rem), var(--wide));
  margin-inline: auto;
}
.prose-wrap { width: min(calc(100% - 2.4rem), var(--max)); margin-inline: auto; }

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(7, 6, 5, 0.92), rgba(7, 6, 5, 0.72) 70%, rgba(7, 6, 5, 0));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(calc(100% - 2.4rem), var(--wide));
  margin-inline: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.brand img {
  width: 36px;
  height: 36px;
  flex: none;
  filter: drop-shadow(0 0 8px rgba(232, 93, 4, 0.7)) brightness(1.15);
}
.brand strong {
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: none;
}
.brand span {
  display: block;
  font-family: Cinzel, serif;
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.1rem;
}
.btn {
  display: inline-block;
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  border-radius: 2px;
  border: 1px solid rgba(243, 212, 138, 0.55);
  color: var(--gold-2);
  background: rgba(22, 16, 12, 0.55);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover {
  color: #1a1008;
  background: linear-gradient(180deg, #f6d889, #e4b449 55%, #c4891e);
  border-color: #ffe7a8;
  box-shadow: 0 0 18px rgba(232, 93, 4, 0.4);
}
.btn-offer {
  font-size: 0.85rem;
  padding: 1.05rem 2.1rem;
  color: #1a1008;
  background: linear-gradient(180deg, #f6d889, #e4b449 45%, #c4891e);
  border: 1px solid #ffe7a8;
  box-shadow: 0 0 28px rgba(232, 93, 4, 0.4), 0 8px 28px rgba(0, 0, 0, 0.45);
}
.btn-offer:hover {
  color: #1a1008;
  filter: brightness(1.08);
  box-shadow: 0 0 36px rgba(255, 140, 58, 0.55), 0 8px 28px rgba(0, 0, 0, 0.45);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
}
.hero-img {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 32% 50%;
}
.hero-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(7, 6, 5, 1) 0%, rgba(7, 6, 5, 0.82) 22%, rgba(7, 6, 5, 0.28) 52%, rgba(7, 6, 5, 0.45) 100%),
    linear-gradient(to right, rgba(7, 6, 5, 0.45), transparent 28%, transparent 72%, rgba(7, 6, 5, 0.5)),
    radial-gradient(ellipse at 50% 100%, rgba(232, 93, 4, 0.16), transparent 55%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2.4rem), 52rem);
  margin: 0 auto 7.5vh;
  text-align: center;
  padding-bottom: 1.5rem;
}
.eyebrow {
  font-family: Cinzel, serif;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.85rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}
.wordmark {
  font-family: "UnifrakturMaguntia", "Palatino Linotype", serif;
  font-weight: 400;
  font-size: clamp(3.5rem, 13vw, 8.4rem);
  line-height: 0.9;
  color: #f7ecd8;
  margin: 0;
  text-shadow:
    0 0 18px rgba(232, 93, 4, 0.45),
    0 0 48px rgba(228, 180, 73, 0.22),
    0 3px 24px rgba(0, 0, 0, 0.85);
  animation: titleFlicker 7s ease-in-out infinite;
}
.wordmark .line { display: block; }
.domain-line {
  font-family: Cinzel, serif;
  font-size: clamp(0.95rem, 2.4vw, 1.35rem);
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--gold-2);
  margin: 0.85rem 0 0;
  text-shadow: 0 0 16px rgba(232, 93, 4, 0.4), 0 2px 12px rgba(0, 0, 0, 0.8);
}
.lede {
  font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--ink-dim);
  margin: 1.15rem auto 0;
  max-width: 28rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
}
.scroll-cue {
  display: inline-block;
  margin-top: 2rem;
  font-family: Cinzel, serif;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 2.2rem;
  margin: 0.55rem auto 0;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: cuePulse 2.4s ease-in-out infinite;
}

@keyframes titleFlicker {
  0%, 46%, 54%, 100% {
    text-shadow:
      0 0 18px rgba(232, 93, 4, 0.45),
      0 0 48px rgba(228, 180, 73, 0.22),
      0 3px 24px rgba(0, 0, 0, 0.85);
  }
  49% {
    text-shadow:
      0 0 10px rgba(232, 93, 4, 0.2),
      0 0 24px rgba(228, 180, 73, 0.1),
      0 3px 24px rgba(0, 0, 0, 0.85);
  }
  51% {
    text-shadow:
      0 0 26px rgba(255, 140, 58, 0.6),
      0 0 64px rgba(228, 180, 73, 0.35),
      0 3px 24px rgba(0, 0, 0, 0.85);
  }
}
@keyframes cuePulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.08); }
}

/* ----- Embers ----- */
.embers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}
.ember {
  position: absolute;
  left: var(--x, 50%);
  bottom: -12px;
  width: var(--s, 5px);
  height: var(--s, 5px);
  border-radius: 50%;
  background: radial-gradient(circle, #fff1c4 0%, #ff8c3a 42%, #e85d04 68%, transparent 100%);
  opacity: 0;
  filter: blur(0.3px);
  animation: rise var(--dur, 10s) linear var(--delay, 0s) infinite;
  will-change: transform, opacity;
}
@keyframes rise {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0; }
  10% { opacity: 0.85; }
  55% { transform: translate3d(var(--drift, 24px), -55vh, 0) scale(0.8); opacity: 0.5; }
  100% { transform: translate3d(calc(var(--drift, 24px) * -0.8), -110vh, 0) scale(0.25); opacity: 0; }
}

/* ----- Grain ----- */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0.07;
  background: url("grain.png") repeat;
  mix-blend-mode: overlay;
}

/* ----- Story ----- */
.chronicle {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232, 93, 4, 0.07), transparent 42%),
    var(--bg);
  padding: 1rem 0 2rem;
}
.chapter { padding: 3.2rem 0 1rem; }
.chapter + .chapter { padding-top: 2.4rem; }
.chap-num {
  font-family: Cinzel, serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.35rem;
  text-align: center;
}
.chapter h2 {
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 3.4vw, 2.05rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 1.6rem;
  color: var(--ink);
}
.sigil {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 0 auto 2.4rem;
  width: min(calc(100% - 2.4rem), 22rem);
}
.sigil .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--rule), transparent);
  animation: lampFlicker 5.5s ease-in-out infinite;
}
.sigil img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 8px rgba(232, 93, 4, 0.6));
}
@keyframes lampFlicker {
  0%, 100% { opacity: 0.85; }
  48% { opacity: 0.85; }
  50% { opacity: 0.4; }
  52% { opacity: 1; }
  54% { opacity: 0.75; }
}

.chapter .prose p {
  margin: 0 0 1.2rem;
  color: var(--ink-dim);
}
.chapter .prose p:last-child { margin-bottom: 0; }
.drop .prose h2 + p::first-letter {
  font-family: "UnifrakturMaguntia", serif;
  font-size: 3.5rem;
  float: left;
  line-height: 0.72;
  padding: 0.18em 0.14em 0 0;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(232, 93, 4, 0.35);
}
.name-mark {
  display: block;
  font-family: "UnifrakturMaguntia", serif;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  text-align: center;
  color: var(--gold-2);
  line-height: 1;
  margin: 1.3rem 0;
  text-shadow: 0 0 18px rgba(232, 93, 4, 0.4);
}
.quote {
  font-style: italic;
  color: var(--ink) !important;
  text-align: center;
  font-size: 1.28rem;
  margin: 1.6rem 0 !important;
}

/* ----- Full-bleed plates ----- */
.plate {
  margin: 2.6rem 0 1rem;
  position: relative;
}
.plate img {
  width: 100%;
  height: min(68vh, 38rem);
  object-fit: cover;
  object-position: center 40%;
}
.plate::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 80px 16px var(--bg);
}
.plate figcaption {
  font-family: Cinzel, serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-top: 0.65rem;
  position: relative;
  z-index: 1;
  padding: 0 1.2rem 0.2rem;
}

/* ----- Offer ----- */
.offer {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 5rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232, 93, 4, 0.18), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(228, 180, 73, 0.08), transparent 45%),
    var(--bg-2);
  border-top: 1px solid var(--rule);
}
.offer h2 {
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 4.6vw, 3rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
  color: var(--ink);
  text-shadow: 0 0 24px rgba(232, 93, 4, 0.25);
}
.offer .for-sale-domain {
  font-family: "UnifrakturMaguntia", serif;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  line-height: 0.95;
  margin: 0.4rem 0 0.9rem;
  color: #f7ecd8;
  text-shadow:
    0 0 18px rgba(232, 93, 4, 0.45),
    0 0 42px rgba(228, 180, 73, 0.2);
  animation: titleFlicker 7s ease-in-out infinite;
}
.offer .for-word {
  font-family: Cinzel, serif;
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.price {
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: clamp(2.3rem, 8vw, 4.1rem);
  letter-spacing: 0.14em;
  color: var(--gold-2);
  margin: 0.15rem 0 1.2rem;
  text-shadow: 0 0 22px rgba(232, 93, 4, 0.55);
  animation: titleFlicker 7s ease-in-out 1.4s infinite;
}
.offer-kicker {
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1.8rem;
}
.offer-note {
  margin: 1.5rem auto 0;
  max-width: 26rem;
  font-size: 1.05rem;
  color: var(--muted);
}

/* ----- Footer / 404 ----- */
.site-footer {
  padding: 2.2rem 0 2.6rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.98rem;
  border-top: 1px solid rgba(228, 180, 73, 0.12);
}
.site-footer p { margin: 0.3rem 0; }
.lost {
  min-height: 70svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1.2rem;
}
.lost h1 {
  font-family: Cinzel, serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0 0 1rem;
}

@media (max-width: 700px) {
  body { font-size: 1.125rem; }
  .brand span { display: none; }
  .hero-copy { margin-bottom: 6vh; }
  .wordmark { font-size: clamp(3.2rem, 18vw, 5.4rem); }
  .plate img { height: 52vw; min-height: 14rem; max-height: 22rem; }
  .chapter { padding: 2.4rem 0 0.6rem; }
  .hdr .btn { padding: 0.6rem 0.85rem; font-size: 0.64rem; }
  .drop .prose h2 + p::first-letter { font-size: 2.9rem; }
  .chapter h2 { letter-spacing: 0.05em; }
}
@media (min-width: 900px) {
  .plate img { height: min(72vh, 42rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wordmark, .price, .offer .for-sale-domain, .sigil .line, .scroll-cue::after, .ember {
    animation: none !important;
  }
  .ember { display: none; }
}
