/* Clefbound's site: the app's Sky palette by day, Midnight by night (the READMEs in design/icon).
   Shapes: cards 24px, phones 44px, buttons and keys 14px. */
:root {
  --page: #E0F1FF;
  --card: #FFFFFF;
  --soft: #C4E3FF;
  --ink: #14243A;
  --muted: #4A5B70;
  --primary: #0B3F75;
  --on-primary: #FFFFFF;
  --on-primary-muted: #C9DCF0;
  --link: #1571C4;
  --line: #C4DDF2;
  --key-black: #1E1A16;
  --stage-from: #5CC0FF;
  --stage-to: #1F87DE;
  --shadow: 11 63 117;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #12141F;
    --card: #1D2031;
    --soft: #262A40;
    --ink: #F2F1F6;
    --muted: #A3A5B8;
    --primary: #F5C66B;
    --on-primary: #1A1608;
    --on-primary-muted: #4A3A14;
    --link: #F5C66B;
    --line: #2C3047;
    --key-black: #07080D;
    --stage-from: #343A55;
    --stage-to: #151826;
    --shadow: 0 0 0;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* Header */
header.site { padding: 16px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 48px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; }
.brand em { color: var(--primary); }
nav.site { display: flex; gap: 22px; font-size: 15px; }
nav.site a { color: var(--muted); text-decoration: none; }
nav.site a:hover, nav.site a[aria-current] { color: var(--ink); }

/* Hero */
.hero {
  display: grid; gap: 40px; align-items: center;
  padding: 24px 0 64px;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 56px; padding: 40px 0 96px; }
}
.hero h1 {
  font-size: clamp(38px, 4.8vw, 56px); line-height: 1.05; letter-spacing: -0.03em;
  font-weight: 800; margin: 0 0 20px; max-width: 12em; text-wrap: balance;
}
.hero .sub { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); margin: 0 0 28px; max-width: 30em; }
.status {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 15px; color: var(--muted);
}
.status strong { color: var(--ink); font-weight: 650; }
.status a { font-weight: 600; }

/* Phones: real screenshots in a plain device frame */
.phone {
  margin: 0; border-radius: 44px; padding: 7px; background: #0E1018;
  box-shadow: 0 1px 0 1px rgb(255 255 255 / 0.06) inset, 0 32px 64px -24px rgb(var(--shadow) / 0.45);
}
.phone img { border-radius: 37px; width: 100%; }

.stage {
  position: relative; border-radius: 32px; aspect-ratio: 1 / 1.02;
  background: linear-gradient(135deg, var(--stage-from), var(--stage-to));
  overflow: hidden; isolation: isolate;
}
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 28% 18%, rgb(255 255 255 / 0.26), transparent 60%);
}
.stage .phone { position: absolute; width: 46%; }
.stage .back { left: 9%; top: 14%; transform: scale(0.92); transform-origin: top left; opacity: 0.96; }
.stage .front { right: 9%; top: 8%; }

/* Sections */
section.band { padding: 32px 0 72px; }
section.band h2 {
  font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -0.025em;
  font-weight: 800; margin: 0 0 16px;
}
section.band p.lede { font-size: 19px; color: var(--muted); margin: 0; max-width: 34em; }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 0.8fr 1.2fr; gap: 72px; } }
.split .shot { max-width: 260px; margin: 0 auto; width: 100%; }
@media (min-width: 900px) { .split .shot { max-width: 320px; } }
.split .steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; max-width: 32em; }
.split .steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.split .steps b { display: block; font-size: 18px; color: var(--ink); }
.split .steps span { color: var(--muted); }
.split .steps i {
  font-style: normal; font-weight: 800; font-size: 15px; width: 40px; height: 40px; border-radius: 14px;
  display: grid; place-items: center; background: var(--primary); color: var(--on-primary);
}

/* What's inside: one bento, five cells */
.bento { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(180px, auto); }
  .cell.stages { grid-column: span 4; grid-row: span 2; }
  .cell.games { grid-column: span 2; }
  .cell.songs { grid-column: span 2; }
  .cell.midi, .cell.private { grid-column: span 3; }
}
.cell { border-radius: 24px; padding: 26px 28px; background: var(--card); }
.cell h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 8px; font-weight: 750; }
.cell p { margin: 0; color: var(--muted); }
.cell.games { background: var(--primary); color: var(--on-primary); }
.cell.games p { color: var(--on-primary); opacity: 0.86; }
.cell.songs, .cell.private { background: var(--soft); }

/* The stages as the app draws them: white keys on their side, black keys over the seams */
.keys { margin-top: 22px; display: grid; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.keys .key {
  position: relative; padding: 16px 20px 16px 34%; min-height: 72px;
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center;
}
.keys .key:first-child { border-top: 0; }
.keys .key b { font-size: 17px; line-height: 1.3; }
.keys .key span { font-size: 14px; color: var(--muted); }
.keys .key.has-black::after {
  content: ""; position: absolute; left: 0; bottom: -15px; width: 26%; height: 28px; z-index: 1;
  background: var(--key-black); border-radius: 0 6px 6px 0;
}

footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 15px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
footer.site nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site a { color: var(--muted); }

/* Documents: privacy, terms, support */
main.doc-page { padding: 8px 0 56px; }
article.doc { background: var(--card); border-radius: 24px; padding: 32px clamp(20px, 5vw, 48px); max-width: 780px; margin: 0 auto; }
article.doc > * { max-width: 66ch; }
article.doc h1 { font-size: clamp(30px, 4vw, 38px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 4px; font-weight: 800; }
article.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
article.doc h2 { font-size: 21px; margin: 36px 0 8px; letter-spacing: -0.01em; }
article.doc h3 { font-size: 18px; margin: 24px 0 6px; }
article.doc ul { padding-left: 22px; }
article.doc li { margin: 4px 0; }
article.doc .lead { font-size: 19px; }

/* Motion: the app's riseIn, once, and only when the viewer hasn't asked for less */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  .stage .phone.rise { animation-name: rise-phone; }
  @keyframes rise-phone { from { opacity: 0; translate: 0 28px; } }
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .reveal.in { opacity: 1; transform: none; }
}
