/* Make it anywhere: the site around the city (splash, preview, film pages) */
:root {
  color-scheme: dark;
  --bg: #0f0724;
  --bg-deep: #07040f;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-2: rgba(255, 255, 255, 0.08);
  --line: rgba(230, 220, 255, 0.28);
  --text: #f6f5ef;
  --soft: #d9d1ee;
  --muted: #b8acd6;
  --violet: #6d32dd;
  --violet-2: #9a5af2;
  --lime: #dff45f;
  --lavender: #e6dcff;
  --live: #ff3b5c;
  --sans: Manrope, system-ui, sans-serif;
  --display: Unbounded, Manrope, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(120% 50% at 50% 0%, #251050 0%, var(--bg) 60%) no-repeat, var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--sans);
  min-height: 100vh;
}
a { color: var(--lime); }
a:hover { color: #f1fbb0; }
button, input { font: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* nav */
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 500 15px var(--display); }
.logo svg { width: 18px; height: 26px; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a { color: var(--lavender); text-decoration: none; }
.nav-links a:hover { color: var(--text); }

.kicker { font: 500 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
h1, h2 { font-family: var(--display); font-weight: 300; letter-spacing: -0.02em; margin: 0; }
h1 b, h2 b { font-weight: 700; }
.lime { color: var(--lime); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; }
.btn-violet { background: var(--violet); color: #fff; }
.btn-violet:hover { background: #7c44ea; color: #fff; }
.btn-lime { background: var(--lime); color: var(--bg); }
.btn-lime:hover { background: #e8f88a; color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 14px; }

/* the link field */
.urlbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line); max-width: 580px; }
.urlbar input { flex: 1 1 220px; min-width: 0; color: var(--text); background: transparent; border: 0; padding: 12px 16px; font-size: 17px; outline: none; }
.urlbar:focus-within { box-shadow: inset 0 0 0 2px var(--violet-2); }
/* Chrome's autofill paints the field light (and the text dark): keep our look */
.urlbar input:-webkit-autofill, .urlbar input:-webkit-autofill:hover, .urlbar input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text); caret-color: var(--text);
  transition: background-color 600000s 0s, color 600000s 0s;
}
.urlbar input::selection { background: rgba(157, 107, 255, 0.45); color: var(--text); }
/* the typed site's logo, at the start of the bar */
.urlbar { align-items: center; }
.peek { flex: none; width: 0; height: 36px; margin-left: 0; border-radius: 9px; background: #fff; display: grid; place-items: center; overflow: hidden; opacity: 0; transform: scale(0.6); transition: width 0.25s ease, margin 0.25s ease, opacity 0.25s ease, transform 0.25s ease; }
.peek.on { width: 36px; margin-left: 6px; opacity: 1; transform: scale(1); }
.peek img { width: 26px; height: 26px; object-fit: contain; }
.urlbar .btn[disabled] { cursor: default; }
input::placeholder { color: #9d93b8; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 700; }
.field input { color: var(--text); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; font-size: 16px; }
.field input:focus { outline: 2px solid var(--violet-2); outline-offset: 1px; }
.hint { color: var(--muted); font-size: 14px; }
.error { color: #ffb3c0; font-size: 14px; }

/* hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 48px 0 72px; }
.hero-copy { flex: 1 1 440px; min-width: 0; }
.hero-copy h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.05; margin: 18px 0 20px; }
.hero-copy p { margin: 0 0 30px; font-size: 19px; color: var(--soft); max-width: 30em; }
.hero-side { flex: 1 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.livebox { position: relative; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #1c0d3c, var(--bg-deep)); box-shadow: inset 0 0 0 1px rgba(230, 220, 255, 0.15), 0 30px 80px rgba(0, 0, 0, 0.35); }
.livebox iframe, .livebox video, .livebox img, .livebox canvas { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.livebox iframe { pointer-events: none; opacity: 0; transition: opacity 0.8s ease; }
.livebox.ready iframe { opacity: 1; }
.livebox .poster { transition: opacity 0.8s ease; }
.livebox.ready .poster { opacity: 0; }
.livebox-link { position: absolute; inset: 0; z-index: 2; }
/* the 2D preview (site/flat-preview.js): the city's still, the ad laid over the screen */
.livebox .flat { position: absolute; inset: 0; overflow: hidden; }
.livebox-label { position: absolute; z-index: 3; right: 14px; bottom: 12px; font: 500 12px var(--mono); color: var(--text); background: rgba(7, 4, 15, 0.7); padding: 6px 10px; border-radius: 999px; pointer-events: none; }
.livebox-progress { position: absolute; z-index: 3; left: 0; bottom: 0; height: 4px; width: 0; background: var(--lime); }
.livebox-progress.run { animation: reveal-bar var(--dur, 14s) linear forwards; }
@keyframes reveal-bar { from { width: 0; } to { width: 100%; } }
.live-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; }
.live-link { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 500 13px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; padding: 10px 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); animation: live-pulse 1.6s ease-out infinite; flex: none; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(255, 59, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); } }
.replay { display: inline-flex; align-items: center; gap: 12px; color: var(--text); background: none; border: 0; padding: 10px 0; cursor: pointer; font-weight: 700; font-size: 17px; text-align: left; }
.replay:hover { color: var(--lime); }
.replay[hidden] { display: none; } /* (its display rule above would otherwise show it with nothing to replay) */
.replay svg { width: 38px; height: 38px; flex: none; padding: 11px 10px 11px 12px; box-sizing: border-box; border-radius: 50%; background: var(--lime); color: #160a33; box-shadow: 0 0 0 6px rgba(223, 244, 95, 0.15); }
.replay:hover svg { box-shadow: 0 0 0 8px rgba(223, 244, 95, 0.22); }

/* the wall */
.wall { padding-bottom: 80px; }
.wall-head { margin-bottom: 24px; }
.wall-head h2 { font-size: 36px; margin-bottom: 10px; }
.wall-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.wall-title-row h2 { margin-bottom: 0; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { border: 0; background: transparent; color: var(--soft); font: 600 14px Manrope, sans-serif; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--lime); color: #12091f; }
.seg button:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 2px; }
.wall-head p { margin: 0; color: var(--soft); font-size: 17px; max-width: 40em; }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; border-radius: 14px; padding: 12px 16px; background: var(--panel); }
.row.to-site { cursor: pointer; transition: background 0.15s ease; }
.row.to-site:hover { background: rgba(255, 255, 255, 0.09); }
.row.top { background: var(--panel-2); box-shadow: inset 0 0 0 1px rgba(223, 244, 95, 0.6); }
.open-row .row-name { flex: 1 1 auto; }
.row-name .cat { margin-left: 8px; padding: 2px 8px; border-radius: 999px; font: 500 10px 'DM Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 2px; color: var(--soft); background: rgba(230, 220, 255, 0.1); white-space: nowrap; }
.row-site { font-size: 14px; }
.row.outbid { background: rgba(255, 255, 255, 0.025); }
.row.outbid .row-price { color: var(--soft); }
.row.free { background: transparent; box-shadow: inset 0 0 0 1px rgba(230, 220, 255, 0.14); }
.row-logo { width: 55px; height: 55px; border-radius: 11px; display: grid; place-items: center; overflow: hidden; color: #fff; font: 700 18px var(--display); flex: none; }
.row-logo img { width: 80%; height: 80%; object-fit: contain; }
.row-name { flex: 1 1 200px; min-width: 0; }
.row-name strong { display: block; font-size: 17px; }
.row-name a { font-size: 14px; }
.row-name a.name-link { font-size: inherit; color: inherit; text-decoration: none; }
.row-name a.name-link:hover { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.row-name a.watch { display: block; width: fit-content; margin-top: 4px; color: var(--lime); font: 600 13px Manrope, sans-serif; text-decoration: none; }
.row.to-site:hover .row-name a.watch { text-decoration: underline; text-underline-offset: 3px; }
.row-screen { flex: 0 1 230px; min-width: 0; color: var(--muted); font-size: 14px; }
.row-price { min-width: 92px; display: flex; flex-direction: column; align-items: flex-end; font: 700 28px/1 var(--display); color: var(--lime); text-align: right; }
.row-price small { font: 500 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.take-link { min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--soft); font: 600 13px var(--sans); cursor: pointer; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(230, 220, 255, 0.2); }
.take-link:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line); background: rgba(255, 255, 255, 0.05); }
.empty { color: var(--muted); padding: 20px 0; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(7, 4, 15, 0.82); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.dialog { width: 480px; max-width: 100%; padding: 28px; border-radius: 18px; background: #1a0d38; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(223, 244, 95, 0.45); display: flex; flex-direction: column; gap: 16px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dialog-title { font: 700 24px var(--display); margin-top: 6px; }
.close { width: 44px; height: 44px; border: 0; background: none; color: var(--lavender); cursor: pointer; font-size: 26px; line-height: 1; flex: none; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0 0; border-top: 1px solid rgba(230, 220, 255, 0.2); }
.total b { font: 700 30px var(--display); }
.fine { color: var(--muted); font-size: 13px; text-align: center; }
.card-canvas { width: 100%; height: auto; aspect-ratio: 2 / 1; border-radius: 10px; display: block; background: #000; }

/* choices (screens, slogans) */
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { text-align: left; display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 48px; border-radius: 12px; border: 0; cursor: pointer; background: rgba(255, 255, 255, 0.04); color: var(--text); box-shadow: inset 0 0 0 1px rgba(230, 220, 255, 0.25); }
.choice[aria-checked='true'] { background: var(--lavender); color: #1a0b38; box-shadow: none; }
.choice .grow { flex: 1; min-width: 0; }
.choice small { display: block; opacity: 0.8; font-size: 13px; }
.choice .price { font: 700 17px var(--display); }

/* progress while the ad is being made */
.making { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 60px 0; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(230, 220, 255, 0.2); border-top-color: var(--lime); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer { padding: 30px 0 50px; color: var(--muted); font-size: 17px; border-top: 1px solid rgba(230, 220, 255, 0.1); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer-links { display: flex; gap: 20px; }
.footer .emo { font-size: 1.45em; line-height: 1; vertical-align: -0.12em; }
.footer a { color: var(--soft); }
@media (max-width: 640px) {
  .row-screen { flex-basis: 100%; order: 5; }
  /* phones: rank, logo and the price on top (the price at the right), the name under them, then "Take it" */
  .row-price { order: 2; margin-left: auto; }
  .row-name { order: 3; flex-basis: 100%; }
  .take-link { order: 4; }
  .hero { padding-top: 24px; }
}

/* the hero grown into the live square (index.html: enter / leave) */
.livebox { view-transition-name: livebox; }
.livebox.full { position: fixed; inset: 0; z-index: 100; aspect-ratio: auto; border-radius: 0; }
.livebox.full iframe { pointer-events: auto; }
.livebox.full .livebox-link, .livebox.full .livebox-label, .livebox.full .poster { display: none; }
html.in-square, html.in-square body { overflow: hidden; }
::view-transition-group(livebox) { animation-duration: 0.45s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
.livebox canvas.poster { object-fit: contain; }
.livebox .peek img { position: static; width: 26px; height: 26px; object-fit: contain; } /* the logo in the box's address field */

/* the hero while the live city builds (index.html): a blurred still, how far along it is */
.livebox .poster.blurred { filter: blur(14px) saturate(1.2) brightness(0.55); transform: scale(1.08); }
.live-loading { position: absolute; z-index: 3; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; pointer-events: none; transition: opacity 0.6s ease; }
.live-loading[hidden] { display: none; }
.livebox.ready .live-loading { opacity: 0; }
.live-loading-pill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: rgba(7, 4, 15, 0.72); font: 500 13px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); box-shadow: inset 0 0 0 1px rgba(230, 220, 255, 0.2); }
.live-loading-bar { width: min(260px, 60%); height: 4px; border-radius: 4px; background: rgba(230, 220, 255, 0.18); overflow: hidden; }
.live-loading-bar i { display: block; height: 100%; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* the live square's sound (index.html): off by default */
.livebox-sound { position: absolute; z-index: 4; left: 12px; bottom: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: var(--text); background: rgba(7, 4, 15, 0.7); box-shadow: inset 0 0 0 1px rgba(230, 220, 255, 0.25); }
.livebox-sound:hover { background: rgba(7, 4, 15, 0.9); }
.livebox-sound:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.livebox-sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.livebox-sound .waves { display: none; }
.livebox-sound[aria-pressed='true'] { color: var(--bg); background: var(--lime); box-shadow: none; }
.livebox-sound[aria-pressed='true'] .waves { display: inline; }
.livebox-sound[aria-pressed='true'] .cross { display: none; }
.livebox.full .livebox-sound { display: none; }
.livebox-sound[hidden] { display: none; }

/* "There's a new #1. in town" (index.html): a purchase is playing out in the hero right now */
.page-news { position: fixed; z-index: 60; right: 20px; bottom: 20px; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 14px; padding: 12px 8px 12px 18px; border-radius: 16px; background: #1a0d38; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(223, 244, 95, 0.6); animation: page-news-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.page-news[hidden], html.in-square .page-news { display: none; }
.page-news-text { display: flex; flex-direction: column; min-width: 0; }
.page-news-text strong { font: 700 16px var(--display); color: var(--lime); }
.page-news-text span { color: var(--soft); font-size: 14px; }
@keyframes page-news-in { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .page-news { animation: none; } }

/* the amount picker (take modal) */
.amount { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(230, 220, 255, 0.2); }
.amount label { font-weight: 600; }
.amount-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(230, 220, 255, 0.25); }
.amount-row:focus-within { box-shadow: inset 0 0 0 2px var(--lime); }
.amount-cur { font: 700 30px var(--display); color: var(--soft); }
.amount-row input { flex: 1; min-width: 0; font: 700 30px var(--display); padding: 6px 0; border: 0; background: transparent; color: var(--text); outline: none; -moz-appearance: textfield; appearance: textfield; }
.amount-row input::-webkit-outer-spin-button, .amount-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-step { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--lime); color: var(--bg); font: 700 26px/1 var(--sans); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.amount-step:hover { background: #e8f88a; }
.amount-step:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.amount-step:disabled { background: rgba(255, 255, 255, 0.08); color: var(--muted); cursor: default; }
.amount-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.amount-chips .chip { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer; background: rgba(255, 255, 255, 0.04); color: var(--text); box-shadow: inset 0 0 0 1px rgba(230, 220, 255, 0.25); font-size: 14px; }
.amount-chips .chip[aria-pressed='true'] { background: var(--lavender); color: #1a0b38; box-shadow: none; }
.amount [hidden] { display: none !important; }
.tower-offer { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 4px 14px; border-left: 2px solid var(--lime); }
.tower-offer[hidden] { display: none; }
.row-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--lime); color: var(--bg); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; vertical-align: 1px; }
/* the address bar stays one line where there's room: the logo peeking in mustn't push the button below */
@media (min-width: 521px) { .urlbar { flex-wrap: nowrap; } .urlbar input { flex-basis: 0; } .urlbar .btn { flex: none; } }
@media (max-width: 520px) { .urlbar { border-radius: 22px; } .urlbar .btn { flex: 1 1 100%; } }
/* the place on the Wall */
.row-rank { flex: none; width: 40px; font: 700 20px/1 var(--display); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.row.top .row-rank { color: var(--lime); }
@media (max-width: 640px) { .row-rank { width: 30px; font-size: 17px; } }
