/* ==========================================================================
   Cinematic Walkthrough Zoom Hero — Pure Scoped CSS Nesting
   High-DPR Hardware-Accelerated Canvas Depth Scrub with Floating HUD
   ========================================================================== */

.nior-walkthrough-hero-track {
  position: relative;
  height: 480vh;
  background-color: var(--nior-obsidian, #0c0d0e);
  color: var(--nior-white, #ffffff);
  overflow-x: clip;
  margin: 0;
  margin-top: 0;
  margin-bottom: -100vh;
  margin-block-end: -100vh;
  z-index: 2;

  .nior-walkthrough-hero-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }

  /* Canvas Media Container */
  .nior-walkthrough-canvas-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background-color: var(--nior-obsidian, #0c0d0e);

    canvas.nior-walkthrough-canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
      will-change: transform;
      transform: translateZ(0);
      background-color: #0c0d0e;
      image-rendering: -webkit-optimize-contrast;
    }

    /* Filmic Scrim Overlays — Completely Removed for 100% Full Brightness & Clarity */
    .nior-walkthrough-scrim-dark,
    .nior-walkthrough-scrim-radial,
    .nior-walkthrough-scrim-vignette {
      display: none;
    }
  }

  /* Center Brand Hero Title Card */
  .nior-hero-center-brand {
    position: absolute;
    inset: 0;
    margin: auto;
    width: min(92vw, 840px);
    height: fit-content;
    z-index: 10;
    pointer-events: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    will-change: transform, opacity;
    opacity: 1;

    .nior-hero-center-brand__title {
      font-family: var(--font-serif, "Playfair Display", Georgia, serif);
      font-size: clamp(2.4rem, 5.2vw, 4.6rem);
      font-weight: 500;
      letter-spacing: 0.28em;
      padding-left: 0.28em;
      color: var(--nior-white, #ffffff);
      line-height: 1.15;
      text-transform: uppercase;
      text-shadow: 0 4px 35px rgba(0, 0, 0, 0.95), 0 2px 10px rgba(0, 0, 0, 0.9);
    }

    .nior-hero-center-brand__divider {
      width: 70px;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--nior-gold, #c9a25e), transparent);
      margin: 18px 0;
      filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95));
    }

    .nior-hero-center-brand__tagline {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
      font-size: clamp(0.72rem, 1.1vw, 0.92rem);
      font-weight: 600;
      letter-spacing: 0.42em;
      padding-left: 0.42em;
      color: var(--nior-champagne, #f4ebe1);
      text-transform: uppercase;
      opacity: 1;
      text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.95),
        0 3px 8px rgba(0, 0, 0, 0.95),
        0 6px 20px rgba(0, 0, 0, 0.9);

      .nior-hero-grow-dot {
        display: inline-block;
        position: relative;
        color: var(--nior-gold, #c9a25e);
        font-weight: 700;
        margin: 0 0.22em;
        text-shadow: 0 0 10px rgba(201, 162, 94, 0.7);
      }

      .nior-hero-tagline-dot {
        display: inline-block;
        color: var(--nior-gold, #c9a25e);
        margin: 0 0.22em;
        opacity: 0.85;
      }
    }
  }

  /* Expanding Factory Background Disc with Scrim Overlay (Blooms behind center brand text) */
  .nior-hero-grow-disc {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #0c0d0e;
    background-image:
      linear-gradient(180deg, rgba(12, 13, 14, 0.68) 0%, rgba(12, 13, 14, 0.58) 50%, rgba(12, 13, 14, 0.78) 100%),
      radial-gradient(circle at center, rgba(12, 13, 14, 0.40) 0%, rgba(12, 13, 14, 0.75) 100%),
      url('../img/hq/factory-3.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 5; /* Kept as background behind center brand text (z-index 10) */
    clip-path: circle(0px at 50% 50%);
    -webkit-clip-path: circle(0px at 50% 50%);
    will-change: clip-path;
    opacity: 0;
    visibility: hidden;
    transform: none;
  }

  /* Staged Initial Content (Headline, Subtitle & CTAs) — Hidden to keep center brand emblem clean */
  .nior-walkthrough-content {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 6;
    align-items: flex-end;
    padding-bottom: clamp(40px, 8vh, 85px);
    pointer-events: none;
    will-change: transform, opacity;

    .nior-walkthrough-ui-container {
      max-width: 760px;
      pointer-events: auto;
    }

    .nior-hero-badge,
    .nior-hero-headline,
    .nior-hero-sub,
    .nior-hero-actions {
      opacity: 1;
      transform: none;
    }

    .nior-hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 6px 16px;
      background: rgba(12, 13, 14, 0.65);
      border: 1px solid rgba(201, 162, 94, 0.35);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-radius: 999px;
      margin-bottom: 22px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);

      .nior-eyebrow {
        font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: var(--nior-gold, #c9a25e);
      }
    }

    .nior-hero-headline {
      font-family: var(--font-serif, "Playfair Display", Georgia, serif);
      font-size: clamp(2.4rem, 4.4vw, 4.2rem);
      font-weight: 500;
      line-height: 1.12;
      letter-spacing: -0.015em;
      color: var(--nior-white, #ffffff);
      margin: 0 0 20px 0;
      text-shadow: 0 4px 35px rgba(0, 0, 0, 0.9), 0 2px 10px rgba(0, 0, 0, 0.85);

      .nior-text-gold {
        color: var(--nior-gold, #c9a25e);
        font-style: italic;
      }
    }

    .nior-hero-sub {
      font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
      font-size: clamp(0.95rem, 1.25vw, 1.12rem);
      font-weight: 300;
      line-height: 1.68;
      color: rgba(255, 255, 255, 0.88);
      max-width: 580px;
      margin: 0 0 32px 0;
      text-shadow: 0 2px 18px rgba(0, 0, 0, 0.95);
    }

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

  /* Minimalist Floating Gold HUD Indicator (Emerges on scroll) */
  .nior-walkthrough-hud {
    position: absolute;
    bottom: clamp(24px, 4.5vh, 44px);
    right: clamp(20px, 4vw, 54px);
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: opacity, transform;

    &.is-active {
      opacity: 1;
      transform: translateY(0);
    }

    .nior-walkthrough-hud__pill {
      display: inline-flex;
      align-items: center;
      gap: 14px;
      padding: 9px 18px;
      background: rgba(12, 13, 14, 0.72);
      border: 1px solid rgba(201, 162, 94, 0.38);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-radius: 999px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);

      .nior-walkthrough-hud__counter {
        display: flex;
        align-items: baseline;
        font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
        font-weight: 600;
        letter-spacing: 0.1em;

        .nior-walkthrough-hud__current {
          font-size: 0.95rem;
          color: var(--nior-gold, #c9a25e);
          min-width: 1.8ch;
          text-align: right;
        }

        .nior-walkthrough-hud__divider {
          color: rgba(255, 255, 255, 0.4);
          font-size: 0.8rem;
          margin: 0 4px;
        }

        .nior-walkthrough-hud__total {
          font-size: 0.8rem;
          color: rgba(255, 255, 255, 0.55);
        }
      }

      .nior-walkthrough-hud__sep {
        width: 1px;
        height: 14px;
        background: rgba(201, 162, 94, 0.35);
      }

      .nior-walkthrough-hud__tag {
        font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: var(--nior-champagne, #f4ebe1);
      }
    }

    /* Micro Progress Bar */
    .nior-walkthrough-hud__progress-track {
      width: 180px;
      height: 2px;
      background: rgba(255, 255, 255, 0.15);
      border-radius: 2px;
      overflow: hidden;

      .nior-walkthrough-hud__progress-fill {
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, var(--nior-gold, #c9a25e), #dfc28d);
        border-radius: 2px;
        transition: width 0.08s linear;
      }
    }
  }

  /* Micro Floating Scroll Hint */
  .nior-walkthrough-scroll-hint {
    position: absolute;
    bottom: clamp(24px, 4.5vh, 44px);
    left: clamp(20px, 4vw, 54px);
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    transition: opacity 0.35s ease;

    .nior-walkthrough-scroll-hint__line {
      width: 32px;
      height: 1px;
      background: var(--nior-gold, #c9a25e);
    }
  }
}

/* Responsive Adaptations */
@media (max-width: 768px) {
  .nior-walkthrough-hero-track {
    .nior-hero-center-brand {
      width: 90vw;
      .nior-hero-center-brand__title {
        letter-spacing: 0.18em;
        padding-left: 0.18em;
      }
    }

    .nior-walkthrough-content {
      padding-bottom: 30px;
      .nior-hero-headline {
        font-size: 2.1rem;
      }
      .nior-hero-sub {
        font-size: 0.9rem;
      }
    }

    .nior-walkthrough-hud {
      right: 16px;
      bottom: 20px;

      .nior-walkthrough-hud__pill {
        padding: 6px 14px;
        gap: 10px;
      }

      .nior-walkthrough-hud__tag {
        font-size: 0.68rem;
        letter-spacing: 0.14em;
      }

      .nior-walkthrough-hud__progress-track {
        width: 130px;
      }
    }

    .nior-walkthrough-scroll-hint {
      display: none;
    }
  }
}
