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

:root {
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --nav-height: 72px;
  --container: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Dark theme (default) */
  --bg: #050508;
  --bg-elevated: #0c0c12;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(12, 12, 18, 0.92);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f0f0f5;
  --text-muted: rgba(240, 240, 245, 0.6);
  --text-dim: rgba(240, 240, 245, 0.4);
  --accent: #3b82f6;
  --accent-bright: #60a5fa;
  --accent-soft-bg: rgba(59, 130, 246, 0.1);
  --accent-soft-border: rgba(59, 130, 246, 0.2);
  --accent-glow: rgba(59, 130, 246, 0.4);
  --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
  --orb-1: #1d4ed8;
  --orb-2: #7c3aed;
  --orb-3: #0891b2;
  --orb-opacity: 0.5;
  --grid-line: rgba(255, 255, 255, 0.02);
  --nav-bg-scrolled: rgba(5, 5, 8, 0.75);
  --shadow-card: none;
  --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.4);
  --color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #0a0e1f;
  --text-muted: rgba(10, 14, 31, 0.62);
  --text-dim: rgba(10, 14, 31, 0.42);
  --accent: #4f46e5;
  --accent-bright: #6366f1;
  --accent-soft-bg: rgba(99, 102, 241, 0.1);
  --accent-soft-border: rgba(99, 102, 241, 0.22);
  --accent-glow: rgba(99, 102, 241, 0.3);
  --gradient: linear-gradient(135deg, #4f46e5 0%, #a855f7 50%, #06b6d4 100%);
  --orb-1: #c7d2fe;
  --orb-2: #e9d5ff;
  --orb-3: #cffafe;
  --orb-opacity: 0.7;
  --grid-line: rgba(15, 23, 42, 0.04);
  --nav-bg-scrolled: rgba(247, 248, 252, 0.78);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  --shadow-elevated: 0 12px 40px rgba(15, 23, 42, 0.12);
  --color-scheme: light;
}

html {
  color-scheme: var(--color-scheme);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Background */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: var(--orb-opacity);
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--orb-1) 0%, transparent 70%);
  top: -200px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--orb-2) 0%, transparent 70%);
  top: 40%;
  right: -150px;
  animation-delay: -7s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--orb-3) 0%, transparent 70%);
  bottom: -100px;
  left: 30%;
  animation-delay: -14s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Layout */
.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding: 120px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  overflow: visible;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
}

.nav.scrolled {
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
  gap: 24px;
}

.nav-logo img {
  display: block;
  height: 28px;
  max-height: 28px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 100px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.nav-cta {
  flex-shrink: 0;
}

/* Language switcher */
.lang-switcher {
  position: relative;
  z-index: 3;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lang-button:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.lang-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.lang-current {
  letter-spacing: 0.04em;
}

.lang-chevron {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  transition: transform 0.2s var(--ease);
}

.lang-switcher.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  background: var(--surface-strong);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 110;
}

.lang-switcher.open .lang-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-menu li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-menu li:hover {
  background: var(--surface);
  color: var(--text);
}

.lang-menu li.active {
  background: var(--accent-soft-bg);
  color: var(--text);
}

.lang-menu .lang-code {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent-bright);
  min-width: 24px;
}

.lang-menu .lang-name {
  font-weight: 500;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}

.theme-option {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 100px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.theme-option.active {
  background: var(--gradient);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.theme-option svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 15px;
}

/* Hero */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
}

.hero .container {
  display: grid;
  gap: 64px;
  align-items: center;
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 24px;
  padding: 6px 14px;
  background: var(--accent-soft-bg);
  border: 1px solid var(--accent-soft-border);
  border-radius: 100px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.gradient-text {
  display: block;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-points li {
  font-size: 15px;
  color: var(--text-muted);
  font-family: ui-monospace, 'Cascadia Code', monospace;
}

.point-marker {
  color: var(--accent-bright);
  margin-right: 4px;
}

.hero-visual {
  position: relative;
}

.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}

.hero-image-wrap img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.hero-image-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), transparent 50%, rgba(139, 92, 246, 0.15));
  pointer-events: none;
}

/* Section headers */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.section-lead {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
}

.section-tagline {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 64px;
  line-height: 1.5;
}

/* Glass cards */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.glass-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.glass-card h3,
.glass-card h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 16px;
}

.glass-card h3 {
  font-size: 1.35rem;
}

.glass-card h4 {
  font-size: 1.1rem;
  margin-top: 20px;
}

.glass-card h4:first-of-type {
  margin-top: 0;
}

.glass-card p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 12px;
}

.glass-card p:last-child {
  margin-bottom: 0;
}

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft-bg);
  border: 1px solid var(--accent-soft-border);
  border-radius: 12px;
  color: var(--accent-bright);
  margin-bottom: 20px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card-list {
  margin: 16px 0;
}

.card-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.card-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.card-highlight {
  font-weight: 400;
  color: var(--text) !important;
}

.step-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-bright);
  background: var(--accent-soft-bg);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.step-label:not(:first-child) {
  margin-top: 24px;
}

/* Bento grids */
.bento-grid {
  display: grid;
  gap: 20px;
}

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

.bento-investor {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) minmax(0, 1.3fr);
  align-items: stretch;
}

.bento-studios {
  grid-template-columns: repeat(3, 1fr);
}

.bento-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.bento-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

.bento-image-tall {
  grid-row: span 2;
}

.bento-image-tall img {
  min-height: 100%;
}

.segment-toggle {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}

/* Pitch */
.pitch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 80px;
  align-items: center;
}

.pitch-content .section-title {
  text-align: left;
}

.pitch-content .section-lead {
  text-align: left;
  margin-bottom: 32px;
}

.pitch-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}

.pitch-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------- */
/*  Prototype Portal — Final CTA section                */
/*  (replaces the static team image)                    */
/* ---------------------------------------------------- */

/* Outer card matches .pitch-image dimensions/border so the surrounding
   layout never moves when we swap the static image for the portal. */
.pitch-portal {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(99, 102, 241, 0.16) 0%, transparent 70%),
    radial-gradient(120% 80% at 0% 0%, rgba(34, 211, 238, 0.08), transparent 60%),
    linear-gradient(160deg, rgba(8, 11, 24, 0.98) 0%, rgba(4, 6, 14, 1) 100%);
  isolation: isolate;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
/* Soft scanline so the portal reads as a "screen", matching the radar */
.pitch-portal::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
  z-index: 4;
}

/* Stage wraps every animated layer and centres the core. */
.portal-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

/* ---- Background pixel/light fragments ---- */
.portal-pixels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.portal-pixels span {
  position: absolute;
  left: var(--px);
  top: var(--py);
  width: 3px;
  height: 3px;
  background: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 4px rgba(34, 211, 238, 0.6);
  border-radius: 1px;
  animation: portalPixelDrift var(--pd, 9s) ease-in-out var(--pdl, 0s) infinite;
}
@keyframes portalPixelDrift {
  0%, 100% { transform: translate(0, 0);    opacity: 0.35; }
  50%      { transform: translate(0, -5px); opacity: 1; }
}

/* ---- Concentric pulsing rings ---- */
.portal-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}
.portal-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(160, 180, 255, 0.18);
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.12);
  animation: portalRingPulse 5s ease-in-out infinite;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.portal-ring-1 { width: 28%; aspect-ratio: 1; animation-delay: -0.0s; }
.portal-ring-2 { width: 50%; aspect-ratio: 1; animation-delay: -1.2s; }
.portal-ring-3 { width: 72%; aspect-ratio: 1; animation-delay: -2.4s; border-style: dashed; opacity: 0.85; }
.portal-ring-4 { width: 94%; aspect-ratio: 1; animation-delay: -3.6s; opacity: 0.55; }
@keyframes portalRingPulse {
  0%, 100% { transform: scale(0.94); opacity: 0.45; }
  50%      { transform: scale(1.06); opacity: 1.00; }
}

/* ---- Inflow particle layer (filled by JS) ---- */
.portal-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.portal-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 3px 8px;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 100px;
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.42);
  color: rgba(245, 247, 255, 0.92);
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.25);
  /* The "ease-in" curve mimics gravitational acceleration into the core. */
  animation: portalInflow var(--d, 6s) cubic-bezier(0.45, 0.0, 0.85, 0.55) var(--dl, 0s) infinite;
  will-change: transform, opacity;
}
@keyframes portalInflow {
  0%   {
    transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(1);
    opacity: 0;
    filter: blur(0.4px);
  }
  16%  { opacity: 1; }
  82%  { opacity: 0.85; }
  100% {
    transform: translate(-50%, -50%) scale(0.18);
    opacity: 0;
    filter: blur(1.4px);
  }
}

/* ---- Central glowing core ---- */
.portal-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 3;
}
.portal-core-glow {
  position: absolute;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.55) 0%, rgba(99, 102, 241, 0.15) 38%, transparent 75%);
  filter: blur(2px);
  animation: portalCoreBreathe 4s ease-in-out infinite;
}
.portal-core-mark {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #f5f7ff 0%, #22d3ee 55%, transparent 100%);
  box-shadow:
    0 0 22px 4px rgba(34, 211, 238, 0.7),
    0 0 60px rgba(99, 102, 241, 0.45);
  animation: portalCoreBreathe 3s ease-in-out infinite;
  transition: box-shadow 0.4s var(--ease);
}
@keyframes portalCoreBreathe {
  0%, 100% { transform: scale(1);   opacity: 0.85; }
  50%      { transform: scale(1.14); opacity: 1; }
}

/* ---- Microcopy ticker chip (lives under the CTA button) ---- */
.portal-ticker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 247, 255, 0.78);
}
.portal-ticker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.85);
  animation: portalTickerPulse 1.6s ease-in-out infinite;
}
@keyframes portalTickerPulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.82); }
}
.portal-ticker-text {
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}
.portal-ticker-text.is-out {
  opacity: 0;
  transform: translateY(-3px);
}

/* ---- Hover state — button hover intensifies the portal.
   Falls back to portal hover if `:has()` isn't supported. ---- */
.pitch-grid:has(.btn-primary:hover) .pitch-portal,
.pitch-portal:hover {
  border-color: rgba(160, 180, 255, 0.32);
  box-shadow:
    0 24px 60px rgba(99, 102, 241, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
}
.pitch-grid:has(.btn-primary:hover) .portal-core-mark,
.pitch-portal:hover .portal-core-mark {
  box-shadow:
    0 0 38px 6px rgba(34, 211, 238, 0.95),
    0 0 100px rgba(99, 102, 241, 0.7);
}
.pitch-grid:has(.btn-primary:hover) .portal-ring,
.pitch-portal:hover .portal-ring {
  border-color: rgba(160, 180, 255, 0.5);
  box-shadow: inset 0 0 18px rgba(99, 102, 241, 0.32);
}
/* Speed up particles on hover by halving their per-particle duration. */
.pitch-grid:has(.btn-primary:hover) .portal-particle,
.pitch-portal:hover .portal-particle {
  animation-duration: calc(var(--d, 6s) * 0.55);
}
.pitch-grid:has(.btn-primary:hover) .portal-ticker-dot,
.pitch-portal:hover .portal-ticker-dot {
  animation-duration: 0.95s;
}

/* ---- Mobile / single-column ---- */
@media (max-width: 600px) {
  .pitch-portal { aspect-ratio: 5 / 4; }
  .portal-particle { font-size: 8px; padding: 2px 7px; }
  .portal-ticker { font-size: 9px; letter-spacing: 0.18em; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .portal-pixels span,
  .portal-ring,
  .portal-core-glow,
  .portal-core-mark,
  .portal-ticker-dot { animation: none !important; }
  .portal-particle { animation: none !important; opacity: 0.8; }
  .portal-ticker-text { transition: none !important; }
}

/* Subscribe */
.subscribe-block {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: center;
  padding: 48px 56px;
  background: var(--accent-soft-bg);
}

.subscribe-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.subscribe-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.subscribe-content p {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Footer */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.footer-logo img {
  height: 24px;
}

.footer-social {
  justify-self: end;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.footer-social:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--text);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

/* Responsive */
@media (min-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr 1.1fr;
  }
}

@media (max-width: 1024px) {
  .bento-investor {
    grid-template-columns: 1fr;
  }

  .bento-image {
    order: -1;
  }

  .bento-studios {
    grid-template-columns: 1fr 1fr;
  }

  .bento-image-tall {
    grid-row: span 1;
    grid-column: span 2;
  }

  .pitch-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .subscribe-block {
    grid-template-columns: 1fr;
    padding: 40px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 24px;
    background: var(--surface-strong);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 16px;
    font-size: 16px;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .bento-2,
  .bento-studios {
    grid-template-columns: 1fr;
  }

  .bento-image-tall {
    grid-column: span 1;
  }

  .segment-toggle {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
  }

  .footer-bottom {
    grid-column: 1 / -1;
  }
}

/* RTL adjustments */
.rtl .hero-points li,
.rtl .card-list li {
  direction: rtl;
}

.rtl .point-marker {
  margin-right: 0;
  margin-left: 4px;
}

.rtl .card-list li {
  padding-left: 0;
  padding-right: 20px;
}

.rtl .card-list li::before {
  left: auto;
  right: 0;
}

.rtl .lang-menu {
  right: auto;
  left: 0;
}

.rtl .footer-social {
  justify-self: start;
}

.rtl .footer-inner {
  grid-template-columns: auto 1fr auto;
}

/* Light theme element-specific adjustments */
:root[data-theme="light"] .hero-image-glow {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), transparent 50%, rgba(168, 85, 247, 0.1));
}

:root[data-theme="light"] .hero-image-wrap,
:root[data-theme="light"] .bento-image,
:root[data-theme="light"] .pitch-image,
:root[data-theme="light"] .pitch-portal {
  box-shadow: var(--shadow-card);
}

:root[data-theme="light"] .subscribe-block {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.06) 100%);
  border-color: var(--border-strong);
}

:root[data-theme="light"] .point-marker {
  color: var(--accent);
}

/* Language-specific fonts */
[lang="ar"] body,
[lang="ar"] .hero-title,
[lang="ar"] .section-title,
[lang="ar"] .subscribe-title,
[lang="ar"] .glass-card h3,
[lang="ar"] .glass-card h4,
[lang="ar"] .section-tagline {
  font-family: 'Noto Sans Arabic', 'Instrument Sans', system-ui, sans-serif;
}

[lang="zh"] body,
[lang="zh"] .hero-title,
[lang="zh"] .section-title,
[lang="zh"] .subscribe-title,
[lang="zh"] .glass-card h3,
[lang="zh"] .glass-card h4,
[lang="zh"] .section-tagline {
  font-family: 'Noto Sans SC', 'Instrument Sans', system-ui, sans-serif;
}

@media (max-width: 480px) {
  .lang-button .lang-icon {
    display: none;
  }
  .lang-button {
    padding: 0 10px;
  }
}

/* ---------------------------------------------------- */
/*  Market Weather Radar — Investor panel               */
/*  (replaces the static investor image)                */
/* ---------------------------------------------------- */

/* ---- Outer card ---- */
.market-radar {
  position: relative;
  background:
    radial-gradient(120% 80% at 0% 0%,    rgba(99, 102, 241, 0.10), transparent 55%),
    radial-gradient(100% 80% at 100% 100%, rgba(34, 211, 238, 0.07), transparent 55%),
    linear-gradient(160deg, rgba(15, 18, 38, 0.94) 0%, rgba(8, 10, 22, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  isolation: isolate;
  min-height: 480px;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

/* Subtle scanline + vignette so the panel reads as a "screen" */
.market-radar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.45) 100%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
  z-index: 0;
}

.mr-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.5vw, 18px);
  padding: clamp(16px, 1.8vw, 22px);
}

/* ---- Header ---- */
.mr-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mr-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
/* Brand mark — a small radar dish glyph (concentric arcs + bottom base) */
.mr-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(34, 211, 238, 0.32);
  overflow: hidden;
}
.mr-mark::before,
.mr-mark::after {
  content: '';
  position: absolute;
  border: 1.4px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
  transform: rotate(45deg);
}
.mr-mark::before {
  inset: 5px 5px 11px 5px;
}
.mr-mark::after {
  inset: 9px 9px 11px 9px;
  opacity: 0.7;
}
.mr-id-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mr-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #f5f7ff;
  line-height: 1.1;
  letter-spacing: 0.005em;
}
.mr-sub {
  margin-top: 3px;
  font-size: 9px;
  color: rgba(245, 247, 255, 0.5);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* LIVE chip in the corner */
.mr-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.28);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(207, 255, 230, 0.85);
  flex-shrink: 0;
}
.mr-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.9);
  animation: mrStatusPulse 1.6s ease-in-out infinite;
}
@keyframes mrStatusPulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.82); }
}

/* ---- Radar dish ---- */
.mr-radar-wrap {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.mr-svg {
  width: 100%;
  height: 100%;
  max-height: 320px;
  display: block;
  overflow: visible;
}

/* Isobar pressure curves drifting subtly horizontally */
.mr-isobars { mix-blend-mode: screen; }
.mr-isobar {
  fill: none;
  stroke: rgba(99, 165, 250, 0.28);
  stroke-width: 0.6;
  stroke-linecap: round;
  transform-box: view-box;
  transform-origin: center;
}
.mr-iso-1 { animation: mrIso1 22s ease-in-out infinite; }
.mr-iso-2 { animation: mrIso2 26s ease-in-out infinite; }
.mr-iso-3 { animation: mrIso3 24s ease-in-out infinite; }
.mr-iso-4 { animation: mrIso4 28s ease-in-out infinite; }
@keyframes mrIso1 { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px);  } }
@keyframes mrIso2 { 0%, 100% { transform: translateX( 3px); } 50% { transform: translateX(-4px); } }
@keyframes mrIso3 { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(4px);  } }
@keyframes mrIso4 { 0%, 100% { transform: translateX( 2px); } 50% { transform: translateX(-3px); } }

/* Range rings — concentric circles */
.mr-rings circle {
  stroke: rgba(160, 180, 255, 0.12);
  stroke-width: 0.55;
}
.mr-ring-outer {
  stroke: rgba(160, 180, 255, 0.22);
  stroke-width: 0.7;
}

/* Crosshair axis lines */
.mr-crosshair line {
  stroke: rgba(160, 180, 255, 0.13);
  stroke-width: 0.5;
}

/* Sweep beam — rotates around the radar centre.
   The wedge path's apex is at user-space (0, 0). With transform-box:view-box
   Chrome resolves transform-origin offsets in user-space units relative to
   the SVG element's local (0, 0), so we set the origin to "0 0" rather than
   "center" — otherwise the pivot lands at user-space (100, 100) (the lower-
   right corner of the dish) and the wedge appears to drift around the
   centre instead of rotating around its own tip. */
.mr-sweep {
  transform-box: view-box;
  transform-origin: 0 0;
  animation: mrSweep 8s linear infinite;
  will-change: transform;
}
.mr-sweep-edge {
  stroke: #22d3ee;
  stroke-width: 0.7;
  stroke-opacity: 0.75;
  filter: drop-shadow(0 0 3px rgba(34, 211, 238, 0.55));
}
@keyframes mrSweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Hype storm — diffuse red haze that breathes gently */
.mr-storm {
  transform-box: view-box;
  transform-origin: center;
  animation: mrStormBreathe 5.5s ease-in-out infinite;
}
@keyframes mrStormBreathe {
  0%, 100% { opacity: 0.70; }
  50%      { opacity: 1.00; }
}
.mr-storm-label {
  font-family: var(--font-display);
  font-size: 5.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  fill: rgba(255, 215, 215, 0.7);
}

/* Signal cluster blips — five positive markers around the dish.
   Each is a small dot with a label and a soft "ping ring" sibling. */
.mr-cluster-dot {
  fill: #22d3ee;
  filter: drop-shadow(0 0 3px rgba(34, 211, 238, 0.85));
  animation: mrClusterPulse 3.2s ease-in-out infinite;
}
.mr-cluster-1 .mr-cluster-dot { animation-delay: -0.0s; }
.mr-cluster-2 .mr-cluster-dot { animation-delay: -0.7s; }
.mr-cluster-3 .mr-cluster-dot { animation-delay: -1.4s; }
.mr-cluster-4 .mr-cluster-dot { animation-delay: -2.1s; }
.mr-cluster-5 .mr-cluster-dot { animation-delay: -2.8s; }
.mr-cluster-6 .mr-cluster-dot { animation-delay: -3.5s; }
@keyframes mrClusterPulse {
  0%, 100% { opacity: 0.65; }
  50%      { opacity: 1.00; }
}
.mr-cluster-label {
  font-family: var(--font-body);
  font-size: 5.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  fill: rgba(245, 247, 255, 0.85);
}

/* JS-driven "ping" — a ring expanding outward from the dot */
.mr-ping {
  fill: none;
  stroke: rgba(34, 211, 238, 0.85);
  stroke-width: 0.9;
  opacity: 0;
}
.mr-cluster.is-pinged .mr-ping {
  animation: mrClusterPing 1.4s ease-out forwards;
}
@keyframes mrClusterPing {
  0%   { r: 4;  opacity: 0.85; stroke-width: 1.1; }
  100% { r: 22; opacity: 0;    stroke-width: 0.3; }
}

/* Centre receiver dot */
.mr-center {
  fill: #f5f7ff;
  filter: drop-shadow(0 0 4px rgba(245, 247, 255, 0.85));
}

/* ---- Readout (2×2 stat grid) ---- */
.mr-readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.mr-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mr-stat-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 247, 255, 0.5);
  font-weight: 600;
}
.mr-stat-value {
  font-size: 12px;
  color: #f5f7ff;
  letter-spacing: 0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Warn variant: tints "Hype risk" amber so it reads as a watch-out */
.mr-stat-warn .mr-stat-value { color: #fbbf24; }

/* ---- Forecast ticker ---- */
.mr-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(34, 211, 238, 0.06), rgba(34, 211, 238, 0.02)),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(34, 211, 238, 0.18);
  min-width: 0;
}
.mr-ticker-prefix {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(34, 211, 238, 0.85);
  font-weight: 700;
  flex-shrink: 0;
}
.mr-ticker-text {
  font-size: 12px;
  color: #f5f7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}
.mr-ticker-text.is-out {
  opacity: 0;
  transform: translateY(-4px);
}

/* ---- Hover state: subtle intensity bump + faster sweep ---- */
.market-radar:hover {
  border-color: rgba(160, 180, 255, 0.22);
  box-shadow:
    0 24px 60px rgba(59, 130, 246, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  transform: translateY(-2px);
}
.market-radar:hover .mr-sweep        { animation-duration: 3.6s; }
.market-radar:hover .mr-status-dot   { animation-duration: 0.95s; }
.market-radar:hover .mr-cluster-dot  { filter: drop-shadow(0 0 6px rgba(34, 211, 238, 1)); }
.market-radar:hover .mr-storm        { opacity: 1; }
.market-radar:hover .mr-sweep-edge   { filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.95)); }

/* In light mode the panel stays dark for "screen" feel, just lift the shadow */
:root[data-theme="light"] .market-radar {
  box-shadow: 0 14px 48px rgba(15, 23, 42, 0.18);
}

/* Narrow viewports — the panel stacks under the side cards */
@media (max-width: 900px) {
  .market-radar { min-height: 460px; }
}
@media (max-width: 600px) {
  .market-radar { min-height: 0; }
  .mr-inner     { padding: 16px; gap: 14px; }
  .mr-svg       { max-height: 260px; }
  .mr-readout   { padding: 10px 12px; gap: 8px; }
  .mr-stat-value, .mr-ticker-text { font-size: 11px; }
}

/* Reduced motion: kill purely decorative animations */
@media (prefers-reduced-motion: reduce) {
  .mr-status-dot,
  .mr-isobar,
  .mr-sweep,
  .mr-storm,
  .mr-cluster-dot { animation: none !important; }
  .mr-cluster.is-pinged .mr-ping { animation: none !important; opacity: 0; }
  .mr-ticker-text { transition: none !important; }
  /* Keep the sweep visible in a single frozen position so the radar still
     reads as a radar even without rotation. */
  .mr-sweep { transform: rotate(35deg); }
}

/* ---------------------------------------------------- */
/*  Warpzone Chase — Pac-Man hunting ghosts             */
/*  (replaces the static studios image)                 */
/* ---------------------------------------------------- */

/* The arena occupies a single bento cell — the same footprint as a regular
   glass card. The cell stretches to match the row's tallest sibling thanks
   to grid `align-items: stretch`, so the canvas naturally fills the space
   without us having to pin a specific aspect ratio. */
.pacman-arena {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(110% 80% at 0% 0%, rgba(99, 102, 241, 0.10), transparent 55%),
    radial-gradient(100% 80% at 100% 100%, rgba(236, 72, 153, 0.06), transparent 55%),
    linear-gradient(160deg, rgba(8, 11, 24, 0.96) 0%, rgba(4, 6, 14, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  min-height: 280px;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* Canvas is absolutely positioned to fill the panel WITHOUT contributing to
   the panel's intrinsic height. This avoids a ResizeObserver feedback loop
   where the parent's 1px border + the canvas's pixel-set inline height keep
   nudging each other taller every frame. */
.pacman-arena > .pacman-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

/* HUD overlays (badge + caught counter) — layered above the canvas */
.pacman-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  padding: clamp(14px, 1.6vw, 22px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-body);
  color: #f5f7ff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}
.pacman-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

/* Glassy "Warpzone Chase · LIVE" badge in the top-left */
.pm-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(8, 10, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e6e8f5;
}
.pm-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffd84a;
  box-shadow: 0 0 10px rgba(255, 216, 74, 0.9);
  animation: pmBadgePulse 1.6s ease-in-out infinite;
}
@keyframes pmBadgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

/* Caught-ghosts counter (top-right) */
.pm-score {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px 6px 14px;
  border-radius: 14px;
  background: rgba(8, 10, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pm-score-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(245, 247, 255, 0.55);
  text-transform: uppercase;
}
.pm-score-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16px, 1.8vw, 22px);
  background: linear-gradient(135deg, #ffd84a 0%, #ec4899 50%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hover state — global glow lift on the panel */
.pacman-arena:hover {
  border-color: rgba(160, 180, 255, 0.22);
  box-shadow:
    0 24px 60px rgba(99, 102, 241, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
.pacman-arena:hover .pm-badge-dot { animation-duration: 0.9s; }

/* Light theme: keep the arena dark for arcade contrast, add a soft shadow */
:root[data-theme="light"] .pacman-arena {
  box-shadow: 0 14px 48px rgba(15, 23, 42, 0.18);
}

/* Responsive: at the 2-column layout the cell still stretches naturally with
   its row. Once the bento collapses to a single column (≤768px) we pin an
   aspect ratio so the arena keeps a maze-friendly square footprint. */
@media (max-width: 768px) {
  .pacman-arena {
    aspect-ratio: 1 / 1;
    min-height: 0;
  }
}
@media (max-width: 600px) {
  .pacman-arena { aspect-ratio: 1 / 1; }
  .pacman-hud   { padding: 12px; }
  .pm-badge     { font-size: 10px; padding: 5px 10px; }
  .pm-score     { padding: 5px 10px 5px 12px; }
}

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

/* ---------------------------------------------------- */
/*  Deal Runner mini-game (replaces the hero image)     */
/* ---------------------------------------------------- */
.game-wrap {
  isolation: isolate;
  background: radial-gradient(120% 120% at 0% 0%, #0e1530 0%, #070912 60%, #05060d 100%);
}

.game-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  cursor: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.game-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(14px, 2.2vw, 22px);
  z-index: 1;
  color: #f5f7ff;
  font-family: var(--font-body);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.game-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.game-hud-bottom {
  display: flex;
  justify-content: center;
}

/* Top-left "Deal Runner · LIVE" badge */
.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(8, 10, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e6e8f5;
}

.game-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: gameDotPulse 1.6s ease-in-out infinite;
}

@keyframes gameDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

/* Score block (top-right) */
.game-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(8, 10, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  line-height: 1;
}

.game-score-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(245, 247, 255, 0.55);
  text-transform: uppercase;
}

.game-score-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 28px);
  background: linear-gradient(135deg, #60a5fa 0%, #c084fc 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.game-score-value.bump {
  animation: gameScoreBump 0.32s var(--ease);
}

@keyframes gameScoreBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.game-score-best {
  display: inline-flex;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(245, 247, 255, 0.45);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Hint at bottom */
.game-hint {
  margin: 0;
  padding: 8px 14px;
  border-radius: 100px;
  background: rgba(8, 10, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: clamp(11px, 1.3vw, 13px);
  color: rgba(245, 247, 255, 0.78);
  letter-spacing: 0.02em;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  text-align: center;
  max-width: 90%;
}

.game-wrap.is-active .game-hint {
  opacity: 0;
  transform: translateY(8px);
}

/* In light mode the embedded "screen" stays dark for game contrast,
   but lift the surrounding glow a little so the panel reads as a display. */
:root[data-theme="light"] .game-wrap {
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

@media (max-width: 600px) {
  .game-hud {
    padding: 12px;
  }
  .game-badge {
    font-size: 10px;
    padding: 5px 10px;
  }
  .game-score {
    padding: 6px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .game-badge-dot {
    animation: none;
  }
}

/* ============================================================
   Legal pages (Mentions légales / Politique de confidentialité)
   Language blocks are toggled via body[data-lang] set by main.js.
   ============================================================ */
.legal-page {
  padding: calc(var(--nav-height) + 100px) 0 100px;
}

@media (max-width: 768px) {
  .legal-page {
    padding-top: calc(var(--nav-height) + 72px);
  }
}

.legal-page .container {
  max-width: 820px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.legal-back:hover { color: var(--text); }

.legal-lang { display: none; }
body[data-lang="en"] .legal-lang[lang="en"],
body[data-lang="fr"] .legal-lang[lang="fr"],
body[data-lang="ar"] .legal-lang[lang="ar"],
body[data-lang="zh"] .legal-lang[lang="zh"] { display: block; }
/* Fallback before JS sets data-lang: show English */
body:not([data-lang]) .legal-lang[lang="en"] { display: block; }

.legal-lang h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.legal-lang h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 36px 0 12px;
  color: var(--text);
}

.legal-lang p,
.legal-lang li {
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 15.5px;
}

.legal-lang p { margin-bottom: 12px; }

.legal-lang ul {
  margin: 0 0 12px;
  padding-inline-start: 22px;
}

.legal-lang li { margin-bottom: 6px; }

.legal-lang a {
  color: var(--accent);
  text-decoration: none;
}

.legal-lang a:hover { text-decoration: underline; }

.legal-card {
  margin: 20px 0;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.legal-card p:last-child { margin-bottom: 0; }
