/* Blackbird landing page. Sizes follow Brand › 05 Website › Landing page (Figma). */

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

/* App tokens (HANDOFF): primary, secondary, tertiary, surface */
:root {
  --bg: #FFFFFF;
  --fg: #0E0E0E;
  --secondary: #535353;
  --tertiary: #818181;
  --line: #E5E5E5;
  --edge: #D9D9D9;
  --surface: #F2F2F2;
  --gutter: 120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E0E;
    --fg: #FFFFFF;
    --secondary: #CBCBCB;
    --tertiary: #999999;
    --line: #2A2A2A;
    --edge: #333333;
    --surface: #171717;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 2px; }
h1, h2, h3, p, ul { margin: 0; }

.wrap { max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Wordmark: ink follows the text colour, the B is cut out in the page colour */
.wordmark { display: inline-flex; color: var(--fg); }
.wordmark svg { display: block; overflow: visible; }
.wordmark .ink, .screen .ink { fill: var(--fg); }
.wordmark .paper, .screen .paper { fill: var(--bg); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.bar { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.bar .wordmark { margin-left: -12px; } /* the artwork has 12 px of air on the left */
.bar nav { display: flex; gap: 32px; }
.bar nav a { color: var(--secondary); text-decoration: none; }
.bar nav a:hover { color: var(--fg); }

/* ---------- Phone ---------- */
.phone {
  --pw: 503px;
  width: var(--pw);
  border: 2px solid var(--edge);
  border-radius: calc(var(--pw) * .137);
  overflow: hidden;
  background: var(--bg);
}
.screen { display: block; width: 100%; height: auto; }
.screen text { font-family: "Geist Mono", ui-monospace, monospace; }
.screen .time { font-family: -apple-system, "SF Pro Text", system-ui, sans-serif; font-weight: 600; font-size: 17px; fill: var(--fg); }
.screen .battery-edge { fill: none; stroke: var(--fg); stroke-opacity: .35; }
.screen .battery-cap { opacity: .4; }
.screen .t-header { font-size: 15px; font-weight: 300; fill: var(--secondary); }
.screen .chevron { fill: none; stroke: var(--secondary); stroke-width: 1; }
.screen .t-strings text { font-size: 32px; font-weight: 100; text-anchor: middle; }
.screen .ter { fill: var(--tertiary); }
.screen .ink-t { fill: var(--fg); }
.screen .paper-t { fill: var(--bg); }
.screen .ter-f { fill: var(--tertiary); }
.screen .sec-f { fill: var(--secondary); }
.screen .t-letter { font-size: 64px; font-weight: 200; }
.screen .t-octave { font-size: 13px; font-weight: 300; }
.screen .t-cents { font-size: 15px; font-weight: 400; fill: var(--secondary); }
.screen .ink-t .t-octave { fill: var(--secondary); }
.screen .t-row { font-size: 15px; font-weight: 300; }
.screen .t-notes { font-size: 13px; font-weight: 300; }
.screen .sharp { fill: none; stroke: var(--secondary); stroke-width: .75; }
.screen .t-caption { font-size: 15px; font-weight: 300; fill: var(--secondary); }
.screen .ring { fill: none; stroke: var(--fg); stroke-width: 1; }

/* Always-dark phone in the dim section */
.phone-dark {
  --bg: #0E0E0E; --fg: #FFFFFF; --secondary: #CBCBCB; --tertiary: #999999; --edge: #333333;
  --pw: 340px;
  border-width: 1px;
}

/* ---------- Hero ---------- */
.hero { overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  align-items: center;
}
.hero-copy { padding: 64px 0; }
.hero h1 { font-size: clamp(30px, 2.8vw, 40px); font-weight: 300; line-height: 1.15; letter-spacing: 0; }
.lede { margin-top: 32px; max-width: 520px; font-size: 20px; line-height: 1.6; color: var(--secondary); }

/* Apple badge: official artwork, unmodified, 48 px tall (minimum 40),
   clear space of a quarter of its height (12 px) on every side. */
.app-store-badge { display: inline-block; margin-top: 48px; line-height: 0; }
.app-store-badge img { display: block; height: 48px; width: auto; }
.small { margin-top: 16px; font-size: 14px; color: var(--secondary); }

.hero-phone { padding-top: 56px; align-self: end; }
/* Crop the phone just below the meter, where the hero ends (as in Figma) */
/* Header 80 + 56 above the phone + the cropped phone = the window height, with a little to spare */
.phone-crop { --pw: clamp(320px, min(calc((100vh - 160px) * 402 / 658), 40vw), 503px); width: var(--pw); height: calc(var(--pw) * 658 / 402); overflow: hidden; }
.phone-crop .phone { --pw: inherit; }

/* ---------- Instruments ---------- */
.instruments { background: var(--surface); padding: 96px 0; }
.instruments h2, .dim h2 { font-size: 48px; font-weight: 300; line-height: 1.2; }
.section-lede { margin: 20px auto 0; max-width: 520px; font-size: 18px; line-height: 1.6; color: var(--secondary); }

.inst-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 96px; align-items: center; }
.inst-phones { display: flex; gap: 32px; align-items: flex-start; }
.phone-sm { --pw: 280px; border-width: 1px; }
.inst-phones > :nth-child(2) { margin-top: 96px; }
.inst-copy .section-lede { margin: 20px 0 0; text-align: left; }
.tunings { margin: 48px 0 0; }
.tunings div { padding: 16px 0; border-top: 1px solid var(--edge); }
.tunings dt { font-size: 16px; font-weight: 400; }
.tunings dd { margin: 4px 0 0; font-size: 15px; line-height: 1.6; color: var(--secondary); }
.own { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--edge); font-size: 16px; line-height: 1.6; }

/* ---------- Dim rooms ---------- */
.dim { background: #0E0E0E; color: #FFFFFF; padding: 64px 0; }
@media (prefers-color-scheme: dark) { .dim { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); } }
.dim-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 64px; align-items: center; }
.dim-phone { justify-self: end; }
.facts { list-style: none; padding: 0; margin-top: 48px; }
.facts li { font-size: 18px; line-height: 1.5; color: #CBCBCB; }
.facts li + li { margin-top: 27px; }

/* Appearance switch: the app's Toggle, drawn for the dark section */
.appearance { margin-top: 40px; display: flex; align-items: center; gap: 16px; font-size: 16px; color: #FFFFFF; }
.toggle { margin: 0; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; line-height: 0; border-radius: 8px; }
.toggle:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.toggle .track { transition: opacity 150ms cubic-bezier(0, 0, .58, 1); }
.toggle .track-on { fill: #CBCBCB; }
.toggle .track-off { fill: #999999; opacity: 0; }
.toggle .knob {
  fill: #FFFFFF; stroke: #CBCBCB; stroke-width: 0;
  transform-box: view-box;
  transition: transform 150ms cubic-bezier(0, 0, .58, 1), fill 150ms cubic-bezier(0, 0, .58, 1), stroke-width 150ms cubic-bezier(0, 0, .58, 1);
}
.toggle[aria-checked="false"] .track-on { opacity: 0; }
.toggle[aria-checked="false"] .track-off { opacity: 1; }
.toggle[aria-checked="false"] .knob { transform: translateX(-23px); fill: #0E0E0E; stroke-width: 1.5px; }

/* The phone beside it follows the switch */
.phone-dark.is-light { --bg: #FFFFFF; --fg: #0E0E0E; --secondary: #535353; --tertiary: #818181; --edge: #D9D9D9; }
.phone-dark, .phone-dark .screen * { transition: fill 300ms ease-out, stroke 300ms ease-out, background-color 300ms ease-out, border-color 300ms ease-out; }

@media (prefers-reduced-motion: reduce) {
  .toggle .track, .toggle .knob, .phone-dark, .phone-dark .screen * { transition: none; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 56px; }
.wordmark-large { width: min(560px, 100%); margin-left: calc(min(560px, 100%) * -12 / 160); }
.wordmark-large svg { width: 100%; height: auto; }
.footer-row { margin-top: 48px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.credit { font-size: 14px; line-height: 1.6; color: var(--secondary); }
.site-footer nav { display: flex; gap: 32px; font-size: 14px; }
.site-footer nav a { color: var(--secondary); text-decoration: none; }
.site-footer nav a:hover { color: var(--fg); }
.legal { margin-top: 40px; font-size: 12px; line-height: 1.6; color: var(--tertiary); max-width: 46em; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1180px) {
  :root { --gutter: 64px; }
  .inst-grid { gap: 64px; }
  .phone-sm { --pw: 240px; }
  .inst-phones { gap: 24px; }
}

@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .bar { height: 72px; }
  .bar nav a:not(.nav-download) { display: none; }

  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy { padding: 40px 0 0; }
  .hero h1 { font-size: 32px; }
  .hero h1 br { display: none; }
  .lede { margin-top: 20px; font-size: 16px; }
  .app-store-badge { margin-top: 32px; }
  .hero-phone { padding-top: 48px; justify-self: center; }
  .phone-crop { --pw: min(320px, calc(100vw - 32px)); }

  .instruments { padding: 72px 0 80px; }
  .instruments h2, .dim h2 { font-size: 32px; }
  .section-lede { font-size: 16px; margin-left: 0; }
  .inst-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .inst-copy { order: -1; }
  .inst-phones { justify-content: center; }
  .inst-bass { display: none; }
  .inst-phones > :nth-child(2) { margin-top: 0; }
  .phone-sm { --pw: min(280px, calc(100vw - 32px)); }

  .dim { padding: 72px 0 0; overflow: hidden; }
  .dim-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .facts { margin-top: 32px; }
  .facts li { font-size: 16px; }
  .facts li + li { margin-top: 16px; }
  .dim-phone { justify-self: center; height: calc(min(280px, 100vw - 32px) * 700 / 402); overflow: hidden; }
  .phone-dark { --pw: min(280px, calc(100vw - 32px)); }

  .site-footer { padding: 48px 0 40px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

