/* Hyperwiz landing: HeroUI-style tokens (same values as the previous page) + the city stage. */
:root {
  color-scheme: light;
  --white: oklch(100% 0 0);
  --snow: oklch(0.9911 0 0);
  --eclipse: oklch(0.2103 0.0059 285.89);
  --radius: 0.5rem;
  --background: oklch(0.9702 0 0);
  --foreground: var(--eclipse);
  --surface: var(--white);
  --surface-secondary: oklch(0.9524 0.0013 286.37);
  --muted: oklch(0.52 0.0138 285.94);
  --border: oklch(90% 0.004 286.32);
  --accent: oklch(0.6204 0.195 253.83);
  --accent-foreground: var(--snow);
  --accent-strong: oklch(0.55 0.195 253.83); /* white-on-accent >= 4.5:1 */
  --link: var(--accent-strong);
  --success: oklch(0.7329 0.1935 150.81);
  --warning: oklch(0.7819 0.1585 72.33);
  --planned: oklch(0.62 0.02 286);
  --surface-shadow: 0 2px 4px 0 rgba(0, 0, 0, .04), 0 1px 2px 0 rgba(0, 0, 0, .06), 0 0 1px 0 rgba(0, 0, 0, .06);
  --overlay-shadow: 0 18px 40px -12px rgba(15, 30, 60, .28), 0 0 1px 0 rgba(0, 0, 0, .16);
  --glass: color-mix(in oklab, var(--surface) 82%, transparent);
  --glass-solid: color-mix(in oklab, var(--surface) 92%, transparent);
  --sky-top: oklch(0.9 0.05 240);
  --sky-bottom: oklch(0.975 0.014 225);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --topbar-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: oklch(12% 0.005 285.823);
    --foreground: var(--snow);
    --surface: oklch(0.2103 0.0059 285.89);
    --surface-secondary: oklch(0.257 0.0037 286.14);
    --muted: oklch(70.5% 0.015 286.067);
    --border: oklch(28% 0.006 286.033);
    --warning: oklch(0.8203 0.1388 76.34);
    --link: var(--accent);
    --surface-shadow: 0 0 0 0 transparent inset;
    --overlay-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6), 0 0 1px 0 rgba(255, 255, 255, .22) inset;
    --sky-top: oklch(0.2 0.07 268);
    --sky-bottom: oklch(0.34 0.1 272);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: oklch(12% 0.005 285.823); --foreground: var(--snow); --surface: oklch(0.2103 0.0059 285.89);
  --surface-secondary: oklch(0.257 0.0037 286.14); --muted: oklch(70.5% 0.015 286.067); --border: oklch(28% 0.006 286.033);
  --warning: oklch(0.8203 0.1388 76.34); --link: var(--accent); --surface-shadow: 0 0 0 0 transparent inset;
  --overlay-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6), 0 0 1px 0 rgba(255, 255, 255, .22) inset;
  --sky-top: oklch(0.2 0.07 268); --sky-bottom: oklch(0.34 0.1 272);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 8px); }
body {
  margin: 0; background: var(--background); color: var(--foreground);
  font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, h3, h4 { letter-spacing: -0.025em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 999px; font: 600 14px/1 var(--sans); cursor: pointer;
  transition: background .15s, transform .1s, border-color .15s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent-strong); color: var(--accent-foreground); }
.btn--primary:hover { background: color-mix(in oklab, var(--accent-strong) 88%, white 12%); }
.btn--secondary { background: var(--surface); color: var(--foreground); border-color: var(--border); }
.btn--secondary:hover { background: var(--surface-secondary); }
.btn--ghost { background: transparent; color: var(--foreground); }
.btn--ghost:hover { background: color-mix(in oklab, var(--foreground) 8%, transparent); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px;
  font: 600 12px/1 var(--sans); background: var(--surface-secondary); color: var(--foreground);
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--planned); flex: none; }
.dot--live { background: var(--success); box-shadow: 0 0 0 3px color-mix(in oklab, var(--success) 25%, transparent); }
.dot--building { background: var(--warning); box-shadow: 0 0 0 3px color-mix(in oklab, var(--warning) 25%, transparent); }
.link { background: none; border: 0; padding: 0; font: 600 14px/1 var(--sans); color: var(--link); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--topbar-h); padding: 0 max(20px, calc((100% - 1160px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in oklab, var(--background) 62%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand__logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--foreground); color: var(--background); }
.brand__logo svg { width: 16px; height: 16px; }
.topbar__nav { display: flex; gap: 6px; }

/* ---------- Stage ---------- */
.stage {
  position: relative; height: min(100svh, 1000px); min-height: 600px; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 72%, var(--background));
}
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
.stage__canvas:active { cursor: grabbing; }
.stage__canvas.is-hover { cursor: pointer; }
.stage__fallback { position: absolute; inset: auto 20px 120px; text-align: center; color: var(--foreground); font-size: 14px; }
.stage__intro {
  position: absolute; z-index: 5; left: max(20px, calc((100% - 1160px) / 2)); top: calc(var(--topbar-h) + 36px);
  width: min(460px, calc(100% - 40px)); pointer-events: none; transition: opacity .35s, transform .35s;
}
.stage__intro { isolation: isolate; }
/* Soft sky-coloured halo so the headline stays legible over foliage. */
.stage__intro::before {
  content: ""; position: absolute; z-index: -1; inset: -48px -90px -56px -60px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--sky-top) 88%, transparent) 55%, transparent);
}
.stage__intro h1 { margin-top: 12px; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; font-weight: 800; }
.stage__intro .grad { background: linear-gradient(90deg, var(--accent), oklch(0.65 0.2 300)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stage__sub { margin-top: 14px; font-size: 16px; color: color-mix(in oklab, var(--foreground) 72%, transparent); max-width: 40ch; }
.stage.is-focused .stage__intro { opacity: 0; transform: translateY(-8px); }

.pins { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.pin {
  position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px;
  border: 0; border-radius: 999px; background: var(--glass-solid); color: var(--foreground); font: 600 12px/1 var(--sans);
  box-shadow: var(--surface-shadow), 0 4px 14px -6px rgba(10, 20, 50, .35); pointer-events: auto; cursor: pointer;
  white-space: nowrap; will-change: transform;
  transition: opacity .25s, background .15s; opacity: 0;
}
.pin.is-visible { opacity: 1; }
.pin.is-hover, .pin:hover { background: var(--surface); }
.stage.is-focused .pin.is-visible:not(.is-active) { opacity: .35; }
.pin:not(.is-visible) { pointer-events: none; }

.legend {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; padding: 0 max(20px, calc((100% - 1160px) / 2)) 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; pointer-events: none;
}
.legend__list { display: flex; gap: 8px; overflow-x: auto; padding: 6px 14px; pointer-events: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
.legend__list::-webkit-scrollbar { display: none; }
.legend__chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: 999px; background: var(--glass-solid); color: var(--foreground); font: 600 13px/1 var(--sans); cursor: pointer; flex: none; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.legend__chip:hover, .legend__chip.is-hover { background: var(--surface); }
.legend__chip[aria-pressed="true"] { background: var(--foreground); color: var(--background); border-color: transparent; }
.legend__key {
  display: none; gap: 14px; align-items: center; flex: none; height: 36px; padding: 0 16px; border-radius: 999px;
  font: 500 12px/1 var(--mono); color: color-mix(in oklab, var(--foreground) 75%, transparent); pointer-events: auto;
  background: var(--glass-solid);
}
.legend__key span { display: inline-flex; align-items: center; gap: 6px; }
.stage__hint {
  position: absolute; z-index: 5; left: 50%; bottom: 76px; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px;
  background: var(--glass-solid); font: 500 12px/1 var(--sans); color: var(--muted); pointer-events: none; transition: opacity .4s;
  white-space: nowrap;
}
.stage__hint.is-gone, .stage.is-focused .stage__hint { opacity: 0; }

/* ---------- Info panel ---------- */
.panel {
  position: absolute; z-index: 20; right: max(20px, calc((100% - 1160px) / 2)); top: calc(var(--topbar-h) + 24px);
  width: min(380px, calc(100% - 40px)); max-height: calc(100% - var(--topbar-h) - 100px); overflow: auto;
  padding: 24px; border-radius: 20px; background: var(--surface); box-shadow: var(--overlay-shadow);
  border: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
  animation: panel-in .35s cubic-bezier(.2, .8, .2, 1);
}
.panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.panel__close {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 32px; height: 32px; border: 0;
  border-radius: 50%; background: var(--surface-secondary); color: var(--foreground); cursor: pointer;
}
.panel__close:hover { background: color-mix(in oklab, var(--foreground) 12%, var(--surface-secondary)); }
.panel h2 { margin-top: 14px; font-size: 28px; line-height: 1.1; font-weight: 800; outline: none; }
.panel__tagline { margin-top: 10px; color: color-mix(in oklab, var(--foreground) 78%, transparent); }
.panel__features { margin-top: 16px; display: grid; gap: 10px; }
.panel__features li { position: relative; padding-left: 22px; font-size: 14px; }
.panel__features li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 3px; background: var(--accent); }
.panel__actions {
  position: sticky; bottom: -24px; z-index: 1; margin: 22px -24px -24px; padding: 14px 24px 22px;
  display: flex; gap: 10px; flex-wrap: wrap; background: var(--surface);
}
.chip .dot { width: 7px; height: 7px; }

/* ---------- Content below the stage ---------- */
.apps { padding: 72px 0 40px; }
.apps h2 { margin-top: 12px; font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.apps__lead { margin-top: 12px; max-width: 62ch; color: var(--muted); font-size: 16px; }
.group-title { margin-top: 44px; font-size: 18px; font-weight: 700; display: flex; align-items: baseline; gap: 12px; }
.group-title span { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.apps__grid { margin-top: 16px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.app {
  display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--surface-shadow); transition: border-color .2s, transform .2s;
}
.app__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app__name { font-size: 18px; font-weight: 700; }
.app__stage { margin-left: auto; font: 500 11px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.app__tagline { font-size: 14px; color: color-mix(in oklab, var(--foreground) 80%, transparent); }
.app__features { display: grid; gap: 7px; font-size: 13px; color: var(--muted); }
.app__features li { padding-left: 16px; position: relative; }
.app__features li::before { content: ""; position: absolute; left: 1px; top: .6em; width: 6px; height: 6px; border-radius: 2px; background: color-mix(in oklab, var(--accent) 70%, transparent); }
.app .link { margin-top: auto; align-self: flex-start; padding-top: 6px; }

.cta { padding: 56px 0 80px; }
.cta__inner { display: grid; gap: 28px; padding: 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--surface-shadow); }
.cta h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.cta p { margin-top: 10px; color: var(--muted); max-width: 52ch; }
.cta__box { display: grid; gap: 8px; align-content: center; }
.cta__box label { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cta__field { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--surface-secondary); border: 1px solid var(--border); }
.cta__field output { font: 500 15px/1 var(--mono); overflow: hidden; text-overflow: ellipsis; }
.cta__state { min-height: 18px; font-size: 13px; color: var(--muted); }
.footer { border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: 13px; }
.footer__inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Larger screens ---------- */
@media (min-width: 760px) {
  .cta__inner { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 40px 44px; }
}
@media (min-width: 980px) {
  .legend__key { display: inline-flex; }
}

/* ---------- Phones: panel becomes a bottom sheet ---------- */
@media (max-width: 759px) {
  .stage { min-height: 560px; }
  .stage__intro { top: calc(var(--topbar-h) + 20px); }
  .stage__hint { display: none; }
  .pin { height: 22px; padding: 0 9px 0 8px; font-size: 11px; }
  .stage.is-focused .pin:not(.is-active) { opacity: 0; pointer-events: none; }
  .panel {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 52%; border-radius: 22px 22px 0 0; padding: 22px 20px 26px;
    animation-name: sheet-in;
  }
  .panel__actions { margin: 22px -20px -26px; padding: 14px 20px calc(18px + env(safe-area-inset-bottom)); bottom: -26px; }
  .legend { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .stage.is-focused .legend { opacity: 0; pointer-events: none; }
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .panel { animation: none; }
  .stage__intro, .pin { transition: none; }
}
.is-no-webgl .stage { height: auto; min-height: 0; padding-bottom: 96px; }
.is-no-webgl .stage__canvas, .is-no-webgl .pins, .is-no-webgl .stage__hint { display: none; }
.is-no-webgl .stage__intro { position: static; padding: calc(var(--topbar-h) + 36px) max(20px, calc((100% - 1160px) / 2)) 24px; width: auto; }
.is-no-webgl .legend { position: static; padding-top: 8px; }
.is-no-webgl .stage__fallback { position: static; padding: 0 max(20px, calc((100% - 1160px) / 2)) 14px; text-align: left; }
.is-no-webgl [data-show] { display: none; }
.is-no-webgl .panel { position: static; width: auto; max-height: none; margin: 8px max(20px, calc((100% - 1160px) / 2)) 0; animation: none; }
