:root {
  color-scheme: dark;
  --base: #0e0d12;
  --raise: #17161d;
  --raise-2: #1f1d27;
  --ink: #f6f4fb;
  --muted: #aaa5b8;
  --faint: #6f6a7e;
  --line: #2a2833;
  --accent: #c9b8ff;
  --accent-ink: #1b1430;
  --green: #1ed760;
  --radius: 18px;
  --shell: min(1200px, calc(100% - 32px));
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  color: var(--ink);
  background: var(--base);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.shell { width: var(--shell); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--base) 78%, transparent); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; text-decoration: none; }
.mark { display: inline-flex; align-items: center; justify-content: center; gap: 3px; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); }
.mark i { width: 3px; height: 8px; border-radius: 2px; background: var(--accent-ink); }
.mark i:nth-child(2) { height: 15px; }
nav { display: flex; gap: clamp(12px, 3vw, 32px); font-size: .92rem; }
nav a { color: var(--muted); text-decoration: none; padding-block: 10px; }
nav a:hover { color: var(--ink); }

/* Shared */
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
h1, h2 { font-weight: 720; letter-spacing: -.045em; line-height: 1.02; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
.section-head { margin-bottom: clamp(24px, 4vw, 44px); }
section { padding-block: clamp(56px, 9vw, 112px); }
.button { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); font-weight: 650; font-size: .96rem; text-decoration: none; transition: background .15s ease; }
.button:hover { background: var(--raise-2); }
.button svg { width: 18px; height: 18px; }
.button.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.button.primary:hover { background: #d9cdff; }
.text-link { color: var(--muted); text-decoration: none; font-size: .95rem; }
.text-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); align-items: center; gap: clamp(32px, 5vw, 72px); padding-top: clamp(40px, 7vw, 96px); }
.lede { color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.15rem); max-width: 40ch; margin-top: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fine { color: var(--faint); font-size: .85rem; margin-top: 16px; }

/* Demo: a desktop with the widget on it */
.demo { min-width: 0; }
/* The preview is framed as a macOS window: title bar with traffic lights, wallpaper as its contents. */
.desk {
  /* Tall enough for the 2 × 2 size, so switching sizes never moves the page. */
  position: relative; display: grid; place-items: center; min-height: 500px;
  padding: 62px clamp(16px, 3vw, 36px) 32px; border-radius: 14px; overflow: hidden;
  border: 1px solid #ffffff24;
  background:
    radial-gradient(60% 70% at 15% 20%, #6b4fd8 0%, transparent 60%),
    radial-gradient(55% 60% at 85% 85%, #d0577f 0%, transparent 60%),
    radial-gradient(50% 50% at 80% 10%, #2f7fd9 0%, transparent 60%),
    linear-gradient(160deg, #2a1d4f, #120e24);
  box-shadow: 0 0 0 .5px #000, 0 50px 100px -30px #000, 0 20px 40px -20px #0009;
}
.titlebar {
  position: absolute; inset: 0 0 auto; height: 38px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: 14px; background: #24222bcc; backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid #00000066; box-shadow: inset 0 1px 0 #ffffff14;
}
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; display: grid; place-items: center; font: 700 9px/1 -apple-system, system-ui, sans-serif;
  font-style: normal; color: transparent; box-shadow: inset 0 0 0 .5px #0000004d; }
.lights .close { background: #ff5f57; }
.lights .minimize { background: #febc2e; }
.lights .zoom { background: #28c840; }
.lights:hover i { color: #0000008c; }  /* macOS shows the symbols while hovering the group */
.window-title { font-size: 13px; font-weight: 600; color: #ffffffb8; }

/* The widget is drawn at Wallify's own size (540 × 180 pt for 3 × 1) with positions from the app's layout
   table, then scaled to fit. site.js sets each element's box; these rules carry the app's look. */
.frame { position: relative; margin: auto; transition: width .45s var(--morph), height .45s var(--morph); }
.widget {
  --art-a: #ff8a5c; --art-b: #7a3cff; --art-c: #1c1033; --tint: #ffb59c;
  position: absolute; left: 0; top: 0; transform-origin: 0 0; font-size: 14px;
}
.widget > * { position: absolute; margin: 0; transition: left .45s var(--morph), top .45s var(--morph), width .45s var(--morph),
  height .45s var(--morph), border-radius .45s var(--morph), font-size .45s var(--morph), opacity .3s,
  transform .3s var(--smooth), filter .3s var(--smooth), background-color .25s ease-out; }
:root { --morph: cubic-bezier(.45, 0, .55, 1); --smooth: cubic-bezier(.6, 0, .4, 1); }
.card { border-radius: 26px; background: #1c1c1fd9; backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
  box-shadow: inset 0 0 0 .8px #ffffff1f, 0 24px 50px -20px #000c; }
.glow { border-radius: 50%; background: radial-gradient(closest-side, var(--art-a), transparent); opacity: .55; filter: blur(28px); transition-property: left, top, width, height, background; }
.art { overflow: hidden; border-radius: 14px; box-shadow: inset 0 0 0 .5px #ffffff1c; }
.cover {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, var(--a), transparent 55%),
    radial-gradient(circle at 75% 70%, var(--b), transparent 60%),
    conic-gradient(from 200deg at 60% 40%, var(--c), var(--b), var(--a), var(--c));
}
.cover::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, #ffffff0a 0 2px, transparent 2px 9px); mix-blend-mode: overlay; }
/* Wallify's default "Cinematic" track change: a diagonal wipe while the new cover settles from 108 % and flares. */
.cover.enter { -webkit-mask-image: linear-gradient(115deg, #000 42%, transparent 58%); mask-image: linear-gradient(115deg, #000 42%, transparent 58%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%; animation: cover-in .5s linear both; }
.cover.leave { animation: cover-out .5s linear both; }
@keyframes cover-in {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; transform: scale(1.08); filter: brightness(1); }
  50% { filter: brightness(1.35); }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; transform: scale(1); filter: brightness(1); }
}
@keyframes cover-out { to { transform: scale(1.06); } }
/* Pausing eases the artwork in 10 pt and dims it, and the glow fades, as in the app. */
.widget[data-playing="false"] .art { transform: scale(var(--paused-scale, .85)); filter: brightness(.6); }
.widget[data-playing="false"] .glow { opacity: 0; }
.shade { border-radius: 0 0 26px 26px; background: linear-gradient(transparent, #000000a2); pointer-events: none; }
.title, .artist, .time, .lyrics { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.title { font-size: 17px; font-weight: 700; color: #f5f5f7; letter-spacing: -.01em; }
.artist { font-size: 14px; color: var(--tint); transition-property: left, top, width, height, font-size, opacity, color; }
.time { font-size: 12px; color: var(--tint); font-variant-numeric: tabular-nums; }
.time.end { text-align: right; }
.bar { border-radius: 3px; background: #2d2d2d; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: #fff; }
.lyrics { font-size: 12.5px; }
.line { position: absolute; inset: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 700; color: #fffffff2; }
.line.note { color: var(--tint); opacity: .6; font-weight: 400; }
.line.in { animation: rise-in .35s cubic-bezier(.45, 0, .55, 1) both; }
.line.out { animation: rise-out .35s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(7px); } }
@keyframes rise-out { to { opacity: 0; transform: translateY(-7px); } }
.widget[data-lyrics="true"] .time, .widget[data-lyrics="false"] .lyrics { opacity: 0; }
.control, .like { display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: #d4d4d4; cursor: pointer; }
.control:hover, .like:hover { background: #ffffff1f; }
.control svg { width: 24px; height: 24px; fill: currentColor; }
.control.play svg { width: 30px; height: 30px; }
/* One HTML wrapper is animated for the press, so Safari composites it on the GPU instead of
   re-rasterising two SVGs, and the icon swap never interrupts the animation. */
.glyph { display: grid; place-items: center; will-change: transform; }
.widget[data-icon="pause"] .play-icon, .widget[data-icon="play"] .pause-icon { display: none; }
.scrub { cursor: pointer; touch-action: none; }
/* Dragging the bar grows it 4 pt with a slight spring, independent of the size morph. */
.widget > .bar { transition: left .45s var(--morph), top .45s var(--morph), width .45s var(--morph), height .45s var(--morph),
  transform .22s cubic-bezier(.2, .9, .3, 1.25); }
.widget[data-seeking="true"] .bar { transform: scaleY(1.8); }
.like svg { width: 17px; height: 17px; fill: #1fd66000; stroke: #ffffffb3; stroke-width: 2; transition: transform .2s, fill .25s, stroke .25s; }
.like[aria-pressed="true"] svg { fill: #1fd660; stroke: #1fd660; transform: scale(1.08); }
.upnext { position: absolute; inset: auto 0 0; padding: 22px 12px 10px; background: linear-gradient(transparent, #000000bf); font-size: 12px; opacity: 0; transition: opacity .3s; }
.upnext b { display: block; font-size: 10px; font-weight: 700; color: #ffffffb3; }
.upnext span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #f5f5f7; }
.widget[data-size="2x2"] .upnext { opacity: 1; }
.widget[data-compact="true"] :is(.bar, .scrub, .time, .lyrics, .control, .like) { opacity: 0; pointer-events: none; }
.widget[data-compact="false"] .shade { opacity: 0; }

.demo-controls { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.sizes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.sizes button, .toggle { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--raise); color: var(--muted); font-size: .85rem; font-weight: 600; cursor: pointer; }
.sizes button:hover, .toggle:hover { color: var(--ink); }
.sizes button[aria-checked="true"], .toggle[aria-pressed="true"] { background: var(--ink); color: var(--base); border-color: var(--ink); }
.demo-note { text-align: center; color: var(--faint); font-size: .82rem; margin-top: 10px; }

/* Captures */
.capture-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 36px); }
/* The captures sit on white; clip each to the widget's own rounded card (measured from the 1080 × 360 images). */
.capture img { width: 100%; height: auto; clip-path: inset(4.6% 1.6% round 4.9% / 14.6%); }
.capture figcaption { color: var(--muted); font-size: .9rem; margin-top: 6px; max-width: 46ch; }

/* Features */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--raise); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: border-color .2s; }
.card:hover { border-color: #3f3b4d; }
.card.span-2 { grid-column: span 2; background: linear-gradient(135deg, #261d44, var(--raise) 60%); }
.card p { color: var(--muted); margin-top: 6px; font-size: .95rem; }
.icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; margin-bottom: 18px; background: #c9b8ff1f; color: var(--accent); font-size: 1.1rem; }

/* Privacy */
.privacy { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 6vw, 80px); border-top: 1px solid var(--line); }
.points { display: grid; gap: 4px; }
.points li { padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.points li:first-child { padding-top: 0; }
.points b { color: var(--ink); font-weight: 650; display: block; margin-bottom: 2px; }

/* Install */
.install-card { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(28px, 5vw, 64px); align-items: end; padding: clamp(28px, 5vw, 56px); border-radius: 26px; border: 1px solid var(--line); background: radial-gradient(80% 120% at 100% 0%, #3a2a6b55, transparent), var(--raise); }
.steps { display: grid; gap: 16px; margin-top: 28px; counter-reset: step; }
.steps li { display: flex; gap: 14px; color: var(--muted); }
.steps li span { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--raise-2); border: 1px solid var(--line); font-size: .85rem; font-weight: 700; color: var(--ink); }
.steps b { color: var(--ink); font-weight: 650; }
.install-actions { display: grid; gap: 14px; justify-items: start; }

/* Footer */
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 28px 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: .88rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy, .install-card { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .desk { min-height: 400px; }  /* the tallest size scaled to a phone needs about 380 */
  nav a:not(:last-child) { display: none; }
  .cards, .capture-grid { grid-template-columns: 1fr; }
  .card.span-2 { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.widget.instant > *, .instant + *, .frame:has(.instant) { transition: none !important; }
