/* =====================================================================
   Irisx — Next-Gen AI Experience
   Design system: near-black canvas, violet light,
   Satoshi + Instrument Serif italic accents, white pill CTA.
   ===================================================================== */

:root {
  --bg:        #06040a;          /* near-black with a violet hint */
  --bg-pure:   #000000;
  --ink:       #f4f2f8;
  --ink-dim:   rgba(244, 242, 248, 0.58);
  --ink-faint: rgba(244, 242, 248, 0.34);
  --line:      rgba(255, 255, 255, 0.10);

  --violet:      #9a7cff;
  --violet-soft: #b9a7ff;
  --violet-deep: #6d28d9;
  --magenta:     #c46bff;

  --sans:  'Satoshi', 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;

  --nav-h: 74px;
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);

  /* runtime values written by JS */
  --hero-dim: 0;     /* 0..1 hero copy/decor fade */
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;            /* clip (not hidden) so it never creates a
                                  scroll container that would break sticky */
}

a { color: inherit; text-decoration: none; }
img, svg, video, canvas { display: block; }

::selection { background: rgba(154, 124, 255, 0.35); color: #fff; }

.dot { color: var(--magenta); }

/* ============================= NAV ============================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(6, 4, 10, 0.72) 0%, rgba(6, 4, 10, 0) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(6, 4, 10, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav__logo { display: flex; align-items: center; gap: 11px; }
.nav__logo-mark {
  width: 18px; height: 18px; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, #fff 0%, var(--violet-soft) 34%, var(--violet) 60%, var(--violet-deep) 100%);
  box-shadow: 0 0 14px rgba(154, 124, 255, 0.7);
}
.nav__logo-text { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }

.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.nav__links > a:not(.btn) {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-dim);
  transition: color 0.25s var(--ease);
}
.nav__links > a:not(.btn):hover { color: var(--ink); }
.nav__login { position: relative; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.btn--pill {
  background: #ffffff;
  color: #0a0712;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 2px 22px rgba(154, 124, 255, 0.22);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn--pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(154, 124, 255, 0.42);
  background: #f3eeff;
}
.btn--lg { font-size: 16px; padding: 15px 26px; }
.btn__arrow { font-size: 0.92em; transition: transform 0.25s var(--ease); }
.btn--pill:hover .btn__arrow { transform: translate(2px, -2px); }

/* ===================== EXPERIENCE (sticky cinematic) ===================== */
.experience {
  position: relative;
  height: 600vh;               /* scroll length that drives the cinematic */
  background: var(--bg);
}
.exp__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--bg);
}

.layer {
  position: absolute;
  inset: 0;
  will-change: opacity, transform;
}

/* canvas fills its stage */
.holo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- hero copy ---- */
.layer--hero { z-index: 20; }

.hero-copy {
  position: absolute;
  left: clamp(20px, 5vw, 84px);
  bottom: clamp(60px, 12vh, 120px);
  z-index: 22;
  max-width: min(92vw, 900px);
  opacity: calc(1 - var(--hero-dim));
  transform: translateY(calc(var(--hero-dim) * -18px));
  pointer-events: none;
}
/* keep "Introducing Irisx." on a single line, scaled to fit any width */
.hero-copy .display {
  white-space: nowrap;
  font-size: clamp(30px, 6.6vw, 90px);
}
.eyebrow {
  font-size: clamp(10px, 1.1vw, 12.5px);
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
}
.display {
  font-weight: 400;
  font-size: clamp(46px, 8.2vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: #fff;
}
.display em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ---- decorative glass glyphs ---- */
.decor { position: absolute; inset: 0; z-index: 15; opacity: calc(1 - var(--hero-dim)); }
.decor-defs { position: absolute; }
.glass {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(50px, 5.4vw, 82px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(var(--s));
  animation: float 9s var(--d, 0s) ease-in-out infinite;
  opacity: 0.9;
}
.glass svg { width: 100%; height: 100%; overflow: visible; }
/* dotted-hologram glyphs: outlines drawn as a row of glowing violet dots */
.glass:not(.glass--solid) svg :is(path, circle, ellipse) {
  fill: none;
  stroke: url(#holo);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 0.1 6;
  filter: url(#holoGlow);
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}

/* ---- scroll cue ---- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 23;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: calc(1 - var(--hero-dim) * 2.4);
  pointer-events: none;
}
.scroll-cue__line {
  width: 1px; height: 42px;
  background: linear-gradient(180deg, var(--violet) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%;
  background: #fff;
  animation: cue 1.9s var(--ease) infinite;
}
@keyframes cue {
  0%   { top: -50%; opacity: 0; }
  40%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ---- video layer ---- */
.layer--video {
  z-index: 30;
  opacity: 0;                  /* JS-driven crossfade */
  background: var(--bg-pure);
}
.scrub-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

/* ---- bloom flash that masks hologram → video handoff ---- */
.flash {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;                  /* JS-driven */
  /* fills the whole screen near-white at the peak (a true fade-to-white), with a faint
     violet tint toward the edges so it still reads as the brand bloom */
  background:
    radial-gradient(circle at 50% 46%,
      rgba(255, 255, 255, 1) 0%,
      rgba(244, 240, 255, 0.99) 40%,
      rgba(216, 203, 255, 0.95) 76%,
      rgba(198, 182, 250, 0.92) 100%);
}

/* ---- vignette overlay ---- */
.stage-vignette {
  position: absolute;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 50% 42%, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
}

/* ===================== ACCESS (last page) ===================== */
.access {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.access .holo-canvas { z-index: 1; }
/* last-page dots layer inside the experience: merges with the video's ending burst */
.layer--last { z-index: 32; opacity: 0; }   /* above the video; JS-driven cross-fade */
.layer--last .holo-canvas { width: 100%; height: 100%; }
/* last-page copy layer (held final frame): "Request Early Access" over the merged woman dots */
.layer--lastcopy { z-index: 33; opacity: 0; }   /* JS-driven fade-in after the merge */
.layer--lastcopy .access__inner { position: absolute; inset: 0; align-items: center; }
.layer--lastcopy .access-copy { opacity: 1; transform: none; transition: none; }
.layer--lastcopy::before {                       /* scrim → copy stays legible over the dots */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(270deg, rgba(6,4,10,0.92) 0%, rgba(6,4,10,0.5) 24%, rgba(6,4,10,0) 50%);
}
/* scrim guarantees the headline stays legible over any stray particles */
.access::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(270deg, rgba(6, 4, 10, 0.92) 0%, rgba(6, 4, 10, 0.5) 24%, rgba(6, 4, 10, 0) 50%);
}
.access__inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 0 clamp(20px, 6vw, 110px);
  display: flex;
  justify-content: flex-end;
}
.access-copy {
  max-width: 460px;
  text-align: left;
  /* entrance handled by JS toggling .is-in */
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.access-copy.is-in { opacity: 1; transform: none; }
.access-copy .display { font-size: clamp(44px, 6.8vw, 92px); margin-bottom: 34px; }
.access .stage-vignette { z-index: 2; }

/* ========================== FOOTER ========================== */
.site-footer {
  position: relative;
  z-index: 3;
  background: var(--bg-pure);
  border-top: 1px solid var(--line);
  padding: 28px clamp(20px, 5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.site-footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.site-footer__brand .nav__logo-mark { width: 14px; height: 14px; }
.site-footer__copy { font-size: 13px; color: var(--ink-faint); }
.site-footer__links { display: flex; align-items: center; gap: 22px; }
.site-footer__links a { font-size: 13px; color: var(--ink-dim); transition: color 0.25s var(--ease); }
.site-footer__links a:hover { color: var(--ink); }
.site-footer__links a[aria-label="LinkedIn"] {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--line); font-weight: 700; font-size: 12px;
}

/* ========================== MISC ========================== */
.noscript-note {
  position: fixed; inset: auto 0 0 0; z-index: 200;
  background: #120c22; color: var(--ink-dim);
  padding: 14px 20px; text-align: center; font-size: 14px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 860px) {
  :root { --nav-h: 62px; }
  .nav__links > a:not(.btn):not(.nav__login) { display: none; }
  .nav__login { display: none; }
  .hero-copy { bottom: clamp(80px, 16vh, 140px); }
  .decor .glass { display: none; }                 /* keep mobile hero clean */
  .access__inner { justify-content: center; padding-bottom: 8vh; align-items: flex-end; }
  .access-copy { text-align: center; max-width: 520px; }
  .access-copy .btn { margin-inline: auto; }
  .access::after {
    background: linear-gradient(0deg, rgba(6, 4, 10, 0.94) 0%, rgba(6, 4, 10, 0.45) 38%, rgba(6, 4, 10, 0) 68%);
  }
}

@media (max-width: 540px) {
  .display { font-size: clamp(40px, 13vw, 60px); }
  .access-copy .display { font-size: clamp(40px, 13vw, 60px); }
  .nav__logo-text { font-size: 17px; }
}

/* keep a couple of decor glyphs on tablets for character */
@media (min-width: 861px) and (max-width: 1100px) {
  .decor .glass { width: clamp(40px, 5vw, 64px); }
}

/* ===================== REDUCED MOTION / FALLBACK ===================== */
/* When JS adds .is-reduced (or the user prefers reduced motion), the
   cinematic un-pins into a calm, stacked, scroll-linked-but-not-jacked layout. */
.is-reduced .experience { height: auto; }
.is-reduced .exp__sticky { position: relative; height: auto; }
.is-reduced .layer { position: relative; inset: auto; }
.is-reduced .layer--hero { min-height: 100vh; min-height: 100svh; }
.is-reduced .layer--video {
  opacity: 1 !important;
  min-height: 60vh;
  position: relative;
}
.is-reduced .scrub-video { position: relative; height: auto; aspect-ratio: 16 / 9; }
.is-reduced .flash { display: none; }
.is-reduced .scroll-cue { display: none; }
.is-reduced .glass { animation: none; }
.is-reduced .access-copy { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .glass { animation: none; }
  .scroll-cue__line::after { animation: none; }
  .access-copy { transition: none; }
}
