/* ═══════════════════════════════════════════════════════════════
   COURT WIZARD — Production Website
   Pixel grimoire aesthetic. Dark fantasy with a wink. No frameworks.
   ═══════════════════════════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
  /* Depth palette — darkened skybox purples */
  --void:           #120e1e;
  --abyss:          #1a1428;
  --obsidian:       #231c38;
  --slate:          #2e2648;
  --iron:           #3a3058;

  /* Accent — neutral whites/grays matching game UI */
  --gold:           #eaeaea;
  --gold-bright:    #ffffff;
  --gold-dim:       #a6a6a6;

  /* Arcane spectrum — purple-tinted matching game buttons */
  --purple:         #6b5a80;
  --violet-deep:    #2e2040;
  --lavender:       #a898c0;
  --arcane:         #4a3d60;

  /* Parchment */
  --parchment:      #e8ddd0;
  --parchment-dark: #ccc0a8;
  --ink:            #2a2018;

  /* Text — game's neutral gray hierarchy */
  --text-bright:    #ebebeb;
  --text-body:      #d9d9d9;
  --text-muted:     #a6a6a6;

  /* Fonts — all pixel */
  --font-display:   'Press Start 2P', monospace;
  --font-heading:   'Press Start 2P', monospace;
  --font-body:      'Press Start 2P', monospace;
  --font-accent:    'Press Start 2P', monospace;
  --font-pixel:     'Press Start 2P', monospace;

  /* Layout */
  --nav-h:          64px;
  --max-w:          1200px;
  --section-py:     7rem;
  --section-px:     2rem;
}


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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 2.2;
  color: var(--text-body);
  background: var(--abyss);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover, a:focus-visible { color: var(--lavender); }

::selection {
  background: rgba(240, 221, 200, 0.25);
  color: var(--text-bright);
}


/* ─── LAYOUT ─── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}


/* ─── PAGE STRUCTURE ─── */
.page-darken {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(18, 14, 30, 0.45) 40%,
    rgba(18, 14, 30, 0.75) 70%,
    rgba(18, 14, 30, 0.9) 100%
  );
}

.page-content {
  position: relative;
  z-index: 1;
}


/* ─── PARALLAX BACKGROUND ─── */
.parallax {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: 0 bottom;
}

.parallax-skybox {
  background-image: url('../images/menu_skybox.png');
  animation: parallax-drift 200s linear infinite;
}

.parallax-bg {
  background-image: url('../images/menu_background.png');
  animation: parallax-drift 120s linear infinite;
}

.parallax-fg {
  background-image: url('../images/menu_foreground.png');
  animation: parallax-drift 70s linear infinite;
}

@keyframes parallax-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ─── FILM GRAIN OVERLAY ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}


/* ─── SKIP LINK ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--abyss);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.6rem;
  padding: 0.5rem 1.5rem;
  border-radius: 0;
  z-index: 9999;
  letter-spacing: 0.04em;
}
.skip-link:focus {
  top: 0;
  color: var(--abyss);
}


/* ─── TYPOGRAPHY ─── */
.heading {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.8vw, 1.5rem);
  color: var(--gold);
  text-align: center;
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 1.5rem;
  margin-bottom: 3.5rem;
}

.heading::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: var(--gold);
  opacity: 0.35;
}

.heading--dark {
  color: var(--ink);
}
.heading--dark::after {
  background: var(--gold-dim);
  opacity: 0.5;
}


/* ─── PIXEL DIVIDERS ─── */
.divider {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.5em;
  opacity: 0.3;
  user-select: none;
  margin: 0;
}

.divider::before {
  content: '\00B7  \00B7  \00B7  \25C6  \00B7  \00B7  \00B7';
}


/* ─── SCROLL REVEAL (progressive enhancement) ─── */
/* Default: everything visible */
[data-reveal] { /* visible by default — no-JS friendly */ }

/* With JS: initially hidden, animate in on intersection */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--delay, 0) * 80ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(26, 20, 40, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.nav.is-scrolled {
  background: rgba(26, 20, 40, 0.95);
  border-bottom-color: hsla(0, 0%, 18%, 0.4);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.nav-logo:hover { color: var(--gold-bright); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.25rem;
}

.nav-links a {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--text-body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after,
.nav-links a:focus-visible::after { width: 100%; }

/* Hamburger (hidden on desktop) */
.nav-toggle { display: none; }

.nav-burger {
  display: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--gold);
  position: absolute;
  transition: all 0.3s ease;
}
.nav-burger span { top: 50%; transform: translateY(-50%); }
.nav-burger span::before { content: ''; top: -7px; }
.nav-burger span::after  { content: ''; top: 7px; }


/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  overflow: hidden;
}

/* Dark overlay for text readability over bright sky */
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(18, 14, 30, 0.45) 0%, rgba(18, 14, 30, 0.75) 100%);
}

/* ── Hero content ── */
.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

/* Arcane glow behind content */
.hero-content::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(107, 90, 128, 0.15) 0%, transparent 70%);
  animation: arcane-breathe 6s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes arcane-breathe {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 3.5rem);
  color: #fff;
  letter-spacing: 0.06em;
  line-height: 1.2;
  animation: arcane-pulse 4.5s ease-in-out infinite;
}

@keyframes arcane-pulse {
  0%, 100% {
    text-shadow:
      0 0 7px rgba(255,255,255,0.8),
      0 0 20px rgba(255,255,255,0.4),
      0 0 40px rgba(107,90,128,0.5),
      0 0 80px rgba(107,90,128,0.3);
  }
  50% {
    text-shadow:
      0 0 4px rgba(255,255,255,0.5),
      0 0 12px rgba(255,255,255,0.2),
      0 0 25px rgba(107,90,128,0.3),
      0 0 50px rgba(107,90,128,0.15);
  }
}

/* Decorative rule between title and tagline */
.hero-rule {
  width: 220px;
  height: 1px;
  margin: 1.75rem auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.45;
  position: relative;
}

.hero-rule::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  opacity: 0.7;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(0.55rem, 1.6vw, 0.85rem);
  color: var(--text-bright);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.hero-quip {
  font-family: var(--font-pixel);
  font-size: clamp(0.5rem, 1.3vw, 0.7rem);
  color: var(--gold);
  opacity: 0.5;
  margin-bottom: 3rem;
  letter-spacing: 0.04em;
}

/* CTA Buttons */
.hero-actions {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  border-radius: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.btn--arcane {
  background: hsla(270, 15%, 12%, 0.75);
  color: var(--text-bright);
  border-color: hsla(270, 15%, 25%, 0.6);
}

.btn--arcane:hover {
  color: #fff;
  border-color: hsla(270, 15%, 40%, 0.8);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  transform: translate(-1px, -1px);
}

.btn--gold {
  background: hsla(270, 10%, 8%, 0.6);
  color: var(--text-body);
  border-color: hsla(270, 10%, 18%, 0.5);
}

.btn--gold:hover {
  color: var(--text-bright);
  border-color: hsla(270, 10%, 30%, 0.7);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  transform: translate(-1px, -1px);
}

.btn .ra {
  font-size: 1.1em;
}

.btn-badge {
  position: absolute;
  top: -10px;
  right: -8px;
  background: hsla(270, 15%, 35%, 0.9);
  color: var(--text-bright);
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  padding: 3px 7px;
  border-radius: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Animated scroll cue */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 50px;
  overflow: hidden;
}

.hero-scroll-line {
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scroll-slide 2.2s ease-in-out infinite;
}

@keyframes scroll-slide {
  0%   { transform: translateY(-100%); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}


/* ═══════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════ */
.about {
  padding: var(--section-py) var(--section-px);
}

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

/* Parchment panel */
.parchment {
  background-color: var(--parchment);
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.05"/></svg>'),
    radial-gradient(ellipse at center, var(--parchment), var(--parchment-dark));
  box-shadow:
    0 2px 40px rgba(0, 0, 0, 0.55),
    inset 0 0 50px rgba(0, 0, 0, 0.06),
    inset 0 0 4px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--parchment-dark);
  border-radius: 4px;
  padding: 3rem 2.75rem;
  color: var(--ink);
  position: relative;
}

/* Corner flourishes */
.parchment::before,
.parchment::after {
  content: '\2726';
  position: absolute;
  font-size: 1.2rem;
  color: var(--gold-dim);
  opacity: 0.45;
  line-height: 1;
}
.parchment::before { top: 0.75rem; left: 0.9rem; }
.parchment::after  { bottom: 0.75rem; right: 0.9rem; }

.about-text p {
  margin-bottom: 1.4rem;
  line-height: 2.4;
  font-size: 0.65rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: #1a0e08; }

.about-art {
  display: flex;
  justify-content: center;
}

/* Gilded picture frame */
.art-frame {
  padding: 6px;
  background: linear-gradient(145deg, var(--gold-dim), var(--gold), var(--gold-dim));
  border-radius: 3px;
  max-width: 340px;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(200, 160, 184, 0.1);
}

.art-frame svg {
  border-radius: 1px;
}


/* ═══════════════════════════════════════
   FEATURES
   ═══════════════════════════════════════ */
@property --glow-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.features {
  padding: var(--section-py) var(--section-px);
}

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

.feature-card {
  position: relative;
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  border-radius: 2px;
  border: 2px solid rgba(240, 221, 200, 0.15);
  background: var(--obsidian);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

/* Animated conic-gradient border (progressive enhancement) */
@supports (background: conic-gradient(red, blue)) {
  .feature-card {
    border: 2px solid transparent;
    background:
      linear-gradient(var(--obsidian), var(--obsidian)) padding-box,
      conic-gradient(from var(--glow-angle), var(--arcane), var(--lavender), var(--purple), var(--arcane)) border-box;
    animation: rotate-glow 4s linear infinite;
  }
}

@keyframes rotate-glow {
  to { --glow-angle: 360deg; }
}

/* Subtle radial glow behind icon */
.feature-card::after {
  content: '';
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(240, 221, 200, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.feature-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(200, 160, 184, 0.3);
}

.feature-icon {
  position: relative;
  z-index: 1;
  margin-bottom: 1.25rem;
  font-size: 2.75rem;
  line-height: 1;
  color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(240, 221, 200, 0.3));
}

.feature-title {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 0.85rem;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.feature-text {
  font-size: 0.6rem;
  color: var(--text-body);
  line-height: 2.0;
}


/* ═══════════════════════════════════════
   WIZARDS SHOWCASE
   ═══════════════════════════════════════ */
.wizards {
  padding: var(--section-py) var(--section-px);
}

.wizards-tease {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -2.5rem;
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

.wizards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.75rem;
}

/* Tarot-card style */
.wizard-card {
  --accent: var(--gold);
  background: linear-gradient(180deg, var(--obsidian) 0%, rgba(17, 19, 34, 0.92) 100%);
  border-radius: 2px;
  overflow: hidden;
  border: 2px solid rgba(240, 221, 200, 0.12);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  cursor: default;
  position: relative;
}

/* Gold shimmer top edge */
.wizard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.wizard-card:hover {
  border-color: var(--accent);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  transform: translate(-1px, -2px);
}

.wizard-card:hover::before {
  opacity: 0.8;
}

.wizard-portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--obsidian) 0%, var(--abyss) 100%);
}

.wizard-portrait .ra {
  font-size: 3.5rem;
  color: var(--accent, var(--gold));
  opacity: 0.6;
  filter: drop-shadow(0 0 12px currentColor);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.wizard-card:hover .wizard-portrait .ra {
  opacity: 0.85;
  filter: drop-shadow(0 0 20px currentColor);
}

.wizard-portrait--locked .ra {
  color: var(--accent, var(--text-muted));
  opacity: 0.18;
  filter: none;
}

.wizard-name {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--gold);
  padding: 1rem 1rem 0.35rem;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.wizard-flavor {
  font-size: 0.55rem;
  color: var(--text-body);
  padding: 0 0.75rem 1.25rem;
  line-height: 1.8;
}

/* Locked/secret wizard cards */
.wizard-card--locked {
  --accent: var(--text-muted);
  border-color: rgba(125, 120, 104, 0.08);
  opacity: 0.7;
}

.wizard-card--locked:hover {
  border-color: rgba(125, 120, 104, 0.2);
  opacity: 0.85;
}

.wizard-name--locked {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
}


/* ═══════════════════════════════════════
   SCREENSHOTS
   ═══════════════════════════════════════ */
.screenshots {
  padding: var(--section-py) var(--section-px);
}

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

.screenshot-slot {
  display: block;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(240, 221, 200, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.screenshot-slot:hover {
  border-color: rgba(240, 221, 200, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(240, 221, 200, 0.08);
  transform: scale(1.03);
}

/* CSS-only Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 14, 30, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox:target {
  opacity: 1;
  pointer-events: auto;
}

.lightbox:target .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.75rem;
  font-size: 2.5rem;
  color: var(--text-body);
  z-index: 2001;
  line-height: 1;
  transition: color 0.2s ease;
}
.lightbox-close:hover { color: var(--gold); }

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-content svg {
  max-height: 85vh;
  width: auto;
  border-radius: 4px;
}


/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.site-footer {
  padding: 4rem 2rem 2.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-brand {
  flex-shrink: 0;
}

.footer-logo {
  width: 280px;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.footer-brand:hover .footer-logo {
  opacity: 0.9;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-link {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--text-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.footer-link .ra {
  font-size: 0.9em;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.footer-link:hover .ra { opacity: 1; }
.footer-link:hover { color: var(--gold); }

.footer-dot {
  color: var(--text-muted);
  opacity: 0.4;
}

.footer-copy {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}


/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

/* Tablet: 768–1199px */
@media (max-width: 1199px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
  :root {
    --section-py: 4.5rem;
    --section-px: 1.25rem;
  }

  /* Mobile nav */
  .nav-burger { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 80vw);
    height: 100vh;
    height: 100dvh;
    background: rgba(18, 14, 30, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.25rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid rgba(240, 221, 200, 0.08);
  }

  .nav-toggle:checked ~ .nav-links {
    transform: translateX(0);
  }

  .nav-toggle:checked ~ .nav-burger span { background: transparent; }
  .nav-toggle:checked ~ .nav-burger span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span::after  { top: 0; transform: rotate(-45deg); }

  .nav-links a { font-size: 1rem; }

  /* About stacks */
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-art { order: -1; }
  .art-frame { max-width: 260px; }
  .parchment { padding: 2.25rem 1.75rem; }

  /* Single-column grids */
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }

  .screenshots-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .wizards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Buttons stack */
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .btn {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-text { align-items: center; }
  .footer-brand { align-self: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* Small mobile */
@media (max-width: 400px) {
  .wizards-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.4rem; }
}


/* ═══════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════ */

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }

  /* Still show content even without transitions */
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
