@font-face {
  font-family: "Cormorant";
  src: url("/fonts/cormorant.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Brush";
  src: url("/fonts/brush-kanji.woff2") format("woff2");
  font-display: block;
}

:root {
  --t: 0;                       /* 0 = Dämmerung, 1 = tiefe Nacht (setzt app.js beim Scrollen) */
  --night: #06070e;
  --paper: #ece2d0;
  --paper-2: #e2d4bb;
  --ink: #17130f;
  --red: #c8202a;
  --sakura: #f2a7c3;
  --serif: "Cormorant", "Times New Roman", serif;
  --brush: "Brush", "Yu Mincho", "Hiragino Mincho ProN", serif;
  /* Washi-Papier: feines Rauschen */
  --washi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h2 { font-weight: 700; margin: 0 0 .6em; line-height: 1.1; }
.defs { position: absolute; width: 0; height: 0; }

/* ---------- Himmel ---------- */
.sky { position: fixed; inset: 0; z-index: -1; background: linear-gradient(#05060c, #0d1024 60%, #161a35); }
.sky-dusk {
  position: absolute; inset: 0;
  background: linear-gradient(#2a2347 0%, #7d4a6e 38%, #d9866f 70%, #f0b48a 100%);
  opacity: calc(1 - var(--t));
}
.stars {
  position: absolute; inset: 0; opacity: var(--t);
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 27% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 41% 22%, #fff, transparent), radial-gradient(1px 1px at 58% 12%, #fff, transparent),
    radial-gradient(1px 1px at 69% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 83% 16%, #fff, transparent),
    radial-gradient(1px 1px at 92% 38%, #fff, transparent), radial-gradient(1px 1px at 6% 44%, #fff, transparent),
    radial-gradient(1px 1px at 34% 40%, #fff, transparent), radial-gradient(1px 1px at 76% 52%, #fff, transparent),
    radial-gradient(1px 1px at 18% 60%, #fff, transparent), radial-gradient(1.5px 1.5px at 51% 48%, #fff, transparent);
}
.moon {
  position: absolute; right: 12vw; width: 16vmin; height: 16vmin; border-radius: 50%;
  top: calc(70vh - var(--t) * 58vh);
  background: radial-gradient(circle at 38% 35%, #fff6df, #e9d6a8 55%, #c9b07d);
  box-shadow: 0 0 60px 10px rgba(255, 240, 200, calc(.15 + var(--t) * .25));
  opacity: calc(.25 + var(--t) * .75);
}

/* ---------- Ecke ---------- */
.mark { position: fixed; top: 16px; left: 16px; z-index: 30; }
.mark img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, .4); }
.dc-corner {
  position: fixed; top: 22px; right: 16px; z-index: 30;
  font-size: .95rem; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  padding: .35rem .9rem; border: 1px solid rgba(236, 226, 208, .5); background: rgba(6, 7, 14, .55);
}
.dc-corner:hover { background: var(--red); border-color: var(--red); }

/* ---------- Banner ---------- */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--night); }
.hero-img { width: min(1436px, 100%); mask-image: linear-gradient(#000 82%, transparent); -webkit-mask-image: linear-gradient(#000 82%, transparent); }
.hero-sub { margin: .4rem 0 0; letter-spacing: .35em; text-transform: uppercase; font-size: .85rem; color: #b8ae9c; text-align: center; padding: 0 16px; }
.scroll-hint { position: absolute; bottom: 24px; font-size: 1.6rem; color: #b8ae9c; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 30vh; background: linear-gradient(transparent, rgba(6, 7, 14, 0)); }

section { position: relative; padding: 0 16px; }

/* ---------- Trailer ---------- */
.trailer { min-height: 120vh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12vh; text-align: center; }
.line {
  margin: 0; font-size: clamp(2rem, 6vw, 4.2rem); font-weight: 600; line-height: 1.15;
  color: #fff8ec; text-shadow: 0 2px 4px rgba(20, 8, 24, .55), 0 4px 30px rgba(20, 8, 24, .6);
}
.line.small { font-size: clamp(1.4rem, 3vw, 2rem); font-style: italic; color: var(--red); text-shadow: none; }

/* ---------- Schriftrollen ---------- */
.scrolls {
  display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap;
  gap: clamp(24px, 6vw, 90px); padding-top: 10vh; padding-bottom: 14vh;
}
.scroll {
  position: relative; width: min(390px, 100%);
  padding: 3.4rem 2.2rem 3rem 4.6rem;
  background: var(--washi), linear-gradient(var(--paper), var(--paper-2));
  color: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
}
.scroll.oni { margin-top: 18vh; background: var(--washi), linear-gradient(#1a1418, #0e0b0d); color: var(--paper); }
/* Holzstäbe oben und unten */
.scroll::before, .scroll::after {
  content: ""; position: absolute; left: -14px; right: -14px; height: 16px; border-radius: 8px;
  background: linear-gradient(#5a3a22, #2b1a0e);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .5);
}
.scroll::before { top: -8px; }
.scroll::after { bottom: -8px; }
.v-title {
  position: absolute; left: 1.1rem; top: 2.6rem;
  writing-mode: vertical-rl; font-family: var(--brush); font-size: 3.2rem; line-height: 1;
  color: var(--ink); filter: url(#ink);
}
.oni .v-title { color: var(--red); font-size: 4.4rem; }
.scroll h2 { font-size: 2.6rem; letter-spacing: .04em; }
.scroll p { margin: 0 0 .9rem; font-size: 1.15rem; }
.elements span, .nf-text span {
  font-family: var(--brush); font-size: 1.5rem; color: var(--red); margin: 0 .1rem 0 .4rem;
}
.elements span:first-child { margin-left: 0; }
.hanko {
  position: absolute; right: 1.2rem; bottom: 1.2rem;
  width: 3rem; height: 3rem; display: grid; place-items: center;
  font-family: var(--brush); font-size: 1.9rem; color: #f6ecdc; background: var(--red);
  border-radius: 4px; transform: rotate(-6deg); filter: url(#rough); opacity: .92;
}

/* ---------- Nachteinbruch ---------- */
.nightfall { min-height: 110vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0; }
.nf-text { text-align: center; font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 600; margin: 0 16px 10vh; line-height: 1.5; }
.forest { position: relative; height: clamp(160px, 26vw, 320px); }
.forest img { width: 100%; height: 100%; }
.eyes {
  position: absolute; width: 22px; height: 6px; opacity: 0;
  background:
    radial-gradient(circle at 3px 3px, #ff3b2f 2px, transparent 3px),
    radial-gradient(circle at 19px 3px, #ff3b2f 2px, transparent 3px);
  filter: drop-shadow(0 0 4px #ff2a1f) drop-shadow(0 0 10px rgba(255, 40, 30, .6));
}
.nightfall.awake .eyes { animation: wake 5s ease-in-out infinite; }
.e1 { left: 8%; bottom: 22%; } .e2 { left: 27%; bottom: 12%; animation-delay: 1.3s !important; }
.e3 { left: 49%; bottom: 26%; animation-delay: .6s !important; } .e4 { left: 68%; bottom: 14%; animation-delay: 2.1s !important; }
.e5 { left: 88%; bottom: 20%; animation-delay: 3s !important; }
@keyframes wake { 0%, 100% { opacity: 0; } 20%, 70% { opacity: 1; } 45% { opacity: .2; } 48% { opacity: 1; } }

/* ---------- Notiz ---------- */
.note-wrap { background: #06070e; padding: 14vh 16px; display: flex; justify-content: center; }
.note {
  position: relative; width: min(620px, 100%); padding: 2.6rem 2.6rem 2.4rem;
  background: var(--washi), var(--paper); color: var(--ink);
  transform: rotate(-1.2deg);
  clip-path: polygon(0 2%, 4% 0, 18% 1.5%, 31% 0, 47% 1%, 63% 0, 78% 1.8%, 92% 0, 100% 1.5%, 99% 22%, 100% 48%, 98.8% 73%, 100% 97%, 85% 100%, 66% 98.6%, 48% 100%, 30% 98.4%, 12% 100%, 0 98%, 1.2% 70%, 0 44%, 1% 20%);
}
.note h2 { font-size: 2.4rem; }
.note p { margin: 0 0 1rem; font-size: 1.15rem; }
.note .keys { font-size: 1rem; font-style: italic; color: #5b4a3a; border-top: 1px solid rgba(23, 19, 15, .2); padding-top: .9rem; margin-bottom: 0; padding-right: 4.5rem; }
.hanko.big { width: 4rem; height: 4rem; font-size: 2.6rem; right: 1.8rem; bottom: 1.6rem; transform: rotate(8deg); }

/* ---------- Finale ---------- */
.finale { background: #06070e; min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 2.2rem; padding-bottom: 10vh; }
.brush { font-size: clamp(2.6rem, 8vw, 5.5rem); margin: 0; color: #fff8ec; }
.seal-btn {
  position: relative; display: inline-block; text-decoration: none;
  font-size: 1.25rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 1rem 2.4rem; color: #fff; background: var(--red);
  clip-path: polygon(2% 8%, 30% 0, 62% 6%, 98% 0, 100% 46%, 97% 100%, 60% 93%, 26% 100%, 0 95%, 3% 50%);
  transition: transform .2s, background .2s;
}
.seal-btn:hover { transform: scale(1.05) rotate(-1deg); background: #e02a34; }
.fivem { color: #a69c8a; font-size: 1.05rem; }
.fivem a { color: var(--paper); text-underline-offset: 4px; }

footer { background: #06070e; display: flex; justify-content: center; gap: 1.4rem; padding: 2rem 16px 2.4rem; font-size: .9rem; color: #7d7466; }

/* ---------- Kirschblüten ---------- */
.petals { position: absolute; inset: 0; overflow: hidden; }
.petal { position: absolute; top: -20px; background: var(--sakura); border-radius: 12px 0 12px 0; opacity: .75; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); opacity: .4; } }

/* ---------- Einblenden (nur mit JS) ---------- */
.js .line, .js .scroll, .js .note, .js .nf-text, .js .brush { opacity: 0; transform: translateY(30px); transition: opacity 1.1s ease, transform 1.1s ease; }
.js .scroll.oni { transform: translateY(60px); }
.js .in { opacity: 1 !important; transform: none !important; }
.js .note.in { transform: rotate(-1.2deg) !important; }

@media (max-width: 720px) {
  body { font-size: 18px; }
  .scroll { padding-left: 4rem; }
  .scroll.oni { margin-top: 0; }
  .trailer { gap: 8vh; }
  .note { padding: 2rem 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .petals, .scroll-hint { display: none; }
  .js .line, .js .scroll, .js .note, .js .nf-text, .js .brush { opacity: 1; transform: none; transition: none; }
  .nightfall.awake .eyes { animation: none; opacity: 1; }
}
