/* =========================================================
   ZERO — Aurora Glass landing page
   ========================================================= */

:root {
  /* Palette — "Golden Hour": default light theme. See docs/THEME-GOLD.md.
     [data-theme="dark"] below overrides these with the original Aurora Night. */
  --bg-0: #fffefb;
  --bg-1: #fdfbf5;
  --bg-2: #f6f1e4;

  --emerald: #9a6d1d;
  --teal: #c49435;
  --cyan: #e9cd8a;
  --mint: #0c6b58; /* supporting accent — themes swap this, per spec */

  --emerald-rgb: 154, 109, 29;
  --teal-rgb: 196, 148, 53;
  --cyan-rgb: 233, 205, 138;

  --text-primary: #1c2420;
  --text-secondary: #4f5f58;
  --text-muted: #7d8c85;

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(138, 97, 26, 0.16);
  --glass-border-strong: rgba(138, 97, 26, 0.28);
  --glass-glow: rgba(var(--teal-rgb), 0.15);

  --ring-1: rgba(154, 109, 29, 0.9);
  --ring-2: rgba(196, 148, 53, 0.7);
  --ring-3: rgba(233, 205, 138, 0.5);
  --ring-glow-rgb: 181, 116, 8; /* bold amber — the neon green below is invisible on white */
  --topbar-bg: rgba(255, 254, 251, 0.7);
  --aurora-overlay: radial-gradient(ellipse at 50% 100%, rgba(217, 155, 25, 0.18), transparent 60%);

  --btn-text: #231903;
  --btn-highlight: rgba(255, 255, 255, 0.9);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --shadow-glass:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 24px 60px -24px rgba(154, 109, 29, 0.28),
    0 2px 6px rgba(28, 36, 32, 0.05);

  --shadow-glow:
    0 0 30px rgba(var(--teal-rgb), 0.15),
    0 0 60px rgba(var(--cyan-rgb), 0.12);

  --max-width: 1200px;

  --font-headline: 'Sora', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-arabic: 'IBM Plex Sans Arabic', 'Manrope', system-ui, sans-serif;

  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);

  /* 3D depth */
  --depth-far: 0.2;
  --depth-mid: 0.5;
  --depth-near: 0.8;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--emerald), var(--teal), var(--cyan));
  z-index: 100;
  box-shadow: 0 0 10px rgba(var(--emerald-rgb), 0.5);
  pointer-events: none;
  transition: width 0.1s linear;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================================
   AURORA BACKGROUND
   ========================================================= */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    var(--aurora-overlay),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 50%, var(--bg-0) 100%);
}

.aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: auroraFloat 24s ease-in-out infinite;
  will-change: transform;
}

.aurora__blob--1 {
  width: 70vw; height: 70vw;
  top: -20vw; left: -10vw;
  background: radial-gradient(circle, rgba(var(--emerald-rgb), 0.35), transparent 60%);
  animation-duration: 28s;
  z-index: 1;
}

.aurora__blob--2 {
  width: 60vw; height: 60vw;
  bottom: -15vw; right: -10vw;
  background: radial-gradient(circle, rgba(var(--teal-rgb), 0.3), transparent 60%);
  animation-duration: 32s;
  animation-delay: -8s;
  z-index: 2;
}

.aurora__blob--3 {
  width: 50vw; height: 50vw;
  top: 30%; left: 40%;
  background: radial-gradient(circle, rgba(var(--cyan-rgb), 0.25), transparent 60%);
  animation-duration: 36s;
  animation-delay: -14s;
  z-index: 1;
}

.aurora__noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
}

@keyframes auroraFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(5vw, -3vh) scale(1.08); }
  50% { transform: translate(-3vw, 4vh) scale(0.96); }
  75% { transform: translate(-4vw, -2vh) scale(1.04); }
}

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 60px);
  padding-top: max(20px, env(safe-area-inset-top));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--glass-border);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topbar__mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(var(--emerald-rgb),0.15), rgba(var(--teal-rgb),0.1));
  border: 1px solid var(--glass-border-strong);
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 16px;
  color: var(--emerald);
  box-shadow: 0 0 20px rgba(var(--emerald-rgb), 0.2);
}

.topbar__name {
  font-family: var(--font-headline);
  font-size: 18px;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-toggle__btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease-soft);
  font-family: inherit;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 600px;
  will-change: transform;
}

.lang-toggle__btn > * {
  pointer-events: none;
}

.lang-toggle__btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    var(--spot, 60px) circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--emerald-rgb), 0.15),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease-soft);
  pointer-events: none;
}

.lang-toggle__btn:hover::before { opacity: 1; }

.lang-toggle__btn:hover { color: var(--text-primary); }

.lang-toggle__btn.is-active {
  background: linear-gradient(135deg, rgba(var(--emerald-rgb),0.15), rgba(var(--teal-rgb),0.1));
  color: var(--emerald);
  border: 1px solid var(--glass-border-strong);
  box-shadow: 0 0 20px rgba(var(--emerald-rgb), 0.15);
}

.lang-toggle__btn.is-active::before {
  background: radial-gradient(
    var(--spot, 60px) circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.2),
    transparent 60%
  );
  opacity: 0;
}

.lang-toggle__btn.is-active:hover::before { opacity: 1; }

.lang-toggle__sep {
  color: var(--text-muted);
  font-size: 12px;
  user-select: none;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px clamp(20px, 5vw, 60px);
}

.hero__visual {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  transform-style: preserve-3d;
  outline: none;
  border: none;
  background: transparent;
}

.hero__stage {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  transform-style: preserve-3d;
}

/* --- Ring / Glowing "0" --- */
.ring {
  position: relative;
  width: min(420px, 70vw);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  transition: transform 0.1s ease-out;
  overflow: visible;
  outline: none;
  border: none;
  background: transparent;
  border-radius: 50%;
  transform: translateZ(0);
}

.ring > * {
  transform-style: preserve-3d;
}

.ring-layer--far { transform: translateZ(-60px) scale(1.02); }
.ring-layer--mid { transform: translateZ(0); }
.ring-layer--near { transform: translateZ(40px); }

.ring__outer,
.ring__mid,
.ring__inner,
.ring__core,
.ring__wave {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: transparent;
  mix-blend-mode: screen;
}

.ring__outer {
  display: none;
}

.ring__mid {
  inset: 11%;
  border: none;
  background:
    radial-gradient(circle at center,
      transparent 60%,
      rgba(var(--ring-glow-rgb), 0.25) 71%,
      rgba(var(--teal-rgb), 0.35) 73%,
      rgba(var(--ring-glow-rgb), 0.20) 76%,
      transparent 81%);
  box-shadow: none;
  filter: blur(0.5px);
  animation: ringBreath 6s ease-in-out infinite 0.5s;
  opacity: 0.7;
}

.ring__inner {
  inset: 24%;
  border: none;
  background:
    radial-gradient(circle at center,
      transparent 50%,
      rgba(var(--ring-glow-rgb), 0.30) 62%,
      rgba(var(--emerald-rgb), 0.45) 64%,
      rgba(var(--ring-glow-rgb), 0.25) 67%,
      transparent 72%);
  box-shadow: none;
  filter: blur(0.5px);
  animation: ringBreath 6s ease-in-out infinite 1s;
  opacity: 0.7;
}

.ring__core {
  inset: 38%;
  background: radial-gradient(circle,
    rgba(var(--emerald-rgb), 0.4) 0%,
    rgba(var(--teal-rgb), 0.15) 50%,
    transparent 70%);
  filter: blur(8px);
  animation: coreBreath 6s ease-in-out infinite 1.2s;
  mix-blend-mode: screen;
}

/* Heartbeat mode — activated after 10s of idle */
.ring.is-heartbeat .ring__mid {
  animation: heartbeat 1.8s ease-in-out infinite;
}

.ring.is-heartbeat .ring__inner {
  animation: heartbeat 1.8s ease-in-out infinite 0.1s;
}

.ring.is-heartbeat .ring__core {
  animation: heartbeat 1.8s ease-in-out infinite 0.05s;
  filter: blur(12px);
  background: radial-gradient(circle,
    rgba(0, 255, 170, 0.55) 0%,
    rgba(var(--teal-rgb), 0.25) 50%,
    transparent 70%);
  mix-blend-mode: screen;
}

/* Faded green outer ring — minimal size */
.ring__outer {
  display: block;
  inset: 5%;
  border: none;
  background:
    radial-gradient(circle at center,
      transparent 60%,
      rgba(var(--ring-glow-rgb), 0.06) 65%,
      rgba(var(--ring-glow-rgb), 0.08) 67%,
      rgba(var(--ring-glow-rgb), 0.05) 69%,
      transparent 72%);
  box-shadow: none;
  animation: ringBreath 8s ease-in-out infinite;
  filter: blur(1px);
  opacity: 0.6;
}

.ring.is-heartbeat .ring__outer {
  animation: heartbeatRing 2s ease-in-out infinite;
  background:
    radial-gradient(circle at center,
      transparent 60%,
      rgba(var(--ring-glow-rgb), 0.10) 65%,
      rgba(var(--ring-glow-rgb), 0.15) 67%,
      rgba(var(--ring-glow-rgb), 0.08) 69%,
      transparent 72%);
  box-shadow: none;
}

/* Mini heartbeat waves — soft glow pulse, no hard edges */
.ring__wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.5);
  border: none;
  background:
    radial-gradient(circle at center,
      transparent 55%,
      rgba(0, 255, 170, 0.15) 68%,
      rgba(0, 255, 170, 0.10) 75%,
      transparent 82%);
  filter: blur(4px);
}

.ring.is-heartbeat .ring__wave {
  animation: wavePulse 3.6s ease-out infinite;
}

.ring.is-heartbeat .ring__wave:nth-child(1) { animation-delay: 0s; }
.ring.is-heartbeat .ring__wave:nth-child(2) { animation-delay: 1.2s; }
.ring.is-heartbeat .ring__wave:nth-child(3) { animation-delay: 2.4s; }

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
    filter: brightness(1);
  }
  10% {
    transform: scale(1.06);
    opacity: 1;
    filter: brightness(1.35);
  }
  20% {
    transform: scale(0.985);
    opacity: 0.8;
    filter: brightness(0.95);
  }
  30% {
    transform: scale(1.03);
    opacity: 0.95;
    filter: brightness(1.25);
  }
  60% {
    transform: scale(1);
    opacity: 0.7;
    filter: brightness(1);
  }
}

@keyframes heartbeatRing {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  10% {
    transform: scale(1.04);
    opacity: 1;
    border-color: rgba(0, 255, 170, 0.5);
  }
  20% {
    transform: scale(0.99);
    opacity: 0.7;
  }
  30% {
    transform: scale(1.025);
    opacity: 0.9;
  }
  60% {
    transform: scale(1);
    opacity: 0.6;
  }
}

@keyframes wavePulse {
  0% {
    transform: scale(0.7);
    opacity: 0.6;
    filter: blur(1px);
  }
  50% {
    opacity: 0.4;
    filter: blur(1.5px);
  }
  100% {
    transform: scale(2);
    opacity: 0;
    filter: blur(3px);
  }
}

.ring__particles {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  left: -20%;
  top: -20%;
  pointer-events: none;
  background: transparent;
  mix-blend-mode: screen;
  filter: blur(0.5px);
  image-rendering: auto;
}

@keyframes ringBreath {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
    filter: brightness(1.3);
  }
}

@keyframes coreBreath {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

/* --- Hero copy --- */
.hero__copy {
  text-align: center;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeUp 1s var(--ease-soft) both;
  animation-delay: 0.2s;
  transform: translateZ(60px);
  will-change: transform;
}

.hero__headline {
  font-family: var(--font-headline);
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero__line { display: block; }

.hero__line--accent {
  background: linear-gradient(120deg, var(--emerald) 0%, var(--teal) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero__tagline {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 520px;
  font-weight: 400;
}

.hero__cta {
  margin-top: 12px;
}

/* --- Button --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.35s var(--ease-soft);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transform-style: preserve-3d;
  perspective: 800px;
  will-change: transform;
}

.btn > * {
  pointer-events: none;
  transform: translateZ(12px);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    var(--spot, 120px) circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.25),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease-soft);
  pointer-events: none;
  z-index: 1;
}

.btn:hover::before {
  opacity: 1;
}

.btn--primary {
  background: linear-gradient(118deg, #b98a2b, #d4a94e 50%, #ecd08d);
  color: var(--btn-text);
  box-shadow:
    0 12px 30px -10px rgba(154, 109, 29, 0.55),
    inset 0 1px 0 var(--btn-highlight);
}

.btn--primary:hover {
  box-shadow:
    0 0 0 1px rgba(var(--emerald-rgb),0.5),
    0 18px 50px -10px rgba(var(--emerald-rgb), 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn--primary:active { transform: translateY(0) !important; }

.btn__divider {
  color: rgba(4, 18, 15, 0.4);
  font-weight: 500;
}

.btn__arrow {
  transition: transform 0.3s var(--ease-soft);
  flex-shrink: 0;
}

.btn--primary:hover .btn__arrow { transform: translateX(4px) translateZ(12px); }

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

/* =========================================================
   FEATURES (glass cards)
   ========================================================= */
.features {
  padding: 80px clamp(20px, 5vw, 60px) 40px;
  display: flex;
  justify-content: center;
}

.features__grid {
  width: 100%;
  max-width: var(--max-width);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
  transition: all 0.4s var(--ease-soft);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
  transform: perspective(1000px) translateY(60px) rotateX(8deg) scale(0.95);
  opacity: 0;
}

.card.is-visible {
  transform: perspective(1000px) translateY(0) rotateX(0) scale(1);
  opacity: 1;
  transition: transform 0.9s var(--ease-soft), opacity 0.6s ease-out, border-color 0.4s var(--ease-soft);
}

.card:nth-child(1).is-visible { transition-delay: 0s; }
.card:nth-child(2).is-visible { transition-delay: 0.15s; }
.card:nth-child(3).is-visible { transition-delay: 0.3s; }

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(
      var(--spot, 200px) circle at var(--mx, 50%) var(--my, 50%),
      rgba(var(--emerald-rgb), 0.12),
      transparent 60%
    ),
    linear-gradient(135deg, rgba(var(--emerald-rgb),0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft);
  pointer-events: none;
}

.card::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--emerald-rgb),0.4), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft);
}

.card:hover {
  border-color: var(--glass-border-strong);
  box-shadow: var(--shadow-glass), var(--shadow-glow);
}

.card:hover::before,
.card:hover::after { opacity: 1; }

.card__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(var(--emerald-rgb),0.12), rgba(var(--teal-rgb),0.06));
  border: 1px solid var(--glass-border-strong);
  color: var(--emerald);
  margin-bottom: 22px;
  box-shadow: 0 0 30px rgba(var(--emerald-rgb), 0.1);
  transform: translateZ(30px);
  transition: transform 0.4s var(--ease-soft);
}

.card:hover .card__icon {
  transform: translateZ(40px) scale(1.05);
}

.card__title {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text-primary);
  transform: translateZ(20px);
}

.card__text {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  transform: translateZ(10px);
}

/* =========================================================
   STATS (social proof)
   ========================================================= */
.stats {
  padding: 40px clamp(20px, 5vw, 60px) 100px;
  display: flex;
  justify-content: center;
}

.stats__row {
  width: 100%;
  max-width: var(--max-width);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 36px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transform-style: preserve-3d;
  perspective: 800px;
}

.stat {
  text-align: center;
  padding: 16px 12px;
  border-right: 1px solid var(--glass-border);
  transform: translateZ(20px);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s var(--ease-soft), transform 0.8s var(--ease-soft);
}

.stat.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stat:nth-child(1) { transition-delay: 0s; }
.stat:nth-child(2) { transition-delay: 0.1s; }
.stat:nth-child(3) { transition-delay: 0.2s; }
.stat:nth-child(4) { transition-delay: 0.3s; }

.stat:last-child { border-right: none; }

.stat__number {
  font-family: var(--font-headline);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--emerald), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 8px;
}

.stat__unit {
  font-size: 0.6em;
  font-weight: 600;
  color: var(--text-secondary);
  -webkit-text-fill-color: var(--text-secondary);
}

.stat__label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 28px clamp(20px, 5vw, 60px);
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--glass-border);
  background: rgba(5, 7, 10, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer__mark {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--emerald-rgb),0.15), rgba(var(--teal-rgb),0.1));
  border: 1px solid var(--glass-border-strong);
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 12px;
  color: var(--emerald);
}

.footer__name {
  font-family: var(--font-headline);
  font-weight: 700;
  color: var(--text-primary);
}

.footer__dot { color: var(--text-muted); }

.footer__link {
  color: var(--text-secondary);
  transition: color 0.3s var(--ease-soft);
}

.footer__link:hover { color: var(--emerald); }

.footer__by {
  font-size: 13px;
  color: var(--text-muted);
}

/* Sound toggle */
.sound-toggle,
.theme-toggle {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s var(--ease-soft);
  position: relative;
  margin-right: 8px;
  vertical-align: middle;
}

html[dir="rtl"] .sound-toggle,
html[dir="rtl"] .theme-toggle {
  margin-right: 0;
  margin-left: 8px;
}

.sound-toggle:hover,
.theme-toggle:hover {
  color: var(--emerald);
  border-color: var(--glass-border-strong);
  box-shadow: 0 0 15px rgba(var(--emerald-rgb), 0.15);
}

.sound-toggle__icon,
.theme-toggle__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s var(--ease-soft);
}

.sound-toggle__icon--off { display: none; }
.sound-toggle.is-muted .sound-toggle__icon--on { display: none; }
.sound-toggle.is-muted .sound-toggle__icon--off { display: block; }

.theme-toggle__icon--sun { display: none; }
.theme-toggle.is-bright .theme-toggle__icon--moon { display: none; }
.theme-toggle.is-bright .theme-toggle__icon--sun { display: block; }

/* =========================================================
   DARK MODE — "Aurora Night" (opt-in; Golden Hour above is now default)
   Most selectors already read rgba(var(--emerald-rgb)) etc, so redefining
   the tokens here re-themes them automatically — only true hardcoded
   exceptions (the gold-gradient button) need an explicit override.
   ========================================================= */
[data-theme="dark"] {
  --bg-0: #05070a;
  --bg-1: #0a0f14;
  --bg-2: #0e151c;
  --ring-glow-rgb: 0, 255, 150;
  --topbar-bg: rgba(5, 7, 10, 0.4);
  --aurora-overlay: radial-gradient(ellipse at 50% 100%, rgba(0, 40, 50, 0.4), transparent 60%);

  --emerald: #00ffc2;
  --teal: #22d3ee;
  --cyan: #38bdf8;
  --mint: #5eead4;

  --emerald-rgb: 0, 255, 194;
  --teal-rgb: 34, 211, 238;
  --cyan-rgb: 56, 189, 248;

  --text-primary: #e8f6f3;
  --text-secondary: #8fb2b0;
  --text-muted: #5b7a78;

  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-strong: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.14);
  --glass-glow: rgba(0, 255, 194, 0.08);

  --ring-1: rgba(0, 255, 194, 0.9);
  --ring-2: rgba(34, 211, 238, 0.7);
  --ring-3: rgba(56, 189, 248, 0.4);

  --btn-text: #04120f;
  --btn-highlight: rgba(255, 255, 255, 0.3);

  --shadow-glass:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 20px 60px -20px rgba(0, 0, 0, 0.6);

  --shadow-glow:
    0 0 40px rgba(0, 255, 194, 0.12),
    0 0 80px rgba(34, 211, 238, 0.08);
}

[data-theme="dark"] .btn--primary {
  background: linear-gradient(135deg, rgba(0, 255, 194, 0.9), rgba(34, 211, 238, 0.8));
  box-shadow:
    0 0 0 1px rgba(0, 255, 194, 0.3),
    0 10px 40px -10px rgba(0, 255, 194, 0.5),
    inset 0 1px 0 var(--btn-highlight);
}

@media (hover: none) and (pointer: coarse) {
  .sound-toggle {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
  }
}

/* =========================================================
   RTL (Arabic)
   ========================================================= */
html[dir="rtl"] body {
  font-family: var(--font-arabic);
}

html[dir="rtl"] .hero__headline,
html[dir="rtl"] .card__title,
html[dir="rtl"] .stat__number,
html[dir="rtl"] .topbar__name,
html[dir="rtl"] .footer__name {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

html[dir="rtl"] .btn__arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn--primary:hover .btn__arrow { transform: scaleX(-1) translateX(-4px); }

html[dir="rtl"] .stat {
  border-right: none;
  border-left: 1px solid var(--glass-border);
}
html[dir="rtl"] .stat:last-child { border-left: none; }

html[dir="rtl"] .hero__line--accent {
  background-position: 100% 50%;
  animation: shimmerRTL 8s ease-in-out infinite;
}

@keyframes shimmerRTL {
  0%, 100% { background-position: 100% 50%; }
  50% { background-position: 0% 50%; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .features__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

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

  .stat {
    padding: 20px 12px;
    border-right: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
  }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) { border-bottom: none; }
  .stat:nth-child(4) { border-right: none; border-bottom: none; }

  html[dir="rtl"] .stat {
    border-right: none;
    border-left: 1px solid var(--glass-border);
  }
  html[dir="rtl"] .stat:nth-child(2) { border-left: none; }
  html[dir="rtl"] .stat:nth-child(even) { border-left: 1px solid var(--glass-border); }
  html[dir="rtl"] .stat:nth-child(2),
  html[dir="rtl"] .stat:nth-child(4) { border-left: none; }
}

@media (max-width: 600px) {
  .hero { padding: 40px 20px; min-height: auto; }
  .hero__stage { gap: 36px; }
  .ring { width: min(280px, 80vw); }

  .hero__headline { font-size: clamp(1.75rem, 7vw, 2.5rem); }
  .hero__tagline { font-size: 15px; }

  .features { padding: 48px 20px 16px; }
  .card { padding: 24px 20px; }
  .card__icon { width: 48px; height: 48px; margin-bottom: 16px; }
  .card__icon svg { width: 22px; height: 22px; }
  .card__title { font-size: 17px; }
  .card__text { font-size: 14px; line-height: 1.65; }

  .stats { padding: 16px 20px 60px; }
  .stats__row { padding: 20px 8px; }
  .stat__number { font-size: 1.5rem; }
  .stat__label { font-size: 12px; }

  /* Touch-friendly CTA — full width, large tap target */
  .btn {
    padding: 16px 26px;
    font-size: 15px;
    gap: 10px;
    width: 100%;
    justify-content: center;
    min-height: 52px;
  }
  .btn__arrow { width: 16px; height: 16px; }
  .hero__cta { width: 100%; max-width: 340px; }

  .topbar { padding: 14px 18px; padding-top: max(14px, env(safe-area-inset-top)); }
  .topbar__name { font-size: 16px; }

  .lang-toggle__btn {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 36px;
    min-width: 42px;
  }

  .footer { padding: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .footer__inner { justify-content: center; text-align: center; gap: 8px; }
  .footer__brand { font-size: 13px; }
  .footer__by { font-size: 12px; }
}

/* Very small phones (< 380px) */
@media (max-width: 380px) {
  .ring { width: min(220px, 78vw); }
  .hero__headline { font-size: 1.5rem; }
  .card { padding: 20px 16px; }
  .stat__number { font-size: 1.25rem; }
}

/* =========================================================
   ACCESSIBILITY & MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .aurora__blob { animation: none; }
}

/* =========================================================
   TOUCH / MOBILE — disable hover-only effects
   ========================================================= */
@media (hover: none) and (pointer: coarse) {
  /* No magnetic / tilt on touch devices — simple tap feedback instead */
  .card { transform: none !important; transition: transform 0.2s ease, opacity 0.6s ease; }
  .card:active {
    transform: scale(0.98) !important;
    box-shadow: var(--shadow-glass), var(--shadow-glow);
    border-color: var(--glass-border-strong);
  }
  .card.is-visible { transform: none !important; }
  .card::before { display: none; }

  .btn { transform: none !important; }
  .btn:active { transform: scale(0.97) !important; }
  .btn::before { display: none; }

  .lang-toggle__btn { transform: none !important; }
  .lang-toggle__btn:active { transform: scale(0.95) !important; }
  .lang-toggle__btn::before { display: none; }

  .footer__link { transform: none !important; }

  /* Reduce canvas particle count on mobile for performance */
  .ring__particles { opacity: 0.85; }
}

/* =========================================================
   MOUSE TRAIL — floating 0 / 1 glyphs
   ========================================================= */
.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.cursor-trail__glyph {
  position: absolute;
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: rgba(var(--emerald-rgb), 0.7);
  text-shadow:
    0 0 8px rgba(var(--emerald-rgb), 0.6),
    0 0 20px rgba(var(--teal-rgb), 0.4);
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
  animation: trailFloat 1s ease-out forwards;
}

@keyframes trailFloat {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateY(0);
    filter: brightness(1.5);
  }
  40% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.9) translateY(-12px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6) translateY(-32px);
    filter: brightness(0.5);
  }
}

/* =========================================================
   HOST RESET — neutralize any app shell / framework styles
   that might leak in when the page is served from a
   higher-level app shell (e.g. Quanta / Tailwind body).
   ========================================================= */
body {
  background: var(--bg-0) !important;
  color: var(--text-primary) !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--font-body) !important;
  line-height: 1.6 !important;
}

body * {
  box-sizing: border-box;
}

[data-zero-landing] {
  min-height: 100vh;
  position: relative;
}

/* Override any framework's default heading/paragraph margins */
[data-zero-landing] h1,
[data-zero-landing] h2,
[data-zero-landing] h3,
[data-zero-landing] p {
  margin: 0;
}
