/* ==========================================================================
   SOMA RÉSINES — APPLE PRISTINE LIGHT GLASSMORPHISM DESIGN SYSTEM
   Matches the Official 2026/2027 Architectural Catalogue
   ========================================================================== */
/* Fonts preloaded asynchronously in HTML head */

:root {
  /* ==========================================================================
     LIGHT THEME PALETTE (Default — Catalogue Style)
     ========================================================================== */
  --bg-base: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-solid: #ffffff;
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  
  /* Apple Light Glass Highlights */
  --glass-border: rgba(0, 0, 0, 0.07);
  --glass-border-bright: rgba(0, 113, 227, 0.28);
  --glass-specular: rgba(255, 255, 255, 0.9);
  --glass-surface: rgba(255, 255, 255, 0.7);
  --glass-surface-active: rgba(255, 255, 255, 0.95);

  /* Brand Accents */
  --cyan-primary: #0071e3;
  --cyan-bright: #0084ff;
  --cyan-neon: #0284c7;
  --cyan-glow: rgba(0, 113, 227, 0.18);
  --cyan-tint: rgba(0, 113, 227, 0.07);

  --orange-primary: #ff6b00;
  --orange-bright: #f97316;
  --orange-neon: #ea580c;
  --orange-glow: rgba(255, 107, 0, 0.2);
  --orange-tint: rgba(255, 107, 0, 0.08);

  --accent-emerald: #059669;
  --accent-emerald-tint: rgba(5, 150, 105, 0.08);
  --accent-gold: #d97706;
  --accent-gold-tint: rgba(217, 119, 6, 0.08);

  /* Typography Colors (Crisp Light Contrast) */
  --text-main: #1d1d1f;
  --text-heading: #0a0e1a;
  --text-sub: #4b5563;
  --text-muted: #6b7280;
  --text-highlight: #000000;

  /* Typography Families */
  --font-en: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-ar: 'Cairo', system-ui, sans-serif;
  --current-font: var(--font-ar);

  /* Shadows & Lighting */
  --glass-shadow: 0 10px 35px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  --glass-shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.09), 0 0 30px rgba(0, 113, 227, 0.08);
  --card-shadow-heavy: 0 25px 60px rgba(15, 23, 42, 0.08);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --radius-pill: 9999px;

  /* Emil Kowalski & Apple Motion Tokens */
  --ease-apple: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --transition-smooth: transform 0.28s var(--ease-apple), opacity 0.28s var(--ease-apple), box-shadow 0.28s var(--ease-apple);
  --transition-fast: transform 0.16s var(--ease-apple), opacity 0.16s var(--ease-apple), background-color 0.16s var(--ease-apple), color 0.16s var(--ease-apple);

  /* Restored Core Variables (Tokens Alignment) */
  --blue-apple: #0071e3;
  --surface-card: rgba(255, 255, 255, 0.85);
  --surface-card-hover: rgba(255, 255, 255, 0.96);
  --gradient-primary: linear-gradient(135deg, var(--cyan-primary) 0%, #0056bd 100%);
  --primary-accent: var(--cyan-primary);
  --text-primary: var(--text-heading);
  --text-secondary: var(--text-sub);
  --font-mono: 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   OPTIONAL DARK THEME (When Toggled)
   ========================================================================== */
[data-theme="dark"] {
  --bg-base: #06080d;
  --bg-surface: #0e1420;
  --bg-subtle: #090d15;
  --bg-card: rgba(18, 24, 38, 0.65);
  --bg-card-solid: #111726;
  --bg-card-hover: rgba(26, 35, 54, 0.85);

  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-bright: rgba(255, 255, 255, 0.28);
  --glass-specular: rgba(255, 255, 255, 0.08);
  --glass-surface: rgba(255, 255, 255, 0.04);
  --glass-surface-active: rgba(255, 255, 255, 0.08);

  --text-main: #f5f5f7;
  --text-heading: #ffffff;
  --text-sub: #a1a1a6;
  --text-muted: #6e6e73;
  --text-highlight: #ffffff;

  --cyan-tint: rgba(0, 113, 227, 0.15);
  --orange-tint: rgba(255, 107, 0, 0.15);

  --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  --glass-shadow-hover: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(0, 113, 227, 0.2);
  --card-shadow-heavy: 0 30px 80px rgba(0, 0, 0, 0.8);

  --blue-apple: #0071e3;
  --surface-card: rgba(18, 24, 38, 0.75);
  --surface-card-hover: rgba(26, 35, 54, 0.90);
  --gradient-primary: linear-gradient(135deg, #0071e3 0%, #0056bd 100%);
  --primary-accent: #00d2ff;
  --text-primary: var(--text-heading);
  --text-secondary: var(--text-sub);
}

/* RTL / LTR Direction */
html {
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

html[lang="ar"], body[dir="rtl"] {
  --current-font: var(--font-ar);
  direction: rtl;
}

html[lang="fr"], body[dir="ltr"] {
  --current-font: var(--font-en);
  direction: ltr;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessible focus ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--cyan-primary);
  outline-offset: 3px;
}

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

/* Instant response for interactive controls */
button, a, [role="button"], .filter-tab, .chip-option, .layer-plate, .social-3d-card, .apple-slider {
  touch-action: manipulation;
}

button, [role="button"], .filter-tab, .chip-option, .settings-action-pill, .control-pill, .nav-dropdown-btn {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  background-color: var(--bg-base);
  background-image: 
    linear-gradient(180deg, rgba(241, 245, 249, 0.4) 0%, rgba(255, 255, 255, 0.7) 30%, rgba(241, 245, 249, 0.5) 70%, rgba(248, 250, 252, 1) 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--current-font);
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
  background-image: none;
}

::selection {
  background: rgba(0, 113, 227, 0.2);
  color: #0071e3;
}

/* ==========================================================================
   AMBIENT BACKGROUND (Subtle Pastel Glows & Fine Grid)
   ========================================================================== */

#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* Subtle Architectural Grid Texture like Catalog Blueprint */
.catalog-grid-backdrop {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.035) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .catalog-grid-backdrop {
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0);
}

.ambient-spotlight {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  transition: transform 0.8s var(--ease-apple);
  will-change: transform;
}

.spotlight-cyan {
  width: 750px;
  height: 750px;
  background: radial-gradient(circle, rgba(0, 132, 255, 0.14) 0%, rgba(0, 113, 227, 0) 70%);
  top: -150px;
  left: -150px;
}

.spotlight-orange {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.12) 0%, rgba(255, 138, 0, 0) 70%);
  bottom: 5%;
  right: -200px;
}

.spotlight-cursor {
  position: fixed;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.08) 0%, rgba(255, 107, 0, 0.04) 50%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ==========================================================================
   NAVIGATION BAR (Apple Minimal Frosted Glass Capsule)
   ========================================================================== */

.nav-container {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 980px;
  z-index: 1000;
  transition: transform 0.28s var(--ease-apple), top 0.28s var(--ease-apple);
}

.nav-glass {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  height: 46px;
  padding: 0 8px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: var(--transition-smooth);
}

[data-theme="dark"] .nav-glass {
  background: rgba(14, 20, 32, 0.75);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-scrolled .nav-glass {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  transform: scale(0.99);
}

[data-theme="dark"] .nav-scrolled .nav-glass {
  background: rgba(10, 14, 24, 0.92);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-heading);
  flex-shrink: 0;
}

.nav-logo-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text-heading);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.nav-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: var(--transition-fast);
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan-primary), var(--orange-primary));
  border-radius: 2px;
  transition: width 0.25s var(--ease-apple);
}

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

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* ==========================================================================
   PROGRESSIVE DISCLOSURE: MORE DROPDOWN MENU
   ========================================================================== */

.nav-dropdown-wrap {
  position: relative;
  list-style: none;
}

.nav-dropdown-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px 0;
  transition: var(--transition-fast);
}

.dropdown-chevron {
  transition: transform 0.25s var(--ease-apple);
}

.nav-dropdown-wrap:hover .dropdown-chevron,
.nav-dropdown-wrap.open .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-wrap:hover .nav-dropdown-btn,
.nav-dropdown-wrap.open .nav-dropdown-btn {
  color: var(--cyan-primary);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(0.96);
  transform-origin: top center;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  min-width: 195px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-apple), transform 0.2s var(--ease-apple);
}

[data-theme="dark"] .nav-dropdown-menu {
  background: rgba(14, 20, 32, 0.94);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-dropdown-wrap:hover .nav-dropdown-menu,
.nav-dropdown-wrap.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-heading);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s var(--ease-apple);
}

.dropdown-item:hover {
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue-apple);
  transform: translateX(3px);
}

[dir="rtl"] .dropdown-item:hover {
  transform: translateX(-3px);
}

.dropdown-item:active {
  transform: scale(0.97);
}

.dropdown-item-icon {
  font-size: 1rem;
  line-height: 1;
}

/* ==========================================================================
   NAV ACTIONS & SETTINGS HUB (Progressive Disclosure for Utilities)
   ========================================================================== */

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.settings-wrap {
  position: relative;
}

.settings-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s var(--ease-apple), background-color 0.25s, color 0.25s, box-shadow 0.25s;
}

[data-theme="dark"] .settings-btn {
  background: rgba(255, 255, 255, 0.07);
}

.settings-btn:hover {
  background: #ffffff;
  color: var(--cyan-primary);
  border-color: var(--cyan-neon);
  box-shadow: 0 4px 12px rgba(0, 210, 255, 0.2);
  transform: rotate(35deg);
}

[data-theme="dark"] .settings-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--cyan-neon);
}

.settings-popover {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  transform-origin: top left;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.22s var(--ease-apple), transform 0.22s var(--ease-apple);
}

[dir="ltr"] .settings-popover {
  left: auto;
  right: 0;
  transform-origin: top right;
}

@media (max-width: 640px) {
  .settings-popover {
    position: fixed;
    top: calc(var(--nav-height) + 12px);
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
    transform-origin: top center !important;
  }
}

.settings-popover.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

[data-theme="dark"] .settings-popover {
  background: rgba(14, 20, 32, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 14px;
}

.settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-heading);
}

.settings-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.settings-close-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.15s, background-color 0.15s;
}

.settings-close-btn:hover {
  color: var(--text-heading);
  background: rgba(0, 0, 0, 0.05);
}

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.025);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .settings-row {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.settings-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.settings-row-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-heading);
  white-space: nowrap;
}

.settings-row-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--surface-card);
  color: var(--text-heading);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.settings-action-pill:hover {
  border-color: var(--cyan-neon);
  color: var(--blue-apple);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.settings-shortcuts-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.settings-shortcut-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue-apple);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(0, 113, 227, 0.18);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s var(--ease-apple), box-shadow 0.18s ease;
  white-space: nowrap;
}

.settings-shortcut-link svg {
  flex-shrink: 0;
}

[data-theme="dark"] .settings-shortcut-link {
  background: rgba(0, 113, 227, 0.14);
  border-color: rgba(0, 113, 227, 0.28);
  color: #70b5f9;
}

.settings-shortcut-link:hover {
  background: var(--blue-apple);
  color: #fff;
  border-color: var(--blue-apple);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}

.settings-shortcut-link.shortcut-call {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.22);
}

[data-theme="dark"] .settings-shortcut-link.shortcut-call {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.32);
}

.settings-shortcut-link.shortcut-call:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.settings-shortcut-link:active {
  transform: scale(0.97) !important;
}

/* CTA BUTTON */
.btn-nav-cta {
  background: linear-gradient(135deg, var(--cyan-primary) 0%, #0056bd 100%);
  color: #ffffff;
  border: none;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(0, 113, 227, 0.28);
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.btn-nav-cta:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 5px 16px rgba(0, 113, 227, 0.4);
}

/* MOBILE BURGER & DRAWER */
.mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--surface-card);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: transform 0.15s var(--ease-apple), background-color 0.2s;
}

.mobile-menu-btn:active {
  transform: scale(0.94);
}

.hamburger-bar {
  width: 14px;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-apple), opacity 0.25s;
}

.mobile-menu-btn.active .hamburger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-drawer {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.22s var(--ease-apple), transform 0.22s var(--ease-apple), visibility 0.22s;
}

[data-theme="dark"] .mobile-drawer {
  background: rgba(14, 20, 32, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
}

.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.mobile-drawer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-heading);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  transition: background-color 0.2s, transform 0.15s var(--ease-apple);
}

.mobile-nav-link:active {
  transform: scale(0.96);
}

[data-theme="dark"] .mobile-nav-link {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-drawer-footer {
  border-top: 1px solid var(--glass-border);
  padding-top: 12px;
}

.mobile-quick-actions {
  display: flex;
  gap: 8px;
}

/* Glass Buttons & Pills */
.btn-glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.18s var(--ease-apple), background-color 0.18s, color 0.18s, box-shadow 0.18s;
}

.btn-glass:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.14);
  color: var(--cyan-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.btn-glass:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-primary) 0%, #0051ba 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.2s var(--ease-apple), box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.7s var(--ease-apple);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 113, 227, 0.45);
}

.btn-primary:active {
  transform: scale(0.96) !important;
}

.btn-orange {
  background: linear-gradient(135deg, var(--orange-primary) 0%, #d44d00 100%);
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-orange:hover {
  box-shadow: 0 8px 25px rgba(255, 107, 0, 0.45);
}

.control-pill {
  height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.16s var(--ease-apple), background-color 0.16s, color 0.16s;
  user-select: none;
}

.control-pill:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--cyan-primary);
  transform: translateY(-1px);
}

.control-pill:active {
  transform: scale(0.96);
}

[data-theme="dark"] .control-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-sub);
}

[data-theme="dark"] .control-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* ==========================================================================
   HERO SECTION (Apple Light Cinematic with Catalogue Backdrop)
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 135px;
  padding-bottom: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10;
  overflow: hidden;
}

.catalog-hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1250px;
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
}

.catalog-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.38;
  filter: saturate(1.1) contrast(1.05);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,0.15) 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,0.15) 80%, transparent 100%);
  transition: opacity 0.5s ease;
}

[data-theme="dark"] .catalog-backdrop-img {
  opacity: 0.15;
  filter: brightness(0.65) contrast(1.2);
}

.catalog-backdrop-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 255, 255, 0.25) 0%, rgba(245, 245, 247, 0.7) 65%, var(--bg-base) 100%);
  pointer-events: none;
}

[data-theme="dark"] .catalog-backdrop-gradient {
  background: radial-gradient(ellipse at 50% 20%, rgba(6, 8, 13, 0.4) 0%, rgba(6, 8, 13, 0.85) 65%, var(--bg-base) 100%);
}

.hero-glow-layer {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 950px;
  height: 480px;
  background: radial-gradient(ellipse at center, rgba(0, 113, 227, 0.15) 0%, rgba(255, 107, 0, 0.1) 40%, transparent 75%);
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
  animation: heroPulse 9s infinite alternate ease-in-out;
}

@keyframes heroPulse {
  0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.9; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 113, 227, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cyan-primary);
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.08);
  margin-bottom: 26px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan-primary);
  box-shadow: 0 0 10px var(--cyan-primary);
  animation: dotBlink 2s infinite ease-in-out;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.3rem, 5.2vw, 4.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 1050px;
  margin: 0 auto 22px;
  color: var(--text-heading);
}

.text-gradient {
  background: linear-gradient(135deg, #0a0e1a 10%, var(--cyan-primary) 65%, var(--orange-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

[data-theme="dark"] .text-gradient {
  background: linear-gradient(135deg, #ffffff 10%, #d8e5f7 40%, #00b4d8 75%, #ff8a00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--text-sub);
  max-width: 780px;
  margin: 0 auto 38px;
  font-weight: 500;
  line-height: 1.65;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 55px;
  flex-wrap: wrap;
}

/* Hero Showcase Glass Screen Card */
.hero-stage-container {
  width: 100%;
  max-width: 1140px;
  padding: 0 20px;
  perspective: 1200px;
}

.hero-screen-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: #ffffff;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.1), 0 0 50px rgba(0, 113, 227, 0.08);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-apple), box-shadow 0.6s var(--ease-apple);
}

[data-theme="dark"] .hero-screen-card {
  background: rgba(10, 14, 24, 0.6);
  border-color: var(--glass-border-bright);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8), 0 0 80px rgba(0, 113, 227, 0.15);
}

.hero-screen-card:hover {
  box-shadow: 0 35px 90px rgba(15, 23, 42, 0.16), 0 0 60px rgba(0, 113, 227, 0.15);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-apple);
}

.hero-screen-card:hover .hero-img {
  transform: scale(1.035);
}

.hero-glass-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(15, 23, 42, 0.75) 100%);
  display: flex;
  align-items: flex-end;
  padding: 40px;
  pointer-events: none;
}

.hero-overlay-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  pointer-events: auto;
}

.hero-overlay-info h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-overlay-info p {
  color: #38bdf8;
  font-size: 0.92rem;
  font-weight: 600;
}

.glass-pill-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   METRICS SECTION (Apple White Glass Cards)
   ========================================================================== */

.metrics-section {
  position: relative;
  z-index: 10;
  padding: 30px 20px 70px;
  max-width: 1240px;
  margin: 0 auto;
}

.metrics-glass-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan-primary), transparent);
}

.metric-card:nth-child(2)::before {
  background: linear-gradient(90deg, transparent, var(--orange-primary), transparent);
}

.metric-card:nth-child(3)::before {
  background: linear-gradient(90deg, transparent, var(--accent-emerald), transparent);
}

.metric-card:nth-child(4)::before {
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.metric-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  box-shadow: var(--glass-shadow-hover);
}

.metric-number {
  font-size: clamp(2.1rem, 3.2vw, 3.1rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--cyan-primary);
  margin-bottom: 8px;
  line-height: 1.1;
}

.metric-card:nth-child(2) .metric-number {
  color: var(--orange-primary);
}

.metric-card:nth-child(3) .metric-number {
  color: var(--accent-emerald);
}

.metric-card:nth-child(4) .metric-number {
  color: var(--accent-gold);
}

.metric-label {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.metric-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SECTIONS COMMON LAYOUT & HEADINGS
   ========================================================================== */

section {
  position: relative;
  z-index: 10;
  padding: 90px 20px;
}

.section-container {
  max-width: 1240px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 55px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan-primary);
  background: var(--cyan-tint);
  border: 1px solid rgba(0, 113, 227, 0.15);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.section-tag.tag-orange {
  color: var(--orange-primary);
  background: var(--orange-tint);
  border-color: rgba(255, 107, 0, 0.18);
}

.section-title {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-heading);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-sub);
  line-height: 1.65;
  font-weight: 500;
}

/* ==========================================================================
   INTERACTIVE 3D LAYER SIMULATOR
   ========================================================================== */

.layers-sim-box {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: var(--card-shadow-heavy);
  align-items: center;
}

.layer-visual-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  perspective: 1000px;
}

.layer-plate {
  position: relative;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 0.24s var(--ease-apple), background-color 0.2s, border-color 0.2s, box-shadow 0.24s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: rotateX(6deg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .layer-plate {
  background: rgba(255, 255, 255, 0.04);
}

@media (hover: hover) and (pointer: fine) {
  .layer-plate:hover {
    transform: rotateX(0deg) scale(1.02) translateY(-3px);
    background: #ffffff;
    border-color: rgba(0, 113, 227, 0.3);
    box-shadow: 0 10px 30px rgba(0, 113, 227, 0.12);
  }
}

.layer-plate.active {
  transform: rotateX(0deg) scale(1.02) translateY(-3px);
  background: #ffffff;
  border-color: var(--cyan-primary);
  border-width: 2px;
  box-shadow: 0 10px 30px rgba(0, 113, 227, 0.12);
}

.layer-plate:active {
  transform: scale(0.97) rotateX(2deg);
}

.layer-plate.active.plate-orange {
  border-color: var(--orange-primary);
  box-shadow: 0 10px 30px rgba(255, 107, 0, 0.15);
}

.layer-meta-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.layer-number-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-heading);
}

.layer-plate.active .layer-number-badge {
  background: var(--cyan-primary);
  color: #fff;
  border-color: var(--cyan-primary);
}

.layer-title-text {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-heading);
}

.layer-depth-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--cyan-tint);
  color: var(--cyan-primary);
  border: 1px solid rgba(0, 113, 227, 0.15);
}

.layer-detail-card {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .layer-detail-card {
  background: rgba(10, 14, 24, 0.7);
}

.detail-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--orange-primary);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.layer-detail-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 12px;
  line-height: 1.3;
}

.layer-detail-desc {
  font-size: 0.98rem;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 24px;
}

.layer-specs-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 26px;
}

.spec-item {
  background: var(--bg-subtle);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.spec-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}

.spec-val {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-heading);
}

/* ==========================================================================
   SYSTEMS & PRODUCTS CATALOG
   ========================================================================== */

.filter-bar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto 45px;
  padding: 6px;
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  max-width: fit-content;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

@media (max-width: 860px) {
  .filter-bar-container {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 6px 10px;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-bar-container::-webkit-scrollbar {
    display: none;
  }
  .filter-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

.filter-tab {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--glass-border);
  color: var(--text-sub);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: transform 0.16s var(--ease-apple), background-color 0.16s, color 0.16s, border-color 0.16s, box-shadow 0.16s;
}

.filter-tab:hover {
  background: #ffffff;
  color: var(--cyan-primary);
  border-color: rgba(0, 113, 227, 0.25);
  transform: translateY(-1px);
}

.filter-tab:active {
  transform: scale(0.96);
}

.filter-tab.active {
  background: var(--cyan-primary);
  color: #ffffff;
  border-color: var(--cyan-primary);
  box-shadow: 0 4px 18px rgba(0, 113, 227, 0.35);
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 28px;
}

.system-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s var(--ease-apple), box-shadow 0.3s var(--ease-apple), background-color 0.25s, border-color 0.25s;
  transform-style: preserve-3d;
}

@media (hover: hover) and (pointer: fine) {
  .system-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: rgba(0, 113, 227, 0.25);
    box-shadow: var(--glass-shadow-hover);
  }
}

.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-apple);
}

.system-card:hover .card-img {
  transform: scale(1.06);
}

.card-badge-floating {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--cyan-primary);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

html[lang="ar"] .card-badge-floating, body[dir="rtl"] .card-badge-floating {
  right: auto;
  left: 14px;
}

.card-badge-orange {
  color: var(--orange-primary);
}

.card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 10px;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.feature-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
}

.feature-check {
  color: var(--cyan-primary);
  font-weight: 900;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
}

.thickness-pill {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--orange-primary);
  background: var(--orange-tint);
  border: 1px solid rgba(255, 107, 0, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.btn-card-action {
  background: transparent;
  border: none;
  color: var(--cyan-primary);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-card-action:hover {
  transform: translateX(4px);
}

html[lang="ar"] .btn-card-action:hover, body[dir="rtl"] .btn-card-action:hover {
  transform: translateX(-4px);
}

/* ==========================================================================
   SECTORS SECTION (Apple Light Bento Grid)
   ========================================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.bento-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: transform 0.28s var(--ease-apple), box-shadow 0.28s var(--ease-apple), background-color 0.25s;
}

@media (hover: hover) and (pointer: fine) {
  .bento-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow-hover);
    border-color: rgba(0, 113, 227, 0.2);
  }
}

.bento-icon-box {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.bento-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 10px;
}

.bento-desc {
  font-size: 0.92rem;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 18px;
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bento-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}

/* ==========================================================================
   4-STEP PROTOCOL (Apple Modern Flow)
   ========================================================================== */

.protocol-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  position: relative;
}

.protocol-timeline::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan-primary), var(--orange-primary), var(--cyan-primary));
  opacity: 0.25;
  z-index: 1;
}

.protocol-step-card {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--glass-shadow);
  transition: transform 0.28s var(--ease-apple), box-shadow 0.28s var(--ease-apple), background-color 0.25s;
}

@media (hover: hover) and (pointer: fine) {
  .protocol-step-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    box-shadow: var(--glass-shadow-hover);
    border-color: rgba(0, 113, 227, 0.25);
  }
}

.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.step-num-bubble {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--cyan-primary);
  box-shadow: 0 4px 15px var(--cyan-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--cyan-primary);
}

.protocol-step-card:nth-child(2) .step-num-bubble {
  border-color: var(--orange-primary);
  color: var(--orange-primary);
  box-shadow: 0 4px 15px var(--orange-glow);
}

.step-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.protocol-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.protocol-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-apple);
}

.protocol-step-card:hover .protocol-card-thumb img {
  transform: scale(1.06);
}

.step-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 10px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ==========================================================================
   ESTIMATOR & REALTIME WHATSAPP CALCULATOR
   ========================================================================== */

.calculator-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 46px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 45px;
  box-shadow: var(--card-shadow-heavy);
  position: relative;
}

.calc-control-group {
  margin-bottom: 28px;
}

.calc-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 14px;
}

.calc-range-val {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--cyan-primary);
}

.apple-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  transition: background 0.3s ease;
}

.apple-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--cyan-primary);
  box-shadow: 0 2px 10px rgba(0, 113, 227, 0.4);
  cursor: pointer;
  transition: transform 0.2s var(--ease-bounce);
}

.apple-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.chips-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-option {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--glass-border);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.16s var(--ease-apple), background-color 0.16s, color 0.16s, border-color 0.16s, box-shadow 0.16s;
}

.chip-option:hover {
  background: #ffffff;
  color: var(--text-heading);
  border-color: rgba(0, 0, 0, 0.15);
}

.chip-option:active {
  transform: scale(0.96);
}

.chip-option.selected {
  background: var(--cyan-tint);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.15);
}

/* Result Card */
.calc-result-card {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .calc-result-card {
  background: rgba(10, 14, 24, 0.7);
}

.result-header {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange-primary);
  margin-bottom: 6px;
}

.result-system-name {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 22px;
}

.result-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 10px;
}

.result-row-label {
  font-size: 0.88rem;
  color: var(--text-sub);
  font-weight: 500;
}

.result-row-value {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-heading);
}

.btn-whatsapp-quote {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  border: none;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s var(--ease-apple), box-shadow 0.2s;
}

.btn-whatsapp-quote:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
}

.btn-whatsapp-quote:active {
  transform: scale(0.96) !important;
}

.btn-email-quote {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  margin-top: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.2s var(--ease-apple), box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-email-quote:hover {
  transform: translateY(-2px);
  background: rgba(0, 113, 227, 0.12);
  border-color: rgba(0, 113, 227, 0.45);
  color: var(--cyan-primary);
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.22);
}

.btn-email-quote:active {
  transform: scale(0.96) !important;
}

[data-theme="dark"] .btn-email-quote {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f5f5f7;
}

[data-theme="dark"] .btn-email-quote:hover {
  background: rgba(0, 210, 255, 0.14);
  border-color: rgba(0, 210, 255, 0.45);
  color: #00d2ff;
}

/* ==========================================================================
   CALLOUT BANNER (Morocco Map & National Presence)
   ========================================================================== */

.callout-box {
  background: linear-gradient(135deg, #ffffff 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  box-shadow: var(--card-shadow-heavy);
  margin-top: 55px;
}

[data-theme="dark"] .callout-box {
  background: radial-gradient(ellipse at top right, rgba(255, 107, 0, 0.15) 0%, rgba(0, 113, 227, 0.12) 50%, var(--bg-card) 100%);
}

.callout-content h3 {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.callout-content p {
  color: var(--text-sub);
  font-size: 1rem;
  max-width: 650px;
}

.cities-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.city-badge {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.city-badge.active-city {
  border-color: var(--orange-primary);
  color: var(--orange-primary);
  background: var(--orange-tint);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}

.card-showcase-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

.card-img-real {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.8s var(--ease-apple);
}

.card-showcase-wrap:hover .card-img-real {
  transform: scale(1.02);
}

.reception-badge-overlay {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(14, 20, 32, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 2;
  transition: transform 0.3s var(--ease-apple);
}

html[lang="ar"] .reception-badge-overlay, [dir="rtl"] .reception-badge-overlay {
  right: auto;
  left: 16px;
}

.card-showcase-wrap:hover .reception-badge-overlay {
  transform: translateY(-2px);
}

.contact-info-glass {
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--card-shadow-heavy);
}

.contact-channels-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: var(--transition-fast);
}

[data-theme="dark"] .contact-item {
  background: rgba(255, 255, 255, 0.03);
}

.contact-item:hover {
  background: var(--bg-subtle);
  border-color: rgba(0, 113, 227, 0.25);
  transform: translateX(5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

html[lang="ar"] .contact-item:hover, body[dir="rtl"] .contact-item:hover {
  transform: translateX(-5px);
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--cyan-tint);
  border: 1px solid rgba(0, 113, 227, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--cyan-primary);
  flex-shrink: 0;
}

.contact-item:nth-child(2) .contact-icon {
  background: var(--orange-tint);
  border-color: rgba(255, 107, 0, 0.18);
  color: var(--orange-primary);
}

.contact-item-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}

.contact-item-val {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-heading);
  direction: ltr;
  display: inline-block;
}

/* ==========================================================================
   FOOTER (World-Class Apple Frosted Glass with 3D Social Re-Motion)
   ========================================================================== */

.footer-section {
  position: relative;
  z-index: 20;
  border-top: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  padding: 70px 24px calc(35px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

[data-theme="dark"] .footer-section {
  background: rgba(8, 11, 18, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-ambient-glow {
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.9), rgba(0, 113, 227, 0.8), transparent);
  filter: blur(1px);
  opacity: 0.85;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 46px;
}

/* TOP BAR */
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--glass-border);
}

.footer-brand-wrap {
  display: flex;
  align-items: center;
}

.footer-top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
  color: #059669;
}

[data-theme="dark"] .live-status-pill {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.status-dot-green {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseGlow 2s infinite;
}

/* QUICK CALLBACK INLINE FORM */
.footer-callback-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  padding: 5px 6px 5px 14px;
  border-radius: var(--radius-pill);
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.footer-callback-box:focus-within {
  border-color: var(--cyan-neon);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.2);
}

.callback-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.callback-prefix {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  user-select: none;
}

.footer-callback-input {
  border: none;
  background: transparent;
  color: var(--text-heading);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  width: 125px;
  outline: none;
  direction: ltr;
}

@media (pointer: coarse) {
  .footer-callback-input {
    font-size: 16px !important;
  }
}

.footer-callback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s var(--ease-apple), box-shadow 0.18s;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.footer-callback-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.45);
}

.footer-callback-btn:active {
  transform: scale(0.96) !important;
}

.footer-callback-feedback {
  position: absolute;
  bottom: -28px;
  left: 0;
  right: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #10b981;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.footer-callback-feedback.active {
  opacity: 1;
}

/* 4-COLUMN MAIN GRID */
.footer-main-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.35fr;
  gap: 38px;
}

@media (max-width: 1080px) {
  .footer-main-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 680px) {
  .footer-main-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 18px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-col-title::after {
  content: '';
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--cyan-neon);
  border-radius: 2px;
}

/* COL 1: IDENTITY & BADGES */
.footer-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-sub);
  margin-bottom: 20px;
}

.footer-legal-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.legal-badge {
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.2s;
}

.legal-badge:hover {
  border-color: var(--cyan-neon);
}

.legal-badge .badge-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.legal-badge .badge-val {
  color: var(--text-heading);
  font-weight: 700;
  font-family: monospace, sans-serif;
  font-size: 0.74rem;
}

.footer-cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cert-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.22);
  color: var(--blue-apple);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

[data-theme="dark"] .cert-pill {
  background: rgba(0, 210, 255, 0.1);
  border-color: rgba(0, 210, 255, 0.25);
  color: var(--cyan-neon);
}

/* COL 2 & 3: LINKS & CITIES */
.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s, transform 0.2s;
}

.footer-link:hover {
  color: var(--cyan-neon);
  transform: translateX(-4px);
}

[dir="ltr"] .footer-link:hover {
  transform: translateX(4px);
}

.link-bullet {
  color: var(--cyan-neon);
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.2s;
}

.footer-link:hover .link-bullet {
  transform: scale(1.3);
}

.footer-cities-wrap {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.cities-head-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 9px;
}

.cities-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.city-pill {
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-sub);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  user-select: none;
}

.city-pill:hover {
  background: var(--blue-apple);
  color: #fff;
  border-color: var(--blue-apple);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 113, 227, 0.3);
}

/* COL 4: 3D SOCIAL RE-MOTION HUB */
.social-header-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.social-live-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #00f2fe;
  box-shadow: 0 0 10px #00f2fe;
  animation: pulseGlow 2s infinite;
  display: inline-block;
}

.footer-social-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.social-3d-deck {
  perspective: 1200px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.social-3d-card {
  position: relative;
  border-radius: 14px;
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  outline: none;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.25s ease, border-color 0.25s ease;
  user-select: none;
  will-change: transform;
  overflow: visible;
}

.card-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 70%);
  transition: opacity 0.3s ease;
  z-index: 4;
}

[data-theme="dark"] .card-glare {
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
}

.card-burst-anchor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

.social-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 12px;
  transform-style: preserve-3d;
}

.social-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(35px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-meta {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  transform: translateZ(22px);
}

.social-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-heading);
}

.social-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.social-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  transform: translateZ(25px);
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Platform Distinct Hover Highlights */
.social-linkedin .social-icon-box { background: #0A66C2; }
.social-linkedin .social-badge { background: rgba(10, 102, 194, 0.12); color: #0A66C2; }
.social-linkedin:hover {
  border-color: rgba(10, 102, 194, 0.6);
  box-shadow: 0 14px 28px rgba(10, 102, 194, 0.35), 0 0 15px rgba(10, 102, 194, 0.2);
}

.social-whatsapp .social-icon-box { background: #25D366; }
.social-whatsapp .social-badge { background: rgba(37, 211, 102, 0.14); color: #25D366; }
.social-whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.6);
  box-shadow: 0 14px 28px rgba(37, 211, 102, 0.35), 0 0 15px rgba(37, 211, 102, 0.2);
}

.social-instagram .social-icon-box {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.social-instagram .social-badge { background: rgba(225, 48, 108, 0.14); color: #e1306c; }
.social-instagram:hover {
  border-color: rgba(225, 48, 108, 0.6);
  box-shadow: 0 14px 28px rgba(225, 48, 108, 0.35), 0 0 15px rgba(253, 29, 29, 0.2);
}

.social-facebook .social-icon-box { background: #1877F2; }
.social-facebook .social-badge { background: rgba(24, 119, 242, 0.12); color: #1877F2; }
.social-facebook:hover {
  border-color: rgba(24, 119, 242, 0.6);
  box-shadow: 0 14px 28px rgba(24, 119, 242, 0.35), 0 0 15px rgba(24, 119, 242, 0.2);
}

.social-youtube .social-icon-box { background: #FF0000; }
.social-youtube .social-badge { background: rgba(255, 0, 0, 0.12); color: #FF0000; }
.social-youtube:hover {
  border-color: rgba(255, 0, 0, 0.6);
  box-shadow: 0 14px 28px rgba(255, 0, 0, 0.35), 0 0 15px rgba(255, 0, 0, 0.2);
}

/* THE CLICK RE-MOTION KEYFRAME SEQUENCE */
@keyframes socialClickRebound {
  0% {
    transform: perspective(1000px) scale3d(0.88, 0.88, 0.88) translateZ(-25px) rotateX(12deg);
    filter: brightness(1.25);
  }
  22% {
    transform: perspective(1000px) scale3d(1.18, 1.18, 1.18) translateZ(75px) rotateY(180deg) rotateX(-10deg);
    filter: brightness(1.5);
  }
  55% {
    transform: perspective(1000px) scale3d(1.08, 1.08, 1.08) translateZ(45px) rotateY(360deg) rotateX(4deg);
  }
  80% {
    transform: perspective(1000px) scale3d(0.97, 0.97, 0.97) translateZ(10px) rotateY(360deg);
  }
  100% {
    transform: perspective(1000px) scale3d(1, 1, 1) translateZ(0) rotateY(360deg);
  }
}

.social-3d-card.clicked-remotion {
  animation: socialClickRebound 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
  z-index: 50 !important;
}

/* EXPLOSIVE SHOCKWAVE PARTICLES */
.social-particle {
  position: absolute;
  width: var(--size, 6px);
  height: var(--size, 6px);
  border-radius: 50%;
  background: var(--p-color, #00d2ff);
  box-shadow: 0 0 10px var(--p-color, #00d2ff);
  pointer-events: none;
  top: var(--origin-y, 50%);
  left: var(--origin-x, 50%);
  animation: particleExplode var(--dur, 0.65s) cubic-bezier(0.12, 0.8, 0.32, 1) forwards;
  z-index: 100;
}

@keyframes particleExplode {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx, 50px), var(--ty, -50px)) scale(0) rotate(var(--rot, 240deg));
    opacity: 0;
  }
}

/* FROSTED TOAST FEEDBACK */
.social-remotion-toast {
  position: fixed;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(100px) scale(0.9);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 210, 255, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s var(--ease-apple), opacity 0.28s var(--ease-apple);
  z-index: 3000;
  direction: rtl;
}

[dir="ltr"] .social-remotion-toast {
  direction: ltr;
}

.social-remotion-toast.active {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

.toast-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  flex-shrink: 0;
}

.toast-text {
  line-height: 1.4;
}

/* BOTTOM BAR */
.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-rights {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-moroccan-pride {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-sub);
}

.footer-bottom-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  color: var(--cyan-neon);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: transform 0.2s var(--ease-apple), background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.footer-catalog-btn:hover {
  background: var(--blue-apple);
  color: #fff;
  border-color: var(--blue-apple);
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.3);
  transform: translateY(-2px);
}

.footer-catalog-btn:active {
  transform: scale(0.96);
}

.footer-web-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-web-link:hover {
  color: var(--text-heading);
}

/* MAGNETIC APPLE BACK TO TOP BUTTON */
.back-to-top-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.back-to-top-btn:hover {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35);
  transform: translateY(-4px) scale(1.08);
}

.back-to-top-btn:active {
  transform: translateY(-1px) scale(0.94);
}

.back-top-tooltip {
  position: absolute;
  top: -34px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: all 0.2s ease;
}

.back-to-top-btn:hover .back-top-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */

.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-apple), visibility 0.25s;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.25s var(--ease-apple);
}

.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */

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

  .layers-sim-box {
    grid-template-columns: 1fr;
  }

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

  .protocol-timeline::before {
    display: none;
  }

  .calculator-wrapper {
    grid-template-columns: 1fr;
  }

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

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

  .callout-box {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .metrics-glass-grid {
    grid-template-columns: 1fr;
  }

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

  .protocol-timeline {
    grid-template-columns: 1fr;
  }

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

  .hero-overlay-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .layers-sim-box {
    padding: 24px;
  }

  .layer-specs-list {
    grid-template-columns: 1fr;
  }

  .callout-box {
    padding: 28px;
  }
}

/* ==========================================================================
   SCROLL-DRIVEN CINEMATIC ODYSSEY (الغوص في عالم الرزين والحرفة)
   ========================================================================== */
.odyssey-section {
  position: relative;
  width: 100%;
  height: 480vh; /* scroll distance for 5 cinematic acts */
  background: #06090e;
  color: #ffffff;
  z-index: 10;
}

.odyssey-sticky-frame {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #06090e;
}

.odyssey-slides-stack {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.odyssey-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.06);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.odyssey-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.odyssey-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.6) contrast(1.15) saturate(1.1);
}

.odyssey-slide-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.overlay-concrete {
  background: radial-gradient(circle at 65% 50%, rgba(20, 28, 45, 0.4) 0%, rgba(6, 9, 14, 0.88) 100%);
}

.overlay-grenaillage {
  background: radial-gradient(circle at 50% 50%, rgba(0, 113, 227, 0.25) 0%, rgba(6, 9, 14, 0.9) 100%);
}

.overlay-liquid {
  background: radial-gradient(circle at 40% 60%, rgba(255, 149, 0, 0.25) 0%, rgba(6, 9, 14, 0.9) 100%);
}

.overlay-heat {
  background: radial-gradient(circle at 60% 40%, rgba(255, 69, 58, 0.25) 0%, rgba(6, 9, 14, 0.9) 100%);
}

.overlay-mirror {
  background: radial-gradient(circle at 50% 40%, rgba(48, 209, 88, 0.15) 0%, rgba(6, 9, 14, 0.88) 100%);
}

#odyssey-liquid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.6;
}

.odyssey-hud-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-height) + 24px) 48px 36px;
  pointer-events: none;
}

/* Scrubber Navigation */
.odyssey-scrubber-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 18px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

.scrubber-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
}

.pulse-recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 10px #ff3b30;
  animation: pulseRecording 1.6s infinite ease-in-out;
}

@keyframes pulseRecording {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.3); }
}

.scrubber-steps-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.scrubber-step-btn {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.65);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
}

.scrubber-step-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.scrubber-step-btn.active {
  color: #ffffff;
  background: rgba(0, 113, 227, 0.3);
  border-color: rgba(0, 113, 227, 0.6);
  box-shadow: 0 0 15px rgba(0, 113, 227, 0.4);
}

.scrubber-progress-indicator {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cyan-primary);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Narrative Cards Track */
.odyssey-cards-track {
  position: relative;
  max-width: 720px;
  width: 100%;
  margin: auto 0;
  min-height: 290px;
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.odyssey-narrative-card {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
  padding: 34px 38px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.65s;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.odyssey-narrative-card.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.card-step-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--cyan-primary);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.card-hero-heading {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 14px;
}

.card-hero-body {
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 22px;
}

.card-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
  width: fit-content;
  flex-wrap: wrap;
}

.metric-accent {
  font-weight: 700;
  color: var(--cyan-primary);
}

/* Odyssey Scroll Prompt */
.odyssey-scroll-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  margin: 0 auto;
  pointer-events: auto;
}

.prompt-mouse-icon {
  width: 18px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.prompt-wheel {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: #ffffff;
  animation: scrollWheelBounce 1.8s infinite ease-in-out;
}

@keyframes scrollWheelBounce {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.2; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   TRANSFORMATION SECTION (Before / After Surface Wiper)
   ========================================================================== */
.transformation-section {
  position: relative;
  padding: 100px 0;
  z-index: 5;
  background: transparent;
}

.wiper-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.wiper-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 560px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--glass-border);
  cursor: ew-resize;
  user-select: none;
  touch-action: pan-y;
  background: #0b0f19;
}

.wiper-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wiper-before {
  z-index: 1;
}

.wiper-after {
  z-index: 2;
  clip-path: inset(0 0 0 var(--wiper-pct, 50%));
  will-change: clip-path;
}

.wiper-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  display: block;
}

.wiper-badge {
  position: absolute;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 5;
}

.wiper-badge-before {
  left: 24px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 69, 58, 0.4);
  color: #ffffff;
}

.wiper-badge-after {
  right: 24px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(48, 209, 88, 0.4);
  color: #ffffff;
}

.dot-red {
  background: #ff453a;
  box-shadow: 0 0 8px #ff453a;
}

.dot-green {
  background: #30d158;
  box-shadow: 0 0 8px #30d158;
}

/* Wiper Handle */
.wiper-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--wiper-pct, 50%);
  width: 2px;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(0, 113, 227, 0.8), 0 0 32px rgba(0, 210, 255, 0.5);
  will-change: left;
}

.wiper-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: inherit;
}

.wiper-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #0071e3;
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.45), 0 0 0 4px rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0071e3;
  transition: transform 0.2s var(--ease-apple), box-shadow 0.2s;
}

.wiper-container:hover .wiper-knob,
.wiper-container:active .wiper-knob {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 12px 30px rgba(0, 113, 227, 0.6), 0 0 0 6px rgba(0, 113, 227, 0.25);
}

/* Wiper Controls Bar */
.wiper-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

.wiper-quick-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wiper-preset-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}

.wiper-preset-btn:hover {
  color: var(--text-primary);
  border-color: rgba(0, 113, 227, 0.3);
  background: rgba(0, 113, 227, 0.05);
}

.wiper-preset-btn.active {
  background: var(--primary-accent);
  color: #ffffff;
  border-color: var(--primary-accent);
  box-shadow: 0 4px 14px var(--cyan-glow);
}

.wiper-metrics-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.wiper-metric-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.wiper-metric-item .metric-num {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary-accent);
  letter-spacing: -0.02em;
}

.wiper-metric-item .metric-lbl {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .odyssey-hud-container {
    padding: calc(var(--nav-height) + 16px) 20px 24px;
  }

  .odyssey-scrubber-bar {
    padding: 6px 12px;
  }

  .scrubber-steps-nav {
    display: none; /* keep brand & progress indicator compact on mobile */
  }

  .odyssey-narrative-card {
    padding: 24px 22px;
    border-radius: var(--radius-lg);
  }

  .card-hero-heading {
    font-size: 1.45rem;
  }

  .card-hero-body {
    font-size: 0.92rem;
  }

  .wiper-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .wiper-quick-btns {
    justify-content: center;
  }

  .wiper-metrics-strip {
    justify-content: space-around;
  }
}

/* ==========================================================================
   ACCESSIBILITY: PREFERS REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ambient-spotlight,
  .hero-glow-layer,
  .pulse-recording-dot,
  .tilt-3d {
    animation: none !important;
    transform: none !important;
  }
}

