:root {
  --bg: #070820;
  --bg2: #0d0f33;
  --card: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.10);
  --text: #eef0ff;
  --muted: #a9adcf;
  --purple: #b44cff;
  --violet: #6a3bff;
  --cyan: #22d3ee;
  --grad: linear-gradient(120deg, #c35cff 0%, #6a3bff 50%, #22d3ee 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(106, 59, 255, 0.25), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(195, 92, 255, 0.15), transparent 60%),
    var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(7, 8, 32, 0.55), rgba(7, 8, 32, 0));
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
header.scrolled {
  background: rgba(7, 8, 32, 0.88);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
/* Legal pages have no hero: keep their header solid and in the flow */
body:not(:has(.hero)) header { position: sticky; background: rgba(7, 8, 32, 0.88); border-bottom-color: var(--line); }
section[id] { scroll-margin-top: 72px; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { width: 38px; height: 38px; }
.brand-name { font-weight: 700; letter-spacing: 0.12em; font-size: 15px; line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; font-size: 10px; letter-spacing: 0.32em; color: var(--muted); }
.menu { display: flex; gap: 26px; list-style: none; }
.menu a { color: var(--muted); font-size: 15px; }
.menu a:hover { color: var(--text); text-decoration: none; }

/* Hero — full-screen cinematic background, headline layered on top */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 0 96px;
}
.hero-media, .hero-scrim, .hero-intro { position: absolute; inset: 0; }
.hero-media { z-index: -4; background: #050a33; container-type: size; overflow: hidden; }
/* The stage always keeps the image's shape, so the wheel overlay lines up with the picture.
   Default: fill the screen (like object-fit: cover), anchored right. */
.hero-stage {
  position: absolute; right: 0; top: 50%;
  width: max(100cqw, 177.69cqh); aspect-ratio: 1672 / 941;
  transform: translateY(-50%);
}
.hero-scene { display: block; width: 100%; height: 100%; }
/* soft edges so the picture melts into the page when it doesn't fill the screen */
.hero-stage {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(90deg, transparent 0, #000 8%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(90deg, transparent 0, #000 8%);
}
.wheel-orb { transform-box: view-box; transform-origin: 1190px 490px; }
.wheel-ring {
  fill: none; stroke: #bff4ff; stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 55 445; opacity: 0;
}

/* Intro film layer */
.hero-intro { z-index: -2; background: #05060f; opacity: 0; visibility: hidden; transition: opacity 0.55s ease-in, visibility 0s linear 0.55s; }
.intro-video { width: 100%; height: 100%; object-fit: cover; display: block; }
html.intro-on .hero-intro { opacity: 1; visibility: visible; transition: none; }
.hero.is-doors .hero-intro { opacity: 0; visibility: hidden; transition: opacity 0.45s ease, visibility 0s linear 0.45s; }

/* Doors with the glowing logo */
.hero-doors { position: absolute; inset: 0; z-index: -3; display: none; pointer-events: none; }
html.intro-on .hero-doors, .hero.is-opening .hero-doors { display: block; }
.door {
  position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden;
  background:
    radial-gradient(60% 50% at 100% 50%, rgba(140, 80, 255, 0.42), transparent 70%),
    linear-gradient(180deg, #0d0d38 0%, #1f1860 50%, #0d0d38 100%);
  will-change: transform;
}
.door-l { left: 0; }
.door-r { right: 0; background:
    radial-gradient(60% 50% at 0% 50%, rgba(80, 200, 255, 0.3), transparent 70%),
    linear-gradient(180deg, #0d0d38 0%, #1f1860 50%, #0d0d38 100%); }
/* panel frames that meet at the centre seam */
.door::before {
  content: ""; position: absolute; top: 9%; bottom: 9%;
  border: 1.5px solid rgba(178, 158, 255, 0.45);
}
.door-l::before { left: 10%; right: 0; border-right: 0; border-radius: 6px 0 0 6px; }
.door-r::before { right: 10%; left: 0; border-left: 0; border-radius: 0 6px 6px 0; }
/* each door shows its half of one centred logo */
.door-inner {
  position: absolute; top: 0; bottom: 0; width: 200%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.door-l .door-inner { left: 0; }
.door-r .door-inner { right: 0; }
.door-mark {
  width: clamp(96px, 13vw, 180px); height: clamp(96px, 13vw, 180px);
  filter: brightness(1.3) saturate(1.25) drop-shadow(0 0 14px rgba(139, 92, 255, 0.95)) drop-shadow(0 0 42px rgba(34, 211, 238, 0.55));
}
.door-name {
  margin-top: clamp(10px, 1.6vw, 22px);
  font-size: clamp(34px, 5.2vw, 76px); font-weight: 800; letter-spacing: 0.14em; line-height: 1;
  padding-left: 0.14em; color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.55), 0 0 26px rgba(190, 120, 255, 0.95), 0 0 60px rgba(120, 220, 255, 0.55);
}
.door-sub {
  margin-top: clamp(8px, 1vw, 14px);
  font-size: clamp(13px, 1.6vw, 24px); font-weight: 700; letter-spacing: 0.5em; padding-left: 0.5em;
  background: linear-gradient(90deg, #f5d9ff, #d7c4ff 50%, #b8f6ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45)) drop-shadow(0 0 16px rgba(190, 120, 255, 0.85));
}
.door-seam {
  position: absolute; top: 9%; bottom: 9%; left: 50%; width: 2px; margin-left: -1px;
  background: linear-gradient(180deg, transparent, #b44cff 20%, #22d3ee 80%, transparent);
  box-shadow: 0 0 14px rgba(139, 92, 255, 0.9), 0 0 36px rgba(34, 211, 238, 0.5);
  /* glow above and below the logo only, never through it */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 18%, transparent 28%, transparent 78%, #000 88%, #000 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 18%, transparent 28%, transparent 78%, #000 88%, #000 100%);
}
/* logo lights up when the doors appear */
.hero.is-doors .door-mark { animation: markOn 1.2s cubic-bezier(.2,.7,.2,1) 0.15s both; }
.hero.is-doors .door-name { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) 0.25s both; }
.hero.is-doors .door-sub { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) 0.45s both; }
.hero.is-doors .door-seam { animation: seamOn 1.2s ease both; }
@keyframes markOn {
  0% { opacity: 0.35; transform: scale(0.9); filter: brightness(1) drop-shadow(0 0 0 rgba(139, 92, 255, 0)) drop-shadow(0 0 0 rgba(34, 211, 238, 0)); }
  55% { opacity: 1; filter: brightness(1.45) saturate(1.3) drop-shadow(0 0 24px rgba(139, 92, 255, 1)) drop-shadow(0 0 80px rgba(34, 211, 238, 0.85)); }
  100% { opacity: 1; transform: none; filter: brightness(1.3) saturate(1.25) drop-shadow(0 0 14px rgba(139, 92, 255, 0.95)) drop-shadow(0 0 42px rgba(34, 211, 238, 0.55)); }
}
@keyframes seamOn { from { opacity: 0; transform: scaleY(0.2); } to { opacity: 1; transform: none; } }
/* doors open */
.door { transition: transform 1.1s cubic-bezier(.7,0,.2,1); }
.hero.is-opening .door-l { transform: translateX(-101%); }
.hero.is-opening .door-r { transform: translateX(101%); }
.hero.is-opening .door-seam { opacity: 0; transition: opacity 0.3s ease; }
.door-light {
  position: absolute; left: 50%; top: 50%; width: 120vmax; height: 120vmax; margin: -60vmax 0 0 -60vmax;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(214, 170, 255, 0.75) 8%, rgba(120, 200, 255, 0.35) 22%, transparent 50%);
  opacity: 0; transform: scaleX(0.08); pointer-events: none;
}
.hero.is-opening .door-light { animation: burst 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes burst { 0% { opacity: 0; transform: scaleX(0.05) scaleY(0.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: scaleX(1) scaleY(1); } }
html.intro-on .hero-content, html.intro-on .hero-scrim { opacity: 0; visibility: hidden; }
/* keep the menu readable over bright film scenes */
html.intro-on header:not(.scrolled) { background: linear-gradient(180deg, rgba(5, 6, 20, 0.82) 0%, rgba(5, 6, 20, 0.45) 70%, rgba(5, 6, 20, 0) 100%); }

/* Reveal: scene settles in, wheel spins and stops, text rises in */
.hero-scrim, .hero-content { transition: opacity 0.6s ease; }
.hero.is-revealing .hero-stage { animation: stageIn 1.5s cubic-bezier(.2,.7,.2,1) 0.55s both; }
.hero.is-revealing .wheel-orb { animation: orbSpin 3s cubic-bezier(.12,.62,.18,1) 0.6s both; }
.hero.is-revealing .wheel-ring { animation: ringRun 3s cubic-bezier(.12,.62,.18,1) 0.6s both; }
.hero.is-revealing .hero-content > * { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) both; }
.hero.is-revealing .hero-content h1 { animation-delay: 0.9s; }
.hero.is-revealing .hero-content p { animation-delay: 1.15s; }
.hero.is-revealing .hero-content .btn { animation-delay: 1.35s; }
@keyframes stageIn { from { opacity: 0; transform: translateY(-50%) scale(1.06); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
@keyframes stageZoom { from { transform: translateY(-50%) scale(1.1); } to { transform: translateY(-50%) scale(1); } }
.hero.is-revealing.via-doors .hero-stage { animation: stageZoom 2.2s cubic-bezier(.2,.7,.2,1) both; }
.hero.is-revealing.via-doors .wheel-orb, .hero.is-revealing.via-doors .wheel-ring { animation-delay: 0.3s; }
.hero.is-revealing.via-doors .hero-content h1 { animation-delay: 0.8s; }
.hero.is-revealing.via-doors .hero-content p { animation-delay: 0.95s; }
.hero.is-revealing.via-doors .hero-content .btn { animation-delay: 1.1s; }
@keyframes orbSpin { from { transform: rotate(-900deg); } to { transform: rotate(0deg); } }
@keyframes ringRun {
  0% { stroke-dashoffset: 0; opacity: 0; }
  8% { opacity: 1; }
  75% { opacity: 0.9; }
  100% { stroke-dashoffset: -2500; opacity: 0; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Intro controls */
.intro-skip, .intro-replay {
  position: absolute; right: 24px; bottom: 24px; z-index: 2;
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: 600 14px/1 inherit; font-family: inherit; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(7, 8, 32, 0.55);
  backdrop-filter: blur(6px);
}
.intro-replay { color: var(--muted); border-color: var(--line); font-weight: 500; }
.intro-skip:hover, .intro-replay:hover { background: rgba(106, 59, 255, 0.35); color: #fff; }
.intro-skip[hidden], .intro-replay[hidden] { display: none; }
html:not(.intro-on) .intro-skip { display: none; }

/* Scrim keeps text readable over the scene */
.hero-scrim {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 8, 32, 0.6) 0%, rgba(7, 8, 32, 0.3) 40%, rgba(7, 8, 32, 0) 60%),
    linear-gradient(0deg, rgba(7, 8, 32, 1) 0%, rgba(7, 8, 32, 0) 22%),
    linear-gradient(180deg, rgba(7, 8, 32, 0.5) 0%, rgba(7, 8, 32, 0) 18%);
}
.hero-content { width: 100%; }
.hero h1 {
  font-size: clamp(36px, 3.9vw, 66px); line-height: 1.06; font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(7, 8, 32, 0.45);
}
.hero h1 .l1, .hero h1 .l2 { display: block; }
@media (min-width: 761px) { .hero h1 .l1, .hero h1 .l2 { white-space: nowrap; } }
.hero h1 .l2 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.hero p { color: #d7daf4; font-size: clamp(17px, 1.6vw, 21px); max-width: 23em; margin: 22px 0 34px; }
.hero .btn {
  padding: 15px 32px; font-size: 17px;
  background: linear-gradient(120deg, #9d4dff 0%, #c04cf0 45%, #ff4f9a 100%);
  box-shadow: 0 8px 30px rgba(214, 76, 200, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero .btn:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(255, 79, 154, 0.5); opacity: 1; }
.btn:focus-visible, .intro-skip:focus-visible, .intro-replay:focus-visible, .menu a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* Screens taller than the image (e.g. 1440x900, 1024x768): show the whole image on the right
   so the app tiles never sit under the text */
@media (min-width: 761px) and (max-aspect-ratio: 17/10) {
  .hero-stage { width: min(100cqw, 177.69cqh); }
  .hero { padding-bottom: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, header { transition: none; }
  .hero.is-revealing .hero-stage, .hero.is-revealing .wheel-orb, .hero.is-revealing .wheel-ring,
  .hero.is-revealing .hero-content > * { animation: none; }
  .door, .hero.is-doors .door-mark, .hero.is-doors .door-name, .hero.is-doors .door-sub, .hero.is-opening .door-light { animation: none; transition: none; }
}
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 999px;
  background: var(--grad); color: #fff; font-weight: 600;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn.ghost { background: transparent; border: 1px solid var(--line); margin-left: 10px; }

/* Sections */
section { padding: 72px 0; }
.eyebrow { color: var(--cyan); font-size: 13px; letter-spacing: 0.25em; text-transform: uppercase; font-weight: 600; }
h2 { font-size: 34px; margin: 6px 0 14px; }
.lead { color: var(--muted); max-width: 640px; margin-bottom: 40px; }

/* Product cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.45); }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; background: rgba(106, 59, 255, 0.18);
}
.card .icon.logo { background: none; overflow: hidden; }
.card .icon.logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; display: block; }
.card h3 { font-size: 22px; }
.card p { color: var(--muted); flex: 1; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.tag.live { background: rgba(34, 211, 238, 0.15); color: var(--cyan); }
.tag.soon { background: rgba(195, 92, 255, 0.15); color: #d9a3ff; }
.card .link { font-weight: 600; }
.card .link.disabled { color: var(--muted); pointer-events: none; }

/* About */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.points { list-style: none; display: grid; gap: 14px; }
.points li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.points b { display: block; margin-bottom: 2px; }
.points span { color: var(--muted); font-size: 15px; }

/* Contact */
.contact-box {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 48px; text-align: center;
}
.contact-box p { color: var(--muted); margin-bottom: 24px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 30px 0; margin-top: 40px; color: var(--muted); font-size: 14px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--muted); }

/* Legal pages */
.legal { padding: 64px 0; max-width: 800px; }
.legal h1 { font-size: 38px; margin-bottom: 6px; }
.legal .date { color: var(--muted); margin-bottom: 32px; }
.legal h2 { font-size: 22px; margin: 30px 0 10px; }
.legal p, .legal li { color: #cfd2ee; margin-bottom: 10px; }
.legal ul { padding-left: 22px; }

@media (max-width: 760px) {
  .menu { gap: 16px; }
  .menu li.hide-sm { display: none; }
  .about { grid-template-columns: 1fr; }
  .btn.ghost { margin: 12px 0 0; }
  .contact-box { padding: 32px 20px; }

  /* Hero on phones: text sits low, scene stays visible above it */
  .hero { align-items: flex-end; padding: 96px 0 56px; }
  /* show all three app tiles above the text */
  .hero-stage { top: 64px; right: auto; left: -72cqw; width: 175cqw; transform: none; }
  @keyframes stageIn { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
  @keyframes stageZoom { from { transform: scale(1.1); } to { transform: none; } }
  .door::before { top: 14%; bottom: 14%; }
  .door-l::before { left: 7%; }
  .door-r::before { right: 7%; }
  .door-seam { top: 14%; bottom: 14%; }
  /* the film keeps its full 16:9 frame on phones so its words are never cut */
  .intro-video { object-fit: contain; }
  .hero h1 { font-size: clamp(30px, 8.6vw, 44px); }
  .hero h1 .l1, .hero h1 .l2 { white-space: nowrap; }
  .hero-scrim {
    background:
      linear-gradient(0deg, rgba(7, 8, 32, 0.97) 0%, rgba(7, 8, 32, 0.86) 38%, rgba(7, 8, 32, 0) 58%);
  }
  .intro-skip { right: 16px; bottom: 24px; }
  .intro-replay { right: 16px; top: 76px; bottom: auto; min-height: 36px; padding: 0 14px; font-size: 13px; }
}

/* ===== Half-screen hero (staging) =====
   The intro film, the doors and the final scene all play in the top half of the screen,
   so the product cards are already visible underneath on the same screen. */
.hero {
  min-height: 50vh; min-height: 50svh;
  padding: 92px 0 44px;
}
@media (min-width: 761px) and (max-aspect-ratio: 17/10) { .hero { padding-bottom: 44px; } }
/* wide, short box: show the whole apps picture on the right so tiles stay next to the text */
@media (min-width: 761px) { .hero-stage { width: min(100cqw, 177.69cqh); } }
/* film fills the half box; its words sit in the middle of the frame, so they stay in view */
.intro-video { object-position: 50% 55%; }
/* logo on the doors sized to the shorter box */
.door-mark { width: clamp(60px, min(13vw, 16vh), 180px); height: clamp(60px, min(13vw, 16vh), 180px); }
.door-name { font-size: clamp(26px, min(5.2vw, 7vh), 76px); margin-top: clamp(6px, 1.4vh, 22px); }
.door-sub { font-size: clamp(11px, min(1.6vw, 2.5vh), 24px); margin-top: clamp(4px, 1vh, 14px); }
/* doors fill the box behind the menu bar; the logo and frame sit below the menu */
.door-inner { padding-top: 68px; }
.door::before, .door-seam { top: calc(68px + 4%); bottom: 7%; }
.door-light { top: calc(50% + 34px); }
.door-light { width: 120vmin; height: 120vmin; margin: -60vmin 0 0 -60vmin; }
/* soft fade at the bottom edge of the box into the page */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, var(--bg), rgba(7, 8, 32, 0));
}
.hero h1 { font-size: clamp(32px, min(3.6vw, 6.4vh), 60px); }
.hero p { margin: 16px 0 24px; }
.intro-skip, .intro-replay { bottom: 18px; z-index: 3; }
/* products start right under the half-screen box */
.hero + #products { padding-top: 36px; }

@media (max-width: 760px) {
  /* phones: smaller app tiles on top, text right under them */
  .hero { align-items: flex-start; padding: calc(44px + 56vw) 0 32px; }
  .hero-stage { top: 40px; left: -42cqw; width: 128cqw; }
  .hero-scrim { background: linear-gradient(0deg, rgba(7, 8, 32, 0.95) 0%, rgba(7, 8, 32, 0.7) 40%, rgba(7, 8, 32, 0) 62%); }
  .intro-replay { bottom: auto; }
  .door::before, .door-seam { top: calc(68px + 5%); bottom: 12%; }
  .hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .hero p { font-size: 16px; margin: 10px 0 18px; }
  .hero .btn { padding: 12px 26px; font-size: 16px; }
  .intro-replay { top: 76px; }
  .hero + #products { padding-top: 28px; }
}
