@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  /* Shore: the page. Dusk: the product. The dusk colours come from the app's own artwork. */
  --bg: #eaf1ef;
  --bg-2: #dbe7e3;
  --ink: #1b1547;
  --ink-2: #4a4673;
  --rule: rgba(27, 21, 71, 0.16);
  --btn-bg: #1b1547;
  --btn-fg: #eaf1ef;
  --focus: #c0287a;
  --sun: #ffd98a;
  --glow-a: rgba(255, 126, 95, 0.3);
  --glow-b: rgba(214, 64, 143, 0.2);
  --glow-c: rgba(255, 217, 138, 0.34);
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0a24;
    --bg-2: #1a1438;
    --ink: #f2edff;
    --ink-2: #b4aed8;
    --rule: rgba(242, 237, 255, 0.16);
    --btn-bg: #f2edff;
    --btn-fg: #150f36;
    --focus: #ffd98a;
    --glow-a: rgba(214, 64, 143, 0.34);
    --glow-b: rgba(61, 42, 134, 0.7);
    --glow-c: rgba(255, 126, 95, 0.12);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(214, 64, 143, 0.18);
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.6 "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 0.18em; }
a, button, summary { touch-action: manipulation; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, figure { margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 30;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.mark { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 16px; }
.nav-links a { text-decoration: none; }
.nav-links a:not(.nav-cta):hover { text-decoration: underline; }
.nav-cta { background: var(--btn-bg); color: var(--btn-fg); padding: 8px 16px; border-radius: 10px; font-weight: 650; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  font-size: 17px;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-mac { background: var(--btn-bg); color: var(--btn-fg); }
html[data-os="android"] .btn-mac { background: transparent; color: var(--ink); }
html[data-os="android"] .btn-android { background: var(--btn-bg); color: var(--btn-fg); }

/* The dusk behind the hero */
main { position: relative; }
.glow {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: -1;
  height: min(920px, 130vw);
  pointer-events: none;
  background:
    radial-gradient(46% 52% at 82% 26%, var(--glow-a), transparent 72%),
    radial-gradient(42% 50% at 98% 58%, var(--glow-b), transparent 70%),
    radial-gradient(50% 40% at 6% 4%, var(--glow-c), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px);
}
h1 {
  font-size: clamp(42px, 6.6vw, 82px);
  line-height: 0.98;
  font-weight: 760;
  font-stretch: 80%;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede { margin-top: 24px; max-width: 34em; font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { margin-top: 20px; max-width: 36em; font-size: 15px; color: var(--ink-2); }
.hero-meta + .hero-meta { margin-top: 8px; }
.when-none { display: none; }
html[data-state="none"] .when-none { display: block; }

/* The demo: the medium widget, at its real proportions. Sizes follow the card's width (cqw). */
.stage-wrap { justify-self: end; width: min(100%, 560px); container-type: inline-size; }
.stage {
  position: relative;
  display: grid;
  grid-template-columns: 39.6cqw minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "cover top" "cover lyric" "cover bottom";
  column-gap: 3.6cqw;
  aspect-ratio: 2.1;
  padding: 4cqw;
  border-radius: 7cqw;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(255, 217, 138, 0.3), transparent 70%),
    linear-gradient(160deg, #b8347f 0%, #8f2a86 48%, #532a8c 100%);
  box-shadow: 0 34px 60px -30px rgba(42, 29, 99, 0.75);
}
.st-top { grid-area: top; position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 8px; }
.st-meta { flex: 1; min-width: 0; }
.st-title { font-size: max(15px, 4.2cqw); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.st-artist { font-size: max(13px, 3.2cqw); opacity: 0.8; line-height: 1.3; }

.art {
  grid-area: cover;
  position: relative;
  width: 39.6cqw;
  height: 39.6cqw;
  border-radius: 5cqw;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 30%, #ffd98a 0 13%, transparent 14%),
    linear-gradient(165deg, #ff7e5f 0%, #d6408f 50%, #3d2a86 100%);
}
.art::after {
  content: "";
  position: absolute;
  left: -15%;
  right: -15%;
  bottom: -18%;
  height: 48%;
  background: linear-gradient(#2b1f63, #150f36);
  border-radius: 50% 50% 0 0 / 80% 80% 0 0;
}
.st-lyrics { display: contents; }

/* The lyrics bubble, as on the real widget: filled when lyrics are on, an outline when they are off. */
.bubble {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -6px -8px 0 0;
  padding: 0;
  border: 0;
  background: radial-gradient(circle closest-side, rgba(255, 255, 255, 0.24) 82%, transparent 84%);
  color: #fff;
  cursor: pointer;
}
.bubble svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.bubble:focus-visible { outline-color: #fff; border-radius: 50%; }
.stage[data-lyrics="off"] .bubble svg { fill: none; stroke: currentColor; stroke-width: 2; }

/* One lyric line at a time, like the widget. */
.lyrics { grid-area: lyric; align-self: start; margin: 0.8cqw 0 0; padding: 0; list-style: none; }
.line {
  display: none;
  font-size: max(16px, 3.7cqw);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.line[aria-current="true"] { display: block; animation: lineIn 0.45s cubic-bezier(0.22, 0.9, 0.28, 1); }
@keyframes lineIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.st-bottom { grid-area: bottom; position: relative; z-index: 1; }
.bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); overflow: hidden; }
.fill { display: block; height: 100%; width: calc(var(--p, 38) * 1%); background: #fff; border-radius: 2px; }
.times { display: flex; justify-content: space-between; margin-top: 6px; font-size: max(12px, 2.6cqw); line-height: 1.3; font-variant-numeric: tabular-nums; opacity: 0.85; }
.ctl { display: flex; align-items: center; justify-content: center; gap: 3.4cqw; margin-top: 0.6cqw; }
.ctl button { border: 0; background: none; color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.ctl button:focus-visible { outline-color: #fff; }
.ctl svg { fill: currentColor; }
.ctl-btn { width: max(44px, 8cqw); height: max(44px, 8cqw); }
.ctl-btn svg { width: max(24px, 4.8cqw); height: max(24px, 4.8cqw); }
.ctl .ctl-play { width: max(48px, 11cqw); height: max(48px, 11cqw); border-radius: 50%; background: #fff; color: #201a3a; }
.ctl-play svg { width: max(24px, 5.4cqw); height: max(24px, 5.4cqw); }
.ctl-play [hidden] { display: none; }
.demo-note { margin-top: 16px; font-size: 14px; color: var(--ink-2); text-align: center; }

/* Lyrics off: the cover art fills the card instead. */
.stage[data-lyrics="off"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "." "bottom"; }
.stage[data-lyrics="off"] .art { grid-area: auto; position: absolute; inset: 0; width: auto; height: auto; border-radius: 0; }
.stage[data-lyrics="off"] .lyrics { display: none; }
.stage[data-lyrics="off"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(21, 15, 54, 0.6), transparent 42%),
    linear-gradient(to top, rgba(21, 15, 54, 0.9), transparent 62%);
}

/* A narrow card stacks: the cover beside the title, the line below, the controls last. */
@container (max-width: 459px) {
  .stage {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas: "cover top" "lyric lyric" "bottom bottom";
    column-gap: 14px;
    aspect-ratio: auto;
    height: 400px;
    padding: 20px;
    border-radius: 30px;
  }
  .art { width: 72px; height: 72px; border-radius: 18px; }
  .st-top { align-self: center; }
  .st-title { font-size: 18px; }
  .st-artist { font-size: 14px; }
  .lyrics { align-self: center; margin-top: 12px; }
  .line { font-size: 24px; }
  .times { font-size: 13px; }
  .ctl { gap: 24px; margin-top: 4px; }
  .stage[data-lyrics="off"] { grid-template-areas: "top" "." "bottom"; }
}

/* Get Tideline */
.get { padding-block: clamp(48px, 7vw, 88px) clamp(56px, 8vw, 104px); border-top: 1px solid var(--rule); }
h2 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 740; font-stretch: 84%; line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance; }
.get-head p { margin-top: 16px; max-width: 40em; color: var(--ink-2); }
.get-head .when-none { margin-top: 8px; }

.tabs {
  display: none;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin-top: 28px;
  padding: 5px;
  border-radius: 16px;
  background: var(--bg-2);
}
.js .tabs { display: flex; }
.tabs button {
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
}
.tabs button:hover { color: var(--ink); }
html[data-tab="mac"] #mac,
html[data-tab="android"] #android { background: var(--btn-bg); color: var(--btn-fg); }

.panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  margin-top: 36px;
}
html[data-tab="mac"] #panel-android,
html[data-tab="android"] #panel-mac { display: none; }

.p-install h3 { margin-bottom: 18px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.p-install .btn { width: 100%; }

.steps { list-style: none; counter-reset: step; margin-top: 28px; padding: 0; display: grid; gap: 18px; color: var(--ink-2); font-size: 16.5px; }
.steps li { counter-increment: step; position: relative; padding-left: 42px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.steps strong { color: var(--ink); font-weight: 650; }

/* Disclosures: the Gatekeeper fallback, the Terminal install, the FAQ */
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font-size: 24px; font-weight: 400; line-height: 1; color: var(--ink-2); }
details[open] > summary::after { content: "\2212"; }

.more { border-top: 1px solid var(--rule); }
.steps + .more { margin-top: 28px; }
.p-install > .more:last-child { border-bottom: 1px solid var(--rule); }
.more summary { padding: 16px 0; font-size: 16.5px; }
.more > p { padding-bottom: 16px; font-size: 16px; color: var(--ink-2); }
.more .or { max-width: 36em; font-size: 15.5px; }
.more .codeblock { margin-bottom: 18px; }

.codeblock { margin-top: 12px; border-radius: 12px; background: var(--bg-2); }
.cb-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 0 16px; font-size: 14px; color: var(--ink-2); }
.copy {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.codeblock pre { margin: 0; padding: 10px 16px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; tab-size: 2; }
.codeblock code { padding: 0; background: none; font-size: inherit; white-space: pre; overflow-wrap: normal; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84em;
  padding: 0.1em 0.38em;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--ink);
  overflow-wrap: anywhere;
}

figure img { border-radius: 22px; }
figcaption { margin-top: 10px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }

.shots-mac { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; align-items: start; }
.s-medium { grid-column: 1 / -1; }

.shots-android {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.36fr);
  grid-template-areas: "a phone" "b phone";
  gap: 32px 28px;
  align-items: start;
}
.shots-android .pair:nth-child(1) { grid-area: a; }
.shots-android .pair:nth-child(2) { grid-area: b; }
.shots-android .phone { grid-area: phone; justify-self: end; width: 100%; max-width: 252px; }
.pair { display: flex; gap: 16px; align-items: flex-start; }
.p-wide { flex: 442 1 0; min-width: 0; }
.p-small { flex: 205 1 0; min-width: 0; }

/* Questions */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
  padding-block: clamp(48px, 7vw, 80px) clamp(64px, 8vw, 112px);
  border-top: 1px solid var(--rule);
}
.faq-list details { border-top: 1px solid var(--rule); }
.faq-list details:last-child { border-bottom: 1px solid var(--rule); }
.faq-list summary { padding: 20px 0; font-size: 19px; }
.faq-list p { max-width: 40em; padding-bottom: 20px; color: var(--ink-2); }
.faq-list a { color: var(--ink); }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding-block: 32px 56px; font-size: 15px; color: var(--ink-2); }
.foot-row { display: flex; flex-wrap: wrap; gap: 16px 48px; justify-content: space-between; }
.foot p { max-width: 38em; }
.foot-links { display: flex; gap: 24px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .stage-wrap { justify-self: center; }
  .panel { grid-template-columns: minmax(0, 1fr); }
  .faq { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 420px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

@media (max-width: 640px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta):not([href^="https"]) { display: none; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; padding: 0 12px; }
  .shots-mac { gap: 24px 16px; }
  .shots-android { grid-template-columns: minmax(0, 1fr); grid-template-areas: "a" "b" "phone"; }
  .shots-android .phone { justify-self: start; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
  .line[aria-current="true"] { animation: none; }
}
