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

:root {
  --bg: #ffffff;
  --ink: #1c1a1f;
  --soft: #46424c;
  --muted: #7a7680;
  --line: #d9d6dd;
  --chip: #f4f3f6;
  --shadow: rgba(40, 30, 60, 0.16);
  --ok: #17803f;
  --ok-bg: #e6f7ec;
  --err: #c93a2e;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131215;
    --ink: #f3f1f6;
    --soft: #cdc9d3;
    --muted: #9a96a1;
    --line: #3a3740;
    --chip: #1f1d23;
    --shadow: rgba(0, 0, 0, 0.5);
    --ok: #7ee2a4;
    --ok-bg: #163322;
    --err: #ff8a7d;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.defs { position: absolute; }

a { color: inherit; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2.5px solid #5b47d6; outline-offset: 4px; border-radius: 6px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- top ---------- */

.top { padding-top: 36px; }

.wordmark {
  display: inline-flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.four {
  display: inline-grid;
  place-items: center;
  width: 1.15em;
  height: 1.15em;
  margin: 0 0.06em;
  border-radius: 0.32em;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.86em;
  line-height: 1;
  transition: transform .5s var(--spring);
}
.wordmark:hover .four { transform: rotate(-12deg) scale(1.08); }

/* ---------- intro ---------- */

h1 {
  max-width: 14.5em;
  margin: 104px 0 0;
  font-size: clamp(2.5rem, 6.6vw, 5.25rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 .unit { display: inline-block; }

.hint {
  margin: 22px 0 88px;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- apps ---------- */

.apps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 56px 36px;
  margin: 104px 0 0;
  padding: 0;
  list-style: none;
}

.icon {
  display: block;
  width: 132px;
  padding: 0;
  border: 0;
  border-radius: 30px;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 14px 18px var(--shadow)) drop-shadow(0 2px 3px var(--shadow));
  transition: transform .55s var(--spring);
  -webkit-tap-highlight-color: transparent;
}
.icon svg { display: block; width: 100%; height: auto; overflow: visible; }
.icon svg * { transform-box: view-box; }
.icon text { font-family: "Bricolage Grotesque", sans-serif; }
.icon:hover { transform: translateY(-6px) rotate(-4deg); }
.app:nth-child(even) .icon:hover { transform: translateY(-6px) rotate(4deg); }
.icon:active { transform: translateY(-2px) scale(.95); transition-duration: .12s; }

/* Each app is a column whose text stretches to the row's height, so the
   notify forms (margin-top: auto) line up across the row. */
.app { display: flex; flex-direction: column; }
.text { display: flex; flex: 1; flex-direction: column; margin-top: 26px; }
.text .status { align-self: flex-start; }

h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  padding: 3px 11px 4px 9px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--soft);
  font-size: 0.875rem;
  font-weight: 500;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot, #a9a5ae);
}
.status.live { --dot: #22b35e; }
.status.review { --dot: #f0a020; }
.status.building { --dot: #7a63f0; }

.desc {
  max-width: 17em;
  margin: 14px 0 18px;
  color: var(--soft);
  text-wrap: pretty;
}

/* ---------- notify-me forms ---------- */

.notify {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 16.5rem;
  margin: auto 0 0;
  padding: 4px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s, background .3s;
}
.notify:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--chip); }
.notify input[type="email"] {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 6px 6px 6px 13px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
}
.notify input::placeholder { color: var(--muted); }
.notify button {
  flex: none;
  padding: 8px 15px 9px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .35s var(--spring), opacity .2s;
}
.notify button:hover { transform: scale(1.05); }
.notify button:disabled { opacity: .55; cursor: default; transform: none; }
.notify-msg {
  position: absolute;
  top: calc(100% + 7px);
  left: 15px;
  right: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}
.notify-msg.err { color: var(--err); }
.notify.done { border-color: transparent; background: var(--ok-bg); box-shadow: none; animation: pop .5s var(--spring); }
.notify.done input, .notify.done button { display: none; }
.notify.done .notify-msg {
  position: static;
  padding: 7px 14px 8px;
  color: var(--ok);
  font-size: 0.95rem;
  font-weight: 600;
}
@keyframes pop { 0% { transform: scale(.94); } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- footer ---------- */

footer { margin-top: 152px; padding-bottom: 56px; }

.hello {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.small { margin: 14px 0 0; color: var(--muted); font-size: 0.9375rem; }

/* ---------- icon toys ---------- */

/* Newton: the end balls trade swings; hits land at 24/48/72/96% (script.js clacks match) */
.play .b1 { animation: cradle-left 2s linear; }
.play .b5 { animation: cradle-right 2s linear; }
@keyframes cradle-left {
  0% { transform: rotate(0); animation-timing-function: ease-out; }
  12% { transform: rotate(18deg); animation-timing-function: ease-in; }
  24% { transform: rotate(0); }
  48% { transform: rotate(0); animation-timing-function: ease-out; }
  60% { transform: rotate(11deg); animation-timing-function: ease-in; }
  72% { transform: rotate(0); }
}
@keyframes cradle-right {
  0%, 24% { transform: rotate(0); animation-timing-function: ease-out; }
  36% { transform: rotate(-17deg); animation-timing-function: ease-in; }
  48% { transform: rotate(0); }
  72% { transform: rotate(0); animation-timing-function: ease-out; }
  84% { transform: rotate(-8deg); animation-timing-function: ease-in; }
  96% { transform: rotate(0); }
}

/* Chronicle: the front page turns, twice */
.sheet { transform-origin: 26px 60px; }
.play .sheet { animation: flip .38s ease-in-out 2; }
.play .sheet-back { animation: nudge .76s ease-out; }
@keyframes flip {
  45% { transform: scaleX(.04) skewY(-8deg); }
  55% { transform: scaleX(.04) skewY(-8deg); }
}
@keyframes nudge {
  40% { transform: rotate(10deg) translate(3px, 1px); }
}

/* Meteor: it shoots off head-first, then a new one rises in behind it */
.play .meteor { animation: shoot 1.4s cubic-bezier(.55, 0, .2, 1); }
.play .stars { animation: twinkle .35s ease-in-out 4 alternate; }
@keyframes shoot {
  32% { transform: translate(90px, -90px); opacity: 0; }
  33% { transform: translate(-70px, 70px); opacity: 0; }
  45% { opacity: 1; }
}
@keyframes twinkle { to { opacity: .35; } }

/* Guitar4mp: knobs get turned (by script.js), the lamp flares, the speaker thumps */
.knob { transition: transform .6s var(--spring); }
.grille { transform-origin: 60px 75px; }
.lamp-glow { transform-origin: 94px 29px; }
.play .grille { animation: thump .16s ease-out 5; }
.play .lamp-glow { animation: flare 1.2s ease-out; }
@keyframes thump { 50% { transform: scale(1.025); } }
@keyframes flare {
  15% { transform: scale(1.9); opacity: .55; }
}

@media (prefers-reduced-motion: reduce) {
  .icon, .knob, .four, .notify button { transition: none; }
  .notify.done { animation: none; }
  .play * { animation: none !important; }
}

/* ---------- smaller screens ---------- */

@media (max-width: 980px) {
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px 40px; }
  .desc { max-width: 22em; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 22px; }
  .top { padding-top: 26px; }
  h1 { margin-top: 64px; }
  .hint { margin-bottom: 56px; }
  .apps { grid-template-columns: 1fr; gap: 48px; margin-top: 64px; }
  .app { display: grid; grid-template-columns: 92px 1fr; gap: 22px; align-items: start; }
  .icon { width: 92px; border-radius: 21px; filter: drop-shadow(0 8px 12px var(--shadow)) drop-shadow(0 1px 2px var(--shadow)); }
  .text { margin-top: 0; }
  h2 { font-size: 1.4rem; }
  .status { margin-top: 8px; }
  .desc { margin-top: 10px; }
  footer { margin-top: 112px; }
}
