/* ═══════════════════════════════════════════════════════════
   IA LAB — IMMERSIVE EXPERIENCE STYLES   v3
   Layers: galaxy z-0 · blob z-1 · content z-10 · constellation z-20
           cursor z-30 · entry z-40 · rocket z-50 · mute z-60
═══════════════════════════════════════════════════════════ */

/* ── CANVAS LAYERS ── */
#ia-galaxy-canvas {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  height: 100dvh;
  z-index: 0; pointer-events: none; display: block;
  background: #000;
}
#ia-blob-canvas {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  height: 100dvh;
  z-index: 1; pointer-events: none; display: block;
  background: transparent;
}
#ia-constellation-canvas {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  height: 100dvh;
  z-index: 20; pointer-events: none; display: block;
  background: transparent;
}

/* ── HERO ── */
#ia-hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 clamp(24px, 5vw, 80px) 56px;
  z-index: 10;
}
#scene-label {
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(240,237,224,0.32);
  font-family: var(--font-body, 'Montserrat', sans-serif);
  font-weight: 500; margin-bottom: 12px;
  opacity: 0; transition: opacity 1.4s ease;
}
#scroll-hint {
  font-size: 10px; letter-spacing: 0.32em;
  color: rgba(240,237,224,0.4);
  opacity: 0; transition: opacity 1.4s ease 0.4s;
}
.ia-hero-ready #scene-label,
.ia-hero-ready #scroll-hint { opacity: 1; }

/* ── CONTENT ── */
#ia-page-content {
  position: relative; z-index: 10;
  opacity: 0; transition: opacity 1s ease;
}
#ia-page-content.visible { opacity: 1; }

footer { position: relative; z-index: 10; background: #000; }

.marquee-wrap  { background: rgba(0,0,0,0.82); position: relative; z-index: 10; }
.ia-services   { background: rgba(0,0,0,0.72); position: relative; z-index: 10; }
.brava-prompts { background: rgba(0,0,0,0.76); position: relative; z-index: 10; }
.ia-cta-section{ background: rgba(0,0,0,0.78); position: relative; z-index: 10; }
.divider       { background: rgba(0,0,0,0.78); position: relative; z-index: 10; height: 1px; border: none; }

/* ── SERVICE ROWS ── */
.ia-service-row-v2 {
  display: flex; align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: 64px clamp(32px, 6vw, 100px);
  border-bottom: 1px solid rgba(240,237,224,0.06);
}
.ia-service-row-v2--reverse { flex-direction: row-reverse; }
.ia-service-left, .ia-service-right { flex: 1; min-width: 0; }

.ia-service-tags {
  font-size: 10px; letter-spacing: 0.22em;
  color: rgba(240,237,224,0.28);
  margin-top: 24px; text-transform: uppercase;
}
.ia-services-header { padding: 80px clamp(32px, 6vw, 100px) 48px; }
.ia-services-header-inner { max-width: 1400px; margin: 0 auto; }

.prompts-features {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 1px; background: rgba(240,237,224,0.06);
  border: 1px solid rgba(240,237,224,0.08); margin-top: 64px;
}
.prompt-feat { background: rgba(0,0,0,0.72); padding: 40px 32px; }
.outline-text { -webkit-text-stroke: 1px var(--color-cream, #f0ede0); color: transparent; }

/* ═══════════════════════════════════════════
   SCROLL REVEALS — once revealed, opacity stays 1 forever
═══════════════════════════════════════════ */
.ia-head { opacity: 1; } /* headings always visible; scramble replaces fade */

/* 98% (not 100%): a fully clipped element has an empty intersection
   rect and IntersectionObserver never fires for it. The 2% sliver is
   visually negligible but keeps the observer working. */
.ia-body {
  clip-path: inset(98% 0 0 0);
  transform: translateY(20px);
  transition: clip-path 0.6s ease-out, transform 0.6s ease-out;
}
.ia-body.ia-revealed { clip-path: inset(0 0 0 0); transform: none; }

.ia-card {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.34, 1.3, 0.64, 1), transform 0.7s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.ia-card.ia-revealed { opacity: 1; transform: none; }

/* Odometer digit roll */
.ia-num { will-change: transform; }
.ia-odo {
  display: inline-flex; overflow: hidden;
  height: 1em; line-height: 1;
  align-items: flex-start; /* columns keep natural 10em height */
}
.ia-odo-col {
  display: inline-flex; flex-direction: column;
  flex: 0 0 auto;
  transform: translateY(0);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
  filter: blur(2px);
}
.ia-odo.ia-odo-go .ia-odo-col { filter: blur(0); }
.ia-odo-col span { display: block; height: 1em; line-height: 1; }

/* ═══════════════════════════════════════════
   ENTRY SCREEN  (z-40)
═══════════════════════════════════════════ */
#ia-entry {
  position: fixed; inset: 0; z-index: 40;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 40px;
  transition: opacity 0.5s ease;
}
#ia-entry.fade-out { opacity: 0; pointer-events: none; }

.ia-entry-stage { position: relative; width: 200px; height: 200px; display: grid; place-items: center; }

.ia-entry-orb {
  width: 80px; height: 80px; border-radius: 50%;
  --glow: 0.5;
  background: radial-gradient(circle at 42% 38%, #ffffff 0%, #a0d4ff 38%, #6b4fd4 78%, rgba(107,79,212,0) 100%);
  box-shadow:
    0 0 calc(30px * var(--glow)) rgba(160,212,255,0.8),
    0 0 calc(80px * var(--glow)) rgba(107,79,212,0.5);
  animation: iaBreath 2s ease-in-out infinite;
  will-change: transform;
}
@keyframes iaBreath {
  0%, 100% { scale: 1; }
  50% { scale: 1.08; }
}

.ia-entry-ring {
  position: absolute; inset: 0;
  width: 200px; height: 200px;
  transform: rotate(-90deg);
}
.ia-entry-ring-fill {
  fill: none; stroke: #c8e6f0; stroke-width: 2;
  stroke-linecap: round;
}
.ia-entry-ring-track { fill: none; stroke: rgba(200,230,240,0.12); stroke-width: 2; }

.ia-entry-dashed {
  position: absolute; inset: -18px;
  border: 1px dashed rgba(200,230,240,0.22);
  border-radius: 50%;
  animation: iaSpin 20s linear infinite;
}
@keyframes iaSpin { to { transform: rotate(360deg); } }

.ia-entry-dust { position: absolute; inset: -50px; pointer-events: none; }
.ia-entry-dust i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(180,215,255,0.6);
  animation: iaDust 6s ease-in-out infinite;
}
.ia-entry-dust i:nth-child(1) { left: 8%;  top: 30%; animation-delay: 0s;   }
.ia-entry-dust i:nth-child(2) { left: 85%; top: 18%; animation-delay: 1.2s; }
.ia-entry-dust i:nth-child(3) { left: 70%; top: 80%; animation-delay: 2.4s; }
.ia-entry-dust i:nth-child(4) { left: 18%; top: 75%; animation-delay: 3.6s; }
.ia-entry-dust i:nth-child(5) { left: 50%; top: 4%;  animation-delay: 4.8s; }
@keyframes iaDust {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-12px); opacity: 0.9; }
}

.ia-entry-instr {
  font-family: 'Chillax', sans-serif;
  font-size: 13px; letter-spacing: 0.34em;
  color: #f0ede0; text-transform: uppercase;
  animation: iaInstrPulse 2.6s ease-in-out infinite;
}
@keyframes iaInstrPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.ia-keycap {
  display: inline-block; padding: 3px 10px; margin: 0 6px;
  border: 1px solid rgba(240,237,224,0.5); border-radius: 6px;
  box-shadow: 0 2px 0 rgba(240,237,224,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
  font-weight: 700;
}

.ia-entry-fallback {
  opacity: 0; pointer-events: none;
  background: transparent; color: rgba(240,237,224,0.6);
  border: 1px solid rgba(240,237,224,0.25);
  border-radius: 100px; padding: 10px 32px;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.6s ease, color 0.3s, border-color 0.3s;
}
.ia-entry-fallback.show { opacity: 1; pointer-events: auto; }
.ia-entry-fallback:hover, .ia-entry-fallback:focus-visible {
  color: #f0ede0; border-color: rgba(240,237,224,0.6);
}

/* Collapse: elements sucked into center */
#ia-entry.collapse .ia-entry-stage,
#ia-entry.collapse .ia-entry-instr,
#ia-entry.collapse .ia-entry-fallback {
  transition: transform 1.4s cubic-bezier(0.55, 0, 1, 0.45), opacity 1.2s ease;
  transform: scale(0.02) rotate(560deg);
  opacity: 0;
}
#ia-entry.collapse { background: transparent; transition: background 1.6s ease 0.4s; }

#ia-transition-canvas {
  position: fixed; inset: 0; z-index: 41;
  width: 100vw; height: 100vh; height: 100dvh;
  pointer-events: none;
}

#ia-flash {
  position: fixed; inset: 0; z-index: 42;
  background: #fff; opacity: 0; pointer-events: none;
  transition: opacity 0.1s ease-in;
}
#ia-flash.on { opacity: 0.85; }
#ia-flash:not(.on) { transition: opacity 0.4s ease-out; }

/* ═══════════════════════════════════════════
   CUSTOM CURSOR  (z-30, desktop only)
═══════════════════════════════════════════ */
body.ia-custom-cursor,
body.ia-custom-cursor #ia-hero,
body.ia-custom-cursor #ia-page-content { cursor: none; }
/* Custom cursor morphs on interactive elements; they keep cursor:none
   because the orb ring IS the affordance. Inputs keep text caret visible. */
body.ia-custom-cursor a,
body.ia-custom-cursor button { cursor: none; }
body.ia-custom-cursor input,
body.ia-custom-cursor textarea { cursor: text; }

#ia-cursor-orb {
  position: fixed; top: 0; left: 0; z-index: 30;
  width: 28px; height: 28px;
  pointer-events: none;
  will-change: transform;
}
#ia-cursor-orb::after {
  content: ''; position: absolute; inset: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 8px rgba(255,255,255,0.9),
    0 0 18px rgba(160,212,255,0.8),
    0 0 34px rgba(160,212,255,0.4);
  transition: inset 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.22s, box-shadow 0.22s, border 0.22s;
  border: 0 solid rgba(200,230,255,0);
}
#ia-cursor-orb.ring::after {
  inset: 0;
  background: transparent;
  border: 1.5px solid rgba(200,230,255,0.9);
  box-shadow: 0 0 14px rgba(160,212,255,0.5);
}
#ia-cursor-orb.down::after { transform: scale(0.7); }

#ia-cursor-trail {
  position: fixed; inset: 0; z-index: 29;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   COSMIC FORM
═══════════════════════════════════════════ */
.waitlist-box {
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(240,237,224,0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ia-field { position: relative; }
.ia-field input {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #2a2a3a !important;
  transition: border-color 0.3s, box-shadow 0.3s !important;
  width: 100%;
}
.ia-field.focus input {
  border-bottom: 1px solid transparent !important;
  border-image: linear-gradient(90deg, #a0d4ff, #8a6bdf) 1 !important;
  border-bottom-width: 1px !important;
  border-bottom-style: solid !important;
  box-shadow: 0 4px 20px rgba(120,140,255,0.25) !important;
}
.ia-field-label {
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 14px; color: rgba(240,237,224,0.4);
  pointer-events: none;
  transition: top 0.25s ease, font-size 0.25s ease, color 0.25s ease;
}
.ia-field.focus .ia-field-label,
.ia-field.filled .ia-field-label {
  top: -6px; font-size: 10px;
  color: rgba(160,212,255,0.85);
  letter-spacing: 0.08em;
}
/* hide native placeholder once label exists */
.ia-field input::placeholder { color: transparent; }

.ia-orbit-canvas {
  position: absolute; pointer-events: none;
  opacity: 0; transition: opacity 0.3s ease;
  z-index: 1;
}
#waitlist-form { position: relative; }

#waitlist-msg.ia-msg-in { animation: iaMsgIn 0.6s ease both; }
@keyframes iaMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════
   ROCKET OVERLAY  (z-50)
═══════════════════════════════════════════ */
#ia-rocket-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,5,0);
  pointer-events: none;
  transition: background 0.4s ease;
}
#ia-rocket-overlay.on  { background: rgba(0,0,5,0.92); }
#ia-rocket-overlay.out { background: rgba(0,0,5,0); transition: background 0.8s ease; }
#ia-rocket-overlay.out .ia-rk-planet,
#ia-rocket-overlay.out .ia-rk-rocket { opacity: 0; transition: opacity 0.6s ease; }

.ia-rk-rocket {
  position: absolute; top: 0; left: 0;
  width: 40px; height: 80px;
  opacity: 0; will-change: transform;
}
.ia-rk-flame {
  position: absolute; left: 50%; top: 76px;
  width: 14px; height: 30px;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  background: linear-gradient(to bottom, #a0d4ff, #8a6bdf 55%, rgba(138,107,223,0));
  animation: iaFlame 0.12s ease-in-out infinite alternate;
}
@keyframes iaFlame {
  from { height: 26px; opacity: 0.85; }
  to   { height: 36px; opacity: 1; }
}

.ia-rk-planet {
  position: absolute; width: 120px; height: 120px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, #6a6a72 0%, #4c4c52 55%, #3a3a40 100%);
  box-shadow: inset -14px -10px 30px rgba(0,0,0,0.55), 0 0 30px rgba(120,120,140,0.15);
  overflow: hidden;
}
.ia-rk-planet::before, .ia-rk-planet::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(0,0,0,0.25);
}
.ia-rk-planet::before { width: 22px; height: 22px; left: 24%; top: 52%; }
.ia-rk-planet::after  { width: 13px; height: 13px; left: 62%; top: 28%; }

.ia-rk-crack {
  position: absolute; inset: 0; opacity: 0;
  border-radius: 50%;
}
#ia-rocket-overlay.impact .ia-rk-planet { animation: iaPlanetShake 0.3s ease; }
#ia-rocket-overlay.impact .ia-rk-crack.a {
  opacity: 1;
  background: linear-gradient(115deg, transparent 47%, rgba(255,190,140,0.85) 49.5%, transparent 52%);
  animation: iaCrackA 0.9s ease-out 0.1s both;
}
#ia-rocket-overlay.impact .ia-rk-crack.b {
  opacity: 1;
  background: linear-gradient(60deg, transparent 48%, rgba(255,170,85,0.6) 50%, transparent 52%);
  animation: iaCrackB 0.9s ease-out 0.15s both;
}
@keyframes iaPlanetShake {
  0%, 100% { transform: translate(0,0); }
  25% { transform: translate(-4px, 2px); }
  50% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, -1px); }
}
@keyframes iaCrackA { from { transform: translate(0,0); } to { transform: translate(-5px, 3px); } }
@keyframes iaCrackB { from { transform: translate(0,0); } to { transform: translate(5px, -3px); } }

.ia-rk-shockwave {
  position: absolute; width: 20px; height: 20px;
  border: 2px solid rgba(255,220,180,0.9);
  border-radius: 50%; opacity: 0;
  will-change: transform, opacity;
}
#ia-rocket-overlay.impact .ia-rk-shockwave { animation: iaShock 0.8s ease-out both; }
@keyframes iaShock {
  from { transform: scale(1); opacity: 0.9; }
  to   { transform: scale(14); opacity: 0; }
}

.ia-rk-fx { position: absolute; inset: 0; }

/* ═══════════════════════════════════════════
   MUTE BUTTON  (z-60)
═══════════════════════════════════════════ */
#ia-mute-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 44px; height: 44px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(240,237,224,0.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  gap: 3px; cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s;
}
#ia-mute-btn:hover, #ia-mute-btn:focus-visible { border-color: rgba(160,212,255,0.6); }
#ia-mute-btn:focus-visible { outline: 2px solid rgba(160,212,255,0.8); outline-offset: 2px; }
#ia-mute-btn i {
  display: block; width: 3px; border-radius: 2px;
  background: rgba(200,230,255,0.85);
  animation: iaBar 0.9s ease-in-out infinite alternate;
}
#ia-mute-btn i:nth-child(1) { height: 10px; animation-delay: 0s; }
#ia-mute-btn i:nth-child(2) { height: 16px; animation-delay: 0.2s; }
#ia-mute-btn i:nth-child(3) { height: 8px;  animation-delay: 0.4s; }
@keyframes iaBar { from { transform: scaleY(0.5); } to { transform: scaleY(1); } }
#ia-mute-btn.muted i { animation: none; transform: scaleY(0.35); background: rgba(200,230,255,0.35); }
#ia-mute-btn.muted::after {
  content: ''; position: absolute;
  width: 26px; height: 1.5px; background: rgba(240,237,224,0.7);
  transform: rotate(-40deg);
}

/* ═══════════════════════════════════════════
   STATIC TIER — CSS-only starfield, no WebGL
═══════════════════════════════════════════ */
body.ia-static { background: radial-gradient(ellipse at 50% 35%, #0d0528 0%, #000 70%); }
body.ia-static #ia-galaxy-canvas,
body.ia-static #ia-blob-canvas,
body.ia-static #ia-constellation-canvas { display: none; }
body.ia-static #ia-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  /* box-shadow starfield */
  width: 2px; height: 2px; border-radius: 50%;
  box-shadow:
    8vw 12vh 0 0 rgba(255,255,255,0.8),  22vw 40vh 0 0 rgba(160,212,255,0.7),
    34vw 8vh  0 1px rgba(255,255,255,0.6), 47vw 64vh 0 0 rgba(184,160,255,0.65),
    55vw 25vh 0 0 rgba(255,255,255,0.75), 64vw 78vh 0 1px rgba(160,212,255,0.5),
    72vw 14vh 0 0 rgba(255,255,255,0.7),  81vw 49vh 0 0 rgba(255,255,255,0.6),
    90vw 30vh 0 1px rgba(184,160,255,0.6), 12vw 84vh 0 0 rgba(255,255,255,0.65),
    28vw 92vh 0 0 rgba(160,212,255,0.6),  93vw 88vh 0 0 rgba(255,255,255,0.7),
    40vw 18vh 0 0 rgba(255,255,255,0.5),  60vw 52vh 0 0 rgba(255,255,255,0.55),
    18vw 58vh 0 0 rgba(160,212,255,0.6),  76vw 66vh 0 0 rgba(255,255,255,0.6);
}
body.ia-static .ia-body,
body.ia-static .ia-card { clip-path: none; opacity: 1; transform: none; transition: none; }
body.ia-static #ia-mute-btn { display: none; }

/* ═══════════════════════════════════════════
   REDUCED MOTION — everything visible, nothing moves
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  #ia-galaxy-canvas, #ia-blob-canvas, #ia-constellation-canvas,
  #ia-entry, #ia-cursor-orb, #ia-cursor-trail, #ia-transition-canvas { display: none !important; }
  body { background: radial-gradient(ellipse at 50% 40%, #0d0528 0%, #000 65%) !important; }
  #ia-page-content, #scene-label, #scroll-hint { opacity: 1 !important; }
  .ia-body, .ia-card, .ia-head, .ia-num {
    clip-path: none !important; opacity: 1 !important;
    transform: none !important; transition: none !important; animation: none !important;
  }
  .ia-entry-orb, .ia-entry-dashed, .ia-entry-instr, #ia-mute-btn i { animation: none !important; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) { .prompts-features { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .ia-service-row-v2, .ia-service-row-v2--reverse { flex-direction: column; padding: 48px 24px; gap: 24px; }
  .ia-service-num-big { text-align: center; font-size: clamp(64px,20vw,100px) !important; }
  .ia-service-title { font-size: clamp(32px,8vw,52px) !important; }
  .ia-service-desc  { font-size: 14px !important; }
  .ia-services-header { padding: 64px 24px 40px; }
  .prompt-feat { padding: 32px 24px; }
  #ia-hero { padding-bottom: 40px; }
  .waitlist-box { padding: 40px 24px !important; }
  #ia-mute-btn { right: 16px; bottom: 16px; }
}
@media (max-width: 480px) { .ia-service-row-v2 { padding: 40px 20px; } }
@media (min-width: 1280px) { .ia-service-row-v2 { padding: 72px 100px; gap: 60px; } }
