:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #f5f5f7;
  --muted: #98989f;
  --faint: #636366;
  --line: rgb(255 255 255 / 0.12);
  --glass: rgb(26 26 28 / 0.58);
  --accent: #ff6a2b;            /* sunset orange */
  --accent-hover: #ff814c;
  --accent-ink: #1f0b00;        /* text on accent fills; 6.7:1 contrast */
  --accent-rgb: 255 106 43;
  --ok: #34d17a;
  --radius: 14px;
  --pad: clamp(16px, 4.2vw, 64px);
  --font: Inter, ui-sans-serif, -apple-system, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body:has(dialog[open]) { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Floating glass nav ─────────────────────────────────────────── */
.nav {
  position: fixed; z-index: 50; top: 14px; left: 50%; translate: -50% 0;
  width: min(1120px, calc(100% - 24px)); height: 54px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 8px 0 18px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 4px; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-links a { padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--fg); background: rgb(255 255 255 / 0.07); }
.nav-cta { display: flex; gap: 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  border: 1px solid var(--line); background: rgb(255 255 255 / 0.06);
  transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.pill:hover { background: rgb(255 255 255 / 0.12); }
.pill:active { transform: scale(0.97); }
.pill.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pill.primary:hover { background: var(--accent-hover); }
.pill.lg { height: 48px; padding: 0 24px; font-size: 16px; }

/* ── Hero billboard ─────────────────────────────────────────────── */
.hero { position: relative; min-height: min(94svh, 900px); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.billboard { position: absolute; inset: 0; z-index: -2; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.slide.on { opacity: 1; }
.slide img, .slide .art-svg { width: 100%; height: 100%; object-fit: cover; }
.slide .art-svg { transform: translateX(var(--shift, 0%)) scale(var(--zoom, 1)); transform-origin: 100% 50%; }
.slide img { transform: scale(1.04); transition: transform 9s linear; }
.slide.on img { transform: scale(1.12); }
.slide-pixel img { image-rendering: pixelated; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, #000 4%, rgb(0 0 0 / 0.84) 34%, rgb(0 0 0 / 0.22) 74%, rgb(0 0 0 / 0.5) 100%),
    linear-gradient(0deg, #000 2%, transparent 38%),
    linear-gradient(180deg, rgb(0 0 0 / 0.55), transparent 22%);
}
.hero-inner { width: 100%; padding: 132px var(--pad) 120px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  padding: 7px 14px 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.06); font-size: 13px; font-weight: 500; color: #d7d7dc;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgb(52 209 122 / 0.18); }
h1 {
  margin: 0; max-width: 11.5ch;
  font-size: clamp(44px, 8.2vw, 112px); font-weight: 700; line-height: 0.98; letter-spacing: -0.045em;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--accent); }
.lede { margin: 26px 0 0; max-width: 46ch; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.5; color: var(--muted); }
.lede strong { color: var(--fg); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.now-showing {
  position: absolute; right: var(--pad); bottom: 36px; z-index: 2;
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-size: 14px;
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
}
.now-showing small { color: var(--muted); }
.dots { display: flex; gap: 6px; padding-right: 8px; }
.dots button { width: 7px; height: 7px; padding: 0; border-radius: 50%; background: rgb(255 255 255 / 0.3); transition: width .3s var(--ease), background .3s; }
.dots button[aria-current="true"] { width: 22px; border-radius: 4px; background: #fff; }

/* ── Projects ───────────────────────────────────────────────────── */
.section { padding: 0 var(--pad); }
.projects { padding-top: 24px; scroll-margin-top: 72px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 32px; margin-bottom: 26px; }
h2 { margin: 0; font-size: clamp(30px, 4.4vw, 56px); font-weight: 700; line-height: 1.04; letter-spacing: -0.04em; text-wrap: balance; }
.count { color: var(--faint); font-weight: 600; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 2px var(--pad); max-width: 100vw; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: rgb(255 255 255 / 0.05);
  font-size: 14px; font-weight: 500; color: #d2d2d7; transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { background: rgb(255 255 255 / 0.11); }
.chip[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }

.row { margin: 0 calc(var(--pad) * -1); }
.row + .row { margin-top: 10px; }
.row-title { margin: 0 var(--pad); font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; letter-spacing: -0.02em; }
.row-wrap { position: relative; }
.scroller {
  display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 30px var(--pad); margin: -8px 0;
  scroll-snap-type: x proximity; scroll-padding: 0 var(--pad); scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.arrow {
  position: absolute; top: 30px; bottom: 30px; z-index: 5; width: clamp(40px, 4vw, 64px);
  display: grid; place-items: center; opacity: 0; transition: opacity .25s;
  font-size: 28px; font-weight: 300; color: #fff;
}
.arrow.l { left: 0; background: linear-gradient(90deg, rgb(0 0 0 / 0.85), transparent); }
.arrow.r { right: 0; background: linear-gradient(270deg, rgb(0 0 0 / 0.85), transparent); }
.arrow[hidden] { display: none; }
.row-wrap:hover .arrow:not([hidden]) { opacity: 1; }
@media (hover: none) { .arrow { display: none; } }

.card {
  position: relative; flex: none; scroll-snap-align: start;
  width: clamp(268px, 27vw, 380px); aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; background: #111; isolation: isolate;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 10px 30px rgb(0 0 0 / 0.5);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card .vis { position: absolute; inset: 0; }
.card .vis > img, .card .vis .art-svg { width: 100%; height: 100%; object-fit: cover; }
.card .vis img { transition: transform 6s linear; }
.card .shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.86) 0%, rgb(0 0 0 / 0.25) 46%, transparent 70%);
  transition: background .4s;
}
.card .meta { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 14px 16px 15px; }
.card h3 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.card .more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.card .more > div { overflow: hidden; }
.card .more p {
  margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: #d6d6db;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .more .tags { display: flex; flex-wrap: nowrap; gap: 5px; margin-top: 9px; overflow: hidden; }
.card .more .tag { flex: none; }
.tag { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; color: #e6e6ea; background: rgb(255 255 255 / 0.14); }
.badge {
  position: absolute; z-index: 2; top: 11px; left: 11px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em;
  background: rgb(0 0 0 / 0.5); border: 1px solid rgb(255 255 255 / 0.14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .25s;
}
.card:hover .badge, .card:focus-visible .badge { opacity: 0; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.badge.live i, .badge.running i { background: var(--ok); box-shadow: 0 0 0 3px rgb(52 209 122 / 0.25); }
.badge.building i, .badge.prototype i { background: var(--accent); }
.badge.soon i { background: #8ab4ff; }

@media (hover: hover) {
  .card:hover, .card:focus-visible { transform: scale(1.08); z-index: 6; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.22), 0 24px 60px rgb(0 0 0 / 0.75); }
  .card:hover .vis img, .card:focus-visible .vis img { transform: scale(1.08); }
  .card:hover .shade, .card:focus-visible .shade { background: linear-gradient(0deg, rgb(0 0 0 / 0.94) 0%, rgb(0 0 0 / 0.6) 55%, rgb(0 0 0 / 0.1) 100%); }
  .card:hover .more, .card:focus-visible .more { grid-template-rows: 1fr; }
}
@media (hover: none) { .card .more { display: none; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; padding: 18px 0 8px; }
.grid .card { width: auto; }
.empty { color: var(--muted); padding: 32px 0; }

/* ── Poster / image motion (plays on hover, always in hero + modal) ── */
.pixel img, .slide-pixel img, .vis-pixel img { image-rendering: pixelated; }
.xfade { position: relative; width: 100%; height: 100%; }
.xfade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xfade img:nth-child(2) { opacity: 0; animation: xfade 6s ease-in-out infinite; animation-play-state: paused; }
.scanlines::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(0 0 0 / 0.16) 0 1px, transparent 1px 3px); }

/* The .a-* rules below use the `animation` shorthand (which resets play-state to
   running), so the paused default comes AFTER them and out-specifies them. */
.a-draw { stroke-dasharray: 1; animation: draw 5s ease-in-out infinite; }
.a-twinkle { animation: twinkle 3s ease-in-out infinite; }
.a-flow { animation: flow 1.1s linear infinite; }
.a-pulse { animation: pulse 2.4s ease-in-out infinite; }
.a-pop { animation: pop 6s ease-out infinite; }
.a-slide { animation: slide 5s ease-out infinite; }
.a-dot { animation: bounce 1s ease-in-out infinite; }
.a-ping { transform-box: fill-box; transform-origin: center; animation: ping 1.8s ease-out infinite; }
.a-gate { animation: fly 4.8s cubic-bezier(.55, 0, .9, .6) infinite; filter: drop-shadow(0 0 8px rgb(47 107 255 / .7)); }
.a-box { transform-box: fill-box; transform-origin: center; animation: lock 4.2s ease-in-out infinite; }
.a-scan { animation: scan 3.6s linear infinite; }
/* Longhands only here: the delay is inherited from the inline style on the parent <g>. */
.a-bleach circle:first-child {
  fill: #ff6f61; animation-name: bleach; animation-duration: 6s; animation-timing-function: ease-in-out;
  animation-iteration-count: infinite; animation-delay: inherit;
}

svg.art-svg * { animation-play-state: paused; }
.card:hover .art-svg *, .card:focus-visible .art-svg *, .card:hover .xfade img, .card:focus-visible .xfade img,
.hero .art-svg *, .modal .art-svg *, .modal .xfade img { animation-play-state: running; }

@keyframes draw { 0% { stroke-dashoffset: 1; } 72%, 100% { stroke-dashoffset: 0; } }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes flow { to { stroke-dashoffset: -50; } }
@keyframes pulse { 0%, 100% { opacity: .12; } 50% { opacity: .34; } }
@keyframes pop { 0% { opacity: 0; transform: translateY(16px); } 10%, 84% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes slide { 0% { opacity: 0; transform: translateX(34px); } 14%, 84% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateX(-20px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-6px); opacity: 1; } }
@keyframes ping { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes fly { 0% { transform: scale(.05); opacity: 0; } 14% { opacity: 1; } 82% { opacity: 1; } 100% { transform: scale(3.6); opacity: 0; } }
@keyframes bleach { 0%, 18% { fill: #ff6f61; } 64%, 100% { fill: #efe8dc; } }
@keyframes lock { 0%, 100% { opacity: .25; transform: scale(1.12); } 30%, 80% { opacity: 1; transform: none; } }
@keyframes scan { 0% { transform: translateY(0); } 100% { transform: translateY(262px); } }
@keyframes xfade { 0%, 35% { opacity: 0; } 50%, 85% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .art-svg *, .xfade img, .slide img { animation: none !important; transition: none !important; }
  .card { transition: none; }
}

/* ── About ──────────────────────────────────────────────────────── */
.about { padding-top: clamp(80px, 12vw, 160px); scroll-margin-top: 40px; }
.about h2 { max-width: 18ch; font-size: clamp(34px, 6vw, 80px); }
.about h2 span { color: var(--muted); }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-top: clamp(40px, 6vw, 72px); }
.pillar { padding: 26px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015)); }
.pillar h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.02em; }
.pillar p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer { margin-top: clamp(80px, 12vw, 160px); padding: 0 var(--pad) 48px; scroll-margin-top: 40px; }
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
  padding: clamp(28px, 5vw, 64px); border-radius: 32px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, rgb(var(--accent-rgb) / 0.16), transparent 55%), rgb(255 255 255 / 0.03);
}
.cta h2 { max-width: 14ch; }
.cta-links { display: flex; flex-wrap: wrap; gap: 12px; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; color: var(--faint); font-size: 13.5px; }

/* ── Detail modal (glass) ───────────────────────────────────────── */
dialog.modal {
  width: min(960px, calc(100% - 24px)); max-height: min(92vh, 960px); margin: auto; padding: 0; overflow: auto;
  color: var(--fg); border: 1px solid rgb(255 255 255 / 0.16); border-radius: 26px;
  background: rgb(24 24 27 / 0.84); box-shadow: 0 40px 120px rgb(0 0 0 / 0.7);
  -webkit-backdrop-filter: blur(40px) saturate(1.7); backdrop-filter: blur(40px) saturate(1.7);
  overscroll-behavior: contain; scrollbar-width: thin;
}
dialog.modal[open] { animation: modalIn .45s var(--ease); }
dialog.modal::backdrop { background: rgb(0 0 0 / 0.62); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); animation: fadeIn .35s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes fadeIn { from { opacity: 0; } }
.m-vis { position: relative; aspect-ratio: 16 / 8.2; background: #0a0a0a; overflow: hidden; }
.m-vis > img, .m-vis .art-svg { width: 100%; height: 100%; object-fit: cover; }
.m-vis::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgb(24 24 27 / 0.96) 0%, transparent 46%); }
.m-title { position: absolute; z-index: 1; left: clamp(20px, 4vw, 40px); right: 70px; bottom: 18px; }
.m-title .kind { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.m-title h2 { font-size: clamp(30px, 5vw, 56px); }
.m-close {
  position: absolute; z-index: 3; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; line-height: 1;
  background: rgb(0 0 0 / 0.5); border: 1px solid rgb(255 255 255 / 0.18);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background .2s, transform .2s;
}
.m-close:hover { background: rgb(255 255 255 / 0.2); }
.m-body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); padding: 6px clamp(20px, 4vw, 40px) clamp(24px, 4vw, 36px); }
.m-lead { margin: 0 0 4px; font-size: clamp(18px, 2vw, 22px); line-height: 1.45; letter-spacing: -0.01em; font-weight: 500; }
.m-body h4 { margin: 28px 0 10px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.m-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.m-body li { position: relative; padding-left: 20px; color: #cfcfd4; font-size: 15.5px; line-height: 1.5; }
.m-body li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.m-body code { font: 13.5px var(--mono); padding: 1px 6px; border-radius: 6px; background: rgb(255 255 255 / 0.1); }
.facts { display: grid; gap: 18px; align-content: start; }
.facts h4 { margin: 0 0 8px; }
.facts .row-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.facts .tag { font-size: 13px; padding: 4px 11px; }
.facts .status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.facts .status i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status.live i, .status.running i { background: var(--ok); box-shadow: 0 0 0 4px rgb(52 209 122 / 0.2); }
.status.building i, .status.prototype i { background: var(--accent); }
.status.soon i { background: #8ab4ff; }
.private { display: flex; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 14px; border: 1px dashed rgb(255 255 255 / 0.2); color: var(--muted); font-size: 14px; line-height: 1.45; }
.m-nav { display: flex; justify-content: space-between; gap: 12px; padding: 18px clamp(20px, 4vw, 40px); border-top: 1px solid var(--line); }
.m-nav button { max-width: 48%; text-align: left; color: var(--muted); font-size: 14px; transition: color .2s; }
.m-nav button:hover { color: var(--fg); }
.m-nav button b { display: block; color: var(--fg); font-weight: 600; font-size: 15px; }
.m-nav button:last-child { text-align: right; margin-left: auto; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav { padding-left: 14px; }
  .hero-inner { padding-top: 112px; padding-bottom: 150px; }
  .now-showing { left: var(--pad); right: auto; bottom: 28px; }
  .hero::after { background: linear-gradient(0deg, #000 8%, rgb(0 0 0 / 0.6) 55%, rgb(0 0 0 / 0.5) 100%), linear-gradient(180deg, rgb(0 0 0 / 0.5), transparent 25%); }
  .m-body { grid-template-columns: 1fr; }
  .m-vis { aspect-ratio: 16 / 10; }
}
