/* =========================================
   ENVARA — Hero Section CSS
   Dark fantasy/MMO theme
   ========================================= */

/* ================== TOKENS ================== */
:root {
  /* Colors - Fantasy/Cozy MMO Theme */
  --bg: #0a0806;
  --bg-2: #120f0a;
  --bg-3: #1a1610;
  
  --text: #f4e8d3;
  --text-muted: rgba(210, 195, 170, 0.65);
  
  /* Gold - CTA only */
  --accent-gold: #d4a84b;
  --accent-gold-light: #e8c86b;
  --accent-gold-dark: #a67c2e;
  
  /* Muted green - tags and accents */
  --accent-green: #5a7a4a;
  --accent-green-muted: #4a6b3a;
  --accent-green-light: #7a9a6a;
  
  /* Brown - secondary accents */
  --accent-brown: #8b7355;
  --accent-brown-light: #a08565;
  
  /* Parchment - text */
  --accent-parchment: #d4c4a8;
  --accent-parchment-light: #e8d8b8;
  
  /* Legacy cyan/violet - minimal use only */
  --accent-cyan: #70e7ff;
  --accent-violet: #a991ff;
  
  /* Glass */
  --glass-bg: rgba(20, 16, 10, 0.7);
  --glass-border: rgba(139, 115, 85, 0.25);
  --glass-blur: 16px;
  
  /* Shadows */
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px rgba(212, 168, 75, 0.12);
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Frame system colors */
  --frame-gold: rgba(212, 168, 75, 0.6);
  --frame-gold-bright: rgba(232, 200, 107, 0.8);
  --frame-gold-dim: rgba(166, 124, 46, 0.4);
  --frame-glow: rgba(212, 168, 75, 0.15);
  --frame-glow-strong: rgba(212, 168, 75, 0.25);
}

/* ================== BASE ================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background gradient */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 700px at 50% 40%, rgba(212, 168, 75, 0.08), transparent 60%),
    radial-gradient(900px 700px at 50% 65%, rgba(107, 143, 90, 0.05), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

/* Subtle gold background sparks */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, var(--frame-gold) 0%, transparent 100%),
    radial-gradient(2px 2px at 80% 20%, var(--frame-gold) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 70%, var(--frame-gold-bright) 0%, transparent 100%),
    radial-gradient(2px 2px at 60% 40%, var(--frame-gold) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 90% 80%, var(--frame-gold-bright) 0%, transparent 100%),
    radial-gradient(2px 2px at 10% 60%, var(--frame-gold) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 70% 10%, var(--frame-gold-bright) 0%, transparent 100%);
  opacity: 0.3;
  animation: sparklePulse 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes sparklePulse {
  0% {
    opacity: 0.2;
  }
  100% {
    opacity: 0.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
    opacity: 0.3;
  }
}

/* ================== FANTASY FRAME SYSTEM ================== */

/* Base gold frame - elegant border with subtle glow */
.envara-gold-frame {
  position: relative;
  border: 1px solid var(--frame-gold);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 0 0 1px rgba(212, 168, 75, 0.1),
    0 0 20px var(--frame-glow),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.envara-gold-frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(135deg, 
    var(--frame-gold-bright) 0%, 
    transparent 30%, 
    transparent 70%, 
    var(--frame-gold-bright) 100%);
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
}

/* Glow frame - stronger ambient glow effect */
.envara-glow-frame {
  position: relative;
  box-shadow: 
    0 0 30px var(--frame-glow-strong),
    0 0 60px rgba(212, 168, 75, 0.08);
}

.envara-glow-frame::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--radius-lg) + 4px);
  background: radial-gradient(ellipse at center, var(--frame-glow) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
}

/* Card ornaments - decorative corner flourishes */
.envara-card-ornaments {
  position: relative;
}

.envara-card-ornaments::before,
.envara-card-ornaments::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid var(--frame-gold-dim);
  opacity: 0.6;
  pointer-events: none;
}

.envara-card-ornaments::before {
  top: 8px;
  left: 8px;
  border-right: none;
  border-bottom: none;
  border-radius: 4px 0 0 0;
}

.envara-card-ornaments::after {
  bottom: 8px;
  right: 8px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 4px 0;
}

/* Corner flourish - more elaborate corner decoration */
.envara-corner-flourish {
  position: relative;
}

.envara-corner-flourish::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 32px;
  height: 32px;
  background: 
    linear-gradient(to right, var(--frame-gold) 2px, transparent 2px),
    linear-gradient(to bottom, var(--frame-gold) 2px, transparent 2px);
  opacity: 0.5;
  pointer-events: none;
}

.envara-corner-flourish::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 32px;
  height: 32px;
  background: 
    linear-gradient(to left, var(--frame-gold) 2px, transparent 2px),
    linear-gradient(to top, var(--frame-gold) 2px, transparent 2px);
  opacity: 0.5;
  pointer-events: none;
}

/* Inner line frame - thin elegant inner border */
.envara-inner-line {
  position: relative;
}

.envara-inner-line::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--frame-gold-dim);
  border-radius: calc(var(--radius-lg) - 4px);
  opacity: 0.4;
  pointer-events: none;
}

/* Sparkle effect - subtle glint on edges */
.envara-sparkle {
  position: relative;
  overflow: hidden;
}

.envara-sparkle::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(232, 200, 107, 0.1) 50%, 
    transparent 100%);
  transform: skewX(-20deg);
  animation: sparkleMove 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sparkleMove {
  0%, 100% {
    left: -100%;
  }
  50% {
    left: 150%;
  }
}

/* Reduced motion for frame animations */
@media (prefers-reduced-motion: reduce) {
  .envara-sparkle::before {
    animation: none;
  }
}

/* ================== HEADER ================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 15, 10, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--frame-gold-dim);
  box-shadow: 0 0 20px rgba(212, 168, 75, 0.05);
}

.header::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--frame-gold) 20%, 
    var(--frame-gold-bright) 50%, 
    var(--frame-gold) 80%, 
    transparent 100%);
  opacity: 0.4;
}

/* Page corner ornaments */
body {
  position: relative;
}

/* NOTE: body::before is already used above for the background gradient.
   Corner ornaments use html::before/body::after instead so both effects
   render simultaneously (a duplicate body::before here previously
   silently replaced the gradient). */
html::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-top: 1px solid var(--frame-gold-dim);
  border-left: 1px solid var(--frame-gold-dim);
  opacity: 0.3;
  z-index: 1;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-top: 1px solid var(--frame-gold-dim);
  border-right: 1px solid var(--frame-gold-dim);
  opacity: 0.3;
  z-index: 1;
  pointer-events: none;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent-parchment), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(212, 168, 75, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 168, 75, 0.3);
}

.header-nav {
  display: flex;
  gap: 16px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link--primary {
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-brown));
  color: #0a0806;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.nav-link--primary:hover {
  filter: brightness(1.1);
  color: #0a0806;
}

/* ================== HERO ================== */
.hero {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 50px 24px 40px;
  position: relative;
  min-height: auto;
}

.hero-container {
  max-width: 1380px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr clamp(410px, 35vw, 430px);
  gap: 24px;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* World column: branding + 3D preview card */
.hero-world {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* Auth column: login or account panel */
.hero-auth {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-width: 0;
  position: relative;
  z-index: 1;
}

/* Responsive: stack at narrower widths */
@media (max-width: 980px) {
  .hero {
    padding: 40px 24px 32px;
  }
  .hero-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-world {
    min-height: 380px;
  }
  .hero-auth {
    min-height: 380px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 20px 16px 24px;
  }
  .hero-world {
    min-height: 300px;
  }
  .hero-auth {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .header-nav {
    gap: 8px;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .nav-link--primary {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .hero-3d-loader {
    font-size: 0.8rem;
  }

  .loader-spinner {
    width: 32px;
    height: 32px;
  }

  .fallback-content h3 {
    font-size: 1rem;
  }

  .fallback-content p {
    font-size: 0.75rem;
  }
}

/* ================== HERO BRANDING ================== */
.hero-world__branding {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-brown));
  color: #0a0806;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  width: fit-content;
  box-shadow: 0 4px 16px rgba(212, 168, 75, 0.3);
}

.hero-title {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--accent-parchment-light);
}

.hero-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 70ch;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

/* ================== BUTTONS ================== */
.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 24px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-brown));
  color: #0a0806;
  box-shadow: 0 8px 24px rgba(212, 168, 75, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 168, 75, 0.4);
  filter: brightness(1.1);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: var(--glass-bg);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ================== HERO 3D ================== */
.hero-3d {
  position: relative;
  height: clamp(400px, 58vh, 540px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--frame-gold-dim);
  background: linear-gradient(180deg, #1a2a1a 0%, #0f1a0f 50%, #0a120a 100%);
  box-shadow:
    var(--shadow),
    0 0 20px var(--frame-glow),
    inset 0 0 30px rgba(0, 0, 0, 0.4);
}

/* Dim + desaturate the live scene slightly so the auth panel reads as primary */
#hero3dCanvas {
  filter: saturate(0.82) brightness(0.9);
}

.hero-3d-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(6, 5, 3, 0.55) 100%);
}

/* Corner ornaments for hero-3d (kept minimal — single accent, no double ring) */
.hero-3d .corner-ornament {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid var(--frame-gold-dim);
  opacity: 0.4;
  pointer-events: none;
  z-index: 2;
}

.hero-3d .corner-ornament--tl {
  top: 12px;
  left: 12px;
  border-right: none;
  border-bottom: none;
  border-radius: 6px 0 0 0;
}

.hero-3d .corner-ornament--tr {
  top: 12px;
  right: 12px;
  border-left: none;
  border-bottom: none;
  border-radius: 0 6px 0 0;
}

.hero-3d .corner-ornament--bl {
  bottom: 12px;
  left: 12px;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 6px;
}

.hero-3d .corner-ornament--br {
  bottom: 12px;
  right: 12px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 6px 0;
}

.hero-3d [hidden] {
  display: none !important;
}

#hero3dCanvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

/* Loading state */
.hero-3d-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 4;
  background: linear-gradient(180deg, #1a2a1a 0%, #0f1a0f 50%, #0a120a 100%);
  color: var(--text-muted);
  font-size: 0.9rem;
  gap: 16px;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(212, 168, 75, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fallback state */
.hero-3d-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  background: linear-gradient(180deg, #1a2a1a 0%, #0f1a0f 50%, #0a120a 100%);
  padding: 32px;
}

.fallback-content {
  text-align: center;
  color: var(--text-muted);
}

.fallback-content h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--accent-parchment);
}

.fallback-content p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Scene status badge */
.hero-3d .scene-status {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  background: rgba(90, 122, 74, 0.2);
  border: 1px solid rgba(90, 122, 74, 0.4);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-green);
  backdrop-filter: blur(8px);
  z-index: 3;
}

/* Content overlay - moved to bottom-left */
.hero-3d .content {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 2;
  text-align: left;
  pointer-events: none;
  background: radial-gradient(ellipse at bottom left, rgba(10, 8, 6, 0.6) 0%, transparent 60%);
  padding: 20px;
  border-radius: var(--radius-lg);
}

.hero-3d .content h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-parchment), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-3d .content p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 220px;
  line-height: 1.4;
}

/* Feature chips - bottom right */
.hero-3d .features {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 65%;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}

.hero-3d .feature-chip {
  padding: 6px 12px;
  background: rgba(20, 16, 10, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-parchment);
  backdrop-filter: blur(8px);
}

/* Narrow screens: the chip row and the bottom-left blurb fight for the same
   corner of the preview, so drop the chips (the features section below says
   the same thing) and let the blurb use the full width. */
@media (max-width: 760px) {
  .hero-3d .features {
    display: none;
  }

  .hero-3d .content {
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 16px;
  }

  .hero-3d .content p {
    max-width: none;
  }
}

/* Play button — now lives at the bottom of the account panel */
#btnPlayNow {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
  letter-spacing: 0.03em;
  margin-top: auto;
}

/* ================== HERO AUTH / PORTAL LOGIN ================== */
:root {
  --auth-panel-width: 430px;
}

.hero-auth {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* -- Portal Login panel -- */
.auth2 {
  width: 100%;
  background: linear-gradient(180deg, #1c150e 0%, #120d08 100%);
  border: 1px solid rgba(212, 168, 75, 0.35);
  border-radius: 13px;
  padding: 24px 30px 30px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 24px var(--frame-glow);
  position: relative;
  overflow: auto;
}

/* Single gold accent bar across the top — replaces the old double-ring frame */
.auth2__accentbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-gold-light), var(--accent-gold), var(--accent-gold-light), transparent);
}

.auth2__header {
  text-align: center;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.auth2__crest {
  width: 34px;
  height: 34px;
  margin: 0 auto 10px;
  color: var(--accent-gold);
  display: block;
  opacity: 0.9;
}

.auth2__title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--accent-parchment-light);
}

.auth2__subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Segmented control */
.auth2__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  position: relative;
  z-index: 1;
}

.auth2__tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 7px;
  padding: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth2__tab:hover {
  color: var(--text);
}

.auth2__tab--active {
  background: linear-gradient(90deg, var(--accent-gold-light), var(--accent-gold));
  color: #241a0a;
  box-shadow: 0 4px 14px rgba(212, 168, 75, 0.35);
}

.auth2__tab--active:hover {
  color: #241a0a;
}

.auth2__panel {
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.auth2__panel[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 7px;
}

.field__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-parchment);
  letter-spacing: 0.03em;
}

.inputWrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(212, 168, 75, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  padding: 0 12px;
  min-height: 52px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.inputWrap:hover {
  border-color: rgba(212, 168, 75, 0.5);
}

.inputWrap:focus-within {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 3px rgba(212, 168, 75, 0.2),
    0 0 14px var(--frame-glow);
}

.inputWrap.is-error {
  border-color: #c85a5a;
}

.inputWrap.is-success {
  border-color: var(--accent-green-light);
}

.inputIcon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--accent-gold);
  opacity: 0.8;
}

.inputIcon svg {
  width: 100%;
  height: 100%;
}

.inputAction {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.inputAction svg {
  width: 18px;
  height: 18px;
}

.inputAction:hover {
  color: var(--accent-gold);
}

.input--hero {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  font-size: 0.95rem;
  outline: none;
}

.input--hero::placeholder {
  color: var(--text-muted);
  opacity: 0.55;
}

.input--hero:disabled,
.btnPrimary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth2__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.chk input {
  accent-color: var(--accent-gold);
}

.linkBtn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s ease;
  /* PASSWORD-RESET-1: also used on <a> ("Forgot password?"). The padding gives a
     ~44px touch target; the negative margin cancels it so the row does not move. */
  display: inline-block;
  padding: 14px 6px;
  margin: -13px 0;
  text-decoration: none;
}

.linkBtn:hover {
  color: var(--accent-gold);
}

.btnPrimary {
  appearance: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  min-height: 50px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #241a0a;
  cursor: pointer;
  background: linear-gradient(90deg, var(--accent-gold-light), var(--accent-gold));
  box-shadow: 0 10px 28px rgba(212, 168, 75, 0.32);
  transition: all 0.2s ease;
  position: relative;
}

.btnPrimary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(212, 168, 75, 0.42);
  filter: brightness(1.05);
}

.btnPrimary:focus-visible,
.auth2__tab:focus-visible,
.inputAction:focus-visible,
.linkBtn:focus-visible {
  outline: 2px solid var(--accent-gold-light);
  outline-offset: 2px;
}

.btnPrimary.is-loading {
  color: transparent;
  pointer-events: none;
}

.btnPrimary.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(36, 26, 10, 0.35);
  border-top-color: #241a0a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.mutedSmall {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
}

/* Reserve space for status text so it never shifts the form when it appears */
.formMsg {
  min-height: 18px;
  font-size: 0.8rem;
  line-height: 1.3;
  text-align: center;
  color: var(--text-muted);
}

.formMsg.is-error {
  color: #ff8a8a;
}

.formMsg.is-success {
  color: var(--accent-green-light);
}

/* TEMPORARY: banner "rejestracja zamknięta" w zakładce Create account.
   var() z fallbackami, bo arkusz bywa wdrażany bez najnowszych tokenów. */
.auth2__notice {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 168, 75, 0.45);
  border-left-width: 4px;
  border-radius: var(--radius-sm, 8px);
  background: rgba(212, 168, 75, 0.1);
  text-align: left;
}

.auth2__notice[hidden] {
  display: none;
}

.auth2__notice-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent-gold-light, #e8c877);
}

.auth2__notice-text {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted, #b9ac93);
}

/* Pola nadal są widoczne (gracz widzi, co go czeka), ale nieaktywne. */
.auth2__panel--locked .field,
.auth2__panel--locked .btnPrimary {
  opacity: 0.45;
}

.auth2__panel--locked .btnPrimary {
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.auth2__footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-muted);
  opacity: 0.75;
  position: relative;
  z-index: 1;
}

/* ================== PASSWORD RECOVERY PAGES ================== */
/* PASSWORD-RESET-1: /forgot-password.html and /reset-password.html reuse the login
   card (.auth2 and everything inside it) unchanged; this block only places that card
   on an otherwise empty page and styles the few links around it. */
.recovery-page [hidden] {
  display: none !important;
}

.recovery-brand {
  text-decoration: none;
  color: inherit;
}

.recovery-main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(24px, 8vh, 88px) 16px 48px;
}

.recovery-card {
  max-width: var(--auth-panel-width);
}

.recovery-links {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.recovery-card a.btnPrimary {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 640px) {
  .recovery-card {
    padding: 20px 18px 24px;
  }
}

/* ================== CHARACTER UI ================== */
#accountPage,
.account-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, #1c150e 0%, #120d08 100%);
  border: 1px solid rgba(212, 168, 75, 0.35);
  border-radius: 13px;
  padding: 14px 18px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 24px var(--frame-glow);
  min-height: 0;
}

/* Hide elements marked as hidden via native attribute */
[hidden] {
  display: none !important;
}

.profile-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-brown));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #0a0806;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent-parchment);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stats {
  display: flex;
  gap: 8px;
}

.level-badge,
.xp-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(90, 122, 74, 0.2);
  color: var(--accent-green-light);
  border: 1px solid rgba(90, 122, 74, 0.3);
}

.btn-logout {
  flex: none;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: var(--glass-bg);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Account section heading */
.account-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.account-section__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent-parchment);
}

/* Character list: scrollable card stack */
.char-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.char-list::-webkit-scrollbar {
  width: 6px;
}

.char-list::-webkit-scrollbar-thumb {
  background: rgba(212, 168, 75, 0.3);
  border-radius: 999px;
}

.char-list .mutedSmall {
  padding: 8px 0;
}

/* Character card — clean and simple */
.char-list .pill {
  appearance: none;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 168, 75, 0.25);
  border-radius: 8px;
  padding: 0;
  height: 66px;
  display: flex;
  align-items: stretch;
  gap: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
  flex: none;
}

.char-list .pill:hover {
  border-color: rgba(212, 168, 75, 0.4);
}

.char-list .pill--active {
  border-color: var(--accent-gold);
  background: rgba(212, 168, 75, 0.12);
}

/* Gold accent bar on selected card */
.char-card__accent {
  flex: none;
  width: 3px;
  background: transparent;
  transition: background 0.2s ease;
}

.pill--active .char-card__accent {
  background: var(--accent-gold);
}

/* Main select button area */
.char-card__select {
  appearance: none;
  border: none;
  background: transparent;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.char-card__avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(139, 115, 85, 0.25), rgba(90, 122, 74, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-parchment);
}

.pill--active .char-card__avatar {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-brown));
  border-color: transparent;
  color: #241a0a;
}

.char-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.char-card__name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-parchment);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.char-card__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.char-card__check {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #241a0a;
  font-size: 0.65rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pill--active .char-card__check {
  opacity: 1;
}

.char-card__delete {
  appearance: none;
  flex: none;
  width: 44px;
  min-width: 44px;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  padding: 0;
  transition: color 0.2s ease, background 0.2s ease;
}

.char-card__delete svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.char-card__delete:hover,
.char-card__delete:focus-visible {
  color: #ff8a8a;
  background: rgba(200, 80, 80, 0.12);
  outline: none;
}

.char-card__delete svg {
  opacity: 1;
}

/* Create form — must be absolutely hidden by default */
.create-form {
  background: rgba(20, 16, 10, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.create-form[hidden],
.create-form[hidden] * {
  display: none !important;
}

.btn-create-toggle {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-create-toggle:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-create-toggle.active {
  background: rgba(212, 168, 75, 0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* ================== FEATURES SECTION ================== */
.features-section {
  padding: 40px 24px 72px;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
}

.features-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-align: center;
  margin: 0 0 12px;
  background: linear-gradient(135deg, var(--accent-parchment), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

@media (max-width: 680px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.feature-card {
  background: linear-gradient(180deg, rgba(26, 22, 16, 0.6), rgba(18, 15, 10, 0.7));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(var(--glass-blur));
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 168, 75, 0.3);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .loader-spinner {
    animation: none;
    border-top-color: var(--accent-gold);
  }
  
  .feature-card:hover {
    transform: none;
  }
  
  .btn-primary:hover,
  .btn-secondary:hover,
  .btnPrimary:hover {
    transform: none;
  }
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon--farm,
.feature-icon--island {
  color: var(--accent-green);
}

.feature-icon--creatures,
.feature-icon--world {
  color: var(--accent-brown);
}

.feature-icon--loot {
  color: var(--accent-gold);
}

.feature-icon--expedition {
  color: var(--accent-green-light);
}

.feature-icon--class {
  color: var(--accent-violet);
}

.feature-icon--party {
  color: var(--accent-cyan);
}

.feature-card h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-parchment);
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- Lede under a section title ---- */
.features-lede {
  margin: 0 auto 40px;
  max-width: 640px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---- Stats strip ---- */
.world-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 0 0 56px;
  padding: 20px 16px;
  background: linear-gradient(180deg, rgba(26, 22, 16, 0.55), rgba(18, 15, 10, 0.65));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur));
}

@media (max-width: 820px) {
  .world-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 12px;
  }
}

@media (max-width: 420px) {
  .world-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.world-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  position: relative;
}

.world-stat + .world-stat::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 12%;
  bottom: 12%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--glass-border), transparent);
}

@media (max-width: 820px) {
  .world-stat + .world-stat::before {
    display: none;
  }
}

.world-stat__num {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--accent-parchment-light), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.world-stat__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Secondary section title ---- */
.features-title--sub {
  font-size: 1.5rem;
  margin-top: 64px;
  margin-bottom: 28px;
}

/* ---- "Also live" list ---- */
.systems-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.system-chip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: rgba(20, 16, 10, 0.5);
  border: 1px solid var(--glass-border);
  border-left: 2px solid var(--frame-gold-dim);
  border-radius: var(--radius-md);
  transition: border-left-color 0.3s ease, background 0.3s ease;
}

.system-chip:hover {
  border-left-color: var(--accent-gold);
  background: rgba(26, 22, 16, 0.65);
}

.system-chip strong {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-parchment);
}

.system-chip span {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---- Honest alpha footnote ---- */
.alpha-note {
  margin: 48px auto 0;
  max-width: 720px;
  padding: 18px 22px;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border);
}

/* ================== FUN / PLAYFUL EXTRAS ================== */

/* Floating particles */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hero-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 8px rgba(212, 168, 75, 0.35);
  animation: floatParticle ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes floatParticle {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.25;
  }
  25% {
    transform: translateY(-30px) translateX(12px) scale(1.15);
    opacity: 0.55;
  }
  50% {
    transform: translateY(-60px) translateX(-8px) scale(0.9);
    opacity: 0.35;
  }
  75% {
    transform: translateY(-30px) translateX(10px) scale(1.05);
    opacity: 0.5;
  }
}

/* Rotating tagline */
.hero-tagline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(212, 168, 75, 0.08);
  border: 1px solid var(--frame-gold);
  width: fit-content;
  position: relative;
  box-shadow: 
    0 0 12px var(--frame-glow),
    inset 0 0 12px rgba(212, 168, 75, 0.05);
}

.hero-tagline::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background: var(--frame-gold-bright);
  border-radius: 50%;
  opacity: 0.6;
  box-shadow: 0 0 6px var(--frame-gold-bright);
}

.hero-tagline__label {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
}

.hero-tagline__text {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: opacity 0.25s ease;
}

/* Wiggle badge on hover */
.hero-badge:hover {
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
  75% { transform: rotate(-2deg); }
}

/* Pills pop on hover */
.hero-pills .pill {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-pills .pill:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(212, 168, 75, 0.15);
}

/* 3D tilt on feature cards */
.feature-card {
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px) rotateX(2deg) rotateY(-2deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 168, 75, 0.08);
}

.feature-card .feature-icon {
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(-8deg);
}

/* CTA pulse */
.btn-primary {
  animation: ctaPulse 3s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(212, 168, 75, 0.3);
  }
  50% {
    box-shadow: 0 10px 32px rgba(212, 168, 75, 0.45);
  }
}

/* Confetti burst utility */
.confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 9999;
  animation: confettiFall 1.2s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(120vh) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

/* Reduced motion safety */
@media (prefers-reduced-motion: reduce) {
  .hero-particle,
  .btn-primary,
  .btn-play-large::before,
  .btn-play-large::after,
  .hero-badge:hover {
    animation: none !important;
  }
  .feature-card:hover,
  .hero-pills .pill:hover,
  .feature-card:hover .feature-icon {
    transform: none !important;
  }
}

/* =========================================
   SEO-CONTENT-FOUNDATION-1
   Shared site footer + generic content-page layout for the new SEO pages
   (/expeditions, /islands, /faq). Reuses existing tokens/card/nav-link
   styles above instead of introducing a parallel design system.
   ========================================= */

/* ---- Primary nav ----
   The header nav now carries four page links plus the Play/Log in CTA on every page;
   it used to be a single button, so the original no-wrap flex row pushed the document
   wider than a 375px viewport (measured: 465px scroll width). Allow it to wrap. */
.header-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  row-gap: 8px;
}

/* ---- Site footer (static HTML, same markup on every page) ---- */
.site-footer {
  border-top: 1px solid var(--frame-gold-dim);
  background: var(--bg-2);
  padding: 48px 24px 28px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
  gap: 32px;
}

.footer-col h3 {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent-gold-light);
}

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .site-footer {
    padding: 36px 20px 24px;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* ---- Generic content page (banner + prose sections) ---- */
.page-hero {
  padding: 56px 24px 40px;
  text-align: center;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(212, 168, 75, 0.08), transparent 65%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

.page-hero__inner {
  max-width: 780px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--accent-parchment), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-lede {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.content-section {
  padding: 8px 24px 56px;
  background: var(--bg-2);
}

.content-section__inner {
  max-width: 860px;
  margin: 0 auto;
}

.content-section h2 {
  margin: 40px 0 14px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-parchment);
}

.content-section h2:first-child {
  margin-top: 0;
}

.content-section p {
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.content-section ul.plain-list {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.content-section ul.plain-list strong {
  color: var(--accent-parchment);
}

/* Contextual "explore more" links at the end of a content page */
.page-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.page-links-row a {
  color: var(--bg);
  background: linear-gradient(90deg, var(--accent-gold-light), var(--accent-gold));
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 999px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.page-links-row a:hover,
.page-links-row a:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

/* ---- FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: linear-gradient(180deg, rgba(26, 22, 16, 0.6), rgba(18, 15, 10, 0.7));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 4px 20px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--accent-parchment);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent-gold);
  font-weight: 900;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  margin: 0 0 16px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--accent-gold-light);
  outline-offset: 2px;
}

/* =========================================
   SEO-HOMEPAGE-REDESIGN-2
   Homepage rebuild: hero (H1 + tagline + CTA row) and the section system that
   replaced the single "wall of six cards". Reuses the tokens, .btnPrimary and
   .world-stats already defined above rather than starting a second design system.
   ========================================= */

/* ---- HERO ---------------------------------------------------------------- */

/* The H1 now carries the product definition, so it gets the weight the joke used
   to have; the joke moved into .hero-tagline directly beneath it. */
.hero-title {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.15;
}

/* The joke that used to be the H1, now a tagline under it.
   NOT called .hero-tagline on purpose: that name already belongs to the legacy
   "rotating tagline" pill further up this file (with its own ::before, __label and
   __text parts), and reusing it silently inherited that component's padding,
   border and glow instead of the styling written here. */
.hero-jokeline {
  margin: 0;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(212, 168, 75, 0.07);
  border: 1px solid var(--frame-gold-dim);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--accent-gold);
}

/* Was 0.9rem/14.4px — this is the only paragraph that explains the product, and
   it was set at caption size on every breakpoint. */
.hero-desc {
  font-size: clamp(1rem, 1.1vw, 1.06rem);
  line-height: 1.65;
  max-width: 62ch;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.hero-cta-primary {
  padding: 14px 30px;
  min-height: 52px;
  font-size: 1rem;
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 22px;
  border: 1px solid var(--frame-gold-dim);
  border-radius: var(--radius-sm);
  color: var(--accent-parchment);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.hero-cta-secondary:hover,
.hero-cta-secondary:focus-visible {
  border-color: var(--accent-gold);
  color: var(--accent-gold-light);
  background: rgba(212, 168, 75, 0.07);
}

.hero-cta-primary:focus-visible,
.hero-cta-secondary:focus-visible,
.final-cta__btn:focus-visible {
  outline: 2px solid var(--accent-gold-light);
  outline-offset: 3px;
}

/* Overlay label inside the 3D card — was an <h2> in the document outline. */
.hero-3d-overlay-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-parchment);
}

/* The auth card stays exactly where it is in the DOM and keeps every id; it is
   only de-emphasised so it no longer out-shouts the H1 as the brightest thing on
   the first screen. */
.hero-auth .auth2 {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* ---- SECTION SYSTEM ------------------------------------------------------ */

.page-section {
  padding: 64px 24px;
  background: var(--bg);
}

.page-section--tint {
  background: var(--bg-2);
  border-top: 1px solid rgba(139, 115, 85, 0.14);
  border-bottom: 1px solid rgba(139, 115, 85, 0.14);
}

.page-section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-parchment), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-lede {
  margin: 0 auto 36px;
  max-width: 620px;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---- Compact cards (What is ENVARA / Classes) ---------------------------- */

.mini-grid {
  display: grid;
  gap: 20px;
}

.mini-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.mini-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.mini-card {
  background: linear-gradient(180deg, rgba(26, 22, 16, 0.6), rgba(18, 15, 10, 0.7));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.mini-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-parchment);
}

.mini-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---- Gameplay loop ------------------------------------------------------- */

.loop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.loop-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-left: 2px solid var(--frame-gold-dim);
  background: rgba(26, 22, 16, 0.35);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.loop-step__num {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(212, 168, 75, 0.14);
  border: 1px solid rgba(212, 168, 75, 0.3);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 800;
}

.loop-step__body h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-parchment);
}

.loop-step__body p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.loop-step__body a,
.teaser a:not(.teaser__cta a) {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.loop-step__body a:hover {
  color: var(--accent-gold-light);
}

/* ---- Teasers (expeditions / islands) ------------------------------------- */

.teaser {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.teaser p {
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.teaser__cta {
  margin: 24px 0 0;
  text-align: center;
}

.teaser__cta a {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-gold-light), var(--accent-gold));
  color: #241a0a;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.teaser__cta a:hover,
.teaser__cta a:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

/* ---- Differentiators ----------------------------------------------------- */

.diff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.diff-item {
  padding: 20px;
  border-top: 2px solid var(--accent-gold);
  background: rgba(26, 22, 16, 0.35);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.diff-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-parchment);
}

.diff-item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---- FAQ teaser ---------------------------------------------------------- */

.faq-teaser {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.faq-teaser__item {
  background: linear-gradient(180deg, rgba(26, 22, 16, 0.6), rgba(18, 15, 10, 0.7));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.faq-teaser__item h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent-parchment);
}

.faq-teaser__item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---- Final CTA ----------------------------------------------------------- */

.final-cta {
  text-align: center;
}

.final-cta__note {
  margin: 0 auto 24px;
  max-width: 560px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.final-cta__btn {
  padding: 15px 36px;
  font-size: 1rem;
}

/* ---- RESPONSIVE ---------------------------------------------------------- */

/* Tablet */
@media (max-width: 980px) {
  .page-section {
    padding: 52px 22px;
  }
  .mini-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .loop-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .diff-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .faq-teaser {
    grid-template-columns: 1fr;
  }
  /* The hero column stacks here, so the 3D card no longer needs to hold a
     desktop-sized slot above the auth panel. */
  .hero-3d {
    height: clamp(300px, 38vh, 400px);
  }
}

/* Phone */
@media (max-width: 640px) {
  .page-section {
    padding: 40px 18px;
  }
  .page-section__inner {
    max-width: 100%;
  }
  .mini-grid--4,
  .mini-grid--3,
  .loop-list,
  .diff-grid,
  .faq-teaser {
    grid-template-columns: 1fr;
  }
  .mini-card,
  .faq-teaser__item {
    padding: 18px;
  }
  .loop-step {
    padding: 14px;
  }
  /* THE mobile fix: this was clamp(400px, 58vh, 540px), i.e. 469px = 58% of a
     375x812 phone screen given to a decorative canvas, which pushed the CTA and
     the auth panel below the fold. Height stays fixed (not auto) so CLS stays 0. */
  .hero-3d {
    height: clamp(220px, 30vh, 280px);
  }
  .hero-cta-row {
    gap: 10px;
  }
  .hero-cta-primary,
  .hero-cta-secondary {
    flex: 1 1 100%;
    justify-content: center;
    text-align: center;
  }
  .section-lede {
    margin-bottom: 26px;
  }
}

/* SEO_PROMO_SHOTS_1: in-game screenshot on a content page */
.page-shot { margin: 0 0 28px; }
.page-shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); border: 1px solid var(--glass-border); }
.page-shot figcaption { margin-top: 8px; font-size: 0.8rem; text-align: center; color: var(--text-muted); }
