/* Fossil Penguin — inked comic look: wood, paper, thick outlines. */

@font-face { font-family: "Lilita One"; src: url("../fonts/lilita-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url("../fonts/comic-neue-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url("../fonts/comic-neue-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #150b06;
  --wood-900: #1f0f07;
  --wood-800: #2d160b;
  --wood-700: #43220f;
  --paper: #f1e6cf;
  --paper-dim: #dccdae;
  --gold: #e3a008;
  --gold-hot: #ffbe2e;
  --ember: #d8502f;
  --lake: #3f86a8;
  --leaf: #6f9d4b;
  --text: #f6edd9;
  --muted: #cdbb9a;
  --radius: 14px;
  --shadow: 5px 5px 0 var(--ink);
  --maxw: 1120px;
  --display: "Lilita One", "Impact", "Arial Black", sans-serif;
  --body: "Comic Neue", "Comic Sans MS", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--wood-900);
  min-height: 100vh;
  overflow-x: hidden;
}
/* fixed wood backdrop, dimmed */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(rgba(20, 9, 4, .72), rgba(20, 9, 4, .86)), url("../img/scenes/wood.webp") center / cover no-repeat;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hot); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold-hot); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.8rem, 8vw, 5.4rem); }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1em; }
.eyebrow {
  display: inline-block; font-family: var(--display); letter-spacing: .12em; text-transform: uppercase;
  font-size: .95rem; color: var(--gold); margin-bottom: .6rem;
}
.lead { font-size: 1.3rem; color: var(--paper); max-width: 40ch; }
.ink-text { color: var(--paper); text-shadow: 3px 3px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--gold);
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--display); font-size: 1.2rem; letter-spacing: .03em;
  padding: .7em 1.3em; border-radius: 999px; text-decoration: none; cursor: pointer;
  color: var(--ink); background: var(--bg);
  border: 3px solid var(--ink); box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); background: var(--gold-hot); color: var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn--ghost { --bg: var(--paper); }
.btn--ghost:hover { background: #fff; }
.btn--sm { font-size: 1rem; padding: .5em 1.05em; box-shadow: 3px 3px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.4rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(31, 15, 7, .94);
  backdrop-filter: blur(6px);
  border-bottom: 4px solid var(--ink);
  box-shadow: 0 3px 0 rgba(227, 160, 8, .35);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); font-family: var(--display); font-size: 1.5rem; line-height: 1; }
.brand img { width: auto; height: 44px; }
.brand span { text-shadow: 2px 2px 0 var(--ink); }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) {
  display: block; padding: .45em .8em; border-radius: 999px; text-decoration: none; color: var(--paper);
  font-family: var(--display); font-size: 1.1rem; letter-spacing: .03em;
}
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { background: var(--wood-700); color: var(--gold-hot); }
.nav-toggle {
  display: none; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px;
  padding: 6px 12px; font-family: var(--display); font-size: 1.1rem; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
}

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 7vw, 84px) 0 clamp(48px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; }
.hero h1 .accent { color: var(--gold); }
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: .95rem; letter-spacing: .06em;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: .25em .9em; box-shadow: 3px 3px 0 var(--ink);
}
.badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); border: 2px solid var(--ink); }
.stage { position: relative; aspect-ratio: 1 / 1; max-width: 520px; margin-inline: auto; width: 100%; }
.stage::before {
  content: ""; position: absolute; inset: 6% 4% 4%; border: 4px solid var(--ink); border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
  background: radial-gradient(circle at 50% 40%, #6a3a1a 0%, #3b1d0d 70%); box-shadow: var(--shadow);
}
.stage .monster { position: absolute; inset: 0; margin: auto; width: 88%; filter: drop-shadow(5px 6px 0 rgba(0, 0, 0, .45)); animation: float 5s ease-in-out infinite; }
.stage .mascot { position: absolute; left: -2%; bottom: 0; width: 34%; filter: drop-shadow(4px 5px 0 rgba(0, 0, 0, .5)); animation: float 4s ease-in-out -1.5s infinite; }
.stage .float-card {
  position: absolute; width: 24%; border: 3px solid var(--ink); border-radius: 8px; box-shadow: 4px 4px 0 var(--ink);
}
.stage .fc1 { right: -1%; top: 8%; transform: rotate(9deg); animation: bob 5s ease-in-out infinite; }
.stage .fc2 { right: 8%; bottom: 2%; transform: rotate(-7deg); animation: bob 6s ease-in-out -2s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-head { max-width: 62ch; margin-bottom: 2.2rem; }
.section-head p { color: var(--paper); }
.section--band { background: rgba(20, 9, 4, .55); border-block: 4px solid var(--ink); }

.paper {
  background: var(--paper); color: var(--ink);
  border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 34px);
}
.paper h2, .paper h3 { color: var(--ink); }
.paper a { color: #8a3a05; }

/* game spotlight */
.spotlight { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: center; }
.spotlight .coin { width: 200px; margin-inline: auto; filter: drop-shadow(5px 6px 0 rgba(21, 11, 6, .35)); animation: float 6s ease-in-out infinite; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 1rem 0 0; }
.facts li { background: var(--wood-800); color: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: .15em .9em; font-weight: 700; font-size: 1rem; }

/* loop steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { position: relative; background: var(--paper); color: var(--ink); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px 18px 18px; counter-increment: step; }
.step::before {
  content: counter(step); position: absolute; top: -18px; left: 16px; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--gold); border: 4px solid var(--ink); border-radius: 50%; font-family: var(--display); font-size: 1.5rem;
}
.step h3 { font-size: 1.5rem; margin-bottom: .3em; }
.step p { margin: 0; font-size: 1.05rem; }

/* monsters */
.monsters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.monster-card { border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; transition: transform .15s ease; }
.monster-card:hover { transform: translateY(-4px) rotate(-.6deg); }
.monster-card .pic { aspect-ratio: 1 / 1; overflow: hidden; display: grid; place-items: center; border-bottom: 4px solid var(--ink); background-size: cover; background-position: center; }
.monster-card .pic img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, .4)); }
.scene-mountain { background-image: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.15)), url("../img/scenes/mountain.webp"); }
.scene-lake { background-image: linear-gradient(rgba(0,0,0,.1), rgba(0,0,0,.1)), url("../img/scenes/lake.webp"); }
.scene-forest { background-image: radial-gradient(circle at 30% 20%, #4f7a38, #1f3a1c 75%); }
.monster-card .info { padding: 14px 16px 18px; }
.monster-card h3 { margin-bottom: .1em; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: .3rem 0 .6rem; }
.tag { font-size: .85rem; font-weight: 700; padding: .05em .65em; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-dim); }
.tag--t1 { background: #cfe3b8; } .tag--t2 { background: #f6d58a; } .tag--t3 { background: #f2a58f; }
.monster-card p { font-size: 1rem; margin: 0; }

/* cards gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; list-style: none; margin: 0; padding: 0; }
.gallery li { perspective: 700px; }
.gallery figure { margin: 0; }
.gallery img { border: 4px solid var(--ink); border-radius: 10px; box-shadow: var(--shadow); width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .2s ease, box-shadow .2s ease; background: var(--wood-800); }
.gallery li:nth-child(odd) img { transform: rotate(-1.5deg); }
.gallery li:nth-child(even) img { transform: rotate(1.5deg); }
.gallery li:hover img { transform: translateY(-8px) rotate(0) scale(1.04); box-shadow: 9px 10px 0 var(--ink); }
.gallery figcaption { text-align: center; font-family: var(--display); margin-top: 10px; color: var(--paper); text-shadow: 2px 2px 0 var(--ink); font-size: 1.1rem; }

/* classes */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.class-card h3 { display: flex; align-items: center; gap: 10px; }
.class-card .pill { font-family: var(--body); font-size: .8rem; font-weight: 700; background: var(--gold); border: 2px solid var(--ink); border-radius: 999px; padding: .05em .7em; }

/* turn strip */
.turn { display: flex; flex-wrap: wrap; gap: 0; list-style: none; padding: 0; margin: 0; counter-reset: t; }
.turn li { flex: 1 1 180px; counter-increment: t; background: var(--paper); color: var(--ink); border: 4px solid var(--ink); padding: 14px 18px 14px 56px; position: relative; margin: 0 -2px -4px 0; font-weight: 700; }
.turn li::before { content: counter(t); position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); border: 3px solid var(--ink); display: grid; place-items: center; font-family: var(--display); }
.turn li span { display: block; font-weight: 400; font-size: .98rem; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
th, td { text-align: left; padding: .6em .8em; border-bottom: 3px solid var(--ink); vertical-align: top; }
th { font-family: var(--display); font-weight: 400; background: var(--wood-800); color: var(--gold-hot); }

/* community / socials */
.community { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; }
.socials { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.socials a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); padding: .55em 1em;
  font-family: var(--display); font-size: 1.2rem; transition: transform .12s ease, box-shadow .12s ease;
}
.socials a small { font-family: var(--body); font-weight: 700; font-size: .95rem; opacity: .75; }
.socials a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.socials .s-discord { background: #b9c1ff; } .socials .s-youtube { background: #ffb4a4; } .socials .s-instagram { background: #ffc6e0; }
.socials .s-tiktok { background: #b4ece6; } .socials .s-x { background: #dcdcdc; }

/* footer */
.site-footer { border-top: 4px solid var(--ink); background: rgba(20, 9, 4, .9); padding: 34px 0 40px; margin-top: 30px; box-shadow: inset 0 3px 0 rgba(227, 160, 8, .35); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--paper); }
.fine { color: var(--muted); font-size: .95rem; margin: 18px 0 0; }

/* article pages (privacy, 404) */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.9rem; margin-top: 1.6em; }
.center { text-align: center; }
.page-hero { padding: 56px 0 24px; }

/* scroll reveal (only when JS has opted in) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .community, .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stage { max-width: 420px; order: -1; }
  .spotlight { grid-template-columns: 1fr; text-align: center; }
  .spotlight .facts { justify-content: center; }
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--wood-900); border-bottom: 4px solid var(--ink); padding: 14px 20px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: .7em 1em; }
  .nav-links .btn { justify-content: center; }
}
@media (max-width: 520px) {
  body { font-size: 1.08rem; }
  .steps { grid-template-columns: 1fr; }
  .monsters { grid-template-columns: 1fr 1fr; gap: 14px; }
  .monster-card .info { padding: 10px 12px 14px; }
  .monster-card h3 { font-size: 1.25rem; }
  .gallery { gap: 14px; }
}
@media (max-width: 380px) { .monsters { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* small utilities (no inline styles, so the CSP can stay strict) */
.mt-s { margin-top: .25em; }
.mini-mascot { width: 220px; margin-inline: auto; }
.lead--center { margin-inline: auto; }
.btn-row--center { justify-content: center; }
