@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Space+Mono:wght@400;700&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --cardboard: #EDE6D8;
  --cardboard-deep: #DED2BC;
  --paper: #F7F3E8;
  --paper-warm: #FBF8F1;
  --ink: #2B2420;
  --ink-soft: #47392F;
  --rust: #B8562F;
  --rust-deep: #8F3F20;
  --rust-tint: rgba(184,86,47,0.08);
  --stone: #8A7E6F;
  --stone-light: #B8AC98;
  --border: #DCCFB4;
  --line-ruled: #E4D9C2;

  --cart-terracotta: #B8562F;
  --cart-forest: #3E7A5C;
  --cart-indigo: #4A5A8A;
  --cart-ochre: #C79A3E;
  --cart-plum: #7A4A6E;
  --cart-teal: #2E7A78;

  --font-display: 'Bricolage Grotesque', 'Arial Black', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 16px; --sp-lg: 32px; --sp-xl: 48px; --sp-xxl: 64px; --sp-section: 88px;
  --r-sm: 4px; --r-md: 8px; --r-lg: 14px; --r-pill: 100px;
  --shadow-sm: 0 1px 3px rgba(43,36,32,0.08), 0 4px 10px rgba(43,36,32,0.06);
  --shadow-md: 0 4px 14px rgba(43,36,32,0.12);
  --shadow-lg: 0 10px 30px rgba(43,36,32,0.16);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--cardboard);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, #000 0, #000 1px, transparent 1px, transparent 3px);
  z-index: 1000;
}

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--sp-section) var(--sp-lg);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.015em; line-height: 1.1; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--rust); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--sp-sm); }
.mono-tag { display: inline-block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; padding: 4px 11px; border-radius: var(--r-pill); background: var(--rust-tint); color: var(--rust); text-transform: uppercase; }

/* NAV */
header { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-lg); max-width: 1200px; margin: 0 auto; position: relative; z-index: 10; }
.logo-container { display: flex; align-items: center; gap: var(--sp-sm); text-decoration: none; color: var(--ink); }
.logo-container img { width: 40px; height: 40px; }
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
nav { display: flex; gap: var(--sp-lg); }
nav a { color: var(--ink); text-decoration: none; font-weight: 600; transition: color 0.2s; }
nav a:hover { color: var(--rust); }

/* HERO */
.hero { text-align: center; padding: 100px var(--sp-lg) 140px; position: relative; z-index: 10; }
.hero h1 { font-size: clamp(48px, 8vw, 92px); margin: 0 auto var(--sp-md); max-width: 900px; }
.hero p.lead { font-size: clamp(18px, 2.5vw, 22px); color: var(--ink-soft); max-width: 600px; margin: 0 auto var(--sp-xl); }
.btn { display: inline-block; font-family: var(--font-body); font-weight: 700; font-size: 15px; border-radius: var(--r-pill); padding: 12px 28px; text-decoration: none; transition: transform 160ms cubic-bezier(0.25,0.1,0.25,1), box-shadow 160ms ease; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--rust); color: var(--paper-warm); box-shadow: 0 4px 14px rgba(184,86,47,0.3); border: none; }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); margin-left: 12px; }

/* GAMES SHELF */
.games-shelf { padding-top: 40px; position: relative; z-index: 10; }
.games-shelf-header { text-align: center; margin-bottom: 60px; }
.games-shelf-header h2 { font-size: clamp(32px, 5vw, 48px); }
.shelf-container { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-xl); align-items: flex-end; padding-bottom: 40px; border-bottom: 8px solid var(--cardboard-deep); }
.cartridge { width: 300px; background: var(--paper-warm); border-radius: var(--r-md); border: 1.5px solid var(--ink); box-shadow: var(--shadow-sm); padding: var(--sp-xl); position: relative; overflow: hidden; transition: transform 320ms cubic-bezier(0.25,0.1,0.25,1), box-shadow 320ms ease; cursor: pointer; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.cartridge::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 10px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 8px); opacity: 0.12; z-index: 1; }
.cartridge .spine { position: absolute; top: 0; left: 0; right: 0; height: 6px; z-index: 2; opacity: 0.8; }
.cartridge:hover { transform: translateY(-8px) rotate(0deg) !important; box-shadow: var(--shadow-lg); }
.cartridge h3 { font-size: 28px; margin-bottom: 12px; margin-top: 16px; }
.cartridge p.hook { font-size: 15px; font-style: italic; color: var(--ink-soft); margin-bottom: 16px; }
.cartridge p.desc { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 24px; flex-grow: 1; }
.cart-cta { font-family: var(--font-body); font-weight: 700; font-size: 14px; color: var(--rust); margin-top: auto; display: flex; align-items: center; gap: 6px; }
.cartridge:hover .cart-cta { text-decoration: underline; }
.cart-no { font-family: var(--font-mono); font-size: 12px; color: var(--stone); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; margin-bottom: 12px; }
.scroll-hint { text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--stone); margin-top: 24px; text-transform: uppercase; letter-spacing: 0.1em; }

/* ABOUT */
.about { display: flex; gap: var(--sp-xxl); align-items: center; justify-content: center; flex-wrap: wrap; padding: 120px var(--sp-lg); position: relative; z-index: 10; max-width: 1080px; margin: 0 auto; }
.about-text { max-width: 500px; }
.about-text h2 { font-size: clamp(32px, 4vw, 44px); margin-bottom: var(--sp-md); line-height: 1.1; }
.about-text p { margin-bottom: var(--sp-md); color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.about-stats { margin-top: var(--sp-lg); font-family: var(--font-mono); font-size: 13.5px; color: var(--ink); display: flex; flex-direction: column; gap: 10px; }
.about-stats li { list-style: none; display: flex; align-items: baseline; }
.about-stats li span:first-child { width: 220px; color: var(--ink-soft); }
.about-stats li span:last-child { font-weight: 700; color: var(--ink); }
.about-image { flex-shrink: 0; }
.about-image img { width: 320px; height: auto; transform-origin: center center; }

@media (prefers-reduced-motion: no-preference) {
  .about-image img {
    animation: mascotFloat 6s ease-in-out infinite;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  .about-image img:hover {
    animation-play-state: paused;
    transform: translateY(-8px) rotate(0deg);
  }
}

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-4px) rotate(1deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
  75% { transform: translateY(-3px) rotate(1.5deg); }
}

/* FOOTER */
footer { background: var(--paper-warm); padding: var(--sp-xl) var(--sp-lg); margin-top: 80px; border-top: 1px solid var(--border); position: relative; z-index: 10; }
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-xl); }
.footer-brand { max-width: 300px; }
.footer-brand .logo-container img { width: 32px; height: 32px; }
.footer-brand p { font-family: var(--font-mono); color: var(--stone); font-size: 13px; margin-top: var(--sp-md); }
.footer-links { display: flex; gap: 80px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; color: var(--rust); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--sp-md); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 15px; transition: color 0.2s; }
.footer-col a:hover { color: var(--rust); }
.footer-bottom { max-width: 1080px; margin: 60px auto 0; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-size: 13px; color: var(--stone); flex-wrap: wrap; gap: 16px; }

/* PRELOADER */
#preloader { position: fixed; inset: 0; background: var(--cardboard); z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.6s ease; }
#preloader.fade-out { opacity: 0; pointer-events: none; }
#preloader img { width: 140px; height: 140px; animation: pulse 2s infinite cubic-bezier(0.25,0.1,0.25,1); }
@keyframes pulse { 0% { transform: scale(0.95); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(0.95); opacity: 0.8; } }

@media (max-width: 768px) {
  nav { display: none; } /* Simplified for mobile, would normally add a hamburger */
  .footer-links { gap: 40px; }
}
