/* ===== iiZR Landing — Interactive Intelligence (Tier 1+2) ===== */

:root {
  --bg: #050008;
  --bg-soft: #0c0614;
  --card-bg: rgba(15, 8, 28, 0.65);
  --card-border: rgba(167, 139, 250, 0.18);
  --text: #ffffff;
  --text-dim: #94a3b8;
  --text-mid: #cbd5e1;
  --text-mute: #64748b;
  --accent: #a78bfa;
  --accent-2: #8b5cf6;
  --accent-bright: #c4b5fd;
  --cyan: #22d3ee;
  --rule: rgba(167, 139, 250, 0.6);

  --display-font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--display-font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== background — particles + gradient mesh ===== */
#bg-particles {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(34, 211, 238, 0.10), transparent 60%);
}
.bg-pattern::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 0%, transparent 80%);
}

/* ===== reveal-on-scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== ACT I — HERO ===== */
.grid.hero {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(420px, 1.3fr) minmax(360px, 1fr);
  gap: 32px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 48px 36px 24px;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: stretch;
}

.col { display: flex; flex-direction: column; gap: 22px; }
.col-center { align-items: stretch; justify-content: stretch; padding: 0; }
.col-right { gap: 18px; }

/* brand */
.brand { display: flex; flex-direction: column; gap: 6px; }
.dots { display: flex; gap: 4px; margin-bottom: 4px; }
.dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: block;
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.7);
}
.logo {
  font-family: var(--display-font);
  font-size: 78px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--text);
}
.logo.small { font-size: 28px; }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kicker.accent { color: var(--accent); }
.kicker .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 6px var(--accent); }
  50% { transform: scale(1.4); opacity: 0.7; box-shadow: 0 0 14px var(--accent); }
}
.dot.pulse { animation: pulse 1.8s ease-in-out infinite; }

/* hero headline */
.hero-headline {
  font-family: var(--display-font);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-top: 18px;
  color: var(--text);
}
.accent { color: var(--accent); }
.rule {
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 12px 0 8px;
  box-shadow: 0 0 10px var(--accent);
}
.subhead {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-mid);
  margin-top: 4px;
}

/* card primitive */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4),
              inset 0 0 0 1px rgba(255,255,255,0.02);
  animation: cardBreath 8s ease-in-out infinite;
}

@keyframes cardBreath {
  0%, 100% { box-shadow: 0 4px 30px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 0 rgba(167,139,250,0); }
  50%      { box-shadow: 0 4px 30px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 24px 0 rgba(167,139,250,0.10); }
}

.card-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* status card */
.status-card { margin-top: 14px; }
.metric {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.metric:last-child { margin-bottom: 0; }
.metric-icon { width: 24px; height: 24px; color: var(--accent); filter: drop-shadow(0 0 4px var(--accent)); }
.metric-icon svg { width: 100%; height: 100%; }
.metric-name { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--text-dim); }
.metric-value { font-family: var(--mono); font-size: 12px; color: var(--text-mid); font-weight: 500; }

.bar {
  grid-column: 2 / -1;
  height: 6px;
  background: rgba(167, 139, 250, 0.12);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 3px;
  box-shadow: 0 0 12px var(--accent);
  transition: width 1.6s cubic-bezier(.2,.7,.2,1);
}

/* hex feature row */
.hex-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.hex { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hex-shape {
  width: 56px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  position: relative;
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.4));
  animation: hexPulse 4s ease-in-out infinite;
  animation-delay: var(--hex-delay, 0s);
}
@keyframes hexPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.4)); }
  50%      { filter: drop-shadow(0 0 18px rgba(167, 139, 250, 0.8)); }
}
.hex-shape::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--card-bg);
  border: 1px solid var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 64'><polygon points='28,2 54,17 54,47 28,62 2,47 2,17' fill='black'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 64'><polygon points='28,2 54,17 54,47 28,62 2,47 2,17' fill='black'/></svg>") center/contain no-repeat;
}
.hex-shape svg { position: relative; z-index: 1; width: 26px; height: 26px; }
.hex-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; color: var(--text-dim); }

/* center — portrait video full-bleed */
.portrait {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 720px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s;
  will-change: transform;
  cursor: pointer;
  background: #050008;
  border: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}
.portrait:hover {
  box-shadow: 0 30px 100px rgba(139, 92, 246, 0.45);
}
.portrait-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 18px;
  filter: contrast(1.05) saturate(1.05);
  display: block;
}
.portrait-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 32px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(to top, rgba(5, 0, 8, 0.6) 0%, transparent 30%);
  border-radius: 18px;
  opacity: 1;
  transition: opacity 0.3s;
}
.portrait:hover .portrait-overlay { opacity: 1; }
.portrait-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(5, 0, 8, 0.75);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: ctaPulse 2.4s ease-in-out infinite;
  transition: opacity 0.4s, transform 0.4s;
}
/* When audio is on, the prompt pills dim (become a status indicator) */
body.audio-on .portrait-cta,
body.audio-on .film-tag,
body.audio-on .pip-label {
  opacity: 0.5;
  animation: none;
  transform: none;
}
body.audio-on .portrait-cta-dot,
body.audio-on .pip-dot {
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.portrait-cta-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
.portrait-glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.3), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

/* right column cards */
.feed-card .waveform {
  width: 100%;
  height: 110px;
  margin-bottom: 18px;
  display: flex; align-items: center;
}
.feed-card .waveform canvas { width: 100%; height: 100%; display: block; }
.feed-text { font-size: 16px; line-height: 1.5; color: var(--text-mid); margin-bottom: 10px; }

.insights { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.insights li {
  display: grid;
  grid-template-columns: 36px 1fr 24px;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(167, 139, 250, 0.08);
  transition: background 0.2s, padding 0.2s;
}
.insights li:last-child { border-bottom: none; }
.insights li:hover { background: rgba(167, 139, 250, 0.04); padding-left: 6px; padding-right: 6px; border-radius: 8px; }
.insights .num { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--cyan); letter-spacing: 0.04em; }
.insights .iname { font-size: 15px; color: var(--text); font-weight: 500; }
.insights .iicon { width: 22px; height: 22px; color: var(--accent); filter: drop-shadow(0 0 4px rgba(167, 139, 250, 0.4)); }
.insights .iicon svg { width: 100%; height: 100%; }

.view-all {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px;
  color: var(--accent); text-decoration: none;
  margin-top: 18px; letter-spacing: 0.06em;
  transition: color 0.15s, gap 0.2s;
}
.view-all:hover { color: var(--accent-bright); gap: 12px; }
.view-all span { font-size: 16px; }

/* agent */
.agent-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.agent-tag { font-family: var(--mono); font-size: 13px; letter-spacing: 0.22em; color: var(--accent); }
.agent-text { font-size: 15px; line-height: 1.5; color: var(--text-mid); margin-top: 4px; }

/* ===== ACT II — QUOTE ===== */
.act { padding: 140px 36px; }
.act-inner { max-width: 1100px; margin: 0 auto; }

.act-quote { padding: 200px 36px; }
.big-quote {
  font-family: var(--display-font);
  font-size: clamp(40px, 5.6vw, 88px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
}
.big-quote .line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.act-quote.in-view .big-quote .line-1 { transition-delay: 0.0s; opacity: 1; transform: none; }
.act-quote.in-view .big-quote .line-2 { transition-delay: 0.4s; opacity: 1; transform: none; }
.act-quote.in-view .big-quote .line-3 { transition-delay: 0.8s; opacity: 1; transform: none; }
.act-quote.in-view .big-quote .line-4 { transition-delay: 1.4s; opacity: 1; transform: none; }
.big-quote em { color: var(--accent); font-style: normal; }
.big-quote .attrib {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 400;
  margin-top: 40px;
  color: var(--text-dim);
  letter-spacing: 0;
}

/* ===== ACT III — CAPABILITIES ===== */
.act-title {
  font-size: clamp(36px, 4.2vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-top: 18px;
  margin-bottom: 64px;
  color: var(--text);
  max-width: 720px;
}
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.cap {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px 28px;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s;
}
.cap::before {
  content: attr(data-num);
  position: absolute;
  top: 22px; right: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--cyan);
}
.cap:hover { border-color: var(--accent); transform: translateY(-4px); }
.cap-glyph {
  width: 44px; height: 44px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.4));
  margin-bottom: 24px;
}
.cap-glyph svg { width: 100%; height: 100%; }
.cap h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.cap p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-mid);
}

/* ===== ACT IV — FILM ===== */
.act-film .act-inner { max-width: 720px; }
.film-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9 / 16;
  margin: 56px auto 32px;
  background: linear-gradient(135deg, #1a0d2a 0%, #050008 100%);
  border-radius: 20px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.25);
}
.film-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(167,139,250,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167,139,250,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black, transparent);
}
.film-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px;
}
.play-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.15);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.5);
  animation: cardBreath 3s ease-in-out infinite;
}
.play-icon svg { width: 32px; height: 32px; }
.film-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.film-caption {
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-mid);
}
.muted { color: var(--text-mute); }

/* ===== ACT V — CTA ===== */
.act-cta { padding: 200px 36px 220px; text-align: center; }
.cta-eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.32em;
  margin-bottom: 24px;
}
.cta-headline {
  font-size: clamp(56px, 7vw, 120px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-bottom: 56px;
}
.cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 36px;
  border-radius: 999px;
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(.2,.7,.2,1);
  letter-spacing: 0.01em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #050008;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(139, 92, 246, 0.7);
}
.btn-arrow { transition: transform 0.2s; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }
.btn-ghost {
  color: var(--text-dim);
  border: 1px solid var(--card-border);
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 8px 30px rgba(139, 92, 246, 0.45), 0 0 0 0 rgba(139, 92, 246, 0.5); }
  50%      { box-shadow: 0 8px 30px rgba(139, 92, 246, 0.45), 0 0 0 18px rgba(139, 92, 246, 0); }
}
.pulse-btn { animation: pulseBtn 2.4s ease-out infinite; }

/* ===== FOOTER ===== */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 36px 36px;
  border-top: 1px solid rgba(167, 139, 250, 0.08);
  max-width: 1500px;
  margin: 0 auto;
}
.footer-eq { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; color: var(--text-dim); }
.footer-eq .op { color: var(--accent); margin: 0 8px; font-weight: 600; }
.footer-url {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px;
  color: var(--text-mid); text-decoration: none;
  letter-spacing: 0.04em;
}
.footer-url:hover { color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1180px) {
  .grid.hero {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "left   center" "right  right";
  }
  .col-left   { grid-area: left; }
  .col-center { grid-area: center; }
  .col-right  { grid-area: right; flex-direction: row; flex-wrap: wrap; gap: 18px; }
  .col-right > * { flex: 1 1 280px; }
  .portrait { min-height: 540px; }
}
@media (max-width: 760px) {
  .grid.hero {
    grid-template-columns: 1fr;
    grid-template-areas: "left" "center" "right";
    padding: 28px 18px;
    gap: 24px;
  }
  .col-right { flex-direction: column; }
  .logo { font-size: 64px; }
  .hero-headline { font-size: 44px; }
  .portrait { min-height: 460px; }
  .act { padding: 80px 18px; }
  .act-quote { padding: 120px 18px; }
  .act-cta { padding: 120px 18px 140px; }
  .footer { flex-direction: column; gap: 10px; padding: 18px; text-align: center; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================== */
/* TIER B — premium pass                                                       */
/* ========================================================================== */

/* ===== B.1 Mouse-aware lighting (radial gradient follows cursor) ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(167, 139, 250, 0.08),
    transparent 60%
  );
  transition: background 0.1s linear;
}

/* ===== B.2 Custom cursor (only when body has .has-custom-cursor) ===== */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s, transform 0.18s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid rgba(167, 139, 250, 0.6);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s, transform 0.18s cubic-bezier(.2,.7,.2,1),
              width 0.2s, height 0.2s, border-color 0.2s;
}
body.has-custom-cursor { cursor: none; }
body.has-custom-cursor a, body.has-custom-cursor button { cursor: none; }
body.has-custom-cursor .cursor-dot,
body.has-custom-cursor .cursor-ring { opacity: 1; }
body.has-custom-cursor.cursor-hover .cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--accent);
  background: rgba(167, 139, 250, 0.08);
}
body.has-custom-cursor.cursor-hover .cursor-dot { opacity: 0; }

/* ===== B.3 Gradient borders on cards ===== */
.card, .cap, .film-frame, .modal-card {
  position: relative;
}
.card::before, .cap::before, .modal-card::before {
  pointer-events: none;
}
.card {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(135deg, rgba(167, 139, 250, 0.35), rgba(34, 211, 238, 0.18) 50%, rgba(167, 139, 250, 0.05) 100%) border-box;
}

/* ===== B.4 Hero portrait integration (vignette mask) ===== */
.portrait-video {
  -webkit-mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, black 70%, transparent 100%);
          mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, black 70%, transparent 100%);
}

/* ===== B.9 Tablet layout (1024-1180) — keep 3 columns, tighter ===== */
@media (min-width: 1024px) and (max-width: 1180px) {
  .grid.hero {
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.15fr) minmax(300px, 0.95fr);
    grid-template-areas: "left center right";
    gap: 22px;
    padding: 32px 24px 16px;
  }
  .col-left, .col-center, .col-right {
    grid-area: auto !important;
  }
  .col-right { flex-direction: column; }
  .logo { font-size: 64px; }
  .portrait { min-height: 600px; }
}

/* ===== B.13 Scroll-snap chapters (only on capable viewports) ===== */
@media (min-width: 1024px) and (hover: hover) {
  html { scroll-snap-type: y proximity; }
  .grid.hero, .act { scroll-snap-align: start; scroll-snap-stop: normal; }
}

/* ===== B.14 Capability cards stagger (CSS-only with nth-child) ===== */
.cap.reveal { transition-delay: 0s; }
.cap-grid .cap.reveal:nth-child(1) { transition-delay: 0.0s; }
.cap-grid .cap.reveal:nth-child(2) { transition-delay: 0.18s; }
.cap-grid .cap.reveal:nth-child(3) { transition-delay: 0.36s; }
.cap-grid .cap.reveal:nth-child(4) { transition-delay: 0.54s; }

/* ===== B.15 Light beam sweep on portrait ===== */
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(167, 139, 250, 0.15) 48%,
    rgba(34, 211, 238, 0.20) 50%,
    rgba(167, 139, 250, 0.15) 52%,
    transparent 70%
  );
  pointer-events: none;
  transform: translateX(-100%);
  animation: beamSweep 9s ease-in-out infinite;
  border-radius: 18px;
  -webkit-mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, black 70%, transparent 100%);
          mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, black 70%, transparent 100%);
}
@keyframes beamSweep {
  0%   { transform: translateX(-100%); }
  35%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* ===== B.17 Logo glitch on hover ===== */
@keyframes logoGlitch {
  0%, 100% { text-shadow: none; transform: translate(0,0); }
  20% { text-shadow: 2px 0 var(--cyan), -2px 0 var(--accent); transform: translate(-1px, 0); }
  40% { text-shadow: -2px 0 var(--cyan), 2px 0 var(--accent); transform: translate(1px, 0); }
  60% { text-shadow: 0 2px var(--accent), 0 -2px var(--cyan); transform: translate(0, -1px); }
  80% { text-shadow: none; transform: translate(0, 0); }
}
.logo:hover { animation: logoGlitch 0.4s steps(8) 1; }

/* ===== B.16 Magnetic CTA — JS-driven via inline styles ===== */
.pulse-btn { will-change: transform; }

/* ========================================================================== */
/* HEYGEN POPUP — floating pill + modal                                        */
/* ========================================================================== */

/* ----- Floating "Meet iiZR" pill ----- */
.meet-pill {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 14px 18px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #050008;
  font-family: var(--display-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(139, 92, 246, 0.45),
              0 0 0 0 rgba(139, 92, 246, 0.6);
  transform: translateY(80px) scale(0.92);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1), opacity 0.4s, box-shadow 0.3s;
  animation: pillPulse 3s ease-out infinite;
  animation-delay: 1s;
}
.meet-pill[hidden] { display: none; }
.meet-pill.in {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.meet-pill:hover {
  box-shadow: 0 16px 50px rgba(139, 92, 246, 0.7),
              0 0 0 0 rgba(139, 92, 246, 0.6);
  transform: translateY(-2px) scale(1.04);
}
.pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #050008;
  position: relative;
  flex-shrink: 0;
}
.pill-dot::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid #050008;
  opacity: 0.6;
  animation: pillDotRing 1.6s ease-out infinite;
}
@keyframes pillDotRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}
.pill-arrow {
  font-size: 18px;
  font-weight: 600;
  margin-left: -2px;
  transition: transform 0.2s;
}
.meet-pill:hover .pill-arrow { transform: translateX(3px); }

@keyframes pillPulse {
  0%, 100% { box-shadow: 0 12px 36px rgba(139, 92, 246, 0.45), 0 0 0 0 rgba(139, 92, 246, 0.5); }
  60%      { box-shadow: 0 12px 36px rgba(139, 92, 246, 0.45), 0 0 0 16px rgba(139, 92, 246, 0); }
}

/* ----- FILM frame — now hosts the autoplaying muted video ----- */
.film-frame {
  background: #050008;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s;
  padding: 0;
}
.film-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}
.film-frame .film-grid { z-index: 1; opacity: 0.5; }
.film-frame .film-overlay { z-index: 2; }
.film-frame:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 30px 80px rgba(139, 92, 246, 0.5);
}
.film-frame:hover .play-icon {
  transform: scale(1.08);
  box-shadow: 0 0 40px rgba(167, 139, 250, 0.9);
}
.play-icon { transition: transform 0.3s, box-shadow 0.3s; }
.film-frame .film-overlay {
  background: linear-gradient(to top, rgba(5, 0, 8, 0.55) 0%, transparent 50%, rgba(5, 0, 8, 0.45) 100%);
  pointer-events: none;
}
.film-frame .play-icon { background: rgba(5, 0, 8, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.film-frame .film-tag {
  background: rgba(5, 0, 8, 0.7);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ----- Bottom-corner PiP — sticky talking widget ----- */
.pip-video {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 8500;
  width: 168px;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
  background:
    linear-gradient(#050008, #050008) padding-box,
    linear-gradient(135deg, var(--accent), var(--cyan), var(--accent)) border-box;
  box-shadow: 0 16px 50px rgba(139, 92, 246, 0.5);
  transform: translateY(100px) scale(0.92);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1), opacity 0.4s, box-shadow 0.3s;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}
.pip-video[hidden] { display: none; }
.pip-video.in {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.pip-video:hover {
  box-shadow: 0 22px 70px rgba(139, 92, 246, 0.75);
  transform: translateY(-3px) scale(1.03);
}
.pip-video-el {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.pip-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 10px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(to top, rgba(5, 0, 8, 0.95), transparent);
  pointer-events: none;
}
.pip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 1.6s ease-in-out infinite;
}
.pip-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #fff;
  font-weight: 600;
}
.pip-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(5, 0, 8, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, transform 0.2s;
  z-index: 3;
}
.pip-video:hover .pip-close { opacity: 1; }
.pip-close:hover { background: var(--accent); transform: scale(1.1); }
.pip-video.dismissed { display: none; }

@media (max-width: 760px) {
  .pip-video { left: 12px; bottom: 12px; width: 120px; }
  .pip-label { font-size: 8px; }
}

/* When pill OR pip is visible at the same time, stack them on opposite sides
   (pill is bottom-RIGHT; pip is bottom-LEFT — no overlap by default) */

/* ========================================================================== */
/* WAITLIST MODAL                                                              */
/* ========================================================================== */
.waitlist-card {
  text-align: center;
  overflow: hidden;
}
.modal-close {
  top: 14px;
  right: 14px;
  position: absolute;
}
.waitlist-card .modal-close {
  top: 14px;
  right: 14px;
  background: transparent;
  border: 1px solid transparent;
}
.waitlist-card .modal-close:hover {
  background: rgba(167, 139, 250, 0.15);
  border-color: var(--card-border);
  color: var(--accent);
}

/* state machine — show one panel at a time */
.waitlist-form-state, .waitlist-success-state {
  transition: opacity 0.35s, transform 0.45s cubic-bezier(.2,.7,.2,1);
}
.waitlist-card[data-state="form"] .waitlist-success-state {
  opacity: 0;
  transform: translateY(12px);
  position: absolute;
  inset: 40px 36px 32px;
  pointer-events: none;
}
.waitlist-card[data-state="success"] .waitlist-form-state {
  opacity: 0;
  transform: translateY(-12px);
  position: absolute;
  inset: 40px 36px 32px;
  pointer-events: none;
}
.waitlist-card[data-state="success"] .waitlist-success-state {
  opacity: 1;
  transform: translateY(0);
}

.waitlist-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 18px;
}
.waitlist-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.waitlist-title {
  font-family: var(--display-font);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}

.waitlist-sub {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-mid);
  margin-bottom: 28px;
}

/* form */
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.field-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.field input {
  font-family: var(--display-font);
  font-size: 15px;
  color: var(--text);
  background: rgba(5, 0, 8, 0.55);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  width: 100%;
}
.field input::placeholder { color: var(--text-mute); }
.field input:focus {
  border-color: var(--accent);
  background: rgba(15, 8, 28, 0.7);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}
.field input:invalid:not(:placeholder-shown) {
  border-color: rgba(239, 68, 68, 0.5);
}

.waitlist-submit {
  margin-top: 6px;
  width: 100%;
  justify-content: center;
  position: relative;
}
.waitlist-submit[disabled] { opacity: 0.7; cursor: wait; }
.wl-btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(5, 0, 8, 0.25);
  border-top-color: #050008;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}
.waitlist-submit[data-loading="true"] .wl-btn-text,
.waitlist-submit[data-loading="true"] .btn-arrow { display: none; }
.waitlist-submit[data-loading="true"] .wl-btn-spinner { display: inline-block; }

.waitlist-fineprint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  margin-top: 10px;
  text-align: center;
}
.waitlist-error {
  font-size: 13px;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  text-align: center;
}

/* success state */
.success-glyph {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(167, 139, 250, 0.6));
}
.success-glyph svg { width: 100%; height: 100%; }
.glyph-ring {
  stroke: var(--accent);
  fill: none;
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: glyphRing 0.7s cubic-bezier(.2,.85,.2,1) forwards;
}
.glyph-check {
  stroke: var(--cyan);
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: glyphCheck 0.4s cubic-bezier(.2,.85,.2,1) 0.4s forwards;
}
.waitlist-card[data-state="success"] .glyph-ring {
  animation: glyphRing 0.7s cubic-bezier(.2,.85,.2,1) forwards;
}
.waitlist-card[data-state="success"] .glyph-check {
  animation: glyphCheck 0.4s cubic-bezier(.2,.85,.2,1) 0.4s forwards;
}
@keyframes glyphRing { to { stroke-dashoffset: 0; } }
@keyframes glyphCheck { to { stroke-dashoffset: 0; } }
.waitlist-success-state .btn { margin-top: 18px; }

/* mobile */
@media (max-width: 520px) {
  .modal-card { padding: 32px 20px 24px; max-width: calc(100vw - 24px); }
  .waitlist-title { font-size: 26px; }
  .waitlist-sub { font-size: 14px; }
}

/* ----- Modal ----- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(.2,.7,.2,1);
}
.modal[hidden] { display: none; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 0, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  border-radius: 24px;
  padding: 40px 36px 32px;
  box-shadow: 0 30px 100px rgba(139, 92, 246, 0.5),
              0 0 0 1px rgba(167, 139, 250, 0.3),
              0 0 80px rgba(167, 139, 250, 0.25) inset;
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(.2,.85,.2,1), opacity 0.3s;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(135deg, var(--accent), var(--cyan), var(--accent)) border-box;
  border: 1px solid transparent;
}
.modal.open .modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.modal-close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 40px; height: 40px;
  background: rgba(15, 8, 28, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.modal-close:hover {
  background: var(--accent);
  color: #050008;
  border-color: var(--accent);
  transform: scale(1.05);
}
.modal-close svg { width: 18px; height: 18px; }
.modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.modal-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.modal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.modal-spinner {
  width: 32px; height: 32px;
  border: 2px solid rgba(167, 139, 250, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.modal-caption {
  padding: 18px 12px 8px;
  text-align: center;
}
.modal-caption p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-mid);
  margin: 0;
}

/* prevent body scroll when modal open */
body.modal-open { overflow: hidden; }

/* ===== mobile pill tweaks ===== */
@media (max-width: 760px) {
  .meet-pill {
    bottom: 16px;
    right: 16px;
    padding: 12px 18px 12px 14px;
    font-size: 13px;
  }
  .modal-card { max-width: calc(100vw - 32px); }
  .modal-close { top: -48px; }
}
