/* WormaDock site. Tokens from CLAUDE.md "Site": the WormaSounds site's look, decided once. */

:root {
  --bg: #0e0f10;
  --card: #1c1d1f;
  --raised: #2a2b2e;
  --ink: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.66);
  --faint: rgba(245, 245, 247, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

@font-face { font-family: "Fraunces"; src: url(fonts/fraunces.woff2?v=2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(fonts/instrument-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 "Instrument Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
/* The fixed nav would cover an anchor target. */
[id] { scroll-margin-top: 88px; }
img, video { display: block; max-width: 100%; height: auto; }
strong { font-weight: 600; }
ul, ol { padding-left: 24px; }
code, pre, kbd { font: 14px ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); }
pre {
  padding: 16px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 0.5px var(--faint);
  /* Wrapped, not scrolled: a Terminal line must never be hidden past the edge. */
  white-space: pre-wrap; overflow-wrap: anywhere; user-select: all;
}
kbd { padding: 1px 6px; border-radius: 4px; background: var(--raised); }
hr { border: 0; border-top: 0.5px solid var(--faint); margin: 32px 0; }

h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
h1 { font-size: clamp(44px, min(6.4vw, 10vh), 84px); }
h2 { font-size: clamp(34px, 4.4vw, 56px); }
h3 { font-size: 17px; font-weight: 600; }

.fine, small, figcaption { font-size: 14px; color: var(--muted); }
.secondary, .placeholder { color: var(--muted); }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px); }
.lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 44ch; }
.center .lead, .lead.center { margin-inline: auto; }

/* Nav: floats over the page; the edge fades and blurs what scrolls under it. */
.edge { position: fixed; inset: 0 0 auto; z-index: 9; height: 96px; pointer-events: none; }
.edge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(14, 15, 16, 0.6), rgba(14, 15, 16, 0)); }
.edge i {
  position: absolute; inset: 0;
  --m: linear-gradient(to top, transparent calc(var(--n) * 12.5%), #000 calc((var(--n) + 1) * 12.5%) calc((var(--n) + 2) * 12.5%), transparent calc((var(--n) + 3) * 12.5%));
  -webkit-backdrop-filter: blur(var(--b)); backdrop-filter: blur(var(--b));
  -webkit-mask: var(--m); mask: var(--m);
}
.edge i:nth-child(1) { --n: 0; --b: 0.4px; }
.edge i:nth-child(2) { --n: 1; --b: 0.8px; }
.edge i:nth-child(3) { --n: 2; --b: 1.5px; }
.edge i:nth-child(4) { --n: 3; --b: 3px; }
.edge i:nth-child(5) { --n: 4; --b: 6px; }
.edge i:nth-child(6) { --n: 5; --b: 12px; }
.edge i:nth-child(7) { --n: 6; --b: 18px; }
.edge i:nth-child(8) { --n: 7; --b: 28px; }

.nav { position: fixed; inset: 0 0 auto; z-index: 10; }
.nav .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: none; padding: 16px clamp(16px, 4vw, 48px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 19px; }
.brand::before { content: ""; width: 36px; height: 36px; border-radius: 8px; background: url(assets/app-icon-96.png?v=2) center / cover; }
.nav ul { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; font-size: 15px; font-weight: 500; }
.nav li a:not(.button) { color: var(--muted); }
.nav li a:not(.button):hover, .nav li a[aria-current] { color: var(--ink); }

.button {
  display: inline-block; padding: 13px 26px; border-radius: 999px; white-space: nowrap;
  background: #fff; color: #000; font-weight: 600;
  transition: transform 0.15s;
}
.button:active { transform: scale(0.97); }
.button.small { padding: 7px 16px; font-weight: 500; }
.more { color: rgba(255, 255, 255, 0.82); font-weight: 500; }
.more:hover { color: #fff; }
.more::after { content: " \203A"; }

/* Home: a full-height opening with the Dock where a Dock sits. */
.hero {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: center; justify-items: center;
  padding: 104px clamp(20px, 6vw, 96px) clamp(150px, 22vh, 240px);
  background: #000 url(assets/hero-bg.jpg) center 40% / cover no-repeat; text-align: center;
}
/* The backdrop dims under the words; the photo's dark lower third carries the Dock. */
.hero::before, .closing::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.38); }
.hero > *, .closing > * { position: relative; z-index: 1; }
.hero h1 { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25); }
.hero h1 { max-width: 14ch; }
.hero .lead { font-size: 21px; font-weight: 500; color: rgba(255, 255, 255, 0.82); max-width: 40ch; margin-top: 24px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 24px; margin-top: 36px; }
.hero .fine { margin-top: 16px; }
/* The strip was shot on black: screen lets the photo show through it like the Dock's glass. */
.hero > .hero-dock { position: absolute; inset: auto 0 16px; margin: 0 auto; width: min(1200px, 100%); mix-blend-mode: screen; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: min(42%, 360px); background: linear-gradient(rgba(14, 15, 16, 0), rgba(14, 15, 16, 0.45) 60%, var(--bg)); }

.closing {
  position: relative; overflow: hidden;
  display: grid; place-items: center; align-content: center; gap: 28px;
  min-height: clamp(440px, 70vh, 680px); padding: 96px 16px; text-align: center;
  background: url(assets/closing-bg.jpg) center 75% / cover no-repeat;
}
.closing::before { background: rgba(0, 0, 0, 0.2); }
.closing::after { content: ""; position: absolute; inset: 0 0 auto; height: min(42%, 360px); z-index: 0; background: linear-gradient(var(--bg), rgba(14, 15, 16, 0.55) 55%, rgba(14, 15, 16, 0)); }
.closing .fine { margin-top: -12px; }

section { padding: clamp(72px, 10vw, 128px) 0; }
section.alt, section.dark { background: none; }

.media { margin: 0; }
.media img, .media video { width: 100%; border-radius: 12px; box-shadow: 0 0 0 0.5px var(--faint); background: #000; }
.media figcaption { margin-top: 12px; }
#video .media { max-width: 980px; margin: 48px auto 0; }

.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 6vw, 96px);
  padding: clamp(48px, 8vw, 96px) 0 0;
}
.feature.flip .text { order: 2; }
.feature p { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 38ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin-top: 24px; }
.chips li { padding: 5px 12px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 0.5px var(--faint); font-size: 14px; color: var(--muted); }

.cards { list-style: none; padding: 0; margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; text-align: left; }
.cards li, .price > div { background: var(--card); border-radius: 12px; padding: 20px; box-shadow: 0 0 0 0.5px var(--faint); }
.cards p { margin-top: 8px; font-size: 15px; color: var(--muted); }
.cards pre { background: var(--raised); box-shadow: none; }
.download .cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.download .cards pre { font-size: 13px; }

.compare { width: 100%; border-collapse: collapse; margin-top: 48px; font-size: 15px; }
.compare th, .compare td { padding: 14px 12px; border-top: 0.5px solid var(--faint); text-align: left; }
.compare thead th { border-top: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.compare th:not(:first-child), .compare td:not(:first-child) { width: 72px; text-align: center; }
.compare .no { color: var(--muted); }
.compare .no::before { content: "\2013"; }
.check { width: 18px; height: 18px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; }
#compare .fine { margin-top: 20px; max-width: 70ch; }

.price { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 48px; text-align: left; }
.price > div { padding: 28px; }
.price .amount { margin: 12px 0 8px; font: 600 56px/1 "Fraunces", Georgia, serif; letter-spacing: -0.015em; }
.price .amount s { margin-left: 8px; font-size: 28px; font-weight: 400; color: var(--muted); }
.price ul { margin-top: 16px; color: var(--muted); }
.price li + li { margin-top: 6px; }
.price .fine { margin-top: 16px; }

footer { margin: 0 clamp(16px, 4vw, 48px); padding: 16px 0 20px; border-top: 0.5px solid var(--faint); font-size: 13px; color: var(--muted); }
footer .wrap { max-width: none; padding: 0; }
footer ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin-bottom: 12px; }
footer a:hover { color: var(--ink); }
footer p + p { margin-top: 4px; }

/* Text pages: FAQ, changelog, privacy, terms, press. */
main.narrow { max-width: 760px; padding-top: 144px; padding-bottom: 128px; }
main.narrow section { padding: 0; }
.page-head h1 { font-size: clamp(40px, 5vw, 56px); }
.page-head p { margin-top: 12px; font-size: 19px; color: var(--muted); }
main.narrow h2 { margin: 56px 0 16px; font-size: 28px; }
main.narrow h3 { margin: 32px 0 8px; }
main.narrow p, main.narrow li, main.narrow td { color: var(--muted); }
main.narrow p + p, main.narrow ul + p, main.narrow ol + p, main.narrow p + ul, main.narrow p + ol, main.narrow pre, main.narrow p + pre { margin-top: 16px; }
main.narrow li + li { margin-top: 8px; }
main.narrow a:not(.button) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
main.narrow a.more { text-decoration: none; }
main.narrow table { width: 100%; border-collapse: collapse; margin-top: 16px; }
main.narrow th, main.narrow td { padding: 12px 12px 12px 0; border-top: 0.5px solid var(--faint); text-align: left; vertical-align: top; }
main.narrow th { color: var(--ink); font-weight: 600; white-space: nowrap; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin-top: 24px; }
main.narrow .toc li { margin: 0; }
main.narrow .toc a { display: block; padding: 5px 12px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 0.5px var(--faint); font-size: 14px; color: var(--muted); text-decoration: none; }
main.narrow .toc a:hover { color: var(--ink); }
.icon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.icon-row img { width: 128px; height: 128px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 16px; }
.shots figure { margin: 0; }

@media (max-width: 820px) {
  .hide-narrow { display: none; }
  .nav ul { gap: 16px; }
  .feature { grid-template-columns: 1fr; }
  .feature.flip .text { order: 0; }
  .hero .lead, .feature p { font-size: 18px; }
  .compare th:not(:first-child), .compare td:not(:first-child) { width: 48px; }
}
@media (max-width: 480px) {
  .brand { font-size: 17px; gap: 8px; }
  .brand::before { width: 28px; height: 28px; }
  .nav ul { gap: 12px; font-size: 14px; }
  .button.small { padding: 6px 12px; }
}

/* Reveal on scroll; the script adds .js only when motion is allowed. */
.js .r {
  opacity: 0; transform: translateY(28px); filter: blur(8px);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease), filter 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .in .r { opacity: 1; transform: none; filter: none; }
.js .hero-dock.r { transform: translateY(64px); transition-duration: 1.2s, 1.6s, 1.2s; transition-delay: 360ms; }
.js .in .hero-dock.r { transform: none; }
