/* ==========================================================================
   OLEANDER SOFTWARE — SISTEMA DE DISEÑO BESPOKE 2026
   "INGENIERÍA INDUSTRIAL DE PRECISIÓN & ARQUITECTURA VIVA"
   Cero plantillas genéricas. Tipografía editorial, retícula arquitectónica
   expuesta, superficies anodizadas, interpolación OKLCH y diálogos Top-Layer.
   ========================================================================== */

:root {
  /* Tier 1 & 2: Superficies de Carbono Anodizado (No el típico azul slate genérico) */
  --bg-obsidian: #050609;
  --bg-deep: #090b10;
  --bg-surface: rgba(12, 15, 22, 0.72);
  --bg-surface-elevated: rgba(18, 22, 32, 0.85);
  --bg-glass-crisp: rgba(10, 13, 20, 0.82);

  /* Líneas estructurales de precisión (1px Blueprint Grid) */
  --border-hairline: rgba(255, 255, 255, 0.075);
  --border-subtle: rgba(255, 255, 255, 0.11);
  --border-highlight: rgba(255, 255, 255, 0.24);
  --specular-top: inset 0 1px 0 0 rgba(255, 255, 255, 0.14);

  /* Textos con contraste editorial cálido */
  --text-ivory: #f4f3ef;
  --text-primary: #f8fafc;
  --text-secondary: #a1a9b8;
  --text-muted: #647084;

  /* Paleta de Acentos de Alta Precisión */
  --accent-amber: #f5b027;
  --accent-teal: #2dd4bf;
  --accent-cyan: #22d3ee;
  --accent-blue: #60a5fa;
  --accent-purple: #a855f7;
  --accent-emerald: #34d399;

  /* Color activo dinámico del núcleo 3D */
  --active-glow: #2dd4bf;
  --active-glow-rgb: 45, 212, 191;

  /* Interpolación de color moderna (Visual Effects Guidance) */
  --in-oklab: ;
  --in-oklch: ;

  /* Familias Tipográficas: Grotesca Geométrica + Serif Editorial + Monospace Técnico */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  --font-editorial: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

@supports (background: linear-gradient(in oklab, white, black)) {
  :root {
    --in-oklab: in oklab;
    --in-oklch: in oklch;
  }
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  color-scheme: dark;
  text-align: start;
}

body {
  margin: 0;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tipografía de Alta Costura (Typography Guidance Compliant) */
h1, h2, h3, h4, .balance-heading {
  text-wrap: balance;
  letter-spacing: -0.03em;
}

p, li, dd, blockquote {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.font-editorial {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-ivory);
}

.display-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.45rem + 3.2vw, 4.35rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--text-ivory);
  text-wrap: balance;
}

.display-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 1.25rem + 2.2vw, 3.35rem);
  line-height: 1.07;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--text-ivory);
  text-wrap: balance;
}

/* ==========================================================================
   0. SCROLL PROGRESS INDICATOR (Scroll-Driven Animation + Fallback)
   ========================================================================== */

#scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 2px;
  z-index: 100;
  pointer-events: none;
  background: linear-gradient(
    90deg var(--in-oklab),
    var(--accent-teal),
    var(--accent-amber),
    var(--accent-cyan)
  );
  transform-origin: 0 50%;
  transform: scaleX(0);
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes grow-scroll-progress {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }

    #scroll-progress {
      animation: grow-scroll-progress auto linear;
      animation-timeline: scroll(root block);
    }
  }
}

/* ==========================================================================
   1. THREE.JS FULL-VIEWPORT CANVAS, NOISE TEXTURE & BLUEPRINT RAILS
   ========================================================================== */

#webgl-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

#webgl-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Textura táctil de grano cinematográfico sutil + Retícula de Ingeniería */
.tech-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  isolation: isolate;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 0),
    linear-gradient(to right, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 24px 24px, 96px 96px, 96px 96px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 35%, transparent 100%);
}

.page-shell {
  position: relative;
  z-index: 10;
}

/* Líneas estructurales expuestas & Crosshairs (+) estilo estudio de ingeniería */
.arch-rail-container {
  position: relative;
  border-inline: 1px solid var(--border-hairline);
}

.arch-section-header {
  position: relative;
  padding-block-end: 2rem;
  border-block-end: 1px solid var(--border-hairline);
}

.arch-index-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 0.375rem;
  box-shadow: var(--specular-top);
}

.arch-index-tag .index-num {
  color: var(--accent-amber);
  font-weight: 700;
}

.arch-crosshair-divider {
  position: relative;
  height: 1px;
  width: 100%;
  background: var(--border-hairline);
}

.arch-crosshair-divider::before,
.arch-crosshair-divider::after {
  content: '+';
  position: absolute;
  inset-block-start: -0.45rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1;
}

.arch-crosshair-divider::before {
  inset-inline-start: 0;
}

.arch-crosshair-divider::after {
  inset-inline-end: 0;
}

.arch-blueprint-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  background: rgba(255, 255, 255, 0.025);
  border-block-end: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.code-manifesto-window {
  background: #06080d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow:
    0 24px 50px -15px rgba(0, 0, 0, 0.85),
    var(--specular-top);
  font-family: var(--font-mono);
}

/* ==========================================================================
   2. INSTRUMENTO 3D INTERACTIVO EN EL HERO
   ========================================================================== */

.hero-3d-viewport {
  position: relative;
  min-height: 440px;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(
      circle at 50% 50% var(--in-oklab),
      rgba(var(--active-glow-rgb), 0.14) 0%,
      rgba(9, 11, 16, 0.45) 65%,
      rgba(5, 6, 9, 0.88) 100%
    );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow:
    0 30px 70px -20px rgba(0, 0, 0, 0.85),
    var(--specular-top);
}

/* Marcas de calibración en las esquinas del visor 3D */
.hero-3d-viewport::before,
.hero-3d-viewport::after {
  content: '+';
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.28);
  pointer-events: none;
  z-index: 25;
  line-height: 1;
}

.hero-3d-viewport::before {
  inset-block-start: 0.65rem;
  inset-inline-start: 0.75rem;
}

.hero-3d-viewport::after {
  inset-block-end: 0.65rem;
  inset-inline-end: 0.75rem;
}

.hero-3d-viewport:hover {
  border-color: rgba(var(--active-glow-rgb), 0.48);
  box-shadow:
    0 30px 80px -15px rgba(var(--active-glow-rgb), 0.2),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.24);
}

#hero-interactive-canvas {
  width: 100%;
  height: 100%;
  min-height: 440px;
  display: block;
  cursor: grab;
}

#hero-interactive-canvas:active {
  cursor: grabbing;
}

/* ==========================================================================
   3. NAVEGACIÓN & COMMAND DOCK HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  transition:
    background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
  background: rgba(5, 6, 9, 0.72);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border-block-end: 1px solid var(--border-hairline);
}

.site-header.is-scrolled {
  background: rgba(5, 6, 9, 0.92);
  border-block-end-color: rgba(255, 255, 255, 0.13);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8);
}

.site-header a[href="#inicio"] img,
.site-header a[href="index.html"] > img {
  max-height: 4rem;
  width: auto;
}

.nav-pill-group {
  background: rgba(12, 15, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.65rem;
  padding: 0.28rem;
  backdrop-filter: blur(16px);
  box-shadow: var(--specular-top);
}

.nav-pill-link {
  position: relative;
  padding: 0.42rem 0.85rem;
  border-radius: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b0b8c6;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-pill-link:hover:not(:disabled),
.nav-pill-link.is-active {
  color: var(--text-ivory);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   4. PANELES ANODIZADOS & BENTO SPOTLIGHT (NO MÁS TARJETAS GENÉRICAS)
   ========================================================================== */

.spotlight-card {
  position: relative;
  background: linear-gradient(
    165deg var(--in-oklab),
    rgba(20, 24, 34, 0.78) 0%,
    rgba(9, 11, 16, 0.88) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 0.95rem;
  overflow: hidden;
  box-shadow:
    0 18px 40px -15px rgba(0, 0, 0, 0.7),
    var(--specular-top);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

/* Progressive enhancement para curvas de ingeniería si el navegador lo soporta */
@supports (corner-shape: squircle) {
  .spotlight-card {
    corner-shape: squircle;
  }
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    520px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(var(--card-glow-rgb, 45, 212, 191), 0.12),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

/* Luz especular superior sutil en cada tarjeta */
.spotlight-card::after {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 12%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--card-glow-rgb, 255, 255, 255), 0.45),
    transparent
  );
  opacity: 0.45;
  transition: opacity 0.35s ease, inset-inline 0.35s ease;
  pointer-events: none;
  z-index: 2;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card:hover::after {
  opacity: 0.95;
  inset-inline: 4%;
}

.spotlight-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--card-glow-rgb, 45, 212, 191), 0.38);
  box-shadow:
    0 26px 55px -16px rgba(0, 0, 0, 0.85),
    0 0 1px 1px rgba(var(--card-glow-rgb, 45, 212, 191), 0.12),
    var(--specular-top);
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

.glow-teal { --card-glow-rgb: 45, 212, 191; }
.glow-cyan { --card-glow-rgb: 34, 211, 238; }
.glow-amber { --card-glow-rgb: 245, 176, 39; }
.glow-blue { --card-glow-rgb: 96, 165, 250; }
.glow-purple { --card-glow-rgb: 168, 85, 247; }
.glow-emerald { --card-glow-rgb: 52, 211, 153; }

/* Retícula de Especificaciones (Spec Ledger — Reemplaza cajas flotantes repetitivas) */
.spec-ledger {
  display: grid;
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  background: rgba(9, 11, 16, 0.78);
  backdrop-filter: blur(14px);
  overflow: hidden;
  box-shadow: var(--specular-top);
}

.spec-ledger-cell {
  padding: 1rem 1.15rem;
  border-inline-end: 1px solid var(--border-hairline);
  border-block-end: 1px solid var(--border-hairline);
  transition: background-color 0.25s ease;
  text-decoration: none;
  text-align: start;
}

.spec-ledger-cell:hover {
  background: rgba(255, 255, 255, 0.035);
}

/* ==========================================================================
   5. BOTONES HARDWARE-GRADE (ADIÓS A LAS PÍLDORAS NEÓN GENÉRICAS)
   ========================================================================== */

.btn-craft-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--text-ivory);
  color: #050609;
  border: 1px solid #ffffff;
  box-shadow:
    0 10px 25px -6px rgba(244, 243, 239, 0.25),
    inset 0 -2px 0 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-craft-primary:hover:not(:disabled) {
  background: #ffffff;
  transform: translateY(-1.5px);
  box-shadow:
    0 14px 32px -6px rgba(244, 243, 239, 0.38),
    inset 0 -2px 0 0 rgba(0, 0, 0, 0.15);
}

.btn-craft-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.35rem;
  border-radius: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-ivory);
  background: rgba(18, 22, 32, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--specular-top);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-craft-secondary:hover:not(:disabled) {
  background: rgba(28, 34, 48, 0.92);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.kbd-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.14);
  color: inherit;
  opacity: 0.8;
}

/* ==========================================================================
   6. SELECTOR DE NODOS 3D & BOTONES DE TOPOLOGÍA
   ========================================================================== */

.node-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(12, 15, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a9b8;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: var(--specular-top);
}

.node-pill:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--text-ivory);
  transform: translateY(-1px);
}

.node-pill.is-active {
  background: rgba(var(--node-rgb, 45, 212, 191), 0.14);
  border-color: rgba(var(--node-rgb, 45, 212, 191), 0.75);
  color: #ffffff;
  box-shadow:
    0 0 22px -5px rgba(var(--node-rgb, 45, 212, 191), 0.4),
    var(--specular-top);
}

.node-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  background: rgb(var(--node-rgb, 45, 212, 191));
  box-shadow: 0 0 8px rgb(var(--node-rgb, 45, 212, 191));
}

.topology-btn {
  padding: 0.38rem 0.75rem;
  border-radius: 0.42rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(9, 11, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.topology-btn:hover:not(:disabled) {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.28);
}

.topology-btn.is-active {
  color: #050609;
  background: var(--text-ivory);
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 16px -4px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   7. INTERACTIVE SCREENSHOT SHOWCASE & 3D TILT FRAME
   ========================================================================== */

.showcase-stage {
  perspective: 1200px;
}

.showcase-frame {
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out, box-shadow 0.35s ease;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #050609;
  box-shadow:
    0 32px 64px -16px rgba(0, 0, 0, 0.88),
    var(--specular-top);
}

.explorer-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  border-radius: 0.75rem;
  background: rgba(12, 15, 22, 0.68);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.22s ease;
  text-align: start;
  width: 100%;
  box-shadow: var(--specular-top);
}

.explorer-tab-btn:hover:not(:disabled) {
  background: rgba(22, 27, 38, 0.85);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.explorer-tab-btn.is-active {
  background: linear-gradient(
    135deg var(--in-oklab),
    rgba(var(--tab-rgb, 45, 212, 191), 0.18),
    rgba(12, 15, 22, 0.95)
  );
  border-color: rgba(var(--tab-rgb, 45, 212, 191), 0.72);
  color: #ffffff;
  box-shadow: 0 12px 30px -10px rgba(var(--tab-rgb, 45, 212, 191), 0.3);
}

/* ==========================================================================
   8. RANGE SLIDERS FOR LIVE ROI & QUOTE SIMULATOR
   ========================================================================== */

input[type='range'].oleander-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #1e2433;
  outline: none;
  cursor: pointer;
}

input[type='range'].oleander-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--text-ivory);
  border: 2px solid #050609;
  box-shadow: 0 0 12px var(--slider-accent, #2dd4bf);
  cursor: pointer;
  transition: transform 0.15s ease;
}

input[type='range'].oleander-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

input[type='range'].oleander-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--text-ivory);
  border: 2px solid #050609;
  box-shadow: 0 0 12px var(--slider-accent, #2dd4bf);
  cursor: pointer;
  transition: transform 0.15s ease;
}

/* ==========================================================================
   9. NATIVE <dialog> TOP-LAYER ANIMATIONS (Modern Web Guidance Compliant)
   ========================================================================== */

dialog.oleander-dialog {
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.15rem;
  background: rgba(9, 11, 16, 0.97);
  color: var(--text-primary);
  max-width: min(92vw, 52rem);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 35px 90px -15px rgba(0, 0, 0, 0.92),
    var(--specular-top);

  /* Closed / Exit base state */
  opacity: 0;
  transform: scale(0.94) translateY(10px);

  /* MANDATORY: transition display and overlay for top-layer elements */
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.28s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

dialog.oleander-dialog.oleander-dialog--xl {
  max-width: min(94vw, 68rem);
}

dialog.oleander-dialog::backdrop {
  background-color: rgb(3 4 7 / 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition-property: background-color, backdrop-filter, display, overlay;
  transition-duration: 0.28s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

:is(dialog.oleander-dialog[open]):where(:not([data-closing])) {
  opacity: 1;
  transform: scale(1) translateY(0);

  @starting-style {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }

  &::backdrop {
    background-color: rgb(3 4 7 / 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    @starting-style {
      background-color: rgb(3 4 7 / 0);
      backdrop-filter: blur(0px);
      -webkit-backdrop-filter: blur(0px);
    }
  }
}

/* ==========================================================================
   10. SCROLL REVEAL, FORCED COLORS & REDUCED MOTION
   ========================================================================== */

.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

  .reveal-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .spotlight-card,
  .showcase-frame,
  .node-pill {
    transition: none;
  }

  dialog.oleander-dialog {
    transform: none;
    transition-duration: 0.1s;
  }

  @starting-style {
    :is(dialog.oleander-dialog[open]):where(:not([data-closing])) {
      transform: none;
    }
  }
}

/* Forced Colors Mode Fallback (Color Guidance Compliant) */
@media (forced-colors: active) {
  .spotlight-card,
  .spec-ledger,
  .hero-3d-viewport,
  .btn-craft-primary,
  .btn-craft-secondary,
  .node-pill.is-active {
    border: 1px solid CanvasText;
  }

  .node-pill.is-active,
  .topology-btn.is-active,
  .explorer-tab-btn.is-active {
    outline: 2px solid Highlight;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

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

::-webkit-scrollbar-thumb {
  background: #1e2433;
  border-radius: 3px;
}

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