
/* Layout (after the Earth3d site): a full-bleed cinematic hero, then one 1200px column of tiles framed by chalk-blue corner marks like the cushion line of a table, with visionOS-style glass labels. Claret felt for depth. Dark by design. */
:root {
  --night: #0b0e12;
  --night-2: #12100f;
  --night-3: #1c1416;
  --ink: #f5f1e6;
  --mute: #a69f93;
  --line: rgba(245, 241, 230, 0.12);
  --cyan: #3fa9f5;
  --felt: #6b1f2e;
  --felt-deep: #2a0b12;
  --cyan-glow: rgba(63, 169, 245, 0.2);
  --glass: rgba(20, 14, 16, 0.6);
  --shade: rgba(11, 14, 18, 0.92);

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-xs: 0.75rem;
  --t-sm: 0.9rem;
  --t-md: 1.0625rem;
  --t-lg: 1.3rem;
  --t-xl: clamp(1.45rem, 1.1rem + 1.3vw, 2.05rem);
  --t-h2: clamp(2rem, 1.3rem + 2.9vw, 3.5rem);
  --t-h1: clamp(2.55rem, 1.2rem + 5.6vw, 5.9rem);

  --gutter: clamp(16px, 4vw, 48px);
  --col: 1200px;
  --radius: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 var(--t-md)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { width: 100%; max-width: calc(var(--col) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font: 500 var(--t-xs)/1.2 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.display {
  font-family: var(--f-display);
  font-stretch: 118%;
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1;
}
.display em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: -0.01em;
  color: var(--cyan);
}
.coord {
  font: 400 var(--t-xs)/1.35 var(--f-mono);
  letter-spacing: 0.04em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 56px; padding: 8px 22px 9px;
  border-radius: 14px;
  background: var(--ink); color: var(--night);
  text-decoration: none; line-height: 1.1;
  transition: transform .2s ease, box-shadow .2s ease;
}
.store small { font: 500 0.7rem/1.2 var(--f-body); letter-spacing: 0.02em; opacity: .75; }
.store b { font: 600 1.28rem/1.15 var(--f-body); letter-spacing: -0.01em; }
.store:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px var(--cyan-glow), 0 0 0 4px var(--cyan-glow); }
.ghost {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 20px 0 14px;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--glass); color: var(--ink);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  font: 500 var(--t-sm)/1 var(--f-body); cursor: pointer;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}
.ghost:hover { border-color: var(--cyan); }
.ghost .ring {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--cyan); color: var(--night);
}
.ghost .ring svg { width: 12px; height: 12px; margin-left: 2px; }
.ghost .dur { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--mute); }

/* ---------- Header ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(to bottom, rgba(11, 14, 18, 0.72), rgba(11, 14, 18, 0));
}
.bar .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.1rem/1 var(--f-display); font-stretch: 112%; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.bar nav { display: flex; gap: 22px; margin-left: auto; }
.bar nav a { text-decoration: none; font-size: var(--t-sm); color: var(--mute); transition: color .2s; }
.bar nav a:hover { color: var(--ink); }
.bar .mini {
  padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--night);
  font: 600 var(--t-sm)/1 var(--f-body); text-decoration: none; white-space: nowrap;
}
@media (max-width: 720px) { .bar nav { display: none; } .bar .mini { margin-left: auto; } }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; min-height: min(88svh, 880px); display: flex; align-items: flex-end; overflow: hidden; background: var(--night-2); }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--shade) 0%, rgba(11, 14, 18, 0.62) 34%, rgba(11, 14, 18, 0.08) 68%),
    linear-gradient(to right, rgba(11, 14, 18, 0.55) 0%, rgba(11, 14, 18, 0) 60%);
}
.hero .wrap { padding-block: 140px clamp(36px, 6vw, 72px); display: grid; gap: 26px; }
.hero h1 { font-size: var(--t-h1); max-width: 13.5ch; }
.hero .lede { max-width: 50ch; font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.28rem); line-height: 1.55; color: rgba(245, 241, 230, 0.86); }
.hero .fine { font: 400 var(--t-xs)/1.4 var(--f-mono); letter-spacing: 0.06em; color: var(--mute); }
.hero-foot { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: flex-end; justify-content: space-between; }
.hud {
  display: grid; gap: 4px; padding: 12px 16px 12px 14px; min-width: 0;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.hud .now { display: flex; align-items: center; gap: 8px; font: 500 var(--t-xs)/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.hud .now i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-glow); }
.hud .place { font: 600 var(--t-sm)/1.3 var(--f-body); transition: opacity .35s ease; }
.hud .coord { transition: opacity .35s ease; }
.hud.swap .place, .hud.swap .coord { opacity: 0; }

/* ---------- Maker's note + legend ---------- */
.note { padding-block: clamp(80px, 11vw, 150px) clamp(56px, 8vw, 100px); }
.note blockquote { margin: 0; display: grid; gap: 28px; max-width: 54rem; }
.note blockquote p { font: 400 var(--t-xl)/1.38 var(--f-body); letter-spacing: -0.01em; max-width: 34ch; }
.note blockquote p + p { max-width: 46ch; font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem); line-height: 1.5; }
.note blockquote p + p { color: var(--mute); }
.note blockquote p em { font-family: var(--f-serif); font-style: italic; font-size: 1.08em; color: var(--ink); }
.note footer { display: flex; align-items: center; gap: 12px; font-size: var(--t-sm); color: var(--mute); }
.note footer img { width: 36px; height: 36px; border-radius: 50%; }
.note footer b { color: var(--ink); font-weight: 600; }

.legend { margin-top: clamp(48px, 7vw, 84px); padding-top: 26px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 20px 40px; align-items: start; }
.legend > .eyebrow { color: var(--mute); padding-top: 4px; }
.legend dl { margin: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 12px; }
.legend svg { width: 22px; height: 22px; grid-row: span 2; color: var(--cyan); margin-top: 2px; }
.legend dt { font-weight: 600; }
.legend dd { margin: 0; color: var(--mute); font-size: var(--t-sm); line-height: 1.5; }
@media (max-width: 900px) { .legend { grid-template-columns: 1fr; } }

/* ---------- Section heads ---------- */
.sec { padding-block: clamp(64px, 9vw, 120px); }
.sec-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 44rem; }
.sec-head h2 { font-size: var(--t-h2); }
.sec-head p { color: var(--mute); font-size: var(--t-lg); line-height: 1.5; max-width: 38em; }

/* ---------- Map tiles ---------- */
.tile { margin: 0; display: grid; gap: 16px; min-width: 0; }
.media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--night-3); aspect-ratio: 16 / 10; max-width: 100%;
}
.media.wide { aspect-ratio: 16 / 9; }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }
.media::before {
  content: ""; position: absolute; inset: 12px; z-index: 2; pointer-events: none;
  --c: var(--cyan); --l: 18px; --w: 2px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
  opacity: .9;
}
.media::after {
  content: ""; position: absolute; inset: 12px; z-index: 2; pointer-events: none;
  border: 1.5px solid var(--cyan); border-radius: 4px;
  box-shadow: 0 0 24px var(--cyan-glow), inset 0 0 24px var(--cyan-glow);
  opacity: 0; transition: opacity .35s ease;
}
.tile:hover .media::after { opacity: 1; }
.chip {
  position: absolute; left: 22px; bottom: 22px; z-index: 3; max-width: calc(100% - 44px);
  display: grid; gap: 2px; padding: 8px 12px; border-radius: 10px;
  background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line);
}
.chip b { font: 600 var(--t-xs)/1.3 var(--f-body); letter-spacing: 0.01em; }
.chip .coord { color: rgba(245, 241, 230, 0.7); }
.tile h3 { font: 700 1.5rem/1.15 var(--f-display); font-stretch: 112%; letter-spacing: -0.015em; }
.tile p { color: var(--mute); max-width: 36em; }
.tile .txt { display: grid; gap: 8px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 32px); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Gestures ---------- */
.gestures { margin-top: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.gestures div { padding: 22px 24px 0 0; display: grid; gap: 4px; }
.gestures div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.gestures kbd { font: 500 var(--t-xs)/1.3 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); }
.gestures span { font: 600 var(--t-lg)/1.3 var(--f-body); }
@media (max-width: 760px) {
  .gestures { grid-template-columns: 1fr; }
  .gestures div, .gestures div + div { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Explore ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split .sec-head { margin-bottom: 28px; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { padding: 18px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--mute); font-size: var(--t-sm); line-height: 1.55; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ---------- Film ---------- */
.film-wrap { position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden; background: #000; aspect-ratio: 16 / 9; max-width: 100%; }
.film-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.film-play {
  position: absolute; inset: 0; z-index: 2; width: 100%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
  background: radial-gradient(ellipse at center, rgba(11, 14, 18, 0.15) 0%, rgba(11, 14, 18, 0.55) 100%);
}
.film-play span { display: inline-flex; align-items: center; gap: 14px; padding: 12px 24px 12px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); font: 600 var(--t-md)/1 var(--f-body); transition: transform .25s ease, border-color .25s ease; }
.film-play i { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--cyan); color: var(--night); }
.film-play i svg { width: 18px; height: 18px; margin-left: 3px; }
.film-play small { font: 400 var(--t-xs)/1 var(--f-mono); color: var(--mute); letter-spacing: 0.06em; }
.film-play:hover span { transform: scale(1.03); border-color: var(--cyan); }
.film-note { margin-top: 14px; }

/* ---------- Gallery ---------- */
.gal-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; margin-bottom: clamp(28px, 4vw, 44px); }
.gal-head .sec-head { margin-bottom: 0; }
.gal-nav { display: flex; gap: 10px; }
.gal-nav button {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--night-3); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; transition: border-color .2s;
}
.gal-nav button:hover { border-color: var(--cyan); }
.gal-nav svg { width: 18px; height: 18px; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 660px); gap: 18px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding-inline: max(var(--gutter), calc((100vw - var(--col)) / 2)); scroll-padding-inline: max(var(--gutter), calc((100vw - var(--col)) / 2));
  padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: var(--night-3) transparent;
}
.strip figure { margin: 0; scroll-snap-align: start; display: grid; gap: 12px; min-width: 0; }
.strip button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.strip .media { aspect-ratio: 16 / 9; }
.strip figcaption { display: flex; justify-content: space-between; gap: 16px; font-size: var(--t-sm); }
.strip figcaption b { font-weight: 600; }
.strip figcaption .coord { text-align: right; }

dialog.lb { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1600px); width: 100%; color: var(--ink); }
dialog.lb::backdrop { background: rgba(3, 5, 9, 0.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.lb img { width: 100%; height: auto; border-radius: 12px; }
dialog.lb .lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 4px 0; }
dialog.lb button { border: 1px solid var(--line); background: var(--night-3); color: var(--ink); border-radius: 999px; padding: 8px 16px; font: 500 var(--t-sm)/1 var(--f-body); cursor: pointer; }

/* ---------- Final CTA ---------- */
.cta { padding-block: clamp(80px, 11vw, 150px); }
.cta-card {
  position: relative; overflow: hidden; border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 100% 0%, rgba(107, 31, 46, 0.55) 0%, rgba(107, 31, 46, 0) 60%), var(--night-2);
  padding: clamp(28px, 5vw, 64px);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center;
}
.cta-card img.icon { width: clamp(96px, 12vw, 148px); height: auto; border-radius: 50%; box-shadow: 0 30px 80px -20px rgba(107, 31, 46, 0.8); }
.cta-card h2 { font-size: var(--t-h2); }
.cta-card .txt { display: grid; gap: 18px; }
.cta-card .specs { display: flex; flex-wrap: wrap; gap: 8px 20px; }
@media (max-width: 640px) { .cta-card { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.foot { padding-block: 32px 48px; border-top: 1px solid var(--line); }
.foot .wrap { display: grid; gap: 10px; font-size: var(--t-xs); color: var(--mute); line-height: 1.6; }
.foot b { color: var(--ink); font-weight: 600; }

/* Reduced motion: loops wait for a tap */
.tap { position: absolute; right: 22px; top: 22px; z-index: 3; display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); color: var(--ink); place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.tap svg { width: 14px; height: 14px; margin-left: 2px; }
.reduce .tap { display: grid; }

/* 8BallsPool additions */
.hero { background: var(--felt-deep); }
.note { background: radial-gradient(80% 60% at 0% 0%, rgba(107, 31, 46, 0.35), rgba(107, 31, 46, 0) 70%); }
.balls { display: inline-flex; gap: 6px; vertical-align: middle; margin-left: 4px; }
.balls i { width: 14px; height: 14px; border-radius: 50%; background: var(--b); box-shadow: inset -2px -3px 4px rgba(0,0,0,.35), inset 2px 2px 3px rgba(255,255,255,.35); }
.balls i.s { background: linear-gradient(var(--ink) 0 26%, var(--b) 26% 74%, var(--ink) 74%); }

/* Text pages (privacy, support) */
.doc { padding-block: 140px 90px; }
.doc .wrap { max-width: calc(820px + 2 * var(--gutter)); }
.doc h1 { font-size: var(--t-h2); margin: 12px 0 10px; }
.doc .sub { color: var(--mute); margin-bottom: 30px; }
.doc h2 { font: 700 1.3rem/1.2 var(--f-display); font-stretch: 112%; letter-spacing: -0.01em; margin: 38px 0 10px; }
.doc p { color: rgba(245, 241, 230, 0.86); margin-bottom: 10px; max-width: 64ch; }
.doc a { color: var(--cyan); }
.doc .card { border: 1px solid var(--line); background: var(--night-2); border-radius: var(--radius); padding: 18px 22px; }
.doc .card p { margin: 0; color: var(--ink); }
.bar.solid { background: rgba(11, 14, 18, 0.86); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
