/* Insect Dice Labyrinth: a firefly forest at night, with paper and ink like the game's menus */
:root {
  --forest: #0d1a14;
  --forest-2: #13261d;
  --moss: #2f5a3f;
  --paper: #f8f1df;
  --paper-2: #ecdfc2;
  --ink: #2a1c10;
  --ink-soft: #5b4630;
  --firefly: #f4c76a;
  --firefly-deep: #d99a2b;
  --text: #f1ead8;
  --text-dim: #b9c4b5;
  --red: #a63a2a;
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--forest);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: var(--firefly); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.5rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.5em; border-radius: 999px; border: 0;
  font: 700 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--firefly); outline-offset: 3px; }
.btn-main { background: var(--firefly); color: var(--ink); box-shadow: 0 0 28px rgba(244, 199, 106, .45); }
.btn-main:hover { background: #ffd885; box-shadow: 0 0 40px rgba(244, 199, 106, .65); }
.btn-ghost { background: rgba(248, 241, 223, .1); color: var(--text); border: 1px solid rgba(248, 241, 223, .35); }
.btn-ghost:hover { background: rgba(248, 241, 223, .18); }

/* Top bar */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
}
.top a.home { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; }
.top nav a { color: var(--text); text-decoration: none; font-weight: 600; opacity: .85; }
.top nav a:hover { opacity: 1; color: var(--firefly); }

/* Hero */
.hero {
  position: relative; min-height: 92vh; display: grid; place-items: center; text-align: center;
  padding: 110px 16px 80px;
  background:
    linear-gradient(to bottom, rgba(13, 26, 20, .35), rgba(13, 26, 20, .15) 40%, var(--forest) 98%),
    url("img/forest.jpg") center / cover no-repeat;
  overflow: hidden;
}
.hero .logo { width: min(220px, 50vw); height: auto; margin: 0 auto 6px; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .6)); }
.hero .title { font-size: clamp(2.8rem, 8vw, 5.6rem); margin: 0 0 10px; text-shadow: 0 4px 30px rgba(0, 0, 0, .7); letter-spacing: .01em; }
.hero .tagline { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); font-style: italic; margin: 0 0 6px; }
.hero .sub { color: var(--text-dim); max-width: 620px; margin: 0 auto 28px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .note { margin-top: 16px; font-size: .9rem; color: var(--text-dim); }

/* Fireflies drifting over the hero */
.fireflies span {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--firefly); box-shadow: 0 0 12px 4px rgba(244, 199, 106, .55);
  animation: drift 9s ease-in-out infinite; opacity: 0;
}
@keyframes drift {
  0% { transform: translate(0, 0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: .8; }
  100% { transform: translate(40px, -120px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .fireflies { display: none; } .btn:hover { transform: none; } }

/* Sections */
section { padding: 80px 0; }
.lead { color: var(--text-dim); max-width: 680px; font-size: 1.1rem; }
.center { text-align: center; }
.center .lead { margin: 0 auto; }

.trailer {
  aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius); overflow: hidden;
  background: #000 url("img/forest.jpg") center / cover; border: 1px solid rgba(248, 241, 223, .15);
  display: grid; place-items: center; margin-top: 28px;
}
.trailer iframe { width: 100%; height: 100%; border: 0; }
.trailer .soon { background: rgba(13, 26, 20, .75); padding: 14px 22px; border-radius: 999px; font-weight: 700; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 36px; }
.card {
  background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); position: relative;
}
.card:nth-child(1) { transform: rotate(-1deg); }
.card:nth-child(2) { transform: rotate(.8deg); }
.card:nth-child(3) { transform: rotate(-.6deg); }
.card .icon { font-size: 2rem; line-height: 1; margin-bottom: 10px; }
.card p { margin: 0; color: var(--ink-soft); }

.cast { background: linear-gradient(var(--forest), var(--forest-2) 30%, var(--forest-2) 70%, var(--forest)); }
.lineup { border-radius: var(--radius); margin: 30px auto 0; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 30px; }
.badges figure { margin: 0; width: 120px; text-align: center; }
.badges img { width: 120px; height: 120px; border-radius: 50%; transition: transform .2s ease; }
.badges img:hover { transform: rotate(-6deg) scale(1.06); }
.badges figcaption { font-family: var(--serif); font-size: 1.2rem; margin-top: 6px; }

.cta { text-align: center; }
.cta .box {
  background: var(--paper); color: var(--ink); border-radius: 20px; padding: 44px 24px;
  max-width: 760px; margin: 0 auto; box-shadow: 0 0 60px rgba(244, 199, 106, .18);
}
.cta .box p { color: var(--ink-soft); }
.cta .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.cta .btn-ghost { color: var(--ink); border-color: rgba(42, 28, 16, .3); background: transparent; }

footer { padding: 40px 0 60px; color: var(--text-dim); font-size: .95rem; text-align: center; }
footer nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
footer a { color: var(--text-dim); }

/* Plain pages (feedback, press kit, privacy) */
.page { padding: 110px 0 60px; }
.page .sheet {
  background: var(--paper); color: var(--ink); border-radius: 20px; padding: clamp(22px, 5vw, 48px);
  max-width: 780px; margin: 0 auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
.sheet h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
.sheet p, .sheet li { color: var(--ink-soft); }
.sheet a { color: var(--red); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0 0 24px; }
.facts dt { font-weight: 800; color: var(--ink); }
.facts dd { margin: 0; color: var(--ink-soft); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.gallery a img { border-radius: 10px; border: 1px solid var(--paper-2); }

/* Forms */
form .field { margin-bottom: 20px; }
form label { display: block; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
form .hint { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
form textarea, form input[type=text], form input[type=email] {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid #cdbb97;
  background: #fffaf0; color: var(--ink); font: 1rem var(--sans);
}
form textarea { min-height: 96px; resize: vertical; }
form textarea:focus, form input:focus { outline: 3px solid var(--firefly); border-color: var(--firefly-deep); }
.stars { display: flex; gap: 8px; flex-wrap: wrap; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0;
  background: #efe3c6; border: 1.5px solid #cdbb97; font-size: 1.4rem; cursor: pointer;
}
.stars input:checked + label { background: var(--firefly); border-color: var(--firefly-deep); }
.stars input:focus-visible + label { outline: 3px solid var(--firefly-deep); }
.trap { position: absolute; left: -9999px; }
.done { text-align: center; padding: 20px 0; }
.gift { background: #fff6dc; border: 2px dashed var(--firefly-deep); border-radius: 14px; padding: 18px; margin: 22px 0; }
.gift .code { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.gift .code span { font: 800 1.7rem ui-monospace, Consolas, monospace; letter-spacing: .08em; color: var(--ink); }
.gift .btn-ghost { color: var(--ink); border-color: rgba(42, 28, 16, .3); background: transparent; padding: .5em 1.1em; }
.hint { color: var(--ink-soft); font-size: .95rem; }
.error { color: var(--red); font-weight: 700; }

@media (max-width: 640px) {
  .top { padding: 14px 16px; }
  .top nav { gap: 12px; font-size: .9rem; }
  section { padding: 56px 0; }
  .card { transform: none !important; }
  .facts { grid-template-columns: 1fr; }
}
