/* ════════════════════════════════════════════════════════════════════════════
   YOROZU — Codex of the Isle. A standalone, hyper-aesthetic compendium.
   Deep-dark glass + warm lantern-gold, matching the game's own chrome.
   ════════════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #0b0a14;
  --bg2: #100d1f;
  --ink: #eae4d6;
  --ink-dim: #b4ac9a;
  --ink-faint: #7d7568;
  --glow: #ffc66a;
  --gold: #d8b46a;
  --gold-soft: rgba(216, 180, 106, .42);
  --glass: rgba(18, 15, 30, .66);
  --glass-2: rgba(26, 21, 44, .55);
  --line: rgba(255, 198, 106, .22);
  --line-soft: rgba(255, 198, 106, .12);
  --pixel: 'Press Start 2P', monospace;
  --body: 'Nunito', system-ui, sans-serif;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --maxw: 1200px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; }
a { color: var(--glow); text-decoration: none; }

/* ---- layered cosmic backdrop (fixed, parallax-feel) ---- */
.bgfx { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.bgfx .neb {
  position: absolute; inset: -10%;
  background:
    radial-gradient(60% 50% at 15% 8%, rgba(120, 86, 220, .20), transparent 60%),
    radial-gradient(55% 45% at 88% 18%, rgba(255, 138, 92, .14), transparent 55%),
    radial-gradient(70% 60% at 50% 110%, rgba(70, 130, 220, .16), transparent 60%),
    linear-gradient(180deg, #0b0a14 0%, #0d0b1a 40%, #0b0a14 100%);
}
.bgfx .stars, .bgfx .stars2 {
  position: absolute; inset: 0;
  background-repeat: repeat;
}
.bgfx .stars {
  background-image:
    radial-gradient(1.4px 1.4px at 20px 30px, rgba(255, 240, 210, .9), transparent),
    radial-gradient(1.2px 1.2px at 140px 80px, rgba(255, 224, 180, .7), transparent),
    radial-gradient(1px 1px at 300px 160px, rgba(200, 220, 255, .8), transparent),
    radial-gradient(1.6px 1.6px at 420px 60px, rgba(255, 230, 190, .85), transparent),
    radial-gradient(1px 1px at 520px 220px, rgba(255, 255, 255, .6), transparent);
  background-size: 600px 320px;
  animation: drift 180s linear infinite;
  opacity: .8;
}
.bgfx .stars2 {
  background-image:
    radial-gradient(1px 1px at 80px 120px, rgba(255, 210, 160, .5), transparent),
    radial-gradient(1.2px 1.2px at 360px 40px, rgba(180, 200, 255, .5), transparent),
    radial-gradient(1px 1px at 240px 260px, rgba(255, 255, 255, .4), transparent);
  background-size: 480px 380px;
  animation: drift 320s linear infinite reverse;
  opacity: .5;
}
@keyframes drift { from { background-position: 0 0; } to { background-position: 600px 320px; } }
.bgfx .vign { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 30%, transparent 55%, rgba(5, 4, 10, .7) 100%); }

/* ════════════════════ HERO ════════════════════ */
.hero { position: relative; min-height: 92vh; display: grid; place-items: center; text-align: center; padding: 80px 20px 60px; overflow: hidden; }
.hero .lanterns { position: absolute; inset: 0; pointer-events: none; }
.hero .lantern { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--glow);
  box-shadow: 0 0 12px 4px rgba(255, 198, 106, .6), 0 0 30px 10px rgba(255, 160, 80, .25); animation: bob 6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .8; } 50% { transform: translateY(-18px); opacity: 1; } }
.hero-inner { position: relative; z-index: 2; max-width: 860px; }
.eyebrow { font-family: var(--pixel); font-size: 10px; letter-spacing: 4px; color: var(--gold); text-transform: uppercase; opacity: .85; margin-bottom: 26px; }
.wordmark {
  font-family: var(--pixel);
  font-size: clamp(40px, 11vw, 116px);
  line-height: .96; letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 1px #fff, 0 4px 0 #5a3d12, 0 5px 0 #3a2710, 0 0 36px rgba(255, 198, 106, .55), 0 0 80px rgba(255, 150, 70, .35);
  background: linear-gradient(180deg, #fff5e2 0%, #ffd98a 45%, #f0a93e 75%, #d98a2a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 22px rgba(255, 160, 70, .35));
  margin-bottom: 8px;
}
.subwordmark { font-family: var(--serif); font-style: italic; font-size: clamp(18px, 3.4vw, 30px); color: var(--ink); opacity: .92; letter-spacing: .5px; }
.herodesc { margin: 22px auto 30px; max-width: 600px; font-size: 17px; color: var(--ink-dim); }
.herocta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn { font-family: var(--pixel); font-size: 10px; letter-spacing: 1px; padding: 15px 22px; border-radius: 10px; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s; border: 1px solid var(--line); color: var(--ink); background: var(--glass); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(0, 0, 0, .5), 0 0 22px rgba(255, 198, 106, .25); border-color: var(--gold-soft); }
.btn.pri { background: linear-gradient(180deg, #ffd98a, #f0a93e); color: #2a1a06; border-color: #ffe7b0; box-shadow: 0 6px 0 #7a4e16, 0 10px 30px rgba(255, 150, 70, .35); }
.btn.pri:hover { box-shadow: 0 4px 0 #7a4e16, 0 12px 34px rgba(255, 150, 70, .5); }
/* floating hero sprite ring */
.heroreel { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.heroreel img { position: absolute; image-rendering: pixelated; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); opacity: .9; animation: float 9s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-22px) rotate(1deg); } }
.scrollcue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-family: var(--pixel); font-size: 8px; letter-spacing: 2px; color: var(--ink-dim); opacity: .6; animation: bob 2.4s ease-in-out infinite; }

/* ════════════════════ STICKY NAV ════════════════════ */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(8, 7, 14, .72); border-bottom: 1px solid var(--line-soft); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 18px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav .brand { font-family: var(--pixel); font-size: 12px; color: var(--glow); margin-right: 14px; white-space: nowrap; text-shadow: 0 0 14px rgba(255, 198, 106, .5); }
.nav a.tab { font-family: var(--pixel); font-size: 8px; letter-spacing: .6px; color: var(--ink-dim); padding: 9px 11px; border-radius: 8px; white-space: nowrap; transition: color .15s, background .15s; }
.nav a.tab:hover { color: var(--ink); background: rgba(255, 198, 106, .08); }
.nav a.tab.on { color: #2a1a06; background: linear-gradient(180deg, #ffd98a, #f0a93e); }

/* ════════════════════ SECTIONS ════════════════════ */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.section { padding: 78px 0 30px; scroll-margin-top: 64px; }
.sec-head { margin: 0 auto 30px; max-width: 760px; text-align: center; }
.sec-kicker { font-family: var(--pixel); font-size: 9px; letter-spacing: 2px; color: var(--gold); opacity: .8; }
.sec-title { font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 6vw, 60px); line-height: 1.02; margin: 12px 0 6px; color: #fff;
  background: linear-gradient(180deg, #fff 0%, #ffe6bd 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sec-tag { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--gold); margin-bottom: 14px; }
.sec-intro { font-size: 16.5px; color: var(--ink-dim); max-width: 720px; margin-left: auto; margin-right: auto; text-align: left; }
.sec-intro + .sec-intro { margin-top: 12px; }

/* feature band (hero sprite for the section) */
.sec-band { position: relative; margin: 26px 0 34px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--glass-2);
  display: grid; grid-template-columns: 1.1fr .9fr; min-height: 200px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.sec-band .band-copy { padding: 26px 28px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.sec-band .band-art { position: relative; display: grid; place-items: center; overflow: hidden; background:
  radial-gradient(70% 80% at 70% 50%, rgba(255, 198, 106, .12), transparent 70%); }
.sec-band .band-art img { image-rendering: pixelated; max-width: 78%; max-height: 240px; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .6)); animation: float 8s ease-in-out infinite; }
.sec-band .band-art.scene img { max-width: 100%; max-height: none; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; animation: none; filter: none; opacity: .9; }

/* ---- the card grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 280px)); justify-content: center; gap: 16px; }
.card { position: relative; border-radius: 16px; padding: 20px 18px 18px; background: var(--glass); border: 1px solid var(--line-soft);
  overflow: hidden; transition: transform .18s ease, box-shadow .25s ease, border-color .25s; opacity: 0; transform: translateY(18px); }
.card.in { opacity: 1; transform: none; }
.card::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(80% 60% at 50% -10%, var(--acc, rgba(255, 198, 106, .25)), transparent 60%); }
.card:hover { transform: translateY(-5px); border-color: var(--acc, var(--gold-soft)); box-shadow: 0 18px 44px rgba(0, 0, 0, .5), 0 0 30px var(--acc-soft, rgba(255, 198, 106, .14)); }
.card .ped { position: relative; height: 132px; display: grid; place-items: center; margin-bottom: 12px; }
.card .ped::after { content: ''; position: absolute; bottom: 8px; width: 64%; height: 14px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); }
.card .ped img { position: relative; image-rendering: pixelated; width: 116px; height: 112px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .55)); transition: transform .25s; }
.card:hover .ped img { transform: translateY(-6px) scale(1.04); }
.card .ped .glowdisc { position: absolute; width: 96px; height: 96px; border-radius: 50%; filter: blur(18px); opacity: .5; background: var(--acc, rgba(255, 198, 106, .4)); }
.card .nm { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.1; color: #fff; }
.card .sub { font-family: var(--pixel); font-size: 8px; letter-spacing: .5px; color: var(--acc-text, var(--gold)); margin: 5px 0 9px; text-transform: uppercase; }
.card .bl { font-size: 14.5px; color: var(--ink-dim); }
.card .stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font-size: 11px; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-soft); color: var(--ink); }
.chip b { color: var(--acc-text, var(--gold)); font-weight: 800; }

/* ---- cinematic realm posters (the painted world backdrops) ---- */
.posters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 232px)); justify-content: center; gap: 14px; margin: 6px 0 30px; }
.poster { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; cursor: default;
  border: 1px solid var(--line-soft); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); transition: transform .2s, box-shadow .25s, border-color .25s; }
.poster:hover { transform: translateY(-6px) scale(1.015); border-color: var(--acc, var(--gold-soft)); box-shadow: 0 26px 60px rgba(0, 0, 0, .6), 0 0 40px var(--acc, rgba(255, 198, 106, .25)); }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: transform .4s ease; }
.poster:hover img { transform: scale(1.07); }
.poster-grad { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(8, 6, 14, .35) 62%, rgba(6, 5, 11, .92) 100%); }
.poster-cap { position: absolute; left: 14px; right: 14px; bottom: 13px; }
.poster-cap .pn { font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.05; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .8); }
.poster-cap .pb { font-family: var(--pixel); font-size: 7.5px; letter-spacing: .4px; color: var(--acc, var(--gold)); margin-top: 6px; text-shadow: 0 1px 8px rgba(0, 0, 0, .9); filter: brightness(1.4); }

/* gallery strip (raw sprite showcase) */
.gallery { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.gtile { width: 92px; height: 92px; border-radius: 12px; display: grid; place-items: center; background: var(--glass);
  border: 1px solid var(--line-soft); transition: transform .15s, border-color .2s; }
.gtile:hover { transform: translateY(-4px) scale(1.06); border-color: var(--gold-soft); }
.gtile img { image-rendering: pixelated; width: 70px; height: 70px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }

/* ════════════════════ FOOTER ════════════════════ */
footer { margin-top: 60px; border-top: 1px solid var(--line-soft); padding: 40px 18px 64px; text-align: center; color: var(--ink-dim); }
footer .fmark { font-family: var(--pixel); font-size: 18px; color: var(--glow); text-shadow: 0 0 18px rgba(255, 198, 106, .5); margin-bottom: 12px; }
footer .small { font-size: 13px; opacity: .7; }

/* ---- responsive ---- */
@media (max-width: 760px) {
  .sec-band { grid-template-columns: 1fr; }
  .sec-band .band-art { min-height: 180px; }
  .sec-band .band-copy { padding: 22px 20px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card .nm { font-size: 19px; }
  .section { padding: 54px 0 26px; }
  .posters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 640px) {
  .heroreel { display: none; }                  /* drop the floating sprites on phones — keeps the hero text clean (they'd show through the transparent wordmark) */
  .hero { min-height: 88vh; padding: 56px 16px 48px; }
  .eyebrow { letter-spacing: 2.5px; margin-bottom: 16px; }
  .subwordmark { font-size: clamp(17px, 5.2vw, 24px); }
  .herodesc { font-size: 16px; margin: 18px auto 26px; }
  .herocta { flex-direction: column; align-items: center; gap: 10px; }
  .herocta .btn { width: 100%; max-width: 320px; text-align: center; }
  main { padding: 0 14px; }
  .sec-tag { font-size: 18px; }
  .sec-intro { font-size: 16px; }
}
@media (max-width: 460px) {
  .grid { grid-template-columns: 1fr; }
  .posters { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sec-title { font-size: clamp(27px, 8vw, 40px); }
  .scrollcue { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto; } }
