:root {
  --bg: #060A18;
  --bg2: #0B1330;
  --text: #EEF2FF;
  --muted: rgba(226, 232, 255, 0.68);
  --line: rgba(255, 255, 255, 0.1);
  --card: rgba(255, 255, 255, 0.05);
  --c: #5B8EF5;      /* current world colour (changes as you scroll) */
  --deep: #1E3A8A;
  --tint: #E8F0FD;
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
body[data-world="farm"]   { --c: #22A35A; --deep: #14703D; --tint: #E8F6EE; }
body[data-world="ride"]   { --c: #2F6FEB; --deep: #1E4FB8; --tint: #E8F0FD; }
body[data-world="dine"]   { --c: #F2643D; --deep: #B8401E; --tint: #FDEDE7; }
body[data-world="health"] { --c: #0D9488; --deep: #0F766E; --tint: #E6F6F4; }
body[data-world="travel"] { --c: #7C3AED; --deep: #5B21B6; --tint: #F1EBFE; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden; transition: background-color .8s var(--ease);
}
h1, h2, h3 { font-family: Poppins, Inter, sans-serif; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(44px, 8vw, 104px); font-weight: 800; }
h2 { font-size: clamp(32px, 4.6vw, 60px); font-weight: 800; }
h3 { font-size: 20px; }
p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 14px 16px auto; z-index: 50; display: flex; align-items: center; gap: 20px;
  padding: 10px 12px 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(6, 10, 24, .55); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  max-width: 1180px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; font: 800 20px Poppins, sans-serif; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; transition: color .25s, background .25s; }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--c);
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px;
  background: linear-gradient(135deg, var(--b), color-mix(in srgb, var(--b) 60%, #000));
  color: #fff; font-weight: 700; box-shadow: 0 10px 30px -10px var(--b), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .8s var(--ease);
}
.btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 18px 40px -12px var(--b), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-small { padding: 10px 18px; font-size: 14px; }
.btn-ghost { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 120px 6vw 80px; overflow: hidden; isolation: isolate; }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-glow { position: absolute; inset: auto -20% -40% 30%; height: 80%; z-index: -2; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 45%, transparent), transparent); filter: blur(40px); transition: background .8s; }
.hero-copy { max-width: 640px; position: relative; z-index: 2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, rgba(6,10,24,.92) 0%, rgba(6,10,24,.7) 32%, rgba(6,10,24,0) 58%); }
@media (max-width: 960px) { .hero::before { background: linear-gradient(180deg, rgba(6,10,24,0) 25%, rgba(6,10,24,.85) 55%); } }
.kicker { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 700; color: var(--c); transition: color .8s; }
.lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0; }
.world-chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.world-chips a { display: inline-block; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); transition: transform .3s var(--ease), background .3s; }
.world-chips a:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c) 32%, transparent); }
.split .ch { display: inline-block; opacity: 0; transform: translateY(.6em) rotateX(-70deg); transform-origin: 50% 100%; animation: chIn .9s var(--ease) forwards; animation-delay: calc(var(--i) * 32ms + 150ms); }
@keyframes chIn { to { opacity: 1; transform: none; } }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border-radius: 14px; border: 2px solid rgba(255,255,255,.35); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: hint 1.8s infinite var(--ease); }
@keyframes hint { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: rgba(255,255,255,.02); }
.marquee-track { display: flex; gap: 48px; width: max-content; padding: 18px 0; animation: marquee 38s linear infinite; }
.marquee span { white-space: nowrap; font-weight: 600; color: var(--muted); }
.marquee span::before { content: "◆"; margin-right: 48px; color: var(--c); font-size: 10px; vertical-align: middle; transition: color .8s; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Worlds ---------- */
.world { position: relative; min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6vw; padding: 120px 7vw; overflow: hidden; isolation: isolate; }
.world.flip .world-copy { order: 2; }
.world-copy { max-width: 540px; }
.world-copy p { font-size: 18px; }
.world-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.world-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; background: var(--wc); animation: blob 18s ease-in-out infinite alternate; }
.world-bg i:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: -10vw; }
.world-bg i:nth-child(2) { width: 30vw; height: 30vw; right: -6vw; bottom: 0; animation-duration: 23s; opacity: .35; }
.world-bg i:nth-child(3) { width: 18vw; height: 18vw; left: 45%; top: 40%; animation-duration: 15s; opacity: .25; }
@keyframes blob { to { transform: translate(8vw, 6vh) scale(1.15); } }
#farm   { --wc: #22A35A; --wd: #14703D; }
#ride   { --wc: #2F6FEB; --wd: #1E4FB8; }
#dine   { --wc: #F2643D; --wd: #B8401E; }
#health { --wc: #0D9488; --wd: #0F766E; }
#travel { --wc: #7C3AED; --wd: #5B21B6; }
.world .kicker { color: var(--wc); }
.world .btn { --b: var(--wc); }
.ticks { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.ticks li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #fff; background: var(--wc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wc) 25%, transparent); }

/* 3D stage: phone + floating layers at different depths (parallax with the mouse) */
.stage { position: relative; height: min(620px, 80vh); display: grid; place-items: center; perspective: 1100px; transform-style: preserve-3d; }
.stage > * { transform-style: preserve-3d; transition: transform .6s var(--ease); }
.phone {
  width: min(300px, 70vw); aspect-ratio: 9 / 18.5; border-radius: 42px; padding: 12px;
  background: linear-gradient(145deg, #1b2240, #0a0f22); border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 50px 100px -30px color-mix(in srgb, var(--wc) 70%, #000), 0 0 0 8px rgba(255,255,255,.03), inset 0 1px 0 rgba(255,255,255,.2);
}
.screen { height: 100%; border-radius: 32px; overflow: hidden; padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--wc) 22%, #0b1022), #0b1022 60%); }
.s-head { font: 700 15px Poppins, sans-serif; padding: 4px 6px 8px; }
.s-photo { height: 38%; border-radius: 20px; position: relative; overflow: hidden; background-size: cover; background-position: center; }
.farm-photo { background-image: radial-gradient(circle at 30% 40%, #6fbf73 0 18%, transparent 19%), radial-gradient(circle at 62% 58%, #8b5a2b 0 6%, transparent 7%), radial-gradient(circle at 48% 30%, #7a4d22 0 4%, transparent 5%), linear-gradient(135deg, #2e7d32, #14532d); }
.dine-photo { background-image: radial-gradient(circle at 50% 55%, #fde68a 0 18%, #f59e0b 19% 28%, transparent 29%), radial-gradient(circle at 50% 55%, #fff 0 40%, transparent 41%), linear-gradient(135deg, #7c2d12, #431407); }
.travel-photo { background-image: linear-gradient(160deg, transparent 55%, #e9d5ff 56% 60%, transparent 61%), linear-gradient(200deg, transparent 50%, #c4b5fd 51% 58%, transparent 59%), linear-gradient(180deg, #a78bfa, #4c1d95); }
.scan { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0, rgba(255,255,255,.55) 48%, transparent 52%); animation: scan 2.6s ease-in-out infinite; }
@keyframes scan { 0% { transform: translateY(-60%); } 100% { transform: translateY(60%); } }
.s-card { border-radius: 16px; padding: 12px 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); display: grid; gap: 2px; }
.s-card b { font-size: 14px; }
.s-card small { color: var(--muted); font-size: 12px; }
.s-card.ok b { color: #86efac; }
.s-row { display: flex; gap: 8px; }
.s-row span { flex: 1; text-align: center; font-size: 12px; font-weight: 600; padding: 10px 4px; border-radius: 12px; background: color-mix(in srgb, var(--wc) 35%, transparent); }
.route { width: 100%; height: 34%; }
.route path { fill: none; stroke: var(--wc); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 8 10; animation: dash 1.4s linear infinite; }
.route circle { fill: #fff; stroke: var(--wc); stroke-width: 4; }
@keyframes dash { to { stroke-dashoffset: -36; } }
.ecg { width: 100%; height: 20%; }
.ecg path { fill: none; stroke: #5eead4; stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 320; animation: ecg 2.2s linear infinite; filter: drop-shadow(0 0 6px #5eead4); }
@keyframes ecg { from { stroke-dashoffset: 320; } to { stroke-dashoffset: -320; } }
.float { position: absolute; font-size: 44px; filter: drop-shadow(0 18px 24px rgba(0,0,0,.45)); animation: bob 6s ease-in-out infinite; }
.f1 { top: 10%; left: 6%; }
.f2 { bottom: 14%; right: 4%; animation-delay: -2s; }
.f3 { top: 18%; right: -2%; animation-delay: -4s; }
.chip { font: 600 13px Inter, sans-serif; padding: 10px 14px; border-radius: 14px; background: rgba(12, 18, 40, .78); border: 1px solid color-mix(in srgb, var(--wc) 55%, transparent); backdrop-filter: blur(10px); white-space: nowrap; }
@keyframes bob { 50% { translate: 0 -14px; } }

/* ---------- Ask ---------- */
.ask { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; padding: 140px 7vw; }
.ask-demo { border-radius: var(--radius); padding: 28px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 16px; }
.wave { display: flex; align-items: center; gap: 5px; height: 54px; }
.wave i { flex: 1; height: 20%; border-radius: 4px; background: linear-gradient(180deg, #22A35A, #2F6FEB, #F2643D); animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(odd) { animation-delay: -.3s; } .wave i:nth-child(3n) { animation-delay: -.6s; } .wave i:nth-child(4n) { animation-delay: -.8s; }
@keyframes wave { 50% { height: 100%; } }
.bubble { padding: 14px 18px; border-radius: 18px; max-width: 88%; line-height: 1.5; }
.bubble.me { justify-self: end; background: #2F6FEB; border-bottom-right-radius: 6px; }
.bubble.bot { background: rgba(255,255,255,.08); border-bottom-left-radius: 6px; min-height: 76px; }
.typed::after { content: "▍"; animation: blink 1s steps(1) infinite; color: var(--c); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Safety ---------- */
.safety { padding: 120px 7vw; text-align: center; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; perspective: 900px; text-align: left; }
.card { padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); transition: transform .5s var(--ease), border-color .4s, background .4s; transform-style: preserve-3d; }
.card:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); }
.card span { font-size: 34px; display: block; margin-bottom: 14px; transform: translateZ(40px); }
.card h3, .card p { transform: translateZ(20px); }

.final { padding: 120px 7vw 140px; text-align: center; }
.final .cta { justify-content: center; }
.soon { color: var(--muted); font-weight: 600; }

/* ---------- Footer ---------- */
.footer { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; padding: 36px 7vw; border-top: 1px solid var(--line); }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer nav a { color: var(--muted); font-weight: 600; }
.footer nav a:hover { color: #fff; }
.footer small { color: var(--muted); width: 100%; }

/* ---------- Reveal on scroll (3D flip-up) ---------- */
.reveal { opacity: 0; transform: perspective(800px) translateY(36px) rotateX(18deg); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Planet labels (positioned from the 3D scene) ---------- */
.planet-labels { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.planet-label { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; font: 600 13px Inter, sans-serif; color: #fff; white-space: nowrap;
  background: rgba(8, 12, 30, .62); border: 1px solid color-mix(in srgb, var(--pc) 60%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .25s, box-shadow .25s, opacity .3s; will-change: transform; }
.planet-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 10px var(--pc); }
.planet-label:hover, .planet-label.on { background: color-mix(in srgb, var(--pc) 45%, rgba(8,12,30,.7)); box-shadow: 0 0 24px -4px var(--pc); }

/* ---------- Legal pages ---------- */
.doc { max-width: 780px; margin: 0 auto; padding: 130px 20px 80px; }
.doc h1 { font-size: clamp(36px, 6vw, 56px); }
.doc h2 { font-size: 24px; margin-top: 2em; }
.doc p, .doc li { color: var(--muted); }
.doc a { color: var(--c); text-decoration: underline; }
.doc-icon { font-size: 52px; margin-bottom: 8px; }
.doc .updated { font-size: 13px; opacity: .8; }
.doc .intro { font-size: 18px; }
.doc-card { margin-top: 18px; padding: 22px 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.doc-card h2 { margin-top: 0; }
.doc-card ul { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 8px; }
.doc-card p:last-child { margin-bottom: 0; }
.doc b { color: var(--text); }
.doc-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.doc .doc-links a { text-decoration: none; color: var(--text); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.doc .doc-links a:hover { background: rgba(255,255,255,.08); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav .btn-small { margin-left: auto; }
  .world, .ask { grid-template-columns: 1fr; padding: 100px 20px; gap: 30px; min-height: auto; }
  .world.flip .world-copy { order: 0; }
  .stage { height: 520px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .hero { padding: 110px 20px 90px; align-items: end; }
  #globe { opacity: .55; mask-image: linear-gradient(180deg, #000 45%, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 85%); }
  .safety, .final { padding: 90px 20px; }
  .footer { padding: 30px 20px; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .f3 { right: 0; }
  .float:not(.chip) { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .split .ch { opacity: 1; transform: none; }
}
