/* ── 3D Hero Scene — all rules scoped to html.hero3d-on ──────────────────────────
   When LANDING_3D = false in config.js, hero3d.js never adds .hero3d-on
   and every rule in this file is completely inert. Classic design is unchanged. */

/* ── Scene wrapper ─────────────────────────────────────────────────────────────── */
html.hero3d-on .hero-scene {
  position: relative;
  overflow: hidden;
  /* Extra bottom padding so the terrain scene has room to breathe below the text */
  padding-bottom: 60px;
}

/* ── WebGL canvas ──────────────────────────────────────────────────────────────── */
html.hero3d-on #hero-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
  z-index: 0;
  display: block;
  opacity: 0;
  transition: opacity 1.6s ease;
}

html.hero3d-on #hero-canvas.hero-canvas--ready {
  opacity: 1;
}

/* ── Hero content floats above canvas ─────────────────────────────────────────── */
html.hero3d-on .hero-scene .hero {
  position: relative;
  z-index: 2;
}

/* ── Edge vignette ─────────────────────────────────────────────────────────────── */
html.hero3d-on .hero-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 140% 50% at 50% 115%, var(--bg) 25%, transparent 65%),
    radial-gradient(ellipse 32% 100% at -3%  50%, var(--bg) 18%, transparent 55%),
    radial-gradient(ellipse 32% 100% at 103% 50%, var(--bg) 18%, transparent 55%),
    radial-gradient(ellipse 100% 30% at 50% -5%, var(--bg) 30%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* ── Terminal card CSS-3D parallax ────────────────────────────────────────────── */
html.hero3d-on .hero-visual {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ── Subtle accent glow under the terminal card ────────────────────────────────── */
html.hero3d-on .terminal {
  box-shadow:
    0 0 40px rgba(18, 201, 0, 0.10),
    0 8px 32px rgba(0, 0, 0, 0.6);
}

/* ── No-WebGL fallback ─────────────────────────────────────────────────────────── */
html.hero3d-on .hero-scene--no-webgl #hero-canvas {
  display: none;
}
html.hero3d-on .hero-scene--no-webgl::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 65% 35%, rgba(18,201,0,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 50% 45% at 20% 65%, rgba(245,158,11,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Scroll reveals ────────────────────────────────────────────────────────────── */
html.hero3d-on #page-landing .sr-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.hero3d-on #page-landing .sr-item.sr-visible {
  opacity: 1;
  transform: none;
}

/* ── Mobile: skip canvas ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  html.hero3d-on #hero-canvas         { display: none !important; }
  html.hero3d-on .hero-scene::after   { display: none; }
  html.hero3d-on .hero-scene          { padding-bottom: 0; }
}
