/* ============================================================
   THE EDICT — Landing Page Stylesheet
   Dark bureaucratic CRT aesthetic
   ============================================================ */

/* --- Self-hosted fonts (no external requests) --- */
@font-face {
  font-family: 'Special Elite';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/SpecialElite-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Special Elite';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/SpecialElite-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
                 U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Mono';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/SpaceMono-Regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/SpaceMono-Regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
                 U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Mono';
  font-style:  italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/SpaceMono-Italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style:  italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/SpaceMono-Italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
                 U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Mono';
  font-style:  normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/SpaceMono-Bold-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style:  normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/SpaceMono-Bold-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
                 U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Custom Properties (from game's DesignSystem.swift) --- */
:root {
  --base:       #0E0C0A;
  --surface:    #151210;
  --surface2:   #1A1500;
  --gold:       #B8922E;
  --gold-bright:#D4A83A;
  --cyan:       #00B4A0;
  --crimson:    #8B1A1A;
  --ink:        #EDE8DC;
  --ink-faded:  #9A9080;
  --ink-deep:   #5A5040;
  --phosphor:   #3A7A50;

  --font-heading: 'Special Elite', serif;
  --font-body:    'Space Mono', monospace;

  --radius-card: 4px;
  --transition:  200ms ease;

  --z-nav: 100;
  --z-overlay: 50;
  --z-effects: 10;
  --z-content: 20;
  --z-above: 30;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--base);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- CRT Scanlines overlay (entire page) --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-effects);
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
}

/* --- Grain/noise overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-effects);
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.15;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold-bright);
}

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Blink animation for cursor --- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0) translateX(-50%); opacity: 1; }
  50%       { transform: translateY(8px) translateX(-50%); opacity: 0.5; }
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Navigation --- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 250ms ease, border-bottom-color 250ms ease;
  border-bottom: 1px solid transparent;
  animation: navSlideDown 400ms ease forwards;
}

#nav.scrolled {
  background-color: rgba(14, 12, 10, 0.92);
  border-bottom-color: rgba(184, 146, 46, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.nav-logo .cursor {
  display: inline-block;
  animation: blink 1.1s step-end infinite;
  color: var(--gold-bright);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink-faded);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--ink);
}

/* Lang switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--ink-deep);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  min-height: 28px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  border-radius: 2px;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--gold);
  border-color: rgba(184, 146, 46, 0.35);
}

.lang-sep {
  color: var(--ink-deep);
  font-size: 0.65rem;
  user-select: none;
}

/* Nav CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  min-height: 32px;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.nav-cta:hover {
  background-color: var(--gold);
  color: var(--base);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 250ms ease, opacity 250ms ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(14, 12, 10, 0.97);
  border-bottom: 1px solid rgba(184, 146, 46, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: calc(var(--z-nav) - 1);
  padding: 1.5rem;
  flex-direction: column;
  gap: 1rem;
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}

.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu .mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-menu .mobile-nav-links a {
  display: block;
  padding: 0.85rem 0;
  font-size: 0.85rem;
  color: var(--ink-faded);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(90, 80, 64, 0.3);
  transition: color var(--transition);
}

.mobile-menu .mobile-nav-links a:hover {
  color: var(--gold);
}

.mobile-menu .mobile-lang {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.mobile-menu .mobile-cta {
  display: block;
  text-align: center;
  padding: 0.75rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
  text-decoration: none;
}

.mobile-menu .mobile-cta:hover {
  background-color: var(--gold);
  color: var(--base);
}

/* --- Sections / Layout --- */
.section {
  position: relative;
  padding: 6rem 1.5rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.85;
}

/* --- Torn Paper Divider --- */
.torn-divider {
  display: block;
  width: 100%;
  height: 32px;
  overflow: hidden;
  line-height: 0;
}

.torn-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- Reveal animation --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  @keyframes float { from, to { transform: none; } }
  @keyframes blink { from, to { opacity: 1; } }
  @keyframes scrollBounce { from, to { transform: translateX(-50%); } }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  overflow: hidden;
}

/* CRT vignette on hero */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: var(--z-content);
  max-width: 720px;
  margin: 0 auto;
}

/* App icon */
.hero-icon-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 2.25rem;
}

.hero-icon-glow {
  position: absolute;
  inset: -24px;
  background: radial-gradient(ellipse at center, rgba(184,146,46,0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-icon {
  position: relative;
  z-index: 1;
  width: 108px;
  height: 108px;
  border-radius: 22%;
  display: block;
  animation: float 3.8s ease-in-out infinite;
  box-shadow:
    0 0 0 1px rgba(184,146,46,0.25),
    0 12px 40px rgba(0,0,0,0.6),
    0 0 60px rgba(184,146,46,0.12);
}

/* Pre-title monospace label */
.hero-pretitle {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  opacity: 0.7;
}

/* Main game title */
.hero-title {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--gold);
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow:
    0 0 40px rgba(184,146,46,0.3),
    0 0 80px rgba(184,146,46,0.12);
}

.hero-title .cursor {
  animation: blink 1.1s step-end infinite;
  color: var(--gold-bright);
}

/* H1 tagline */
.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  color: var(--ink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  text-shadow: 0 0 40px rgba(184,146,46,0.12);
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--ink-faded);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 2.25rem;
}

/* App Store CTA button */
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: #000;
  border: 1px solid var(--gold);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0.8rem 1.5rem;
  min-height: 52px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform 150ms ease;
  box-shadow: 0 0 20px rgba(184,146,46,0.12);
}

.btn-appstore:hover {
  border-color: var(--gold-bright);
  box-shadow: 0 0 30px rgba(184,146,46,0.25);
  transform: translateY(-1px);
  color: var(--ink);
}

.btn-appstore svg {
  flex-shrink: 0;
  fill: var(--ink);
}

.btn-appstore-text {
  text-align: left;
  line-height: 1.3;
}

.btn-appstore-sub {
  display: block;
  font-size: 0.65rem;
  color: var(--ink-faded);
  letter-spacing: 0.04em;
}

.btn-appstore-main {
  display: block;
  font-size: 0.85rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-deep);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-hint svg {
  stroke: var(--ink-deep);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
#about {
  background: var(--surface);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

#about h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--ink);
  margin-bottom: 1.25rem;
  text-shadow: 0 0 40px rgba(184,146,46,0.18);
}

.about-body {
  font-size: 0.9rem;
  color: var(--ink-faded);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.about-quote {
  margin: 1.75rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--gold);
  background: rgba(184, 146, 46, 0.04);
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--ink);
  font-style: italic;
  line-height: 1.55;
  border-radius: 0 2px 2px 0;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.stat-card {
  background: var(--base);
  border: 1px solid rgba(184, 146, 46, 0.15);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  text-align: center;
  transition: border-color var(--transition);
}

.stat-card:hover {
  border-color: rgba(184, 146, 46, 0.35);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.25rem;
  text-shadow: 0 0 24px rgba(184,146,46,0.3);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--ink-faded);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-sub {
  font-size: 0.65rem;
  color: var(--ink-deep);
  margin-top: 0.2rem;
}

/* ============================================================
   MECHANICS SECTION
   ============================================================ */
#mechanics {
  background: var(--base);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  color: var(--ink);
  text-shadow: 0 0 40px rgba(184,146,46,0.18);
}

.mechanics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.mech-card {
  background: var(--surface);
  border: 1px solid rgba(184, 146, 46, 0.15);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  cursor: default;
  transition: border-color var(--transition), transform 200ms ease, box-shadow 200ms ease;
}

.mech-card:hover {
  border-color: var(--gold-bright);
  border-left-color: var(--gold-bright);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(184,146,46,0.14);
}

.mech-icon {
  margin-bottom: 1rem;
  line-height: 0;
}

.mech-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.mech-desc {
  font-size: 0.8rem;
  color: var(--ink-faded);
  line-height: 1.65;
}

/* ============================================================
   CODICES SECTION
   ============================================================ */
#codices {
  background: var(--surface);
  overflow: hidden;
}

.codices-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.codex-card {
  background: var(--base);
  border: 1px solid rgba(184, 146, 46, 0.12);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: default;
  transition: border-color var(--transition), transform 200ms ease, box-shadow 200ms ease;
}

.codex-card:hover {
  border-color: var(--gold-bright);
  border-top-color: var(--gold-bright);
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(184,146,46,0.16);
}

.codex-icon {
  margin-bottom: 1.25rem;
  line-height: 0;
}

.codex-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.codex-desc {
  font-size: 0.72rem;
  color: var(--ink-faded);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.codex-tag {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  font-weight: 700;
}

.codex-tag.chaos     { color: var(--crimson); background: rgba(139,26,26,0.18); border: 1px solid rgba(139,26,26,0.35); }
.codex-tag.system    { color: var(--cyan);    background: rgba(0,180,160,0.1);  border: 1px solid rgba(0,180,160,0.3); }
.codex-tag.taeuschung{ color: var(--gold);    background: rgba(184,146,46,0.1); border: 1px solid rgba(184,146,46,0.3); }
.codex-tag.fokus     { color: var(--phosphor);background: rgba(58,122,80,0.12); border: 1px solid rgba(58,122,80,0.3); }
.codex-tag.risiko    { color: var(--crimson); background: rgba(139,26,26,0.14); border: 1px solid rgba(139,26,26,0.28); }

/* ============================================================
   ATMOSPHERE QUOTE SECTION
   ============================================================ */
#atmosphere {
  background: #0A0800;
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
}

.atm-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--ink);
  font-style: italic;
  max-width: 680px;
  margin: 0 auto 1.25rem;
  line-height: 1.4;
  text-shadow: 0 0 40px rgba(184,146,46,0.18);
}

.atm-quote::before { content: '\201C'; color: var(--gold); margin-right: 0.1em; }
.atm-quote::after  { content: '\201D'; color: var(--gold); margin-left: 0.1em;  }

.atm-sub {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink-deep);
  letter-spacing: 0.1em;
}

/* ============================================================
   DOWNLOAD CTA SECTION
   ============================================================ */
#download {
  background: var(--surface);
  text-align: center;
}

#download h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--ink);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 40px rgba(184,146,46,0.18);
}

.download-icon-wrap {
  position: relative;
  display: inline-block;
  margin: 2rem auto;
}

.download-icon-glow {
  position: absolute;
  inset: -32px;
  background: radial-gradient(ellipse at center, rgba(184,146,46,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.download-icon {
  position: relative;
  z-index: 1;
  width: 128px;
  height: 128px;
  border-radius: 22%;
  display: block;
  box-shadow:
    0 0 0 1px rgba(184,146,46,0.25),
    0 16px 48px rgba(0,0,0,0.6),
    0 0 80px rgba(184,146,46,0.12);
}

.download-sub {
  font-size: 0.75rem;
  color: var(--ink-deep);
  margin-top: 1.25rem;
  letter-spacing: 0.08em;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--base);
  border-top: 1px solid rgba(184, 146, 46, 0.18);
  padding: 2rem 1.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  justify-content: center;
}

.footer-links a {
  font-size: 0.72rem;
  color: var(--ink-deep);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--ink-faded);
}

.footer-lang {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
}

.footer-copy {
  text-align: center;
  font-size: 0.65rem;
  color: var(--ink-deep);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(90, 80, 64, 0.2);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   RESPONSIVE — Mobile hamburger show
   ============================================================ */
@media (max-width: 1023px) {
  .nav-links { display: none; }
}

@media (max-width: 767px) {
  .nav-cta    { display: none; }
  .nav-right .lang-switcher { display: none; }
  .hamburger  { display: flex; }
  .mobile-menu { display: flex; }

  /* Hero */
  .hero-tagline { font-size: clamp(1.9rem, 10vw, 3rem); }
  .hero-icon { width: 84px; height: 84px; }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Mechanics — 2 col below 768, 1 col below 480 */
  .mechanics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Codices — horizontal scroll */
  .codices-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.85rem;
    padding-bottom: 0.5rem;
  }

  .codices-track::-webkit-scrollbar {
    height: 4px;
  }
  .codices-track::-webkit-scrollbar-track {
    background: var(--base);
  }
  .codices-track::-webkit-scrollbar-thumb {
    background: rgba(184,146,46,0.35);
    border-radius: 2px;
  }

  .codex-card {
    flex-shrink: 0;
    width: 200px;
    scroll-snap-align: start;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.75rem;
  }
  .footer-lang { justify-content: center; }
}

@media (max-width: 479px) {
  .mechanics-grid {
    grid-template-columns: 1fr;
  }

  .section { padding: 4.5rem 1rem; }
}

/* Stats grid stays 2×2 on mobile */
@media (max-width: 479px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   TABLET (768–1024px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  .mechanics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .codices-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 0.5rem;
  }

  .codex-card {
    flex-shrink: 0;
    width: 190px;
    scroll-snap-align: start;
  }
}
