/*
 * Kosmaris Landing Page — styles.css
 *
 * ============================================================
 * DESIGN TOKEN MIRROR
 * ============================================================
 * The :root block below is a literal copy of the relevant CSS
 * custom properties from frontend/src/styles/_tokens.scss.
 * Values are reproduced exactly — do NOT change them here
 * without also updating the Angular token file, and vice-versa.
 * Re-sync this block whenever _tokens.scss changes.
 * ============================================================
 *
 * Palette: bg #0a0e1a, neon cyan #5ed5ff, gold #ffd700.
 * BEM-adjacent class naming.
 * Responsive: fluid down to 360px.
 * Animations honour prefers-reduced-motion.
 * WCAG AA: every foreground/background pair ≥ 4.5:1.
 */

/* =====================================================================
   0. Design token layer (mirror of frontend/src/styles/_tokens.scss)
   ===================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* ── Raw RGB channels ──────────────────────────────────────────────── */
  --neon-rgb: 94 213 255;
  --danger-rgb: 255 77 77;
  --gold-rgb: 245 215 110;
  --success-rgb: 104 211 145;

  /* ── Background layers ─────────────────────────────────────────────── */
  --bg-base:     #0a0e1a;
  --bg-elevated: #0d1525;
  --bg-overlay:  #111827;
  --bg-void:     #03070f;
  --bg-pane:     rgb(10 22 40 / 72%);
  --bg-grid:
    linear-gradient(rgb(94 213 255 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(94 213 255 / 6%) 1px, transparent 1px);

  /* ── Borders ────────────────────────────────────────────────────────── */
  --border-subtle: #1e3a5f;
  --border-strong: #2a5a9f;
  --edge:        rgb(94 213 255 / 18%);
  --edge-strong: rgb(94 213 255 / 45%);

  /* ── Text ────────────────────────────────────────────────────────────── */
  --text-primary:   #e0e6f0;
  --text-secondary: #8899bb;
  --text-muted:     #5a7a9a;
  --text-on-dark:   #ffffff;
  --text-1: #e8f4ff;
  --text-2: #8ea8c4;
  --text-3: #51718e;

  /* ── Accent colours ──────────────────────────────────────────────────── */
  --accent-cool:      #5fa8b8;
  --accent-cool-dark: #3d7a8a;
  --accent-warm:      #ffd700;
  --neon:             #5ed5ff;
  --gold:             #f5d76e;
  --neon-soft:        #9ce4ff;

  /* ── Semantic status ─────────────────────────────────────────────────── */
  --danger:         #ff4d4d;
  --success:        #68d391;
  --danger-surface: #2a1020;

  /* ── Shadows / glow ─────────────────────────────────────────────────── */
  --shadow-glow:        0 0 24px rgb(94 213 255 / 25%);
  --shadow-glow-soft:   0 0 12px rgb(94 213 255 / 15%);
  --shadow-glow-warm:   0 0 18px rgb(245 215 110 / 25%);
  --shadow-glow-danger: 0 0 18px rgb(255 77 77 / 30%);

  /* ── Spacing scale ────────────────────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* ── Radius ───────────────────────────────────────────────────────────── */
  --radius-none: 0;
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-full: 50%;

  /* ── Type scale ───────────────────────────────────────────────────────── */
  --text-micro: 10px;
  --text-xs:   12px;
  --text-sm:   13px;
  --text-base: 14px;
  --text-lg:   16px;
  --text-xl:   20px;

  /* ── Font families ────────────────────────────────────────────────────── */
  --font-sans: 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;

  /* ── Landing-specific layout ───────────────────────────────────────────── */
  --max-content:  1200px;
  --section-pad:  100px 24px;
  --transition-fast: 0.15s ease;
  --transition-med:  0.3s ease;
}

/* =====================================================================
   1. Base reset and global defaults
   ===================================================================== */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--accent-cool);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: var(--neon);
  text-decoration: underline;
}

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

:focus:not(:focus-visible) {
  outline: none;
}

/* =====================================================================
   2. Layered nebula backdrop (mirrors auth-backdrop from _auth-card.scss)
   Layer order (back → front):
     1. Deep-space base color (#0a0e1a via body background)
     2. Off-centre cyan nebula core
     3. Secondary nebula wisp — upper-right, warm gold tone
     4. Radial scattered-light haze — lower-right
     5. Vignette — darkens corners
     6. Faint tactical grid dots
     7. CSS box-shadow star field pinpoints
   ===================================================================== */

/* The .page-backdrop element covers the viewport and contains all
   atmospheric layers. The star field is created purely in CSS via
   box-shadow on .starfield__star elements (no images needed). */
.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg-base);
  background-image:
    /* Vignette */
    radial-gradient(
      ellipse 120% 120% at 50% 50%,
      transparent 40%,
      rgb(3 7 15 / 70%) 100%
    ),
    /* Secondary wisp — upper-right, warm */
    radial-gradient(
      ellipse 55% 45% at 78% 18%,
      rgb(255 215 0 / 6%) 0%,
      transparent 70%
    ),
    /* Primary nebula — cool cyan core off-centre */
    radial-gradient(
      ellipse 80% 65% at 35% 55%,
      rgb(94 213 255 / 10%) 0%,
      rgb(94 213 255 / 4%) 30%,
      rgb(255 215 0 / 3%) 60%,
      transparent 80%
    ),
    /* Lower-right haze */
    radial-gradient(
      ellipse 40% 35% at 85% 80%,
      rgb(94 213 255 / 5%) 0%,
      transparent 65%
    );
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%;
  background-repeat: no-repeat;
  background-position: center center;
  pointer-events: none;
}

/* Faint tactical grid overlay (mirrors auth-hero__grid opacity) */
.page-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--bg-grid);
  background-size: 32px 32px;
  opacity: 0.18;
  pointer-events: none;
}

/* =====================================================================
   3. Star field — CSS-only, no images
   ===================================================================== */
.starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.starfield__star {
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
  animation: starfield-twinkle var(--tw-dur, 3s) ease-in-out infinite alternate;
  animation-delay: var(--tw-delay, 0s);
  opacity: var(--tw-opacity, 0.6);
}

@keyframes starfield-twinkle {
  from { opacity: var(--tw-opacity, 0.6); transform: scale(1); }
  to   { opacity: calc(var(--tw-opacity, 0.6) * 0.25); transform: scale(0.7); }
}

@media (prefers-reduced-motion: reduce) {
  .starfield__star { animation: none; }
}

/* =====================================================================
   4. Orbital ring accents (pure CSS circles behind the hero)
   ===================================================================== */
.orbital-rings {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orbital-rings__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgb(94 213 255 / 8%);
}

.orbital-rings__ring--1 {
  width: 600px;
  height: 600px;
  top: 50%;
  left: -120px;
  transform: translateY(-50%);
}

.orbital-rings__ring--2 {
  width: 900px;
  height: 900px;
  top: 50%;
  left: -300px;
  transform: translateY(-50%);
  border-color: rgb(255 215 0 / 4%);
}

.orbital-rings__ring--3 {
  width: 500px;
  height: 500px;
  top: 10%;
  right: -200px;
  border-color: rgb(94 213 255 / 5%);
}

/* =====================================================================
   5. Layout utility
   ===================================================================== */
.container {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px;
}

/* =====================================================================
   6. Navigation
   ===================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgb(10 14 26 / 88%);
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--transition-med), border-color var(--transition-med);
}

.nav--scrolled {
  background: rgb(10 14 26 / 96%);
  border-bottom-color: var(--edge-strong);
  box-shadow: var(--shadow-glow-soft);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px;
}

/* .brand--nav mirrors app-brand base: neon, letter-spacing, uppercase */
.brand--nav {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--neon);
  text-shadow: 0 0 14px rgb(94 213 255 / 60%);
  text-decoration: none;
  flex-shrink: 0;
}

.brand--nav:hover {
  color: var(--neon);
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav__links a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--neon);
  background: rgb(94 213 255 / 8%);
  text-decoration: none;
}

/* Nav CTA — mirrors k-button--primary sizing for the nav context */
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 18px;
  background: var(--neon);
  border: 1px solid var(--neon);
  border-radius: var(--radius-sm);
  color: var(--bg-base) !important;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.nav__cta:hover,
.nav__cta:focus-visible {
  background: color-mix(in srgb, var(--neon) 80%, var(--bg-base));
  box-shadow: var(--shadow-glow-soft);
  color: var(--bg-base) !important;
  text-decoration: none !important;
}

/* =====================================================================
   7. Hero section (above-the-fold)
   ===================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

/* Cyan bloom centred on hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgb(94 213 255 / 8%) 0%, transparent 70%),
    radial-gradient(ellipse 40% 35% at 75% 65%, rgb(255 215 0 / 4%) 0%, transparent 60%);
  pointer-events: none;
}

.hero__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

/* Status pill */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgb(94 213 255 / 8%);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 5px 18px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--neon-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 36px;
  animation: hero-badge-in 0.6s ease both;
}

.hero__badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  flex-shrink: 0;
  animation: dot-pulse 2.4s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

@keyframes hero-badge-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__badge        { animation: none; }
  .hero__badge .badge-dot { animation: none; }
}

/* ── .brand--hero mirrors app-brand--hero from brand.component.scss ── */
.brand--hero {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-cool);
  text-shadow: 0 0 32px rgb(94 213 255 / 30%);
  line-height: 1.05;
  margin-bottom: 24px;
  display: block;
  animation: hero-in 0.7s 0.1s ease both;
}

.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.7;
  animation: hero-in 0.7s 0.2s ease both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .brand--hero    { animation: none; }
  .hero__tagline  { animation: none; }
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  animation: hero-in 0.7s 0.35s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .hero__actions { animation: none; }
}

/* =====================================================================
   7b. Hero screenshot
   ===================================================================== */
.hero__screenshot-wrap {
  position: relative;
  max-width: 1100px;
  margin: 56px auto 0;
  border-radius: 8px;
  overflow: hidden;
  /* Cyan border glow */
  border: 1px solid var(--edge-strong);
  box-shadow:
    0 0 0 1px var(--edge),
    0 8px 40px rgb(0 0 0 / 60%),
    0 0 60px rgb(94 213 255 / 12%);
  /* Fade bottom edge into page so it looks like the game is inside the screen */
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.hero__screenshot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .hero__screenshot-wrap {
    margin-top: 40px;
    border-radius: 4px;
  }
}

/* =====================================================================
   8. Button components
   Replicates k-button class rules from k-button.component.scss exactly.
   Mapped: .k-button → .k-button, .k-button--primary, .k-button--secondary,
           .k-button--ghost, .k-button--cta
   ===================================================================== */
.k-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  min-height: 32px;
  white-space: nowrap;
  transition: border-color var(--transition-fast), color var(--transition-fast),
    background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.k-button:hover,
.k-button:focus-visible {
  border-color: var(--neon);
  color: var(--neon);
  text-decoration: none;
}

/* Landing pages use larger hero-sized buttons */
.k-button--lg {
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 700;
  min-height: 44px;
}

/* Primary — cyan fill, glow on hover */
.k-button--primary {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--bg-base);
  font-weight: 700;
  box-shadow: 0 0 0 0 rgb(94 213 255 / 40%);
  animation: k-button-pulse 2.5s ease-in-out infinite;
}

@keyframes k-button-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(94 213 255 / 40%); }
  50%       { box-shadow: 0 0 0 10px rgb(94 213 255 / 0%); }
}

@media (prefers-reduced-motion: reduce) {
  .k-button--primary { animation: none; }
}

.k-button--primary:hover,
.k-button--primary:focus-visible {
  background: color-mix(in srgb, var(--neon) 80%, var(--bg-base));
  border-color: var(--neon);
  color: var(--bg-base);
  box-shadow: var(--shadow-glow-soft);
  text-decoration: none;
}

/* Secondary — outlined, border lifts to neon on hover */
.k-button--secondary {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.k-button--secondary:hover,
.k-button--secondary:focus-visible {
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: var(--shadow-glow-soft);
  text-decoration: none;
}

/* Ghost — no border at rest */
.k-button--ghost {
  border-color: transparent;
  color: var(--text-secondary);
}

.k-button--ghost:hover,
.k-button--ghost:focus-visible {
  border-color: var(--border-subtle);
  color: var(--text-secondary);
  box-shadow: var(--shadow-glow-soft);
  text-decoration: none;
}

/* CTA — high-emphasis, angled corner, always-on glow */
.k-button--cta {
  --shadow-glow-cta-bright: 0 0 36px rgb(94 213 255 / 55%);
  background: var(--neon);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-base);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-5);
  min-height: 40px;
  box-shadow: var(--shadow-glow);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
}

.k-button--cta:hover,
.k-button--cta:focus-visible {
  box-shadow: var(--shadow-glow-cta-bright, 0 0 36px rgb(94 213 255 / 55%));
  transform: translateY(-1px);
  color: var(--bg-base);
  text-decoration: none;
}

/* Gold variant (social/follow CTAs) */
.k-button--warm {
  background: var(--accent-warm);
  border-color: var(--accent-warm);
  color: #000;
  font-weight: 700;
}

.k-button--warm:hover,
.k-button--warm:focus-visible {
  background: #e6c200;
  border-color: #e6c200;
  color: #000;
  box-shadow: var(--shadow-glow-warm);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .k-button,
  .k-button--cta { transition: none; }
  .k-button--cta:hover { transform: none; }
}

/* =====================================================================
   9. Section scaffolding
   ===================================================================== */
.section {
  padding: var(--section-pad);
  position: relative;
}

.section--alt {
  background: rgb(255 255 255 / 1.5%);
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
}

.section__header {
  margin-bottom: 56px;
}

/* ── Section label — mirrors k-section-title typography ─────────────
   font-size/letter-spacing/uppercase match the k-section-title heading style */
.section__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: var(--space-3);
}

/* Pulsing dot before label (mirrors k-section-title__dot) */
.section__label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--neon);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon);
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .section__label::before { animation: none; }
}

/* Section heading border-bottom accent — mirrors k-section-title__heading border */
.section__title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.2;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--edge);
}

.section__title--center {
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section__body {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.8;
}

/* =====================================================================
   10. k-panel surface (mirrors _primitives.scss .k-panel exactly)
   ===================================================================== */
.k-panel {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
}

.k-panel--strong {
  border-color: var(--border-strong);
}

/* Landing-page extension: hover glow + inner-glow (editorial panels) */
.k-panel--feature {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  /* Soft inner glow at rest */
  box-shadow: inset 0 0 20px rgb(94 213 255 / 3%);
}

/* Top-edge neon accent line (hidden at rest, revealed on hover) */
.k-panel--feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--accent-warm));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.k-panel--feature:hover {
  border-color: var(--edge-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-soft), inset 0 0 24px rgb(94 213 255 / 5%);
}

.k-panel--feature:hover::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .k-panel--feature {
    transition: border-color var(--transition-fast);
  }
  .k-panel--feature:hover {
    transform: none;
  }
}

/* =====================================================================
   11. "What is Kosmaris" section
   ===================================================================== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about__content .section__title {
  border-bottom: none;
  padding-bottom: 0;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: 40px;
}

/* stat-card uses k-panel chrome */
.stat-card {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  box-shadow: inset 0 0 12px rgb(94 213 255 / 3%);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--edge-strong);
  box-shadow: var(--shadow-glow-soft);
}

.stat-card__number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--neon);
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgb(94 213 255 / 40%);
}

.stat-card__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.about__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Real screenshot variant inside .about__visual */
.about__screenshot {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--edge-strong);
  box-shadow:
    0 0 0 1px var(--edge),
    0 12px 48px rgb(0 0 0 / 55%),
    0 0 40px rgb(94 213 255 / 10%);
}

@media (max-width: 820px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about__visual {
    order: -1;
  }
}

/* =====================================================================
   12. Pillars / feature cards
   ===================================================================== */

/* Intro paragraph inside the pillars section header */
.pillars .section__header .section__body {
  max-width: 640px;
  margin-top: 16px;
}

.pillars__grid {
  display: grid;
  /* 3 columns on desktop, auto-fit collapses to 2 or 1 on narrower viewports */
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .pillars__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Pillar icon: inline SVG wrapper (kept for backward compat; no longer used) */
.pillar-card__icon {
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-5);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(94 213 255 / 8%);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  padding: 10px;
  flex-shrink: 0;
}

.pillar-card__icon svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: inherit;
}

/* Pillar thumbnail screenshot — wider than the old icon, sits above the card text */
.pillar-card__thumb {
  width: 100%;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--edge);
  box-shadow: 0 4px 20px rgb(0 0 0 / 40%), 0 0 16px rgb(94 213 255 / 6%);
  aspect-ratio: 16 / 10;
}

.pillar-card__thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.4s ease;
}

.k-panel--feature:hover .pillar-card__thumb-img {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .pillar-card__thumb-img { transition: none; }
  .k-panel--feature:hover .pillar-card__thumb-img { transform: none; }
}

.pillar-card__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: var(--space-3);
  letter-spacing: 0.02em;
}

.pillar-card__body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

.pillar-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgb(94 213 255 / 8%);
  border: 1px solid var(--edge);
  color: var(--neon-soft);
  letter-spacing: 0.06em;
}

/* =====================================================================
   13. Galaxy preview section
   ===================================================================== */
.galaxy-preview {
  text-align: center;
}

.galaxy-preview__header {
  margin-bottom: 48px;
}

/* Real galaxy screenshot wrapper */
.galaxy-screenshot-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--edge-strong);
  box-shadow:
    0 0 0 1px var(--edge),
    0 16px 64px rgb(0 0 0 / 60%),
    0 0 80px rgb(94 213 255 / 10%);
}

/* Pulsing halo behind the screenshot */
.galaxy-screenshot-wrap::before {
  content: '';
  position: absolute;
  inset: -15%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(94 213 255 / 6%) 0%, transparent 70%);
  animation: halo-pulse 4s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes halo-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .galaxy-screenshot-wrap::before { animation: none; }
}

.galaxy-screenshot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.galaxy-preview__caption {
  margin-top: 28px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================================
   14. Get-started (bottom CTA) section
   ===================================================================== */
.cta-section {
  text-align: center;
}

.cta-section .section__title {
  border-bottom: none;
  padding-bottom: 0;
}

.cta-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  margin-top: 40px;
}

/* Text gradient utility (hero wordmark gradient fallback if accent-cool not vivid enough) */
.text-gradient {
  background: linear-gradient(135deg, var(--neon) 0%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================================================================
   15. Footer (matches app-footer colour/spacing language)
   No version pill — irrelevant on a marketing page.
   ===================================================================== */
.footer {
  border-top: 1px solid var(--edge);
  padding: 36px 24px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.footer__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--neon);
  text-shadow: 0 0 10px rgb(94 213 255 / 40%);
  text-decoration: none;
}

.footer__logo:hover {
  color: var(--neon);
  text-decoration: none;
}

.footer__links {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  align-items: center;
}

.footer__links a {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.footer__links a:hover {
  color: var(--neon);
  text-decoration: none;
}

.footer__copy {
  width: 100%;
  margin-top: var(--space-4);
  color: var(--text-3);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

/* =====================================================================
   16. Responsive overrides
   ===================================================================== */

/* Tablet (≤768 px) */
@media (max-width: 768px) {
  :root {
    --section-pad: 80px 20px;
  }

  .hero {
    padding: 110px 20px 64px;
  }

  .pillars__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile (≤600 px) */
@media (max-width: 600px) {
  :root {
    --section-pad: 64px 20px;
  }

  .nav__links {
    display: none;
  }

  .hero {
    padding: 96px 20px 56px;
  }

  .pillars__grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .about__stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* Narrow mobile (≤400 px / 360 px target) */
@media (max-width: 400px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .k-button--primary,
  .k-button--secondary,
  .k-button--ghost {
    justify-content: center;
    text-align: center;
  }

  .about__stats {
    grid-template-columns: 1fr;
  }

  .cta-section__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Wide desktop (≥1440 px) — ensure content stays readable */
@media (min-width: 1440px) {
  :root {
    --section-pad: 120px 40px;
  }
}

/* =====================================================================
   18. Screenshot lightbox (Task A)
   Plain <div> overlay — not <dialog>. ARIA role="dialog" + aria-modal
   managed via JS. No JS dependency — works even without GSAP/Lenis.
   ===================================================================== */

/* Clickable screenshots — zoom-in affordance */
.lb-trigger {
  cursor: zoom-in;
  position: relative;
}

/* Hover: subtle scale + brightening to signal interactivity.
   The pillar cards already have their own :hover transform; adding a
   separate scale on just the image inside adds a secondary depth cue.
   Reduced-motion: skip all transforms but keep cursor. */
.lb-trigger:hover,
.lb-trigger:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}

.about__screenshot.lb-trigger:hover,
.galaxy-screenshot.lb-trigger:hover,
.hero__screenshot.lb-trigger:hover {
  filter: brightness(1.08);
}

@media (prefers-reduced-motion: no-preference) {
  .about__screenshot.lb-trigger:hover,
  .galaxy-screenshot.lb-trigger:hover,
  .hero__screenshot.lb-trigger:hover {
    transform: scale(1.015);
    transition: transform 0.25s ease, filter 0.25s ease;
  }
}

/* Magnifier badge — small zoom icon centred on thumb images on hover.
   Implemented as ::after on the wrapping .pillar-card__thumb when
   the img inside is focused or hovered. Because CSS can't target
   a parent via child-hover we add a sibling-driven .lb-thumb-hovered
   class via JS. For non-JS fallback the cursor alone suffices. */
.pillar-card__thumb {
  position: relative; /* already set; belt-and-suspenders */
}

.pillar-card__thumb::after {
  content: '\1F50D'; /* magnifier emoji — pure CSS, no SVG request */
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--neon);
  text-shadow: 0 0 12px rgb(94 213 255 / 80%);
  background: rgb(3 7 15 / 50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border-radius: var(--radius-sm);
}

.pillar-card__thumb:has(.lb-trigger:hover)::after,
.pillar-card__thumb:has(.lb-trigger:focus-visible)::after {
  opacity: 1;
}

/* :has() fallback via JS-added class */
.pillar-card__thumb.lb-thumb--active::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pillar-card__thumb::after {
    transition: none;
  }
}

/* ── Overlay backdrop ──────────────────────────────────────────────── */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Hidden state */
  opacity: 0;
  pointer-events: none;
  /* Smooth fade-in / fade-out */
  transition: opacity 0.25s ease;
}

.lb-overlay.lb-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .lb-overlay {
    transition: none;
  }
}

/* Semi-transparent "void" backdrop */
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(3 7 15 / 88%);
  cursor: zoom-out;
}

/* ── Image panel ──────────────────────────────────────────────────── */
.lb-panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 85vh;
  /* Cyan-accented border + glow */
  border: 1px solid var(--edge-strong);
  border-radius: 8px;
  box-shadow:
    0 0 0 1px var(--edge),
    0 0 48px rgb(94 213 255 / 22%),
    0 24px 80px rgb(0 0 0 / 75%);
  overflow: hidden;
  background: var(--bg-void);
  /* Scale from 94% to 100% on open for a snappy pop feel */
  transform: scale(0.94);
  transition: transform 0.25s ease;
}

.lb-overlay--open .lb-panel {
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .lb-panel {
    transform: none;
    transition: none;
  }
}

.lb-img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 7px;
}

/* ── Close button ─────────────────────────────────────────────────── */
.lb-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(10 14 26 / 85%);
  border: 1px solid var(--edge-strong);
  border-radius: 50%;
  color: var(--neon);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.lb-close:hover,
.lb-close:focus-visible {
  background: var(--neon);
  color: var(--bg-void);
  box-shadow: 0 0 14px rgb(94 213 255 / 55%);
  outline: none;
}

.lb-close:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .lb-close {
    transition: none;
  }
}

/* =====================================================================
   Lenis smooth-scroll required CSS (companion to lenis.min.js)
   Must NOT be inside any @media query — Lenis adds these classes to <html>
   at runtime and they must always be reachable.
   The `scroll-behavior: auto !important` rule neutralises the native
   `html { scroll-behavior: smooth }` conflict; Lenis owns the smoothing
   when active, native smooth is the no-JS/reduced-motion fallback.
   ===================================================================== */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* =====================================================================
   17. Motion layer — GSAP + Lenis starting states
   Scoped to html.js-anim (added by script.js before any animation runs).
   No-JS and prefers-reduced-motion users never see this class, so they
   always see all content in its final visible state.
   ===================================================================== */

/* Generic scroll-reveal targets: start invisible and shifted down.
   GSAP's `from` tween animates FROM these values to the natural state. */
html.js-anim .js-reveal {
  opacity: 0;
  transform: translateY(24px);
}

/* Pillar / feature cards: same starting state for the staggered cascade.
   Override the old per-element inline style that script.js used to set. */
html.js-anim .k-panel--feature {
  opacity: 0;
  transform: translateY(28px);
  /* Preserve existing hover/transition on these panels */
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

/* Hero elements have their own CSS keyframe animations defined earlier.
   When JS loads, GSAP takes over (script.js removes the animation property
   inline) so we do not double-declare starting states here — GSAP `from`
   sets them at runtime. Nothing to add for hero under js-anim. */

/* =====================================================================
   17a. Reduced-motion: ensure everything is fully visible at once,
   regardless of whether js-anim class is present.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  /* Override any residual js-anim starting-states */
  html.js-anim .js-reveal,
  html.js-anim .k-panel--feature {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Make sure GSAP inline styles (set before motion-check runs) can't
     leave elements invisible. This is a belt-and-suspenders rule — the
     JS guard removes js-anim before painting when reduced-motion is on. */
  .js-reveal,
  .k-panel--feature {
    opacity: 1;
    transform: none;
  }
}

/* =====================================================================
   19. FAQ section
   Uses native <details>/<summary> accordion for keyboard + AT support
   without JavaScript. Answers are always in the DOM for crawler indexing.
   ===================================================================== */
.faq {
  text-align: center;
}

.faq__header {
  margin-bottom: 48px;
}

.faq__header .section__title {
  border-bottom: none;
  padding-bottom: 0;
}

.faq__list {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Each Q&A row */
.faq__item {
  border-bottom: 1px solid var(--edge);
}

.faq__item:first-child {
  border-top: 1px solid var(--edge);
}

.faq__details {
  /* Reset browser default details margin */
  width: 100%;
}

/* summary acts as the clickable question row */
.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  cursor: pointer;
  list-style: none; /* remove default triangle marker */
  /* Remove ::-webkit-details-marker in Webkit */
  -webkit-appearance: none;
  user-select: none;
  transition: color var(--transition-fast);
}

/* Remove the native disclosure triangle in all browsers */
.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::marker {
  display: none;
}

.faq__question:hover,
.faq__question:focus-visible {
  color: var(--neon);
  outline: none;
}

.faq__question:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Question text — h3 inside summary; keep it as inline for layout */
.faq__question-text {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.4;
  margin: 0;
  transition: color var(--transition-fast);
}

.faq__question:hover .faq__question-text,
.faq__details[open] .faq__question-text {
  color: var(--neon);
}

/* Chevron indicator — CSS pseudo-element on summary, no extra HTML element needed */
.faq__question::after {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--edge);
  border-radius: 50%;
  color: var(--neon-soft);
  /* Plus/minus cross: use box-shadow trick via background */
  background-image:
    /* horizontal bar */
    linear-gradient(currentColor, currentColor),
    /* vertical bar */
    linear-gradient(currentColor, currentColor);
  background-size: 10px 1.5px, 1.5px 10px;
  background-repeat: no-repeat;
  background-position: center, center;
  transition: transform var(--transition-med), border-color var(--transition-fast), color var(--transition-fast), background-size var(--transition-med), background-image var(--transition-fast);
}

.faq__details[open] .faq__question::after {
  border-color: var(--edge-strong);
  color: var(--neon);
  /* Collapse vertical bar to form minus */
  background-size: 10px 1.5px, 1.5px 0px;
}

@media (prefers-reduced-motion: reduce) {
  .faq__question::after,
  .faq__question-text {
    transition: none;
  }
}

/* Answer panel */
.faq__answer {
  margin: 0;
  padding: 0 0 var(--space-5);
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 680px;
}

.faq__answer a {
  color: var(--neon-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq__answer a:hover,
.faq__answer a:focus-visible {
  color: var(--neon);
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 600px) {
  .faq__question-text {
    font-size: var(--text-base);
  }

  .faq__answer {
    font-size: var(--text-base);
  }
}
