:root {
  --bg: #05060d;
  --bg2: #080918;
  --fg: #eef0ff;
  --muted: #9aa0c3;
  --line: rgba(255, 255, 255, 0.09);
  --cyan: #5ee7ff;
  --violet: #8b7bff;
  --magenta: #ff5fc8;
  --amber: #ffc27a;
  --radius: 28px;
  color-scheme: dark;
}

@property --a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 10px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: fixed; left: 16px; top: -64px; z-index: 50;
  background: var(--cyan); color: #04101a; padding: 10px 14px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* GPU background. Fixed behind the hero, fades out on scroll. */
#gl {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block; pointer-events: none;
  background:
    radial-gradient(70% 60% at 75% 50%, rgba(110, 90, 255, 0.22), transparent 70%),
    linear-gradient(180deg, #05060d, #0a0820);
}

/* Navigation */
.nav {
  position: fixed; z-index: 20; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 24px), 1120px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px 6px 16px;
  background: rgba(10, 12, 26, 0.55);
  border: 1px solid var(--line); border-radius: 999px;
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 750; letter-spacing: -0.01em; color: var(--fg); }
.brand svg path { stroke: var(--bg); }
.nav nav { display: flex; align-items: center; gap: 6px; }
.navlink { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; text-decoration: none; color: var(--muted); font-weight: 600; }
.navlink:hover { color: var(--fg); }
.pill {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 999px;
  text-decoration: none; font-weight: 700; color: #06101a;
  background: linear-gradient(100deg, var(--cyan), var(--violet));
}

/* Hero */
.hero {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; padding: 120px 0 90px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 6, 13, 0.9) 0%, rgba(5, 6, 13, 0.7) 40%, rgba(5, 6, 13, 0) 72%);
}
.hero .wrap { position: relative; }
@media (max-width: 760px) {
  .hero::before { background: linear-gradient(180deg, rgba(5, 6, 13, 0.55) 0%, rgba(5, 6, 13, 0.82) 45%, rgba(5, 6, 13, 0.2) 100%); }
}

.eyebrow {
  margin: 0 0 18px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan);
}

h1 {
  margin: 0 0 24px; font-size: clamp(3rem, 9.5vw, 6.8rem); line-height: 0.95; letter-spacing: -0.055em; font-weight: 800;
  background: linear-gradient(100deg, #ffffff 15%, #c3ccff 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad {
  background: linear-gradient(100deg, var(--cyan), var(--violet), var(--magenta), var(--cyan));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 14s linear infinite;
}
@keyframes flow { to { background-position: 300% 0; } }

.lead { max-width: 30em; margin: 0 0 34px; font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: #c7cbe6; }

.cta, .links { margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }

.btn, .ghost {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 700; text-decoration: none;
}
.btn {
  color: #06101a; background: linear-gradient(100deg, var(--cyan), var(--violet));
  box-shadow: 0 10px 40px -10px rgba(110, 120, 255, 0.7);
}
.ghost { border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.04); }
.btn, .ghost { transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 46px -8px rgba(110, 120, 255, 0.9); }
.ghost:hover { background: rgba(255, 255, 255, 0.09); }

.cue {
  position: absolute; left: 50%; bottom: 26px; width: 28px; height: 46px; margin-left: -14px;
  border: 2px solid rgba(255, 255, 255, 0.3); border-radius: 16px; display: block;
}
.cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px;
  background: var(--cyan); animation: cue 2s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* Apps */
.apps {
  position: relative; z-index: 1; padding: 130px 0 120px;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(139, 123, 255, 0.16), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}
.apps::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, transparent 90%);
  mask-image: linear-gradient(180deg, transparent, #000 25%, transparent 90%);
}
.apps .wrap { position: relative; }
h2 { margin: 0 0 56px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -0.04em; }

.feature {
  position: relative; padding: 1px; border-radius: var(--radius);
  background: conic-gradient(from var(--a), rgba(255, 255, 255, 0.07) 0 55%, var(--cyan), var(--violet), var(--magenta), rgba(255, 255, 255, 0.07));
  animation: spin 9s linear infinite;
}
@keyframes spin { to { --a: 360deg; } }

.feature-in {
  position: relative; display: grid; gap: 40px; align-items: center;
  padding: clamp(24px, 5vw, 64px); border-radius: calc(var(--radius) - 1px);
  background: linear-gradient(160deg, rgba(22, 24, 48, 0.96), rgba(9, 10, 22, 0.98));
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .feature-in { grid-template-columns: minmax(260px, 0.9fr) 1.1fr; } }

.kind { margin: 0 0 8px; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
h3 { margin: 0 0 6px; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -0.04em; }
.tag { margin: 0 0 18px; font-weight: 700; font-size: 1.15rem; color: var(--cyan); }
.copy p { color: #c7cbe6; }
.feats { list-style: none; margin: 22px 0 30px; padding: 0; display: grid; gap: 14px; }
.feats li { position: relative; padding-left: 30px; color: #c7cbe6; }
.feats li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 14px; height: 14px; border-radius: 5px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
}
.feats b { color: var(--fg); }

/* Phone illustration, pure CSS */
.stage { display: grid; justify-items: center; gap: 12px; perspective: 900px; }
.phone {
  position: relative; width: min(100%, 270px); aspect-ratio: 9 / 18.2; border-radius: 40px; padding: 10px;
  background: linear-gradient(160deg, #2a2d52, #0d0e20);
  box-shadow: 0 40px 90px -30px rgba(110, 100, 255, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: rotate(-4deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.25s ease-out;
}
.notch { position: absolute; top: 16px; left: 50%; width: 74px; height: 20px; margin-left: -37px; border-radius: 12px; background: #05060d; z-index: 2; }
.screen {
  overflow: hidden;
  height: 100%; border-radius: 31px; padding: 50px 16px 24px; display: flex; flex-direction: column; gap: 18px;
  background: radial-gradient(90% 60% at 50% 0%, rgba(139, 123, 255, 0.32), transparent 70%), #080918;
}
.hud { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.time { flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.time i { display: block; height: 100%; transform-origin: left; background: linear-gradient(90deg, var(--cyan), var(--magenta)); animation: tick 8s linear infinite; }
@keyframes tick { from { transform: scaleX(1); } to { transform: scaleX(0.02); } }

.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; flex: 1; align-content: start; }
.c {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px;
  font-weight: 800; font-size: 1.35rem; color: #dfe3ff;
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.slot { background: rgba(255, 255, 255, 0.02); box-shadow: none; border: 1px dashed rgba(255, 255, 255, 0.18); }
.tile {
  position: absolute; inset: -1px; display: grid; place-items: center; border-radius: 12px; color: #06101a;
  background: linear-gradient(140deg, var(--cyan), var(--violet) 60%, var(--magenta));
  box-shadow: 0 8px 24px -6px rgba(120, 120, 255, 0.8);
  animation: land 8s ease-in infinite;
}
.s1 .tile { animation-delay: 0s; }
.s2 .tile { animation-delay: 1.3s; }
.s3 .tile { animation-delay: 2.6s; }
.s4 .tile { animation-delay: 3.9s; }
@keyframes land {
  0%   { transform: translateY(-520%); opacity: 0; }
  4%   { opacity: 1; }
  16%  { transform: translateY(0); }
  19%  { transform: translateY(-7%); }
  22%  { transform: translateY(0); }
  90%  { transform: translateY(0); opacity: 1; }
  97%, 100% { transform: translateY(0); opacity: 0; }
}
.note { margin: 0; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: #6d7396; }

/* Coming soon */
.soon {
  margin-top: 28px; display: flex; align-items: center; gap: 28px; padding: 30px clamp(22px, 4vw, 44px);
  border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: var(--radius); background: rgba(255, 255, 255, 0.02);
}
.soon h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); letter-spacing: -0.02em; margin: 0 0 4px; }
.soon p { margin: 0; color: var(--muted); }
.orbit { position: relative; flex: none; width: 76px; height: 76px; }
.orbit::before { content: ""; position: absolute; inset: 29px; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px rgba(255, 194, 122, 0.8), 0 0 24px 4px rgba(255, 150, 90, 0.5); }
.orbit i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(139, 123, 255, 0.45); animation: orb 6s linear infinite; }
.orbit i:nth-child(2) { inset: 8px; animation-duration: 9s; animation-direction: reverse; border-color: rgba(94, 231, 255, 0.4); }
.orbit i:nth-child(3) { inset: -8px; animation-duration: 13s; border-color: rgba(255, 95, 200, 0.3); }
.orbit i::after { content: ""; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--cyan); }
@keyframes orb { to { transform: rotate(360deg); } }

.foot { position: relative; z-index: 1; padding: 28px 0 44px; border-top: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-size: 0.9rem; }
.foot p { margin: 0; }

/* Scroll-driven reveals, pure CSS. Browsers without support just show everything. */
@supports (animation-timeline: view()) {
  .apps h2, .feature, .soon {
    animation-name: rise; animation-timing-function: linear; animation-fill-mode: both;
    animation-timeline: view(); animation-range: entry 0% entry 45%;
  }
  .feature { animation: rise linear both, spin 9s linear infinite; animation-timeline: view(), auto; animation-range: entry 0% entry 45%, normal; }
  @keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
}

/* Off-screen blocks stop animating. */
.off, .off * { animation-play-state: paused !important; }

/* Calm mode: no motion, tiles shown landed. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .phone { transform: none; }
}

/* Footer */
.foot { padding: 48px 0 36px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; margin-bottom: 28px; }
.foot-brand { margin: 0 0 6px; font-weight: 800; font-size: 1.2rem; color: var(--fg); letter-spacing: -0.02em; }
.foot-note { margin: 0; max-width: 26em; color: var(--muted); }
.foot-h { margin: 0 0 10px; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--fg); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot li a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); }
.foot li a:hover { color: var(--fg); }
.copy-line { padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.85rem; }

/* Legal pages */
.subpage { background: linear-gradient(180deg, #05060d, #0a0820 60%, #05060d); min-height: 100vh; display: flex; flex-direction: column; }
.legal { flex: 1; padding: 130px 0 80px; }
.narrow { max-width: 760px; }
h1.plain { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; letter-spacing: -0.045em; margin: 0 0 8px; background: none; color: var(--fg); -webkit-text-fill-color: currentColor; }
.updated { margin: 0 0 36px; color: var(--muted); font-size: 0.9rem; }
.legal h2 { margin: 36px 0 8px; font-size: 1.25rem; letter-spacing: -0.02em; }
.legal p { margin: 0 0 14px; color: #c7cbe6; }
.legal a { color: var(--cyan); text-underline-offset: 3px; }
.legal strong { color: var(--fg); }
.card { margin: 24px 0 32px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,0.03); }
.card h2 { margin-top: 0; }
.mail { font-size: 1.4rem; font-weight: 700; word-break: break-all; }
.muted { color: var(--muted) !important; margin-bottom: 0 !important; }

/* ---------- Mobile and touch ---------- */
html { -webkit-tap-highlight-color: transparent; }
.nav { top: calc(10px + env(safe-area-inset-top, 0px)); }
.wrap { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.foot { padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px)); }

/* Phones and small tablets */
@media (max-width: 760px) {
  .wrap { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .nav { width: calc(100% - 20px); padding-left: 12px; }
  .navlink { padding: 0 10px; }
  .pill { padding: 0 16px; }
  .hero { padding: calc(96px + env(safe-area-inset-top, 0px)) 0 84px; align-items: flex-end; }
  h1 { font-size: clamp(2.8rem, 14vw, 4.4rem); margin-bottom: 18px; }
  .lead { margin-bottom: 26px; }
  .cta { flex-direction: column; align-items: stretch; }
  .cta .btn, .cta .ghost, .links .btn, .links .ghost { justify-content: center; width: 100%; min-height: 52px; }
  .links { flex-direction: column; }
  .apps { padding: 84px 0 80px; }
  h2 { margin-bottom: 36px; }
  .feature-in { padding: 22px 18px 28px; gap: 28px; }
  .phone { width: min(78%, 250px); }
  .soon { flex-direction: row; gap: 18px; padding: 22px 18px; }
  .orbit { width: 60px; height: 60px; }
  .orbit::before { inset: 22px; }
  .foot-grid { flex-direction: column; gap: 24px; }
  .foot ul { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .legal { padding-top: calc(104px + env(safe-area-inset-top, 0px)); padding-bottom: 56px; }
  .card { padding: 20px; }
  .mail { font-size: 1.15rem; }
}

/* Very small phones */
@media (max-width: 360px) {
  .brand span { display: none; }
  .navlink { padding: 0 8px; }
}

/* Short screens (landscape phones): no scroll cue, tighter hero */
@media (max-height: 560px) {
  .cue { display: none; }
  .hero { min-height: 0; padding-top: 88px; padding-bottom: 48px; align-items: center; }
  h1 { font-size: clamp(2.4rem, 8vw, 3.8rem); }
}

/* Touch devices: no hover lifts, no constantly repainting border (saves battery) */
@media (hover: none) {
  .btn:hover, .ghost:hover { transform: none; }
  .feature { animation: none; --a: 135deg; }
  .grad { animation: none; background-position: 0 0; }
}
