/* ============================================
   CINEMATIC INTRO — Island Horizon Reveal
   Replaces the old theatrical curtain reveal.
   
   DROP-IN: Add this CSS to style.css (or keep as 
   a separate file linked in <head>).
   
   Required CSS variables (already in your :root):
     --deep:   #0a0f1e  (add this one new variable)
     --orange: #f97316
     --amber:  #f59e0b  (add this one new variable)
   
   The old curtain variables/styles (.hp-curtain*) 
   can be fully removed.
   ============================================ */

/* --- Add these two new variables to your existing :root --- */
/*
:root {
  --deep: #0a0f1e;
  --amber: #f59e0b;
}
*/

/* ---------- Intro Overlay ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--deep, #0a0f1e);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ---------- Glowing Horizon Line ---------- */
.intro__horizon {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 50%;
  height: 2px;
  z-index: 2;
  transform: translateY(-50%) scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(249,115,22,0.3) 10%,
    var(--orange, #f97316) 30%,
    var(--amber, #f59e0b) 50%,
    var(--orange, #f97316) 70%,
    rgba(249,115,22,0.3) 90%,
    transparent 100%
  );
  box-shadow:
    0 0 40px rgba(249,115,22,0.5),
    0 0 80px rgba(249,115,22,0.2),
    0 -20px 60px rgba(249,115,22,0.1),
    0 20px 60px rgba(249,115,22,0.1);
}

/* ---------- Radial Glow Bloom ---------- */
.intro__bloom {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(249,115,22,0.15) 0%,
    rgba(249,115,22,0.05) 40%,
    transparent 70%
  );
  z-index: 2;
  pointer-events: none;
}

/* ---------- Island Silhouettes ---------- */
.intro__islands {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  width: 80%;
  max-width: 750px;
  z-index: 3;
  opacity: 0;
}
.intro__islands svg {
  width: 100%;
  height: auto;
}
.intro__islands path {
  fill: none;
  stroke: var(--orange, #f97316);
  stroke-width: 1.5;
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  filter: drop-shadow(0 0 8px rgba(249,115,22,0.4));
}

/* ---------- Central Brand Block ---------- */
.intro__brand {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(15px) scale(0.95);
}

.intro__logo svg {
  width: 56px;
  height: 56px;
}
.intro__logo circle {
  stroke: rgba(249,115,22,0.5);
  stroke-width: 1.2;
}
.intro__logo .pine {
  fill: var(--orange, #f97316);
  opacity: 0.9;
}
.intro__logo .pine-dot {
  fill: rgba(249,115,22,0.5);
}

.intro__wordmark {
  font-family: var(--font-display, 'Cabinet Grotesk', sans-serif);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: #e2e8f0;
  letter-spacing: -0.03em;
}
.intro__wordmark em {
  font-style: normal;
  color: var(--orange, #f97316);
}

/* ---------- Tagline ---------- */
.intro__tagline {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(226,232,240,0.4);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
}

/* ---------- Progress Bar ---------- */
.intro__progress {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  z-index: 10;
  overflow: hidden;
}
.intro__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--orange, #f97316), var(--amber, #f59e0b));
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(249,115,22,0.5);
}

/* ---------- Cycling Counter Text ---------- */
.intro__counter {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  text-align: center;
  opacity: 0;
  white-space: nowrap;
}

/* ---------- Final States ---------- */
.intro--fading {
  transition: opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}
.intro--hidden {
  display: none;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .intro {
    transition: none !important;
  }
  .intro__horizon,
  .intro__bloom,
  .intro__brand,
  .intro__tagline {
    transition: none !important;
  }
}
