/* ============================================================
   ARS REGIA — DESIGN TOKENS
   Dual-theme: "Alquimia Digital" (dark) · "Razón y Luz" (light)
   ============================================================ */

/* ── Dark theme — DEFAULT ("Alquimia Digital") ─────────────
   Combined selector: :root covers no-JS fallback; html.theme-dark
   is set by JS override. Both share identical values, defined once.
   ─────────────────────────────────────────────────────────── */
:root,
html.theme-dark {

  /* Base surfaces */
  --color-void:        #03030A;
  --color-base:        #0A0B10;
  --color-surface-1:   #1A1C23;
  --color-surface-2:   #14141F;
  --color-surface-3:   #1F2130;

  /* Gold spectrum (static — always gold) */
  --color-gold-100:    #FDF6DC;
  --color-gold-200:    #F5E6A0;
  --color-gold-300:    #E8C94A;
  --color-gold-400:    #D4AF37;
  --color-gold-500:    #B8972A;
  --color-gold-600:    #8B6E1A;
  --color-gold-700:    #5C4610;

  /* Blue spectrum (static — always blue) */
  --color-blue-100:    #DBEAFE;
  --color-blue-200:    #BFDBFE;
  --color-blue-300:    #60A5FA;
  --color-blue-400:    #3B82F6;
  --color-blue-500:    #2563EB;
  --color-blue-600:    #1E3A8A;
  --color-blue-700:    #1E2D5E;

  /* Semantic — accent / primary */
  --color-primary:            var(--color-gold-400);
  --color-primary-hover:      var(--color-gold-500);
  --color-primary-glow:       rgba(212, 175, 55, 0.25);
  --color-primary-glow-strong:rgba(212, 175, 55, 0.45);

  /* Gradient hero helpers */
  --gradient-hero-1: var(--color-gold-200);
  --gradient-hero-2: var(--color-gold-400);
  --gradient-hero-3: var(--color-gold-300);
  --gradient-hero-4: var(--color-gold-500);
  --gradient-hero-5: var(--color-gold-200);
  --hero-glow:       rgba(212, 175, 55, 0.06);
  --phil-glow:       rgba(212, 175, 55, 0.05);
  --cta-glow:        rgba(212, 175, 55, 0.08);

  /* Text hierarchy */
  --color-text-primary:   #E2E8F0;
  --color-text-secondary: #94A3B8;
  --color-text-tertiary:  #4A5568;
  --color-text-inverse:   #0A0A0F;

  /* Borders */
  --color-border-subtle:  rgba(212, 175, 55, 0.08);
  --color-border-default: rgba(212, 175, 55, 0.18);
  --color-border-strong:  rgba(212, 175, 55, 0.35);
  --color-border-active:  rgba(212, 175, 55, 0.65);

  /* Status */
  --color-success: #3D9970;
  --color-warning: #D4AF37;
  --color-error:   #C0392B;

  /* Glassmorphism */
  --glass-bg:          rgba(15, 15, 26, 0.60);
  --glass-bg-strong:   rgba(10, 10, 20, 0.90);
  --glass-backdrop:    blur(16px) saturate(180%);
  --glass-backdrop-sm: blur(8px) saturate(160%);
  --glass-border:      rgba(212, 175, 55, 0.15);

  /* Shadows */
  --shadow-sm:        0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md:        0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg:        0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl:        0 16px 64px rgba(0, 0, 0, 0.7);
  --shadow-accent-sm: 0 0 12px var(--color-primary-glow);
  --shadow-accent-md: 0 0 24px var(--color-primary-glow-strong);
  --shadow-accent-lg: 0 0 48px var(--color-primary-glow), 0 0 96px var(--color-primary-glow);
  /* Legacy aliases */
  --shadow-gold-sm:   var(--shadow-accent-sm);
  --shadow-gold-md:   var(--shadow-accent-md);
  --shadow-gold-lg:   var(--shadow-accent-lg);

  /* Nav scrolled shadow */
  --nav-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
  --scrollbar-track: var(--color-void);
  --scrollbar-thumb: var(--color-gold-700);
  --scrollbar-thumb-hover: var(--color-gold-600);
  --selection-bg: rgba(212, 175, 55, 0.25);
  --selection-color: var(--color-gold-200);

  /* Semantic aliases */
  --fondo-principal:  var(--color-base);
  --fondo-secundario: var(--color-surface-1);
  --texto-primario:   var(--color-text-primary);
  --color-acento:     var(--color-primary);

  /* Logo official colors — dark theme: light frame + gold compass */
  --logo-frame-color:  rgba(235, 235, 240, 0.85);
  --logo-shadow-color: #D4AF37;

  /* ── Typography ────────────────────────────────────────── */

  --font-display: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Fluid type scale */
  --text-xs:    clamp(0.7rem,  0.65rem + 0.25vw,  0.75rem);
  --text-sm:    clamp(0.8rem,  0.75rem + 0.25vw,  0.875rem);
  --text-base:  clamp(0.9rem,  0.85rem + 0.25vw,  1rem);
  --text-md:    clamp(1rem,    0.95rem + 0.3vw,   1.125rem);
  --text-lg:    clamp(1.1rem,  1rem + 0.5vw,      1.25rem);
  --text-xl:    clamp(1.2rem,  1.1rem + 0.75vw,   1.5rem);
  --text-2xl:   clamp(1.4rem,  1.2rem + 1vw,      1.875rem);
  --text-3xl:   clamp(1.75rem, 1.5rem + 1.25vw,   2.5rem);
  --text-4xl:   clamp(2rem,    1.75rem + 1.5vw,   3rem);
  --text-5xl:   clamp(2.5rem,  2rem + 2.5vw,      4rem);
  --text-hero:  clamp(3rem,    2.5rem + 3vw,       5.5rem);

  --leading-tight:   1.1;
  --leading-snug:    1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.75;

  --tracking-tighter: -0.02em;
  --tracking-tight:   -0.01em;
  --tracking-normal:   0em;
  --tracking-wide:     0.05em;
  --tracking-wider:    0.1em;
  --tracking-widest:   0.2em;

  /* ── Spacing ───────────────────────────────────────────── */

  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;
  --space-section: clamp(4rem, 8vw, 8rem);

  /* ── Layout ────────────────────────────────────────────── */

  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;

  /* ── Borders ───────────────────────────────────────────── */

  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* ── Transitions ───────────────────────────────────────── */

  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Z-index layers ────────────────────────────────────── */

  --z-base:     0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
}

/* ── Light theme — "Razón y Luz" ───────────────────────── */
/* Applied via system preference */
@media (prefers-color-scheme: light) {
  :root {
    --color-void:        #F8FAFC;
    --color-base:        #FFFFFF;
    --color-surface-1:   #F1F5F9;
    --color-surface-2:   #E2E8F0;
    --color-surface-3:   #CBD5E1;

    --color-primary:            #1E3A8A;
    --color-primary-hover:      #1E40AF;
    --color-primary-glow:       rgba(30, 58, 138, 0.20);
    --color-primary-glow-strong:rgba(30, 58, 138, 0.35);

    --gradient-hero-1: var(--color-blue-400);
    --gradient-hero-2: var(--color-blue-600);
    --gradient-hero-3: var(--color-blue-300);
    --gradient-hero-4: var(--color-blue-500);
    --gradient-hero-5: var(--color-blue-400);
    --hero-glow:       rgba(30, 58, 138, 0.06);
    --phil-glow:       rgba(30, 58, 138, 0.05);
    --cta-glow:        rgba(30, 58, 138, 0.07);

    --color-text-primary:   #0F172A;
    --color-text-secondary: #334155;
    --color-text-tertiary:  #64748B;
    --color-text-inverse:   #FFFFFF;

    --color-border-subtle:  rgba(30, 58, 138, 0.08);
    --color-border-default: rgba(30, 58, 138, 0.18);
    --color-border-strong:  rgba(30, 58, 138, 0.35);
    --color-border-active:  rgba(30, 58, 138, 0.65);

    --glass-bg:          rgba(248, 250, 252, 0.70);
    --glass-bg-strong:   rgba(255, 255, 255, 0.92);
    --glass-border:      rgba(30, 58, 138, 0.15);

    --nav-shadow: 0 4px 32px rgba(0, 0, 0, 0.10);
    --scrollbar-track: #F1F5F9;
    --scrollbar-thumb: #CBD5E1;
    --scrollbar-thumb-hover: #94A3B8;
    --selection-bg: rgba(30, 58, 138, 0.15);
    --selection-color: #1E3A8A;

    /* Semantic aliases */
    --fondo-principal:  var(--color-base);
    --fondo-secundario: var(--color-surface-1);
    --texto-primario:   var(--color-text-primary);
    --color-acento:     var(--color-primary);

    /* Logo official colors — light theme: black frame + gray compass */
    --logo-frame-color:  #111111;
    --logo-shadow-color: #9CA3AF;
  }
}

/* ── Manual override — force LIGHT ─────────────────────── */
html.theme-light {
  --color-void:        #F8FAFC;
  --color-base:        #FFFFFF;
  --color-surface-1:   #F1F5F9;
  --color-surface-2:   #E2E8F0;
  --color-surface-3:   #CBD5E1;

  --color-primary:            #1E3A8A;
  --color-primary-hover:      #1E40AF;
  --color-primary-glow:       rgba(30, 58, 138, 0.20);
  --color-primary-glow-strong:rgba(30, 58, 138, 0.35);

  --gradient-hero-1: #60A5FA;
  --gradient-hero-2: #1E3A8A;
  --gradient-hero-3: #3B82F6;
  --gradient-hero-4: #2563EB;
  --gradient-hero-5: #60A5FA;
  --hero-glow:       rgba(30, 58, 138, 0.06);
  --phil-glow:       rgba(30, 58, 138, 0.05);
  --cta-glow:        rgba(30, 58, 138, 0.07);

  --color-text-primary:   #0F172A;
  --color-text-secondary: #334155;
  --color-text-tertiary:  #64748B;
  --color-text-inverse:   #FFFFFF;

  --color-border-subtle:  rgba(30, 58, 138, 0.08);
  --color-border-default: rgba(30, 58, 138, 0.18);
  --color-border-strong:  rgba(30, 58, 138, 0.35);
  --color-border-active:  rgba(30, 58, 138, 0.65);

  --glass-bg:          rgba(248, 250, 252, 0.70);
  --glass-bg-strong:   rgba(255, 255, 255, 0.92);
  --glass-border:      rgba(30, 58, 138, 0.15);

  --nav-shadow: 0 4px 32px rgba(0, 0, 0, 0.10);
  --scrollbar-track: #F1F5F9;
  --scrollbar-thumb: #CBD5E1;
  --scrollbar-thumb-hover: #94A3B8;
  --selection-bg: rgba(30, 58, 138, 0.15);
  --selection-color: #1E3A8A;

  /* Semantic aliases */
  --fondo-principal:  var(--color-base);
  --fondo-secundario: var(--color-surface-1);
  --texto-primario:   var(--color-text-primary);
  --color-acento:     var(--color-primary);

  /* Logo official colors — light theme: black frame + gray compass */
  --logo-frame-color:  #111111;
  --logo-shadow-color: #9CA3AF;
}
/* ============================================================
   ARS REGIA — BASE STYLES
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: transparent; /* canvas provides the bg; html holds the fallback */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: color 0.4s ease;
}

html {
  background-color: var(--color-base);
  transition: background-color 0.4s ease;
}

/* ── Custom scrollbar ──────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* ── Selection ─────────────────────────────────────────── */

::selection {
  background: var(--selection-bg);
  color: var(--selection-color);
}

/* ── Typography base ───────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

p {
  line-height: var(--leading-relaxed);
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
}

/* ── Focus management ──────────────────────────────────── */

:focus {
  outline: none;
}

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

/* ── Section layout helper ─────────────────────────────── */

.section {
  padding: var(--space-section) 0;
  position: relative;
}

.section__container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* ── Divider ───────────────────────────────────────────── */

.divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin: var(--space-6) auto;
}

.divider--flush {
  margin: 0;
}

.footer__logo-icon {
  width: auto;
  height: 28px;
}

/* Logo SVG in legal page nav header */
.nav__logo-mark {
  width: auto;
  height: 42px;
}

/* ── Screen-reader only ────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Reduced motion ────────────────────────────────────── */

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

  html {
    scroll-behavior: auto;
  }
}
/* ============================================================
   ARS REGIA — ANIMATIONS & KEYFRAMES
   ============================================================ */

/* ── Gold shimmer on gradient text ────────────────────── */

@keyframes shimmer-text {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ── Slow symbol rotation (hero background) ────────────── */

@keyframes symbol-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes symbol-rotate-reverse {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* ── CTA button pulsing glow ────────────────────────────── */

@keyframes pulse-glow {
  0%, 100% {
    box-shadow:
      0 0 24px var(--color-primary-glow),
      0 0 48px var(--color-primary-glow),
      inset 0 1px 0 rgba(255, 255, 255, 0.10);
  }
  50% {
    box-shadow:
      0 0 40px var(--color-primary-glow-strong),
      0 0 80px var(--color-primary-glow),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

/* ── Scroll indicator bounce ────────────────────────────── */

@keyframes bounce-gentle {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── Section entrance (IntersectionObserver) ────────────── */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-left {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-right {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Nav link underline slide ───────────────────────────── */

@keyframes underline-slide {
  from { right: 100%; }
  to   { right: 0; }
}

/* ── Hero eyebrow line expand ───────────────────────────── */

@keyframes line-expand {
  from { width: 0; }
  to   { width: 40px; }
}

/* ── Process step connector draw ────────────────────────── */

@keyframes dash-draw {
  from { stroke-dashoffset: 200; }
  to   { stroke-dashoffset: 0; }
}

/* ── Mobile menu stagger entrance ───────────────────────── */

@keyframes menu-item-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Hero headline lines cascade ────────────────────────── */

@keyframes headline-cascade {
  from {
    opacity: 0;
    transform: translateY(40px) skewY(2deg);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) skewY(0deg);
    filter: blur(0);
  }
}

/* ── Card float on hover ────────────────────────────────── */

@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* ── Orbit ring ─────────────────────────────────────────── */

@keyframes orbit {
  from { transform: rotate(0deg) translateX(60px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(60px) rotate(-360deg); }
}

/* ── Section-level scroll reveal (transition, not animation) */
/* Applied to entire <section> blocks; children animate independently */

.section--reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity  700ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 700ms cubic-bezier(0.4, 0, 0.2, 1);
  /* CSS-only safety net: reveal after 2s if JS/IntersectionObserver fails */
  animation: _reveal-fallback 700ms ease-out 2s both;
}

@keyframes _reveal-fallback {
  to { opacity: 1; transform: translateY(0); }
}

.section--reveal.is-visible {
  opacity: 1;
  transform: none;
  animation: none; /* JS handled it — cancel the CSS fallback */
}

@media (prefers-reduced-motion: reduce) {
  .section--reveal {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}

/* ── Utility animation classes ──────────────────────────── */

.animate-ready {
  opacity: 0;
  transform: translateY(28px);
}

.animate-in {
  animation: fade-up 650ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-in--left {
  animation: fade-left 650ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-in--right {
  animation: fade-right 650ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-in--fade {
  animation: fade-in 650ms ease both;
}

/* Stagger delays */
.animate-delay-1  { animation-delay: 100ms; }
.animate-delay-2  { animation-delay: 200ms; }
.animate-delay-3  { animation-delay: 300ms; }
.animate-delay-4  { animation-delay: 400ms; }
.animate-delay-5  { animation-delay: 500ms; }
.animate-delay-6  { animation-delay: 600ms; }
.animate-delay-7  { animation-delay: 700ms; }
/* ============================================================
   ARS REGIA — COMPONENTS
   (Nav, Buttons, Cards, FAQ, Language Switcher)
   ============================================================ */

/* ── NAVIGATION ────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: var(--space-5) 0;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    padding var(--transition-base),
    box-shadow var(--transition-base);
}

.nav.is-scrolled {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: var(--space-3) 0;
  box-shadow: var(--nav-shadow);
}

.nav__container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

/* ── Logo PNG wrapper ───────────────────────────────────── */
#logo-wrapper {
  position: relative;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#logo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Default (dark): show night logo */
.logo-img--day   { display: none; }
.logo-img--night { display: block; }

@media (prefers-color-scheme: light) {
  .logo-img--day   { display: block; }
  .logo-img--night { display: none; }
}

html.theme-dark  .logo-img--day   { display: none; }
html.theme-dark  .logo-img--night { display: block; }
html.theme-light .logo-img--night { display: none; }
html.theme-light .logo-img--day   { display: block; }


.nav__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  color: var(--color-primary);
  text-transform: uppercase;
  line-height: 1;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--color-primary);
  transition: right var(--transition-base);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--color-primary);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  right: 0;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

/* Language switcher in nav */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--color-border-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-2);
}

.lang-switcher__btn {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}

.lang-switcher__btn:hover {
  color: var(--color-text-secondary);
}

.lang-switcher__btn.is-active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.lang-switcher--mobile {
  margin-top: var(--space-4);
}

/* Theme toggle button (sun/moon) */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-border-subtle);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-base);
}

/* Moon shown in dark mode, sun in light mode */
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none;  }

html.theme-light .theme-toggle .icon-moon { display: none;  }
html.theme-light .theme-toggle .icon-sun  { display: block; }

@media (prefers-color-scheme: light) {
  .theme-toggle .icon-moon { display: none;  }
  .theme-toggle .icon-sun  { display: block; }
}
/* Re-show moon if user manually set dark while system is light */
html.theme-dark .theme-toggle .icon-moon { display: block; }
html.theme-dark .theme-toggle .icon-sun  { display: none;  }

/* Hamburger menu button */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 6px;
  transition: border-color var(--transition-fast);
}

.nav__burger:hover {
  border-color: var(--color-primary);
}

.nav__burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--color-text-secondary);
  border-radius: 1px;
  transition:
    transform var(--transition-base),
    opacity var(--transition-base),
    background var(--transition-fast);
}

.nav__burger.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
  background: var(--color-primary);
}
.nav__burger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__burger.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
  background: var(--color-primary);
}

/* Mobile overlay menu */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-sticky) - 1);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-section);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.nav__mobile.is-open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.nav__mobile-link {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
  animation: menu-item-in 400ms ease both;
}

.nav__mobile-link:hover {
  color: var(--color-primary);
}

/* ── BUTTONS ────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  transition:
    background var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}

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

/* Sizes */
.btn--sm  { padding: var(--space-2) var(--space-5);  font-size: var(--text-xs); height: 34px; }
.btn--md  { padding: var(--space-3) var(--space-8);  font-size: var(--text-sm); height: 42px; }
.btn--lg  { padding: var(--space-4) var(--space-10); font-size: var(--text-base); height: 50px; }
.btn--xl  { padding: var(--space-5) var(--space-12); font-size: var(--text-md); height: 60px; }

/* Primary — gold fill */
.btn--primary {
  background: linear-gradient(135deg, var(--color-gold-300) 0%, var(--color-gold-500) 100%);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-gold-sm);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-gold-200) 0%, var(--color-gold-400) 100%);
  box-shadow: var(--shadow-gold-md);
  transform: translateY(-2px);
}

/* Ghost — accent outline */
.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-border-strong);
}
.btn--ghost:hover {
  background: var(--color-border-subtle);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-accent-sm);
  transform: translateY(-2px);
}

/* Glow — pulsing animation */
.btn--glow {
  background: linear-gradient(135deg, var(--color-gold-300) 0%, var(--color-gold-500) 100%);
  color: var(--color-text-inverse);
  animation: pulse-glow 3s ease-in-out infinite;
}
.btn--glow:hover {
  animation-play-state: paused;
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold-lg);
}

/* ── Button light-theme overrides ───────────────────────── */
@media (prefers-color-scheme: light) {
  .btn--primary {
    background: linear-gradient(135deg, var(--color-blue-400) 0%, var(--color-blue-600) 100%);
  }
  .btn--primary:hover {
    background: linear-gradient(135deg, var(--color-blue-300) 0%, var(--color-blue-500) 100%);
  }
  .btn--glow {
    background: linear-gradient(135deg, var(--color-blue-400) 0%, var(--color-blue-600) 100%);
  }
  .btn--glow:hover {
    box-shadow: var(--shadow-accent-lg);
  }
}

html.theme-light .btn--primary {
  background: linear-gradient(135deg, var(--color-blue-400) 0%, var(--color-blue-600) 100%);
}
html.theme-light .btn--primary:hover {
  background: linear-gradient(135deg, var(--color-blue-300) 0%, var(--color-blue-500) 100%);
}
html.theme-light .btn--glow {
  background: linear-gradient(135deg, var(--color-blue-400) 0%, var(--color-blue-600) 100%);
}
html.theme-light .btn--glow:hover {
  box-shadow: var(--shadow-accent-lg);
}

/* ── Card light-theme overrides ─────────────────────────── */

html.theme-light .card {
  box-shadow: 0 2px 12px rgba(30, 58, 138, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  border-color: rgba(30, 58, 138, 0.12);
}

html.theme-light .card:hover {
  box-shadow: 0 8px 32px rgba(30, 58, 138, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: rgba(30, 58, 138, 0.22);
}

@media (prefers-color-scheme: light) {
  .card {
    box-shadow: 0 2px 12px rgba(30, 58, 138, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    border-color: rgba(30, 58, 138, 0.12);
  }

  .card:hover {
    box-shadow: 0 8px 32px rgba(30, 58, 138, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: rgba(30, 58, 138, 0.22);
  }
}

/* ── CARDS ──────────────────────────────────────────────── */

.card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop-sm);
  -webkit-backdrop-filter: var(--glass-backdrop-sm);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  will-change: transform;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform 550ms cubic-bezier(0.23, 1, 0.32, 1);
}

.card--feature {
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.card--feature:hover {
  border-color: var(--color-border-default);
  box-shadow:
    var(--shadow-gold-sm),
    var(--shadow-lg),
    0 28px 56px rgba(0, 0, 0, 0.45);
}

.card__icon {
  width: 2rem;
  height: 2rem;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  display: block;
}

.card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-primary);
  margin: 0;
}

.card__body {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  flex: 1;
}

/* ── FAQ ACCORDION ──────────────────────────────────────── */

.faq__list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq__item {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop-sm);
  -webkit-backdrop-filter: var(--glass-backdrop-sm);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.faq__item:hover {
  border-color: var(--color-border-default);
}

.faq__item.is-open {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-gold-sm);
}

.faq__question-wrap {
  margin: 0;
}

.faq__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  transition: color var(--transition-fast);
}

.faq__trigger:hover,
.faq__item.is-open .faq__trigger {
  color: var(--color-primary);
}

.faq__trigger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  border-radius: var(--radius-xl);
}

.faq__question-text {
  flex: 1;
  line-height: var(--leading-snug);
}

.faq__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  opacity: 0.6;
  transition:
    transform var(--transition-base),
    opacity var(--transition-fast);
}

.faq__trigger:hover .faq__icon,
.faq__item.is-open .faq__trigger .faq__icon {
  opacity: 1;
}

.faq__item.is-open .faq__icon {
  transform: rotate(180deg);  /* chevron points up when open */
}

/* Answer panel — smooth max-height animation */
.faq__answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 350ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 250ms ease;
}

.faq__answer:not([hidden]) {
  opacity: 1;
}

/* Keep display:block so max-height can animate from 0 */
.faq__answer[hidden] {
  display: block !important;
}

.faq__answer-inner {
  padding: 0 var(--space-6) var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
}

.faq__answer-inner p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin: var(--space-4) 0 0;
}

/* ── BADGE / TAG ────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-border-subtle);
  color: var(--color-primary);
  border: 1px solid var(--color-border-default);
}

/* ── ACCENT SEPARATOR LINE ──────────────────────────────── */

.gold-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-border-default) 20%,
    var(--color-primary) 50%,
    var(--color-border-default) 80%,
    transparent 100%
  );
}

/* ── LOGO NODES ─────────────────────────────────────────── */

.logo-node {
  fill: var(--logo-frame-color);
  opacity: 0.5;
  transition: fill 0.35s ease, opacity 0.35s ease, filter 0.35s ease;
}

/* ── FORM FIELDS ────────────────────────────────────────── */

.form__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Honeypot trap — invisible to humans, visible to bots */
.form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

.form__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.form__input,
.form__textarea {
  background: var(--glass-bg);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  outline: none;
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--color-text-tertiary);
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form__textarea {
  resize: vertical;
  min-height: 96px;
}

/* ── FAQ GROUP ──────────────────────────────────────────── */

.faq__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq__group-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-primary);
  padding: var(--space-4) 0 var(--space-2);
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: var(--space-1);
  opacity: 0.8;
}
/* ============================================================
   ARS REGIA — SECTION STYLES
   ============================================================ */

/* ── HERO ───────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* No background — canvas shows through as page background */
}

/* Full-page generative background — fixed behind all content.
   z-index: 0 (not -1) is required for iOS Safari: negative z-index on
   fixed elements gets composited behind the scroll layer on mobile,
   making the canvas invisible as you scroll past the hero.
   Sections (position:relative, z-index:auto) are painted after the
   canvas in DOM order, so they naturally sit on top — transparent
   sections reveal the canvas without any additional z-index stacking. */
#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ── Official Logo Widget (hero background) ─────────────── */
.hero__logo-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.hero__logo-bg .logo-widget {
  width: min(62vw, 62vh);
  height: min(62vw, 62vh);
  animation: symbol-rotate 360s linear infinite;
  will-change: transform;
}

/* Individual Sefirot circles — animated by logo-animation.js */
.sefira-node {
  fill: transparent;
  stroke: var(--color-border-default);
  stroke-width: 1.5;
  transition:
    fill 0.4s ease,
    stroke 0.4s ease,
    filter 0.4s ease;
}

/* Connection paths between Sefirot */
.sefira-path {
  stroke: var(--color-border-subtle);
  stroke-width: 1;
  fill: none;
  opacity: 0.6;
}

.hero__content {
  position: relative;
  z-index: var(--z-raised);
  text-align: center;
  max-width: var(--container-xl);
  padding: calc(var(--space-section) + 60px) var(--space-6) var(--space-section);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-primary);
}

.hero__eyebrow-line {
  display: block;
  width: 40px;
  height: 1px;
}

.hero__eyebrow-line:first-child {
  background: linear-gradient(90deg, transparent, var(--color-primary));
}

.hero__eyebrow-line:last-child {
  background: linear-gradient(90deg, var(--color-primary), transparent);
}

.hero__headline {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.hero__headline-line {
  display: block;
  overflow: hidden;
}

.hero__headline-line--1 {
  animation: headline-cascade 800ms cubic-bezier(0.4, 0, 0.2, 1) 200ms both;
}

.hero__headline-line--2 {
  animation: headline-cascade 800ms cubic-bezier(0.4, 0, 0.2, 1) 350ms both;
}

.hero__headline-line--3 {
  animation: headline-cascade 800ms cubic-bezier(0.4, 0, 0.2, 1) 500ms both;
}

.hero__headline-accent {
  font-style: normal;
  background: linear-gradient(
    135deg,
    var(--gradient-hero-1) 0%,
    var(--gradient-hero-2) 35%,
    var(--gradient-hero-3) 60%,
    var(--gradient-hero-4) 85%,
    var(--gradient-hero-5) 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    headline-cascade 800ms cubic-bezier(0.4, 0, 0.2, 1) 500ms both,
    shimmer-text 8s linear 1300ms infinite;
}

.hero__subheadline {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0;
  animation: fade-up 800ms ease 700ms both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  animation: fade-up 800ms ease 900ms both;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding-top: var(--space-4);
  animation: fade-up 800ms ease 1100ms both;
}

.hero__meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.hero__meta-number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  line-height: 1;
}

.hero__meta-label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

.hero__meta-divider {
  font-size: var(--text-xs);
  color: var(--color-border-default);
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-tertiary);
  text-decoration: none;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  transition: color var(--transition-base);
  animation: bounce-gentle 2.5s ease-in-out infinite;
}

.hero__scroll:hover {
  color: var(--color-primary);
}

.hero__scroll-arrow {
  font-size: var(--text-lg);
}

/* ── COUNTDOWN ──────────────────────────────────────────── */

.hero__countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  animation: fade-up 800ms ease 1100ms both;
}

.hero__countdown-label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.hero__countdown-display {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
}

.hero__countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  min-width: 60px;
}

.hero__countdown-num {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero__countdown-unit-label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.hero__countdown-sep {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  opacity: 0.45;
  padding-bottom: var(--space-5);
  line-height: 1;
}

.hero__countdown-tagline {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  text-align: center;
  max-width: 480px;
  line-height: var(--leading-relaxed);
}

/* ── CAPABILITIES ───────────────────────────────────────── */

.capabilities {
  /* transparent — canvas shows through */
}

.capabilities__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

/* ── PHILOSOPHY ─────────────────────────────────────────── */

.philosophy {
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, var(--phil-glow) 0%, transparent 70%);
  overflow: hidden;
}

.philosophy__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.philosophy__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Modifier: left-aligned title within philosophy section */
.section__title--left {
  text-align: left;
  margin-bottom: var(--space-6);
}

.philosophy__body {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.philosophy__quote-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
  background: var(--glass-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  position: relative;
}

.philosophy__quote-mark {
  font-family: var(--font-display);
  font-size: 8rem;
  line-height: 0.6;
  color: var(--color-border-default);
  position: absolute;
  top: var(--space-6);
  left: var(--space-8);
  pointer-events: none;
}

.philosophy__quote {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: italic;
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
  text-align: center;
  position: relative;
  z-index: 1;
}

.philosophy__quote-source {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-primary);
  text-align: center;
}

/* ── HOW IT WORKS ───────────────────────────────────────── */

.how-it-works {
  /* transparent — canvas shows through */
}

.how-it-works__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

/* Connecting line between steps */
.how-it-works__steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(12.5% + 28px);
  right: calc(12.5% + 28px);
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--color-border-default) 0%,
    var(--color-primary) 33%,
    var(--color-primary) 66%,
    var(--color-border-default) 100%
  );
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding: 0 var(--space-4);
  position: relative;
  z-index: 1;
}

.step__number {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-accent-sm);
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-wide);
  margin: 0;
}

.step__body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ── HOW IT WORKS — MISSION TEXT ────────────────────────── */

.how-it-works__mission {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.how-it-works__mission p {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  text-align: center;
}

/* ── FAQ SECTION ────────────────────────────────────────── */

.faq {
  /* transparent — canvas shows through */
}

/* ── CTA ────────────────────────────────────────────────── */

.cta-block {
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, var(--cta-glow) 0%, transparent 60%);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
  text-align: center;
  overflow: hidden;
  position: relative;
}

.cta-block__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--space-section) var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-10);
  align-items: start;
}

.cta-block__form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  background: var(--glass-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  text-align: left;
}

.cta-block__form-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  line-height: var(--leading-snug);
  margin: 0;
}

.cta-block__form-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

.cta-block__notify-form,
.cta-block__rep-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cta-block__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.cta-block__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 520px;
}

.cta-block__email-form {
  display: flex;
  gap: var(--space-3);
  width: 100%;
  max-width: 480px;
}

.cta-block__input {
  flex: 1;
  background: var(--glass-bg);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast);
  outline: none;
}

.cta-block__input::placeholder {
  color: var(--color-text-tertiary);
}

.cta-block__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

/* Decorative glow orb */
.cta-block__orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ── FOOTER ─────────────────────────────────────────────── */

.footer {
  /* transparent — canvas shows through */
  border-top: 1px solid var(--color-border-subtle);
  padding: var(--space-16) 0 var(--space-8);
}

.footer__grid {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-border-subtle);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.footer__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-primary);
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: var(--leading-relaxed);
  max-width: 260px;
}

.footer__col-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-4);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer__bottom {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  /* Always visible — never part of the scroll-animation system */
  opacity: 1 !important;
  transform: none !important;
}

.footer__legal {
  display: flex;
  gap: var(--space-6);
}

.footer__legal a {
  font-size: var(--text-xs);
  color: #94A3B8;          /* light slate — readable on dark canvas bg */
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__legal a:hover {
  color: var(--color-primary);
}

.footer__copyright {
  font-size: var(--text-xs);
  color: #94A3B8;
  letter-spacing: var(--tracking-wide);
}

/* ── Footer: light-mode — explicit dark colors ───────────── */

html.theme-light .footer__legal a {
  color: #1E3A8A;          /* navy — readable on white bg */
}

html.theme-light .footer__legal a:hover {
  color: #1E40AF;
}

html.theme-light .footer__copyright {
  color: #334155;
}

@media (prefers-color-scheme: light) {
  .footer__legal a {
    color: #1E3A8A;
  }

  .footer__legal a:hover {
    color: #1E40AF;
  }

  .footer__copyright {
    color: #334155;
  }
}

/* ── Light mode: section backgrounds — transparent to show canvas  */

html.theme-light .capabilities,
html.theme-light .how-it-works,
html.theme-light .faq {
  background: transparent;
}

html.theme-light .philosophy {
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, var(--phil-glow) 0%, transparent 70%);
}

@media (prefers-color-scheme: light) {
  .capabilities,
  .how-it-works,
  .faq {
    background: transparent;
  }

  .philosophy {
    background:
      radial-gradient(ellipse 60% 50% at 80% 50%, var(--phil-glow) 0%, transparent 70%);
  }
}


/* ── LEGAL PAGES ────────────────────────────────────────── */

.legal-page {
  min-height: 100svh;
  padding-top: 100px;
  padding-bottom: var(--space-section);
}

.legal-page__container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.legal__header {
  text-align: center;
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border-subtle);
}

.legal__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
  line-height: var(--leading-snug);
}

.legal__date {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  letter-spacing: var(--tracking-wide);
}

.legal__intro {
  background: var(--glass-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-10);
}

.legal__intro p {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  font-size: var(--text-md);
  margin: 0;
}

.legal__section {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border-subtle);
}

.legal__section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.legal__section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  margin-bottom: var(--space-5);
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-primary);
  line-height: var(--leading-snug);
}

.legal__section-body {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
}

.legal__section-body p {
  margin-bottom: var(--space-4);
}

.legal__section-body p:last-child {
  margin-bottom: 0;
}

.legal__section-body ul {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.legal__section-body li {
  padding-left: var(--space-6);
  position: relative;
  line-height: var(--leading-relaxed);
}

.legal__section-body li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

.legal__section-body strong {
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold);
}

.legal__section-body em {
  color: var(--color-primary);
  font-style: normal;
  font-weight: var(--weight-medium);
}

.legal__link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition-fast);
}

.legal__link:hover {
  opacity: 0.75;
}

.legal-loading {
  text-align: center;
  padding: var(--space-16);
  color: var(--color-text-tertiary);
  font-size: var(--text-lg);
}

@media (max-width: 480px) {
  .legal-page {
    padding-top: 80px;
  }

  .legal-page__container {
    padding: 0 var(--space-4);
  }

  .legal__title {
    font-size: var(--text-2xl);
  }

  .legal__section-title {
    font-size: var(--text-lg);
  }
}
/* ============================================================
   ARS REGIA — RESPONSIVE (Mobile-first breakpoints)
   ============================================================ */

/* ── Large tablet / small desktop: max 1024px ───────────── */

@media (max-width: 1024px) {
  .philosophy__inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .philosophy__quote-wrap {
    padding: var(--space-8);
  }

  /* CTA 2-col → 1-col on small desktop */
  .cta-block__inner {
    grid-template-columns: 1fr;
  }
}

/* ── Tablet: max 768px ──────────────────────────────────── */

@media (max-width: 768px) {
  /* Nav */
  .nav__links {
    display: none;
  }

  .nav__actions .btn--sm {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  /* Hero */
  .hero__subheadline {
    font-size: var(--text-md);
  }

  /* Countdown */
  .hero__countdown-num {
    font-size: var(--text-3xl);
  }

  .hero__countdown-unit {
    min-width: 48px;
  }

  /* Capabilities */
  .capabilities__grid {
    grid-template-columns: 1fr;
  }

  /* How it works */
  .how-it-works__mission {
    padding: 0 var(--space-4);
  }

  /* Philosophy */
  .philosophy__quote-wrap {
    padding: var(--space-6);
  }

  .philosophy__quote {
    font-size: var(--text-xl);
  }

  .philosophy__quote-mark {
    font-size: 5rem;
  }

  /* CTA forms */
  .cta-block__inner {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
}

/* ── Mobile: max 480px ──────────────────────────────────── */

@media (max-width: 480px) {
  /* Nav */
  .nav__container {
    padding: 0 var(--space-4);
  }

  .lang-switcher {
    display: none; /* Hidden in nav, accessible in mobile menu */
  }

  /* Hero */
  .hero__content {
    padding-top: calc(var(--space-section) + 56px); /* reduced: 80px was excessive */
    gap: var(--space-6);
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Countdown */
  .hero__countdown-display {
    gap: var(--space-2);
  }

  .hero__countdown-num {
    font-size: var(--text-2xl);
  }

  .hero__countdown-unit {
    min-width: 38px;
  }

  .hero__countdown-sep {
    font-size: var(--text-xl);
    padding-bottom: var(--space-4);
  }

  /* Section headers */
  .section__header {
    margin-bottom: var(--space-10); /* desktop: 64px → mobile: 40px */
  }

  .section__title {
    font-size: var(--text-3xl);
  }

  /* FAQ */
  .faq__trigger {
    padding: var(--space-4) var(--space-4);
    font-size: var(--text-sm);
  }

  .faq__answer-inner {
    padding: 0 var(--space-4) var(--space-4);
  }

  /* CTA form groups */
  .cta-block__form-group {
    padding: var(--space-6);
  }

  /* Sections */
  .section__container {
    padding: 0 var(--space-4);
  }

  /* Prevent iOS Safari auto-zoom on input focus (triggers when font-size < 16px) */
  .form__input,
  .form__textarea {
    font-size: 1rem;
  }
}

/* ── Small mobile: max 360px ────────────────────────────── */

@media (max-width: 360px) {
  .hero__eyebrow {
    font-size: 0.6rem;
  }

  .hero__eyebrow-line {
    width: 20px;
  }
}

/* ── Wide desktop: min 1440px ───────────────────────────── */
/* capabilities__grid stays 3-col at all desktop widths (3×3 layout) */
