/* ==========================================================================
       DESIGN SYSTEM & KINETIC DARK LUXURY FOUNDATION
       ========================================================================== */
    :root {
      --bg-void: #070b17;
      --accent-acid: #fb6321;
      --accent-vermilion: #82a5ff;
      --grid-line: rgba(255, 255, 255, 0.075);
      --text-primary: #F5F5F7;
    }

    * {
      box-sizing: border-box;
    }

    html, body {
      background-color: var(--bg-void);
      color: var(--text-primary);
      font-family: system-ui, sans-serif;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    ::selection {
      background: #fb6321;
      color: #070b17;
    }

    /* Subtle Film Noise Overlay (Pure Inline SVG Filter - No External Assets) */
    .noise-overlay {
      position: fixed;
      inset: 0;
      z-index: 90;
      pointer-events: none;
      opacity: 0.04;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    }

    /* Architectural Hairline Grid Background */
    .arch-grid {
      background-size: 64px 64px;
      background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    }

    .hairline {
      border-color: rgba(255, 255, 255, 0.09);
    }

    /* Custom Scrollbar */
    ::-webkit-scrollbar {
      width: 6px;
    }
    ::-webkit-scrollbar-track {
      background: #070b17;
    }
    ::-webkit-scrollbar-thumb {
      background: #22222C;
      border-radius: 999px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: #fb6321;
    }

    /* ==========================================================================
       CUSTOM MAGNETIC CURSOR (Desktop Only)
       ========================================================================== */
    @media (hover: hover) and (pointer: fine) {
      body.custom-cursor-active,
      body.custom-cursor-active a,
      body.custom-cursor-active button,
      body.custom-cursor-active [data-cursor] {
        cursor: none !important;
      }
    }

    #cursor-ring {
      position: fixed;
      top: 0;
      left: 0;
      width: 28px;
      height: 28px;
      border-radius: 9999px;
      border: 1px solid rgba(245, 245, 247, 0.7);
      pointer-events: none;
      z-index: 9998;
      transform: translate(-50%, -50%);
      transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                  height 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                  background-color 0.25s ease,
                  border-color 0.25s ease,
                  opacity 0.2s ease;
      mix-blend-mode: difference;
      display: none;
      align-items: center;
      justify-content: center;
    }

    #cursor-dot {
      position: fixed;
      top: 0;
      left: 0;
      width: 6px;
      height: 6px;
      border-radius: 9999px;
      background-color: #fb6321;
      pointer-events: none;
      z-index: 9999;
      transform: translate(-50%, -50%);
      display: none;
      transition: transform 0.15s ease, opacity 0.2s ease;
    }

    #cursor-label {
      position: fixed;
      top: 0;
      left: 0;
      pointer-events: none;
      z-index: 9999;
      transform: translate(-50%, -50%) scale(0.8);
      opacity: 0;
      background: #fb6321;
      color: #070b17;
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.12em;
      padding: 6px 12px;
      border-radius: 9999px;
      white-space: nowrap;
      box-shadow: 0 0 25px rgba(251,99,33, 0.45);
      transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
      display: none;
    }

    #cursor-ring.is-expanded {
      width: 64px;
      height: 64px;
      background-color: rgba(255, 255, 255, 0.95);
      border-color: transparent;
    }

    #cursor-label.is-visible {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }

    /* ==========================================================================
       HERO TEXT REVEAL & MOTION PRIMITIVES
       ========================================================================== */
    .line-mask {
      overflow: hidden;
      display: block;
    }

    .line-reveal {
      display: inline-block;
      transform: translateY(115%);
      opacity: 0;
      animation: lineUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes lineUp {
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    /* Scroll Reveal Observer Classes */
    .reveal-on-scroll {
      opacity: 0;
      transform: translateY(28px);
      transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                  transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-on-scroll.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* ==========================================================================
       INFINITE KINETIC MARQUEE
       ========================================================================== */
    .marquee-track {
      display: flex;
      width: max-content;
      will-change: transform;
    }

    .marquee-left {
      animation: marqueeLeft 28s linear infinite;
    }

    .marquee-right {
      animation: marqueeRight 32s linear infinite;
    }

    .marquee-wrapper:hover .marquee-track {
      animation-play-state: paused;
    }

    @keyframes marqueeLeft {
      0% { transform: translateX(0); }
      100% { transform: translateX(-50%); }
    }

    @keyframes marqueeRight {
      0% { transform: translateX(-50%); }
      100% { transform: translateX(0); }
    }

    /* ==========================================================================
       BENTO SPOTLIGHT EFFECT (TOEM × ROADMAPW)
       ========================================================================== */
    .spotlight-card {
      position: relative;
      background: rgba(16, 24, 42, 0.85);
      border: 1px solid rgba(255, 255, 255, 0.08);
      overflow: hidden;
      transition: border-color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .spotlight-card::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(
        480px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(251,99,33, 0.13),
        transparent 60%
      );
      opacity: 0;
      transition: opacity 0.35s ease;
      pointer-events: none;
      z-index: 1;
    }

    .spotlight-card.spotlight-vermilion::before {
      background: radial-gradient(
        480px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(34,89,235, 0.15),
        transparent 60%
      );
    }

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

    .spotlight-card:hover {
      border-color: rgba(251,99,33, 0.35);
    }

    .spotlight-card.spotlight-vermilion:hover {
      border-color: rgba(34,89,235, 0.4);
    }

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

    /* ==========================================================================
       BEFORE / AFTER COMPARISON SLIDER
       ========================================================================== */
    .ba-container {
      position: relative;
      overflow: hidden;
      user-select: none;
      touch-action: pan-y;
    }

    .ba-after-clip {
      position: absolute;
      inset: 0;
      clip-path: inset(0 0 0 var(--split, 50%));
      transition: clip-path 0.05s linear;
    }

    .ba-container.is-animating .ba-after-clip {
      transition: clip-path 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .ba-divider {
      position: absolute;
      top: 0;
      bottom: 0;
      left: var(--split, 50%);
      width: 2px;
      background: #fb6321;
      box-shadow: 0 0 20px rgba(251,99,33, 0.8);
      z-index: 20;
      transform: translateX(-50%);
      pointer-events: none;
    }

    .ba-container.is-animating .ba-divider {
      transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    }

    /* ==========================================================================
       ROADMAP SVG ROUTE & ANIMATIONS
       ========================================================================== */
    @keyframes dashFlow {
      to {
        stroke-dashoffset: -36;
      }
    }
    .svg-flow {
      stroke-dasharray: 6 6;
      animation: dashFlow 1.4s linear infinite;
    }

    @keyframes pulseRing {
      0% { transform: scale(0.95); opacity: 0.85; }
      70% { transform: scale(1.6); opacity: 0; }
      100% { transform: scale(1.6); opacity: 0; }
    }
    .node-pulse {
      animation: pulseRing 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    }

    /* Overdrive Mode Enhancement */
    body.overdrive-mode {
      --grid-line: rgba(251,99,33, 0.12);
    }
    body.overdrive-mode .arch-grid {
      background-image:
        linear-gradient(to right, rgba(251,99,33, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(34,89,235, 0.07) 1px, transparent 1px);
    }

    /* Giant Footer Wordmark Kinetic Hover */
    .footer-letter {
      display: inline-block;
      transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
    }
    .footer-letter:hover {
      transform: translateY(-10%) skewX(-6deg);
      color: #fb6321;
    }

    /* Scanline Loader for Roadmap Generator */
    @keyframes scanBar {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(300%); }
    }
    .scan-bar {
      animation: scanBar 0.85s ease-in-out infinite;
    }

/* Identidad Roadmapw y ajustes para la vista previa. */
:root {
  --roadmap-orange: #fb6321;
  --roadmap-blue: #2259eb;
}

.brand-link { flex: 0 0 auto; }
.brand-logo { width: clamp(112px, 18vw, 190px); height: auto; }
.header-actions { min-width: 0; }
.header-cta { white-space: nowrap; }
.ba-container { --split: 46%; }
#roadmap-svg-progress { transition: stroke-dashoffset .5s ease; }
#giant-wordmark { font-size: clamp(2.65rem, 14vw, 14.5rem); }
#giant-wordmark .footer-letter:last-child { color: var(--roadmap-orange); }
#hero, section[id] { scroll-margin-top: 4.25rem; }
:focus-visible { outline: 2px solid #a9bdff; outline-offset: 3px; }
.reveal-on-scroll { opacity: 1; transform: none; }
.motion-ready .reveal-on-scroll:not(.is-visible) { opacity: 0; transform: translateY(24px); }
.lead-demo-note { color: #c0cbdf; }
#booking-error { color: #ffaa80; }
#toast { max-width: calc(100vw - 2rem); }
[hidden] { display: none !important; }

@media (max-width: 420px) {
  .header-cta { font-size: .625rem; padding-inline: .6rem; }
  .header-actions { gap: .45rem; }
  .brand-logo { width: 116px; }
}
@media (max-width: 359px) {
  .header-cta svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .motion-ready .reveal-on-scroll:not(.is-visible) { opacity: 1; transform: none; }
  #roadmap-canvas { display: none; }
}

.sound-toggle {
  display: grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: .5rem;
  color: var(--text-primary);
}
.sound-toggle svg { width: 1rem; height: 1rem; }
.sound-toggle:hover { color: var(--roadmap-orange); }
.sound-toggle[aria-pressed="true"] .sound-muted,
.sound-toggle[aria-pressed="false"] .sound-waves { display: none; }

@media (max-width: 359px) {
  .brand-logo { width: 96px; }
  .header-cta { padding-inline: .45rem; }
}
