/* Shared look for every app page (/alspot/, /soundtoggl/ …). The picker at / keeps its own inline styles, like the
   games site. Each page sets its colour with --edge (glow and buttons), --edge-ink (text on the dark theme) and
   --edge-ink-light (text on the light theme) in a <style> block or on <body style="…">. */
:root {
  --bg: #15171b;
  --bg-glow: rgba(232, 200, 113, .08);
  --card: #1e2127;
  --card-2: #252932;
  --ink: #eef0f3;
  --ink-soft: #a8afb9;
  --line: rgba(255, 255, 255, .09);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 20px 44px rgba(0, 0, 0, .4);
  --radius: 20px;
  --display: "Fraunces", Georgia, serif;
  --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --edge: #c9a14a;
  --edge-ink: #e8c871;
  --edge-ink-light: #7a5a1e;
  --btn-ink: #101215;
  --accent: var(--edge-ink);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f1ec;
    --bg-glow: rgba(214, 170, 72, .14);
    --card: #fffdf9;
    --card-2: #f6f2ea;
    --ink: #23201b;
    --ink-soft: #625b51;
    --line: rgba(35, 32, 27, .1);
    --shadow: 0 1px 2px rgba(35, 32, 27, .06), 0 16px 36px rgba(35, 32, 27, .12);
    --accent: var(--edge-ink-light);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 18px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  background: radial-gradient(1100px 560px at 70% -8%, color-mix(in srgb, var(--edge) 16%, transparent), transparent 70%), var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 17px; } }

/* ---------- Header ---------- */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
header.top.scrolled { border-color: var(--line); }
.nav { display: flex; align-items: center; gap: 20px; height: 64px; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 15px; white-space: nowrap; }
.back:hover { color: var(--ink); }
.back svg { width: 16px; height: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 21px var(--display); min-width: 0; }
.brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); flex: none; }
.nav nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.nav nav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.btn { color: var(--btn-ink); }
@media (max-width: 760px) { .nav nav > a:not(.btn) { display: none; } }
@media (max-width: 480px) { .back span { display: none; } .nav { gap: 12px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 700 17px var(--body); padding: 12px 22px; border-radius: 999px;
  background: var(--edge); color: var(--btn-ink); border: 0; cursor: pointer;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--edge) 35%, transparent);
  transition: transform .12s, filter .12s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.small { padding: 7px 16px; font-size: 15px; }
.btn.big { padding: 15px 28px; font-size: 19px; }
.btn.plain { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn .lines { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn .sub { display: block; font: 500 13px var(--body); opacity: .8; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero { padding-top: 32px; } .hero-grid { grid-template-columns: 1fr; gap: 32px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font: 700 13px var(--body); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--edge) 14%, transparent); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.app-id { display: flex; align-items: center; gap: 18px; }
.app-id img { width: 84px; height: 84px; border-radius: 19px; box-shadow: 0 4px 16px rgba(0, 0, 0, .35); flex: none; }
.hero h1 { font-size: clamp(44px, 6.4vw, 76px); font-weight: 800; }
.hero .subtitle { font: 600 17px var(--body); color: var(--ink-soft); margin-top: 4px; }
.tagline { font: 700 clamp(20px, 2.1vw, 25px)/1.35 var(--display); color: var(--accent); margin: 22px 0 14px; }
.lede { color: var(--ink-soft); margin: 0 0 14px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 26px; }
.fine { font-size: 15px; color: var(--ink-soft); margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; }
.chips li { font-size: 14px; font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); }
.status { display: inline-block; font-size: 15px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; margin-top: 18px; }

/* The picture next to the hero text: a screenshot, or the icon on a glow when there's no screenshot. */
.stage { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--edge) 55%, transparent), transparent 62%),
              linear-gradient(160deg, color-mix(in srgb, var(--edge) 34%, #0b0f14), #0b0f14 78%); }
.stage.icon img { position: absolute; width: 42%; left: 29%; top: 50%; transform: translateY(-50%); border-radius: 22%; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.stage.shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.stage.phone img { position: absolute; height: 118%; width: auto; max-width: none; left: 50%; top: 9%; transform: translateX(-50%); border-radius: 28px; box-shadow: 0 30px 70px rgba(0, 0, 0, .6), 0 0 0 6px #111; }
.stage.phone .icon-badge { position: absolute; left: 22px; bottom: 22px; width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }

/* ---------- Sections ---------- */
section { padding: 72px 0; scroll-margin-top: 64px; }
@media (max-width: 600px) { section { padding: 52px 0; } }
.section-head { max-width: 720px; margin: 0 0 36px; }
.section-head.center { text-align: center; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(30px, 3.8vw, 44px); }
.section-head p { color: var(--ink-soft); margin: 12px 0 0; }
.kicker { font: 700 13px var(--body); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin-bottom: 10px; }
.band { background: color-mix(in srgb, var(--card) 55%, transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Features */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--edge) 16%, transparent); color: var(--accent); margin-bottom: 14px; }
.card .ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 22px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 16.5px; }

/* Screenshots */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; align-items: start; }
.gallery.phones { grid-template-columns: repeat(auto-fit, minmax(200px, 280px)); justify-content: center; }
figure.shot { margin: 0; cursor: zoom-in; }
figure.shot img { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); width: 100%; background: var(--card); }
.gallery.phones figure.shot img { border-radius: 24px; }
figure.shot figcaption { font-size: 15px; color: var(--ink-soft); margin-top: 10px; text-align: center; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(8, 9, 11, .86); }
dialog.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 12px; }
dialog.lightbox p { color: #fff; text-align: center; margin: 10px 0 0; }

/* Good to know */
.notes { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--edge); border-radius: 16px; padding: 20px 24px; }
.notes h3 { font-size: 21px; margin-bottom: 8px; }
.notes ul { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.notes li { margin: 6px 0; }

/* Steps (numbered setup guides) */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 62px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: var(--ink-soft); }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 800 16px var(--display); background: var(--edge); color: var(--btn-ink); }
.steps b { color: var(--ink); }
code { font: 600 .92em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink); }

/* Download (alSpot) */
.dl-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
@media (max-width: 800px) { .dl-grid { grid-template-columns: 1fr; } }
.dl { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.dl h3 { font-size: 26px; }
.dl p { margin: 0; color: var(--ink-soft); font-size: 16.5px; }
.dl .meta { font-size: 14px; color: var(--ink-soft); }
.dl details { font-size: 15.5px; color: var(--ink-soft); background: var(--card-2); border-radius: 14px; padding: 12px 16px; }
.dl summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.dl ol { margin: 10px 0 0; padding-left: 20px; }
.dl .btn { align-self: flex-start; }

/* What's new */
.releases { display: grid; gap: 18px; }
.release { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; }
.release h3 { font-size: 21px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.release h3 small { font: 600 14px var(--body); color: var(--ink-soft); }
.release ul { list-style: none; margin: 10px 0 0; padding: 0; }
.release li { margin: 8px 0; color: var(--ink-soft); display: flex; gap: 10px; align-items: baseline; }
.release .kind { flex: none; font: 700 11.5px var(--body); text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--edge) 16%, transparent); color: var(--accent); min-width: 74px; text-align: center; }
.release .kind.fixed { background: var(--card-2); color: var(--ink-soft); }

/* Mac install help, shown after the download starts */
dialog.machelp { border: 0; border-radius: var(--radius); padding: 0; max-width: 560px; width: calc(100vw - 32px); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
dialog.machelp::backdrop { background: rgba(8, 9, 11, .66); }
.machelp .mh-head { background: var(--edge); color: var(--btn-ink); padding: 20px 24px 16px; display: flex; gap: 12px; align-items: center; }
.machelp .mh-head svg { width: 28px; height: 28px; flex: none; }
.machelp h3 { font: 800 23px/1.15 var(--display); margin: 0; }
.machelp .mh-body { padding: 18px 24px 22px; font-size: 16px; }
.machelp .mh-body > p { margin: 0 0 12px; color: var(--ink-soft); }
.machelp ol { margin: 0 0 16px; padding-left: 22px; }
.machelp li { margin: 6px 0; }
.machelp .mh-note { background: var(--card-2); border-radius: 14px; padding: 12px 14px; font-size: 15px; margin-bottom: 16px; color: var(--ink-soft); }
.machelp .mh-actions { display: flex; justify-content: flex-end; }

/* ---------- Footer ---------- */
footer { padding: 28px 0 40px; color: var(--ink-soft); font-size: 15px; border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.foot a { color: var(--ink-soft); }
.foot a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
