/* 50400 Studios website: Glass look (matches GlassColors in the Stacked app). Shared by every page. */

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #08090D;
  --glow-green: rgba(16, 185, 129, 0.25);
  --glow-red: rgba(239, 68, 68, 0.25);
  --glow-purple: rgba(139, 92, 246, 0.25);

  --card-fill: linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)), rgba(8, 9, 13, 0.6);
  --card-border: rgba(255, 255, 255, 0.18);
  --card-blur: blur(20px) saturate(140%);
  --input-fill: rgba(255, 255, 255, 0.06);

  --r-card: 20px;
  --r-panel: 26px;
  --r-control: 16px;

  --text: #FFFFFF;
  --text-2: #C7CBD4;
  --hint: #B0B5C0;
  --link: #C4B5FD;
  --accent: #8B5CF6;
  /* Button fill: #8B5CF6 with white text is 4.2:1, this shade is 5.7:1. */
  --accent-fill: #7C3AED;
  --success: #6EE7B7;
  --error: #F87171;

  --font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

/* Reduce look: solid cards, no blur, no animation. Same glows and corners. */
@media (prefers-reduced-transparency: reduce), (prefers-reduced-motion: reduce) {
  :root {
    --card-fill: #1C1F2A;
    --card-border: rgba(255, 255, 255, 0.14);
    --card-blur: none;
    --input-fill: #252938;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Three big blurred glows, fixed behind everything. */
.glows { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.glows span {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(60px);
  animation: drift 26s ease-in-out infinite alternate;
}
.glows .g1 { background: radial-gradient(circle, var(--glow-green) 0%, transparent 65%); top: -30vmax; left: -25vmax; }
.glows .g2 { background: radial-gradient(circle, var(--glow-red) 0%, transparent 65%); top: 25vh; right: -35vmax; animation-delay: -9s; }
.glows .g3 { background: radial-gradient(circle, var(--glow-purple) 0%, transparent 65%); bottom: -35vmax; left: 5vw; animation-delay: -17s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4vmax, 3vmax) scale(1.08); }
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--accent-fill); color: #fff; padding: 8px 14px; border-radius: var(--r-control); z-index: 10; }

/* Glass surfaces */
.glass {
  background: var(--card-fill);
  border: 1px solid var(--card-border);
  border-radius: var(--r-card);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
}
.panel { border-radius: var(--r-panel); }
.card { padding: 22px 20px; }

/* Header */
.site-header { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 19px; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }

/* Hero: one left column. The right side stays free for the tour phone (site.js tilts it there).
   The hero sits above the phone but lets clicks on its empty space through. */
.hero {
  position: relative; z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100svh - 72px); padding: 16px 0 40px;
}
.hero-copy { max-width: 580px; pointer-events: auto; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 0; }
.hero-actions .btn { width: auto; }
.hero h1 { font-size: clamp(42px, 11vw, 68px); line-height: 1.02; margin: 0 0 16px; letter-spacing: -0.025em; font-weight: 800; }
.hero .lede { color: var(--text-2); margin: 0 0 24px; max-width: 34em; font-size: 18px; }

/* Join form */
.join { padding: 22px 20px; }
.join h2 { margin: 0 0 4px; font-size: 21px; }
.join .sub { margin: 0 0 16px; color: var(--text-2); font-size: 15px; }
label, legend { font-weight: 500; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
input[type="email"] {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  font: inherit;
  color: var(--text);
  background: var(--input-fill);
  border: 1px solid var(--card-border);
  border-radius: var(--r-control);
}
input[type="email"]::placeholder { color: var(--hint); opacity: 1; }
input[type="email"]:focus { outline: 2px solid var(--link); outline-offset: 1px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { padding: 0; margin-bottom: 4px; }
.hint { color: var(--hint); font-size: 14px; margin: 0 0 10px; }
.ticks { display: grid; gap: 8px; }
.tick {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-control);
  background: var(--input-fill);
  cursor: pointer; font-weight: 400; font-size: 15px;
}
.tick input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }
.tick:has(input:checked) { border-color: var(--link); }
.turnstile { min-height: 65px; margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; padding: 12px 20px;
  font: inherit; font-weight: 700; font-size: 17px;
  color: #fff;
  background: var(--accent-fill);
  border: 1px solid var(--accent);
  border-radius: var(--r-control);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.35);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5); }
.btn[disabled] { cursor: progress; opacity: 0.85; transform: none; }
.btn.secondary { background: transparent; border-color: var(--card-border); box-shadow: none; }

.status { margin: 12px 0 0; min-height: 1.4em; font-size: 15px; }
.status.error { color: var(--error); }
.status.ok { color: var(--success); }
.done { text-align: center; padding: 10px 0; }
.done h2 { color: var(--success); font-size: 24px; margin: 0 0 6px; }
.done p { color: var(--text-2); margin: 0; }

/* Sections */
section { padding: 20px 0; }
.section-title { font-size: 26px; margin: 0 0 14px; }

/* ---- App tour ----
   Default (no JS, or the Reduce look): a plain list, one card per scene.
   .tour-live (added by site.js): sticky phone, crossfading screen, dots. */
.tour { --shot-h: 90vh; }
.tour .section-title { position: relative; z-index: 2; }
.join-section { max-width: 640px; margin: 0 auto; }
.tour-scenes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tour-scene { min-width: 0; }
.tour-scene h3 { font-size: 21px; line-height: 1.25; }
.tour-shots { display: flex; gap: 12px; margin-top: 16px; }
.tour-shots img {
  display: block; flex: 0 1 220px; min-width: 0; width: 220px; height: auto;
  border-radius: var(--r-card); border: 1px solid var(--card-border); background: #000;
}
.tour-stage, .tour-caption { display: none; }

.tour-live .tour-body { display: grid; }
.tour-live .tour-scenes, .tour-live .tour-stage { grid-area: 1 / 1; }
.tour-live .tour-scenes { gap: 0; }
.tour-live .tour-scene {
  position: relative; display: block; height: calc(var(--shots, 1) * var(--shot-h));
  padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.tour-mark { position: absolute; left: 0; right: 0; height: var(--shot-h); pointer-events: none; }
.tour-live .tour-shots,
.tour-live .tour-text {
  position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.tour-live .tour-stage {
  position: sticky; top: 0; z-index: 1; align-self: start;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tour-live .tour-caption { display: block; text-align: center; max-width: 30em; min-height: 7.2em; margin-top: 18px; padding: 0 8px; }
.tour-caption h3 { margin: 0 0 4px; font-size: 20px; line-height: 1.25; }
.tour-caption p { margin: 0; color: var(--text-2); font-size: 16px; }
.tour-caption.fade { animation: tour-fade 0.35s ease; }
@keyframes tour-fade { from { opacity: 0; transform: translateY(6px); } }

/* Phone frame in the style of a Pixel Pro: 44px outer / 37px screen corners at 320px wide. */
.tour {
  --pw: clamp(170px, min(64vw, calc((100svh - 240px) * 0.44)), 280px);
}
.tour-device { position: relative; }
.tour-live .phone { transform-origin: 50% 30%; }
/* While tilted, layers behind the phone give it real thickness. Each layer gets the phone's transform plus its own
   depth, so no preserve-3d is needed (that made Chrome draw the screenshots at low resolution). */
.phone-slabs {
  display: none; position: absolute; inset: 0; pointer-events: none;
  border-radius: calc(var(--pw) * 0.1375);
}
.phone-slabs.is-tilted { display: block; }
.phone-slab { position: absolute; inset: 0; border-radius: inherit; transform-origin: 50% 30%; }
/* Its own layer while tilted, so Chrome draws the screenshots at full resolution before the 3D turn. */
.phone.is-tilted .phone-screen { will-change: transform; }
.phone {
  position: relative; width: var(--pw);
  padding: calc(var(--pw) * 0.028);
  border-radius: calc(var(--pw) * 0.1375);
  /* Metal rim: lit edges, darker middle. Inside it a thin black bezel. */
  background:
    linear-gradient(#050507, #050507) padding-box,
    linear-gradient(145deg, #6B6E78 0%, #2A2C33 22%, #17181C 50%, #2A2C33 78%, #5A5D66 100%) border-box;
  border: calc(var(--pw) * 0.012) solid transparent;
  box-shadow:
    var(--edge, 0 0 0 0 transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 90px -20px rgba(0, 0, 0, 0.8),
    0 20px 120px -10px rgba(139, 92, 246, 0.28);
}
.phone::before, .phone::after {
  content: ""; position: absolute; right: calc(var(--pw) * -0.026); width: calc(var(--pw) * 0.014);
  background: linear-gradient(90deg, #2A2C33, #4A4D56); border-radius: 0 3px 3px 0;
}
.phone::before { top: 21%; height: 8%; }
.phone::after { top: 33%; height: 15%; }
.phone-screen {
  position: relative; aspect-ratio: 9 / 19.5; overflow: hidden;
  border-radius: calc(var(--pw) * 0.1156); background: #000;
}
.phone-screen img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.35s ease;
}
.phone-screen img.on { opacity: 1; }
.phone-screen::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  /* Glare: stronger while the phone is tilted toward the light (--tilt runs 1 to 0 as it lands). */
  background: linear-gradient(115deg, rgba(255, 255, 255, calc(0.07 + 0.08 * var(--tilt, 0))) 0%,
    rgba(255, 255, 255, 0.02) 30%, transparent 45%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.phone-cam {
  position: absolute; z-index: 2; left: 50%; top: calc(var(--pw) * 0.06);
  width: calc(var(--pw) * 0.034); aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: #050507; box-shadow: 0 0 0 1px #24252B;
}

.tour-dots {
  position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  margin-left: 10px; display: flex; flex-direction: column; gap: 2px;
}
.tour-dot {
  display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  background: none; border: 0; border-radius: 12px; cursor: pointer;
}
.tour-dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.5); transition: height 0.2s ease, background-color 0.2s ease;
}
.tour-dot:hover::before { background: var(--text-2); }
.tour-dot[aria-current]::before { height: 20px; background: var(--link); }
.grid { display: grid; gap: 16px; }
.card h2, .card h3 { margin: 0 0 8px; }
.card p { margin: 0 0 10px; color: var(--text-2); }
.card p:last-child { margin-bottom: 0; }
.promise ul { margin: 0; padding-left: 20px; color: var(--text-2); }
.promise li { margin: 6px 0; }
.promise strong { color: var(--text); }

details { border-top: 1px solid var(--card-border); padding: 12px 0; }
details:first-of-type { border-top: 0; padding-top: 4px; }
summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
details p { margin: 8px 0 0; color: var(--text-2); }

/* Footer */
.site-footer { padding: 28px 0 40px; color: var(--text-2); font-size: 15px; }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* Simple pages (privacy, confirm, remove, 404) */
.page { padding: 24px 0 20px; }
.page .card { padding: 26px 22px; }
.page h1 { font-size: clamp(30px, 8vw, 42px); margin: 0 0 12px; line-height: 1.1; }
.page h2 { font-size: 20px; margin: 26px 0 6px; }
.page h2.part { font-size: 26px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--card-border); }
.page h3 { font-size: 18px; margin: 22px 0 6px; }
.page p, .page li { color: var(--text-2); }
.page .center { text-align: center; }
.page .actions { display: grid; gap: 10px; margin-top: 20px; }
.muted { color: var(--hint); font-size: 14px; }

/* Phones: the tilted phone pokes out past the edge at the top, so clip sideways (clip keeps sticky working). */
@media (max-width: 759px) {
  .wrap { overflow-x: clip; }
  /* Text at the top; the tilted phone fills the space under it on the first screen. */
  .hero { justify-content: flex-start; padding-top: 24px; }
}
@media (min-width: 720px) {
  .card { padding: 28px; }
  .join { padding: 28px; }
  .ticks { grid-template-columns: 1fr 1fr; }
  .ticks.platforms { grid-template-columns: repeat(3, 1fr); }
  .page .actions { grid-template-columns: auto auto; justify-content: center; }
  .page .actions .btn { width: auto; }
  .tour-scene { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
  .tour-shots { margin-top: 0; }
  .tour-shots img { flex-basis: 170px; width: 170px; }
}
@media (min-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .grid.two { grid-template-columns: 1fr 1fr; }
  .tour-shots img { flex-basis: 220px; width: 220px; }

  /* Tour: captions on the left, the phone stays in the middle of the screen on the right. */
  .tour { --pw: clamp(260px, calc((100vh - 110px) * 0.45), 400px); }
  .tour-live .tour-body { grid-template-columns: minmax(0, 1fr) auto; column-gap: 96px; }
  .tour-live .tour-stage { grid-area: 1 / 2; padding-right: 40px; }
  .tour-live .tour-caption { display: none; }
  .tour-live .tour-scene { padding-top: calc(50vh - 90px); }
  .tour-live .tour-text {
    position: sticky; top: calc(50vh - 90px); width: auto; height: auto; overflow: visible;
    clip-path: none; white-space: normal;
    padding: 28px; border-radius: var(--r-card);
    background: var(--card-fill); border: 1px solid var(--card-border);
    -webkit-backdrop-filter: var(--card-blur); backdrop-filter: var(--card-blur);
    transition: border-color 0.3s ease;
  }
  .tour-live .tour-scene.is-active .tour-text { border-color: var(--link); }
  .tour-live .tour-text { padding: 36px 40px; }
  .tour-text h3 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 12px; }
  .tour-live .tour-text p { font-size: 19px; line-height: 1.6; }
}

/* ---- Admin (/admin) ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.admin { max-width: 1120px; padding-bottom: 40px; }
.admin h2 { font-size: 19px; margin: 0 0 10px; }
.admin h2.sub-title { margin-top: 24px; }
.btn.small { width: auto; min-height: 44px; padding: 8px 16px; font-size: 15px; }
.btn.secondary:hover { box-shadow: none; border-color: var(--link); }
.btn.danger { background: transparent; color: var(--error); border-color: rgba(248, 113, 113, 0.5); box-shadow: none; }
.btn.danger:hover { border-color: var(--error); box-shadow: none; }
input[type="password"], input[type="search"], input[type="text"], input[type="url"], textarea, select {
  width: 100%; min-height: 50px; padding: 12px 16px;
  font: inherit; color: var(--text);
  background: var(--input-fill);
  border: 1px solid var(--card-border);
  border-radius: var(--r-control);
}
input[type="password"]:focus, input[type="search"]:focus, input[type="text"]:focus, input[type="url"]:focus, textarea:focus, select:focus { outline: 2px solid var(--link); outline-offset: 1px; }
select option { background: #1C1F2A; color: var(--text); }
textarea { resize: vertical; min-height: 160px; line-height: 1.5; }
input[type="url"]::placeholder { color: var(--hint); opacity: 1; }
input:disabled, textarea:disabled { opacity: 0.75; cursor: not-allowed; }

.emails .field .hint { margin: 0; }
.launch-progress { display: grid; gap: 10px; justify-items: start; padding: 14px 16px; margin: 0 0 16px;
  border: 1px solid var(--card-border); border-radius: var(--r-control); background: var(--input-fill); }
.launch-progress .progress-text { margin: 0; color: var(--text); font-weight: 500; }
.launch-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.login-view { max-width: 440px; margin: 24px auto 0; }
.login-view h1 { margin: 0 0 4px; font-size: 28px; }
.login-view .sub { margin: 0 0 18px; color: var(--text-2); }

.admin-title { font-size: clamp(28px, 7vw, 38px); margin: 4px 0 2px; }
#load-status { margin: 0 0 14px; }
.admin .panel { margin-bottom: 16px; }
.admin .grid.two { gap: 0 16px; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 0 16px; }
.stat { display: grid; gap: 2px; padding: 16px 18px; }
.stat-num { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-2); font-size: 14px; }

.empty { text-align: center; }
.empty h2 { margin: 0 0 6px; }

.readout { margin: 0 0 10px; color: var(--text-2); font-size: 15px; min-height: 1.5em; }
.chart-svg { display: block; width: 100%; height: 160px; overflow: visible; touch-action: manipulation; }
.chart-svg:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 6px; }
.chart-svg .bar { fill: var(--accent); }
.chart-svg .bar.zero { fill: rgba(255, 255, 255, 0.18); }
.chart-svg .bar.on { fill: var(--link); }
.chart-svg .hit { fill: transparent; cursor: pointer; }
.chart-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--hint); font-size: 13px; }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin-bottom: 4px; }
.bar-label { min-width: 0; overflow-wrap: anywhere; }
.bar-count { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-track { display: block; width: 100%; height: 8px; }
.bar-track .track { fill: rgba(255, 255, 255, 0.08); }
.bar-track .bar { fill: var(--accent); }

.toolbar { display: grid; gap: 0 12px; margin-bottom: 4px; }
.toolbar .field { margin-bottom: 12px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; align-self: end; }
#shown { margin: 0 0 8px; }

.people { width: 100%; border-collapse: collapse; font-size: 15px; }
.people th { text-align: left; font-weight: 500; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--card-border); }
.people td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); vertical-align: middle; }
.people td.email { overflow-wrap: break-word; min-width: 15em; font-weight: 500; }
.people td.features { color: var(--text-2); }
.people td.actions { text-align: right; }
.tick-yes { color: var(--success); font-weight: 700; }
.tick-no { color: var(--hint); }
.more { display: flex; margin: 14px auto 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--r-control);
  background: #1C1F2A; border: 1px solid var(--card-border); color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 15px;
}

/* Phones: each row becomes a small card. */
@media (max-width: 599px) {
  .people thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .people, .people tbody { display: block; }
  .people tr {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px;
    padding: 12px 14px; margin-bottom: 10px;
    border: 1px solid var(--card-border); border-radius: var(--r-control);
  }
  .people td { display: contents; }
  .people td::before { content: attr(data-label); color: var(--hint); font-size: 13px; align-self: center; }
  .people td.email { font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
  .people td.email::before, .people td.actions::before { content: none; }
  .people td.email, .people td.actions { grid-column: 1 / -1; display: block; padding: 0 0 6px; border: 0; }
  .people td.actions { padding: 8px 0 0; text-align: left; }
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: minmax(0, 1fr) 200px auto; align-items: end; }
}

/* ======================================================================================================
   Studio pages (/, /roadmap, /contact, /privacy, /terms, app pages). Same Glass look; the glows are the
   logo's purples and come from the "theme" setting (studio.js sets --glow-1 to --glow-4).
   ====================================================================================================== */
:root {
  --glow-1: rgba(76, 29, 149, 0.25);
  --glow-2: rgba(109, 40, 217, 0.25);
  --glow-3: rgba(139, 92, 246, 0.25);
  --glow-4: rgba(196, 181, 253, 0.25);
  --amber: #FCD34D;
  --pill: 999px;
}
.studio-glows .g1 { background: radial-gradient(circle, var(--glow-1) 0%, transparent 65%); top: -30vmax; left: -25vmax; }
.studio-glows .g2 { background: radial-gradient(circle, var(--glow-2) 0%, transparent 65%); top: 20vh; right: -35vmax; animation-delay: -9s; }
.studio-glows .g3 { background: radial-gradient(circle, var(--glow-3) 0%, transparent 65%); bottom: -35vmax; left: 5vw; animation-delay: -17s; }
.studio-glows .g4 {
  background: radial-gradient(circle, var(--glow-4) 0%, transparent 65%);
  width: 45vmax; height: 45vmax; top: 55vh; left: 35vw; animation-delay: -5s; animation-duration: 34s;
}

/* Logo dial: each ring turns at its own speed. In the header it turns while hovered (and stays where it stopped);
   as a spinner it always turns. The Reduce look stops all of it (see the reduce rule at the top). */
.logo-mark { display: inline-grid; place-items: center; }
.logo-mark svg, .spinner svg, .coming-dial svg { display: block; overflow: visible; }
.ring { transform-box: view-box; transform-origin: 50% 50%; animation: ring-turn var(--t, 3s) linear infinite; animation-play-state: paused; }
.r1 { --t: 1.6s; }
.r2 { --t: 2.6s; animation-direction: reverse; }
.r3 { --t: 3.8s; }
.r4 { --t: 5.2s; animation-direction: reverse; }
.r5 { --t: 7s; }
@keyframes ring-turn { to { transform: rotate(360deg); } }
.studio-brand:hover .ring, .studio-brand:focus-visible .ring, .spinner .ring, .coming-dial .ring { animation-play-state: running; }
.coming-dial .ring { animation-duration: calc(var(--t) * 4); }

.studio-brand .logo-mark svg { width: 36px; height: 36px; transition: transform 0.4s ease; }
.studio-brand:hover .logo-mark svg { transform: scale(1.08); }
.spinner { display: grid; place-items: center; gap: 12px; padding: 56px 0; }
.spinner svg { width: 64px; height: 64px; }

/* Header nav */
.studio-header { flex-wrap: wrap; gap: 8px 20px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-nav a { position: relative; padding: 10px 0; color: var(--text-2); font-weight: 500; text-decoration: none; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; border-radius: 1px;
  background: var(--link); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); }
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }

/* Reveals: content fades up as it scrolls in (studio.js adds .is-in). `translate` so it doesn't fight `transform`. */
.reveal { opacity: 0; translate: 0 18px; transition: opacity 0.6s ease var(--d, 0s), translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s); }
.reveal.is-in { opacity: 1; translate: 0 0; }

/* Status chips: In development, Beta, Live, Planned, Done */
.status-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: var(--pill);
  font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  color: var(--text-2); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
}
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status-chip[data-status="in_development"] { color: var(--link); }
.status-chip[data-status="in_development"]::before { animation: dot-pulse 2s ease-in-out infinite; }
.status-chip[data-status="beta"] { color: var(--amber); }
.status-chip[data-status="live"], .status-chip[data-status="done"] { color: var(--success); }
@keyframes dot-pulse { 50% { box-shadow: 0 0 0 4px rgba(196, 181, 253, 0.25); } }

/* ---- Home: hero ---- */
.studio-hero {
  position: relative; display: grid; gap: 28px; align-items: center;
  min-height: min(760px, calc(100svh - 80px)); padding: 16px 0 40px;
}
.studio-hero .hero-copy { max-width: 600px; }
.studio-hero h1 { font-size: clamp(40px, 10vw, 72px); line-height: 1.02; margin: 0 0 16px; letter-spacing: -0.025em; font-weight: 800; }
.studio-hero .lede { color: var(--text-2); margin: 0 0 26px; font-size: 18px; max-width: 34em; }
.studio-hero .lede strong { color: var(--text); }
.studio-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.studio-hero .hero-actions .btn { width: auto; }
.featured-chip {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 18px;
  padding: 6px 12px 6px 6px; border-radius: var(--pill); color: var(--text); text-decoration: none;
  font-size: 15px; font-weight: 500;
  background: var(--card-fill); border: 1px solid var(--card-border);
  -webkit-backdrop-filter: var(--card-blur); backdrop-filter: var(--card-blur);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.featured-chip:hover { border-color: var(--link); transform: translateY(-1px); }
.featured-chip img { width: 28px; height: 28px; border-radius: 8px; }

.hero-visual { display: flex; justify-content: center; perspective: 1200px; --pw: clamp(190px, 52vw, 290px); }
.hero-float { position: relative; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.4s ease-out; }
.hero-phone { animation: hero-bob 7s ease-in-out infinite; }
.hero-app-icon {
  position: absolute; left: calc(var(--pw) * -0.18); bottom: 14%; width: calc(var(--pw) * 0.26); height: auto;
  border-radius: 22%; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
  animation: hero-bob 7s ease-in-out -3.5s infinite;
}
@keyframes hero-bob { 50% { transform: translateY(-12px); } }
/* Background media: behind the whole hero, dimmed so the text stays readable. */
.studio-hero.has-bg { grid-template-columns: minmax(0, 1fr); }
.hero-bg { position: absolute; inset: 0 -16px; z-index: -1; overflow: hidden; border-radius: var(--r-panel); }
.hero-bg img, .hero-bg video { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 9, 13, 0.92) 0%, rgba(8, 9, 13, 0.7) 60%, rgba(8, 9, 13, 0.45) 100%); }

/* Store buttons: Google Play first. A plain dark button, or the official badge picture if one is uploaded. */
.store-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; position: relative; z-index: 2; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px;
  border-radius: 14px; background: #000; border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff; font-weight: 600; font-size: 15px; text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.store-badge:hover { transform: translateY(-2px); border-color: #fff; }
.store-badge.has-image { padding: 0; border: 0; background: none; }
.store-badge img { display: block; height: 48px; width: auto; }
.store-badges.small { margin-top: 4px; }
.store-badges.small .store-badge { min-height: 44px; padding: 6px 12px; font-size: 14px; }
.store-badges.small .store-badge img { height: 44px; }
.i-line { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.i-fill { fill: currentColor; }

/* ---- Home: app gallery ---- */
.section-head { margin-bottom: 18px; max-width: 40em; }
.section-head p { margin: 0; color: var(--text-2); }
.app-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; overflow: hidden;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease,
    opacity 0.6s ease var(--d, 0s), translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s);
}
/* Spotlight that follows the pointer (studio.js sets --mx and --my). */
.app-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s ease;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(196, 181, 253, 0.16), transparent 60%);
}
.app-card:hover, .app-card:focus-within { --lift: -4px; border-color: rgba(196, 181, 253, 0.55); box-shadow: 0 22px 50px -24px rgba(139, 92, 246, 0.7); }
.app-card:hover::before { opacity: 1; }
.app-card-pic { margin: -22px -22px 6px; width: calc(100% + 44px); max-width: none; aspect-ratio: 16 / 9; object-fit: cover; }
.app-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.app-icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45); transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.app-icon.blank { display: block; background: var(--input-fill); border: 1px solid var(--card-border); }
.app-card:hover .app-icon { transform: rotate(-6deg) scale(1.06); }
.app-name { margin: 6px 0 0; font-size: 22px; }
.card-link { color: var(--text); text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.app-card:has(.card-link:focus-visible) { outline: 2px solid var(--link); outline-offset: 3px; }
.app-tagline { margin: 0; color: var(--text-2); }
.card-go { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-weight: 600; font-size: 15px; }
.card-go svg { transition: transform 0.2s ease; }
.app-card:hover .card-go svg { transform: translateX(4px); }
.app-card.coming { border: 1px dashed rgba(255, 255, 255, 0.24); border-radius: var(--r-card); justify-content: center; }
.app-card.coming:hover { --lift: 0px; box-shadow: none; }
.app-card.coming p { margin: 0; color: var(--text-2); }
.coming-dial svg { width: 56px; height: 56px; }
.coming-link { position: relative; z-index: 2; font-weight: 600; }

/* ---- Signup panel ---- */
.signup-section { max-width: 680px; margin: 0 auto; }
.ticks.apps { grid-template-columns: minmax(0, 1fr); }

/* ---- Page headings (roadmap, contact) ---- */
.page-head { padding: 20px 0 8px; max-width: 46em; }
.page-head h1 { font-size: clamp(36px, 9vw, 56px); line-height: 1.05; margin: 0 0 12px; letter-spacing: -0.02em; }
.page-head .lede { margin: 0; color: var(--text-2); font-size: 18px; }

/* ---- Roadmap ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.chip {
  min-height: 44px; padding: 8px 16px; border-radius: var(--pill); cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--text);
  background: var(--input-fill); border: 1px solid var(--card-border); transition: border-color 0.2s ease, background-color 0.2s ease;
}
.chip:hover { border-color: var(--link); }
.chip[aria-pressed="true"] { border-color: var(--link); background: rgba(124, 58, 237, 0.35); }
.road-board { display: grid; gap: 22px; padding: 16px 0; }
.road-col-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; font-size: 17px; }
.road-count { color: var(--hint); font-size: 14px; font-weight: 500; }
.road-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.road-item { padding: 16px 18px; transition: border-color 0.2s ease; }
.road-item:hover { border-color: rgba(196, 181, 253, 0.45); }
.road-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 8px; }
.road-top .muted { font-size: 13px; }
.app-chip { padding: 2px 10px; border-radius: var(--pill); border: 1px solid var(--card-border); color: var(--text-2); font-size: 13px; }
.road-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.road-item h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; }
.road-item p { margin: 0; color: var(--text-2); font-size: 15px; }
.road-item .changelog { margin-top: 12px; padding: 4px 0 0; border-top: 1px solid var(--card-border); }
.changelog summary { font-size: 15px; min-height: 44px; }
.changelog ul, .changelog ol { margin: 6px 0 0; padding-left: 20px; color: var(--text-2); font-size: 15px; }
.changelog h2, .changelog h3 { font-size: 15px; margin: 10px 0 4px; }
.vote {
  flex: none; display: grid; justify-items: center; align-content: center; min-width: 54px; min-height: 58px; padding: 6px 8px;
  border-radius: 14px; border: 1px solid var(--card-border); background: var(--input-fill); color: var(--text);
  font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
}
.vote:hover { border-color: var(--link); transform: translateY(-2px); }
.vote[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-fill); }
.vote.is-busy { cursor: progress; }
.vote.is-busy svg { animation: vote-bob 0.8s ease-in-out infinite; }
.vote.pop svg { animation: vote-pop 0.5s cubic-bezier(0.3, 1.8, 0.5, 1); }
@keyframes vote-bob { 50% { transform: translateY(-3px); } }
@keyframes vote-pop { 40% { transform: translateY(-6px) scale(1.3); } }
.vote-check { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 25; }

/* ---- Contact ---- */
.contact-section { max-width: 760px; }
.contact-who { display: grid; gap: 0 16px; }
.optional { color: var(--hint); font-weight: 400; }
.ticks.kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.counter { margin: 2px 0 0; text-align: right; }

/* ---- App pages ---- */
.app-hero { display: grid; gap: 20px; align-items: center; padding: 24px 0 12px; }
.app-hero-icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1); }
.app-hero h1 { font-size: clamp(40px, 10vw, 64px); line-height: 1.04; margin: 10px 0 8px; letter-spacing: -0.02em; }
.app-hero .lede { margin: 0; color: var(--text-2); font-size: 19px; }
.app-hero .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 22px 0 0; }
.app-hero .hero-actions .btn { width: auto; }
.prose h2 { font-size: 21px; margin: 18px 0 6px; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); }
.shot-strip { list-style: none; margin: 0; padding: 4px 4px 14px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; }
.shot-strip li { flex: none; scroll-snap-align: start; }
.shot-strip img { display: block; width: clamp(170px, 44vw, 240px); height: auto; border-radius: var(--r-card); border: 1px solid var(--card-border); background: #000; }
.mini-road { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.mini-road li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text); }

@media (max-width: 479px) {
  .site-nav { gap: 0 16px; }
  .studio-brand { font-size: 17px; }
}
@media (min-width: 720px) {
  .contact-who { grid-template-columns: 1fr 1fr; }
  .ticks.apps { grid-template-columns: 1fr 1fr; }
  .app-hero { grid-template-columns: auto minmax(0, 1fr); gap: 28px; }
}
@media (min-width: 900px) {
  .studio-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); padding: 32px 0 64px; }
  .hero-visual { --pw: clamp(240px, 24vw, 300px); }
}
@media (min-width: 960px) {
  .road-board { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}
