:root {
  --viirtue-purple: #673490;
  --viirtue-blue: #2ec0e1;
  --digital-electric-purple: #7506dd;
  --digital-electric-violet: #a056ff;
  --digital-dark-purple: #300151;
  --digital-dark-blue: #12154b;
  --digital-blue: #7ce4fc;
  --digital-grey: #cac7d7;
  --hairline: rgba(202, 199, 215, 0.14);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--digital-dark-blue);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, var(--digital-dark-purple) 0%, var(--digital-dark-blue) 100%) fixed;
  overflow-x: hidden;
}

/* Faint dot grid, masked to the middle of the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(124, 228, 252, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 65% 50%, #000 0%, transparent 65%);
          mask-image: radial-gradient(ellipse at 65% 50%, #000 0%, transparent 65%);
  opacity: 0.35;
}

/* Slow-drifting color fields behind everything. */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.aurora span:nth-child(1) {
  width: 55vmax; height: 55vmax;
  left: 40%; top: -20%;
  background: var(--digital-electric-purple);
  opacity: 0.35;
  animation: drift-a 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(2) {
  width: 45vmax; height: 45vmax;
  left: -10%; bottom: -25%;
  background: var(--viirtue-blue);
  opacity: 0.16;
  animation: drift-b 28s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(-12vw, 18vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(18vw, -10vh) scale(0.9); } }

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.site-header { border-bottom: 1px solid var(--hairline); }

.header-inner,
.hero,
.footer-inner {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.lockup img {
  width: auto;
  height: 30px;
  display: block;
}
.lockup .divider {
  width: 1px;
  height: 22px;
  background: rgba(202, 199, 215, 0.3);
}
.product-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--digital-blue);
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--digital-grey);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}
.header-link span {
  color: var(--digital-blue);
  font-size: 16px;
  transition: transform 150ms ease;
}
.header-link:hover { color: #fff; }
.header-link:hover span { transform: translate(2px, -2px); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero-copy { max-width: 600px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--digital-electric-violet);
  margin: 0 0 20px;
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--digital-blue);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--digital-blue);
  animation: ping 2s ease-out infinite;
}
@keyframes ping {
  from { transform: scale(1); opacity: 0.7; }
  to   { transform: scale(3.2); opacity: 0; }
}

h1 {
  color: #fff;
  font-size: clamp(3.8rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0 0 24px;
}

h1 .one,
.scene-caption .c-one {
  /* Keep the final glyph's ink inside the gradient clipping box. */
  display: inline-block;
  padding-right: 0.08em;
  margin-right: -0.08em;
  background: linear-gradient(90deg, #a056ff 0%, #7ce4fc 30%, #2ec0e1 50%, #a056ff 75%, #7ce4fc 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
h1 .one {
  animation: shimmer 9s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }

p.subhead {
  color: var(--digital-grey);
  font-size: 18px;
  line-height: 1.65;
  max-width: 46ch;
  margin: 0 0 36px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--digital-electric-purple);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 8px 28px rgba(117, 6, 221, 0.45);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(160, 86, 255, 0.55);
}
.cta:focus-visible,
.header-link:focus-visible,
.lockup:focus-visible,
.ghost:focus-visible,
.skip:focus-visible,
.legal-links a:focus-visible {
  outline: 3px solid rgba(124, 228, 252, 0.6);
  outline-offset: 4px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.tagline {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.45em;
  margin: 0 0 18px;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.tagline b {
  font-weight: 800;
  color: var(--digital-blue);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(202, 199, 215, 0.35);
  background: transparent;
  color: var(--digital-grey);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.ghost:hover {
  border-color: var(--digital-blue);
  color: #fff;
}

/* ---- Intro sequence ---- */

/* While the intro plays, the hero copy and core wait. If the script never
   starts (no `running` class), the failsafe shows the copy anyway. */
.playing .hero-copy { opacity: 0; }
.playing:not(.running) .hero-copy { animation: failsafe 1ms 4s forwards; }
@keyframes failsafe { to { opacity: 1; } }
.playing .core { opacity: 0; }

.resolved .hero-copy .eyebrow        { animation: rise 900ms 100ms cubic-bezier(.2,.7,.2,1) both; }
.resolved .hero-copy h1              { animation: rise 1100ms 250ms cubic-bezier(.2,.7,.2,1) both; }
.resolved .tagline span:nth-child(1) { animation: rise 900ms 550ms cubic-bezier(.2,.7,.2,1) both; }
.resolved .tagline span:nth-child(2) { animation: rise 900ms 700ms cubic-bezier(.2,.7,.2,1) both; }
.resolved .tagline span:nth-child(3) { animation: rise 900ms 850ms cubic-bezier(.2,.7,.2,1) both; }
.resolved .hero-copy .subhead        { animation: rise 1100ms 1050ms cubic-bezier(.2,.7,.2,1) both; }
.resolved .hero-copy .actions        { animation: rise 1100ms 1200ms cubic-bezier(.2,.7,.2,1) both; }

.intro {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--caption-top, 62vh);
  z-index: 3;
  padding: 0 16px;
  text-align: center;
  pointer-events: none;
}

.scene { opacity: 0; }
.scene.show { opacity: 1; }
.scene.hide {
  opacity: 0;
  transform: translateY(-12px);
  filter: blur(8px);
  transition: opacity 380ms ease, transform 380ms ease, filter 380ms ease;
}

.scene-count {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--digital-electric-violet);
}
.scene.show .scene-count { animation: rise 600ms cubic-bezier(.2,.7,.2,1) both; }

.scene-caption {
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 6.4vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.scene-caption .ch,
.scene-caption .c-one { display: inline-block; }
.product-scene .scene-caption { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.scene-detail {
  margin: 9px 0 0;
  color: var(--digital-grey);
  font-size: clamp(13px, 1.6vw, 18px);
  line-height: 1.3;
}
.scene-detail:empty { display: none; }
.scene.show .scene-detail { animation: rise 450ms 200ms both; }
.scene.show .c-one { animation: ch-in 700ms cubic-bezier(.2,.7,.2,1) both, shimmer 9s linear infinite; }
.scene.show .ch { animation: ch-in 700ms calc(140ms + var(--i) * 45ms) cubic-bezier(.2,.7,.2,1) both; }
@keyframes ch-in {
  from { opacity: 0; transform: translateY(0.35em); filter: blur(10px); }
}

.intro-controls {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
  transition: opacity 400ms ease, visibility 0s;
}
html:not(.playing) .intro-controls {
  opacity: 0;
  visibility: hidden;
  transition: opacity 400ms ease, visibility 0s 400ms;
}

.intro-progress {
  width: 160px;
  height: 2px;
  border-radius: 2px;
  background: rgba(202, 199, 215, 0.18);
  overflow: hidden;
}
.intro-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--viirtue-blue), var(--digital-electric-violet));
  transform: scaleX(0);
  transform-origin: left;
}

.skip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(202, 199, 215, 0.3);
  background: rgba(18, 21, 75, 0.4);
  color: var(--digital-grey);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.skip:hover { color: #fff; border-color: var(--digital-blue); }

/* The orbit canvas centers on this box; the core glow sits inside it. */
.visual {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  display: grid;
  place-items: center;
}

.core {
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, rgba(255,255,255,0.95) 0%, rgba(124,228,252,0.75) 14%, rgba(160,86,255,0.55) 38%, rgba(117,6,221,0.18) 62%, transparent 72%);
  box-shadow: 0 0 80px 10px rgba(160, 86, 255, 0.35), 0 0 160px 40px rgba(46, 192, 225, 0.12);
  transition: opacity 1400ms ease;
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.07); }
}

footer { border-top: 1px solid var(--hairline); }

.footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--digital-grey);
}

.footer-rule {
  width: 18px;
  height: 2px;
  background: var(--viirtue-blue);
}

.legal-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.legal-links a {
  color: var(--digital-grey);
  text-decoration-color: rgba(202, 199, 215, 0.35);
  text-underline-offset: 3px;
}
.legal-links a:hover { color: #fff; }

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 24px;
  }
  .visual {
    order: -1;
    width: min(78vw, 420px);
    margin: 0 auto;
  }
  .hero-copy { text-align: center; margin: 0 auto; }
  .tagline,
  .actions { justify-content: center; }
  p.subhead { margin-left: auto; margin-right: auto; }
  body::before {
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 60%);
            mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 60%);
  }
}

@media (max-width: 540px) {
  .header-inner,
  .hero,
  .footer-inner {
    width: min(100% - 32px, 1200px);
  }

  .header-inner { min-height: 68px; }
  .lockup img { height: 26px; }
  .header-link { font-size: 0; }
  .header-link span { font-size: 18px; }

  /* Fit the phone viewport (with browser toolbars showing) without scrolling. */
  .header-inner { min-height: 60px; }
  .hero {
    padding-top: 4px;
    padding-bottom: 8px;
    gap: 0;
  }
  .visual { width: min(58vw, 25svh); }
  .eyebrow { margin-bottom: 10px; }
  h1 {
    font-size: clamp(2.8rem, 13vw, 4rem);
    margin-bottom: 12px;
  }
  .tagline {
    font-size: 1rem;
    margin-bottom: 10px;
  }
  p.subhead {
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 14px;
  }
  .cta, .ghost { padding-top: 12px; padding-bottom: 12px; }
  .intro-controls { bottom: 72px; }

  .footer-inner {
    min-height: 56px;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    row-gap: 6px;
  }
}
