/* Depth: a lit, layered background and three elevation levels.
 * Orange (#EC5F22) stays the only accent. No new colours beyond the greys already on the site. */

:root {
  --elev-flat: none;
  --elev-raised: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 0 rgba(0, 0, 0, 0.6), 0 12px 32px rgba(0, 0, 0, 0.45);
  --elev-floating: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 rgba(0, 0, 0, 0.6), 0 28px 64px rgba(0, 0, 0, 0.6);
  --glow-accent: 0 24px 60px rgba(236, 95, 34, 0.10);
}

html { background: #0A0A0B; }
body { background: transparent !important; }

/* The fixed background layer (created by depth.js) sits behind all content. */
.lc-depth {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

/* Warm light from the top, cool falloff toward the bottom. */
.lc-depth::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(236, 95, 34, 0.09), rgba(236, 95, 34, 0) 60%),
    linear-gradient(180deg, rgba(10, 10, 11, 0) 40%, rgba(255, 255, 255, 0.02) 100%);
}

/* Perspective grid floor, fading with distance (lower part of the page). */
.lc-depth::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: 0;
  height: 45%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(600px) rotateX(58deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
}

/* Fine grain to remove banding. */
.lc-depth-grain {
  position: absolute;
  inset: 0;
  background-image: url("/assets/noise.png");
  background-size: 128px 128px;
  opacity: 0.3;
}

/* Soft blobs that drift with scroll (transform only).
 * Drawn as radial gradients, not filter: blur(). Safari (all iPhone browsers) clips large blur
 * filters to a hard-edged box, which showed as a solid orange square over the hero.
 * The 180px margin/padding extends the glow past the blob the way the blur used to, so the
 * blob's position and size stay the same. */
.lc-depth-blob {
  position: absolute;
  box-sizing: content-box;
  margin: -180px;
  padding: 180px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--blob) 0%, var(--blob) 20%, transparent 100%);
  will-change: transform;
}
.lc-depth-blob--orange { width: 46vw; height: 46vw; left: 60vw; top: -12vw; --blob: rgba(236, 95, 34, 0.08); }
.lc-depth-blob--grey { width: 40vw; height: 40vw; left: -12vw; top: 55vh; --blob: rgba(255, 255, 255, 0.06); }
.lc-depth-blob--small { width: 26vw; height: 26vw; left: 40vw; top: 140vh; --blob: rgba(236, 95, 34, 0.06); }

/* Sections that paint a solid background let the layer show through. */
.lc-depth-clear { background-color: transparent !important; }

/* Elevation: cards raised, the pinned or active item and the terminal floating. */
.pg-card {
  background: #171717;
  box-shadow: var(--elev-raised);
}
.lc-win,
.lc-stage-frame {
  box-shadow: var(--elev-floating), var(--glow-accent);
}

/* Desktop pointer tilt (applied by depth.js to these frames only). */
.pg-frame,
.lc-stage-frame {
  transform-style: preserve-3d;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 767.98px), (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .pg-frame, .lc-stage-frame { transform: none !important; transition: none; }
  .lc-depth-blob { will-change: auto; }
}

/* Reading progress line (top, 1px, orange). Width is set by depth.js. */
.lc-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  width: 100%;
  background: #EC5F22;
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 60;
  pointer-events: none;
}

/* Hover feedback: 200ms lift for buttons and button-like links. */
.cs-cta-link, .cs-nav-link, button, .kb-btn, .kb-open, .lc-footer a, .cs-top nav a {
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), color 200ms cubic-bezier(0.22, 1, 0.36, 1), border-color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cs-cta-link:hover, .kb-btn:hover, .kb-open:hover { transform: translateY(-1px); }

/* Page transitions where the View Transitions API is supported; otherwise pages change instantly. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: 300ms cubic-bezier(0.22, 1, 0.36, 1) both lc-vt-out;
  }
  ::view-transition-new(root) {
    animation: 300ms cubic-bezier(0.22, 1, 0.36, 1) both lc-vt-in;
  }
}
@keyframes lc-vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes lc-vt-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  .cs-cta-link:hover, .kb-btn:hover, .kb-open:hover { transform: none; }
}

/* Ambient weave canvas (weave.js): behind content, never receives input. */
.lc-weave {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}

