/* lane overrides only */
body.lane-labs {
}
/* Dexxtra Labs page
   Minimal layout, tech ambient background, subtle motion
*/

:root{
  --labs-bg: #050509;
  --labs-ink: #F5F5F7;
  --labs-muted: rgba(245,245,247,0.70);
  --labs-dim: rgba(245,245,247,0.52);

  /* Labs accent (neon mint + graphite black) */
  --labs-accent: #7CFFDA;
  --labs-accent2: #6AE6C6;

  --labs-line: rgba(245,245,247,0.10);
  --labs-line2: rgba(124,255,218,0.10);
  --labs-shadow: rgba(0,0,0,0.55);

  --labs-max: 860px;
  --labs-pad: clamp(20px, 4vw, 44px);

}

/* Labs lane base styles ONLY — do not touch global scroll context */
body.lane-labs{
  margin: 0; /* safe */
  color: var(--labs-ink);
  background: var(--labs-bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  letter-spacing: 0.2px;
}

/* Scoped box-sizing so nav + skeleton aren’t affected */
body.lane-labs *,
body.lane-labs *::before,
body.lane-labs *::after{
  box-sizing: border-box;
}
/* =========================================
   Ambient Background Layers
   ========================================= */

.labs-ambient{
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Base vignette and noise (living haze) this is the haze effect */
.labs-ambient::before{
  content: "";
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(60% 60% at 50% 30%, rgba(124,255,218,0.12), transparent 60%),
    radial-gradient(40% 40% at 70% 70%, rgba(124,255,218,0.08), transparent 60%),
    radial-gradient(55% 55% at 30% 85%, rgba(255,255,255,0.05), transparent 62%),
    linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.55));

  filter: saturate(1.08);
  opacity: 1;

  transform-origin: center;
  animation: labsBaseHazeLive 15s ease-in-out infinite;
  will-change: transform;
}

@keyframes labsBaseHazeLive{
  0%{
    transform: translate3d(-2%, -1.5%, 0) scale(1.02);
  }
  50%{
    transform: translate3d(2%, 1.5%, 0) scale(1.05);
  }
  100%{
    transform: translate3d(-2%, -1.5%, 0) scale(1.02);
  }
}

/* Fine grid */
.labs-grid{
  position: absolute;
  inset: 0;
  opacity: 0.8;
  background-image:
    linear-gradient(to right, rgba(245,245,247,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245,245,247,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 70% at 50% 35%, black 55%, transparent 100%);
}

/* "Chip" pads, a repeating circuit tile feel */
.labs-chips{
  position: absolute;
  inset: -30%;
  opacity: 0.45;
  transform: rotate(8deg);
  background:
    linear-gradient(90deg, rgba(124,255,218,0.06) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(124,255,218,0.05) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(245,245,247,0.03) 18px 19px, transparent 19px 36px);
  background-size: 120px 120px, 120px 120px, 240px 240px;
  mask-image: radial-gradient(75% 65% at 50% 45%, black 52%, transparent 100%);
}

/* Scan layer
   Default state is calm and subtle
   Intro state does one sweep, then stops
*/
.labs-scan{
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;

  /* Calm idle glow belongs here */
  opacity: 0.22;
  background:
    radial-gradient(420px 320px at 20% 25%, rgba(124,255,218,0.14), transparent 70%),
    radial-gradient(520px 360px at 75% 65%, rgba(124,255,218,0.10), transparent 72%);
  filter: blur(0.7px);
}

.labs-scan::after{
  content:"";
  position: absolute;
  inset: -20%;
  pointer-events: none;

  background:
    radial-gradient(520px 420px at 22% 28%, rgba(124,255,218,0.18), transparent 72%),
    radial-gradient(620px 460px at 78% 66%, rgba(124,255,218,0.13), transparent 74%),
    radial-gradient(420px 360px at 62% 18%, rgba(124,255,218,0.09), transparent 70%);

  opacity: 1;
  transform: translate3d(-3%, -2%, 0);
  animation: labsHazeDrift 80s linear infinite;
  will-change: transform;
}

@keyframes labsHazeDrift{
  0%   { transform: translate3d(-3%, -2%, 0); }
  100% { transform: translate3d(3%, 2%, 0); }
}


 

/* Intro sweep beam lives on ::before, only when body has .labs-intro */
body.lane-labs.labs-intro .labs-scan::before{
  content:"";
  position:absolute;
  inset: -45%;

  /* brighter, tighter beam */
  background:
    linear-gradient(135deg,
      transparent 0%,
      rgba(124,255,218,0.0) 44%,
      rgba(124,255,218,0.28) 50%,
      rgba(124,255,218,0.0) 56%,
      transparent 100%);

  /* sharper + hotter */
  filter: blur(0.35px);
  transform: translate3d(-80%, -80%, 0);
  animation: labsIntroSwipe 1.8s ease-out 1;
  opacity: 0;
  will-change: transform, opacity;
}

@keyframes labsIntroSwipe{
  0%   { transform: translate3d(-80%, -80%, 0); opacity: 0; }
  18%  { opacity: 0.90; }
  86%  { transform: translate3d(80%, 80%, 0); opacity: 0.70; }
  100% { transform: translate3d(80%, 80%, 0); opacity: 0; }
}

/* Reduced motion: no sweep */
@media (prefers-reduced-motion: reduce){
  body.lane-labs.labs-intro .labs-scan::before{
    animation: none;
    opacity: 0;
  }
}

/* Canvas spark layer sits above scan but still subtle */
.labs-spark{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.68;
  mix-blend-mode: screen;
}


/* =========================================
   page padding
   ========================================= */


body.lane-labs .labs-page{
  padding-top: clamp(120px, 33vh, 360px);
}
/* =========================================
   Page Layout
   ========================================= */

   /* =========================================
   Hero
   ========================================= */

.labs-page{
  min-height: 100vh;
  padding: calc(var(--labs-pad) * 1.2) var(--labs-pad) calc(var(--labs-pad) * 1.6);
  display: grid;
  place-items: start center;
}

.labs-hero,
.labs-section,
.labs-footer{
  width: min(100%, var(--labs-max));
}

.labs-hero{
  padding-top: clamp(22px, 5vw, 56px);
  padding-bottom: clamp(18px, 4vw, 42px);
}





.labs-title{
  margin: 18px 0 10px;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.labs-lede{
  margin: 0;
  max-width: 64ch;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.55;
  color: var(--labs-muted);
}

.labs-quiet{
  margin: 14px 0 0;
  color: var(--labs-dim);
  font-size: 13px;
  letter-spacing: 0.02em;
}

 /* =========================================
   what it is
   ========================================= */

.labs-section{
  margin-top: clamp(18px, 4vw, 30px);
  padding-top: clamp(18px, 4vw, 32px);
  border-top: 1px solid rgba(245,245,247,0.08);
}

.labs-h2{
  margin: 0 0 10px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(245,245,247,0.88);
}

.labs-prose p{
  margin: 0 0 12px;
  max-width: 74ch;
  color: var(--labs-muted);
  line-height: 1.7;
}

/* =========================================
   How it moves
   Mobile-first, desktop enlargement only
   ========================================= */

/* Center the movement cluster only */
.labs-movement{
  text-align: center;
}



/* Flow card base (mobile first, keep the original fit) */
.labs-flow{
  margin: 14px auto 0;
  padding: 16px 18px 14px;

  display: inline-block;
  width: fit-content;
  max-width: min(100%, 560px);

  text-align: left; /* preserve ASCII alignment */

  border-radius: 16px;
  border: 1px solid rgba(124,255,218,0.14);
  background: linear-gradient(
    180deg,
    rgba(124,255,218,0.05),
    rgba(0,0,0,0.20)
  );
  box-shadow: 0 18px 38px rgba(0,0,0,0.25);
}

/* ASCII block base (mobile fit stays intact) */
.labs-pre{
  margin: 0;
  padding: 0;

  display: block;
  max-width: 100%;
  white-space: pre;
  overflow-x: auto;

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono","Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(245,245,247,0.92);
}

/* Desktop only: make the box bigger by adding vertical mass */
@media (min-width: 960px){
  .labs-flow{
    padding: 22px 22px 20px; /* more breathing room */
    min-height: 190px;       /* makes it feel larger without stretching wide */
    border-radius: 18px;
  }

  .labs-pre{
    font-size: 14px;         /* slightly bigger text */
    line-height: 1.6;
  }
}

/* Reset inner alignment for the two cards under it */
.labs-movement .labs-cardlike,
.labs-movement .labs-cardlike p{
  text-align: left;
}
/* Two cards under the flow */
.labs-split{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

@media (min-width: 820px){
  .labs-split{
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
}

/* Card shells */
.labs-cardlike{
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(245,245,247,0.10);
  background: rgba(0,0,0,0.20);
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}

.labs-h3{
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,245,247,0.88);
}

.labs-cardlike p{
  margin: 0;
  color: var(--labs-muted);
  line-height: 1.7;
}
  /* =========================================
   WHAT IT SUPPORTS (uniform width)
   ========================================= */

.labs-supports{
  margin-top: 10px;
}

/* Labs – Capacity intro tone match */
#supports .labs-sub {
  color: rgba(255, 255, 255, 0.58);
}

/* controls the overall width */
.labs-list{
  list-style: none;
  padding: 0;
  margin: 0 auto;

  display: grid;
  gap: 12px;

  width: min(100%, 560px); /* 👈 single source of truth */
}

/* cards now match each other */
.labs-list li{
  display: grid;
  gap: 4px;

  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(245,245,247,0.08);
  background: rgba(0,0,0,0.16);
}

/* title */
.labs-list li span{
  font-weight: 640;
  color: rgba(245,245,247,0.92);
}

/* description */
.labs-list li em{
  font-style: normal;
  color: var(--labs-muted);
  font-size: 13px;
  line-height: 1.55;
}

 /* =========================================================
   LABS IN MOTION (EXAMPLES)
   ========================================================= */

#labs-in-motion{
  margin-top: clamp(56px, 10vw, 96px);
}

/* Carousel viewport */
.labs-carousel{
  position: relative;
  margin-top: 32px;
  border: 1px solid var(--labs-line2);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,0.35);
}

/* Stable height so it doesn't jump */
.labs-carousel::before{
  content: "";
  display: block;
  aspect-ratio: 16 / 9;
}

/* Stack slides on top of each other */
.labs-slide{
  position: absolute;
  inset: 0;
  margin: 0;

  opacity: 0;
  transform: scale(1);
  transition: opacity 380ms ease;
  pointer-events: none;
}

/* Only show the active one */
.labs-slide.is-active{
  opacity: 1;
  pointer-events: auto;
}

/* FULL IMAGE, NO CROPPING */
.labs-slide img{
  width: 100%;
  height: 100%;
  object-fit: contain;            /* key change */
  object-position: center;
  display: block;
  background: rgba(0,0,0,0.55);   /* fills letterbox area */
}

/* Caption overlay (locks to bottom) */
.labs-slide figcaption{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;

  font-size: 13px;
  color: var(--labs-muted);

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.75),
    rgba(0,0,0,0.10)
  );
}

.labs-slide figcaption span{
  color: var(--labs-accent);
  font-weight: 500;
}

/* Dots */
.labs-carousel-controls{
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);

  display: inline-flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;

  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(245,245,247,0.10);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.labs-dot{
  width: 30px;
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(245,245,247,0.18);
  background: rgba(245,245,247,0.12);
  cursor: pointer;
  padding: 0;
}

.labs-dot.is-active{
  background: rgba(124,255,218,0.85);
  border-color: rgba(124,255,218,0.55);
}

.labs-motion-note{
  margin-top: 32px;
}



  .labs-slide figcaption{
    padding: 16px 14px;
    font-size: 12px;
  }


@media (max-width: 640px){
  /* Give the carousel more vertical room */
  .labs-carousel::before{
    aspect-ratio: 3 / 4; /* taller than 16:9, but not extreme */
  }

  .labs-slide img{
    object-fit: cover;
    object-position: center;
  }
}

/* =========================================
   LABS FOOTER (system idle state)
   ========================================= */

.labs-footer{
  margin-top: clamp(48px, 8vw, 72px);
  padding-top: 28px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(124,255,218,0.10);
}

.labs-footer-inner{
  width: min(100%, var(--labs-max));
  margin: 0 auto;

  display: grid;
  gap: 14px; /* more breathing room */
}

/* system status line */
.labs-closer{
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245,245,247,0.65);
}

/* control, not link */
.labs-top{
  justify-self: start;
  width: fit-content;
  align-self: flex-start;

  margin-top: 12px;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: rgba(124,255,218,0.75);
  text-decoration: none;

  padding: 6px 10px;
  border-radius: 999px;

  border: 1px solid rgba(124,255,218,0.25);
  background: rgba(0,0,0,0.25);

  /* prevent typewriter reflow/jump without shrinking the pill */
  white-space: nowrap;
  line-height: 1.2;
  min-height: 30px;

  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.labs-top:hover{
  color: rgba(124,255,218,1);
  border-color: rgba(124,255,218,0.55);
  background: rgba(124,255,218,0.08);
  transform: translateY(-1px);
}



/* ======================================
 This is the Animation section
   ====================================== */


/* ======================================
   LABS — HERO WARM-UP ANIMATION
   System initialization / power-on
   ====================================== */

@keyframes labsWarmUp {
  0%   { opacity: 0; }
  12%  { opacity: 0.35; }
  18%  { opacity: 0.12; }
  28%  { opacity: 0.75; }
  36%  { opacity: 0.45; }
  52%  { opacity: 0.9; }
  70%  { opacity: 0.78; }
  100% { opacity: 1; }
}

.labs-hero{
  opacity: 0;
  animation: labsWarmUp 0.85s cubic-bezier(.22,.61,.36,1);  
  animation-delay: 0.8s; /* ← the pause */
  animation-fill-mode: forwards; /* ← stay visible after */
}

@media (prefers-reduced-motion: reduce) {
  .labs-hero {
    animation: none;
    opacity: 1;
  }
}

/* ======================================
   LABS — Reveal Items
   Scroll-based: each item reveals when it enters view
   ====================================== */

/* Default hidden state */
.labs-reveal-item:not(.labs-terminal) {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
  will-change: opacity, transform;
}

/* Terminal typed items do not fade up */
.labs-terminal {
  opacity: 1;
  transform: none;
  transition: none;
  will-change: contents;
  white-space: pre-wrap;
}

/* Gate: nothing reveals until intent */
body:not(.labs-unlocked) .labs-reveal-item {
  opacity: 0;
  transform: translateY(14px);
}

/* Revealed */
body.labs-unlocked .labs-reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Optional stagger ONLY when you opt-in */
body.labs-unlocked .labs-reveal-item[data-reveal-order] {
  transition-delay: calc((var(--reveal-order, 1) - 1) * 70ms);
}

@media (prefers-reduced-motion: reduce) {
  .labs-reveal-item {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* ======================================
   LABS — MOVEMENT: STAGGERED REVEAL ITEMS
   ====================================== */

body.labs-unlocked #movement .labs-reveal-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
  transition-delay: calc((var(--reveal-order, 1) - 1) * 120ms);
}

body.labs-unlocked #movement .labs-reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  body.labs-unlocked #movement .labs-reveal-item {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* ======================================
   LABS IN MOTION: carousel reveal only
   ====================================== */

/* keep this scoped so other sections dont get affected */
#labs-in-motion .labs-carousel.labs-reveal-item,
#labs-in-motion [data-labs-carousel].labs-reveal-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms ease, transform 620ms ease;
  will-change: opacity, transform;
}

body.labs-unlocked #labs-in-motion .labs-carousel.labs-reveal-item.is-revealed,
body.labs-unlocked #labs-in-motion [data-labs-carousel].labs-reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  #labs-in-motion .labs-carousel.labs-reveal-item,
  #labs-in-motion [data-labs-carousel].labs-reveal-item {
    transition: none;
    transform: none;
    opacity: 1;
  }
}
/* ======================================
   LABS — Terminal Type (single system)
   ====================================== */

/* Terminal typed items: hidden only until the reveal system is armed */
body.lane-labs:not(.labs-unlocked) .labs-terminal{
  visibility: hidden;
  white-space: pre-wrap;
}

/* After unlock, keep hidden until observer marks it revealed */
body.lane-labs.labs-unlocked .labs-terminal{
  visibility: hidden;
  white-space: pre-wrap;
}

/* Once revealed, allow render */
body.lane-labs.labs-unlocked .labs-terminal.is-revealed{
  visibility: visible;
}

/* Optional cursor (only appears if JS injects .labs-cursor) */
body.lane-labs .labs-terminal .labs-cursor{
  display: inline-block;
  width: 0.6ch;
  margin-left: 0.15ch;
  opacity: 0.9;
  animation: labsCursorBlink 700ms steps(1) infinite;
}

@keyframes labsCursorBlink{
  50%{ opacity: 0; }
}

