/* Scorio website.
   Layout: a dark "stage" (the app's own palette) where ivory score pages are the only bright surfaces,
   amber reserved for actions and the brand mark. Bodoni for the voice of an engraved title page,
   Inter for reading, Plex Mono for the markings musicians actually write (♩ = 72, V.S., mm. 24). */
:root {
  --stage: #121110;
  --stage-2: #191816;
  --surface: #201e1b;
  --line: #2e2b27;
  --ivory: #f2efe9;
  --muted: #a8a297;
  --faint: #78736a;
  --amber: #ffb02e;
  --amber-ink: #131313;
  --paper: #f8f5ee;
  --paper-ink: #24221f;
  --red-pencil: #c7362b;
  --blue-pencil: #2f5fa8;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hand: "Caveat", "Bradley Hand", cursive;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.86rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  --step-3: clamp(2.1rem, 1.7rem + 2vw, 3.3rem);
  --step-4: clamp(2.7rem, 2rem + 3.6vw, 5.2rem);

  --wrap: 1180px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--stage);
  color: var(--ivory);
  font: 400 var(--step-0)/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--amber); color: var(--amber-ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-family: var(--body); font-weight: 600; letter-spacing: 0; line-height: 1.3; }
h1 em, h2 em { font-style: italic; color: var(--amber); }
p { margin: 0; }
.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.5; max-width: 34em; }
.eyebrow {
  font: 500 var(--step--1)/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: .7em;
}
.eyebrow::before { content: ""; width: 1.8em; height: 1px; background: currentColor; opacity: .6; }
.mono { font-family: var(--mono); }

/* ---------- Header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60;
  background: var(--stage);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--stage) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.15rem/1 var(--body); letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; gap: 28px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
.nav a:hover { color: var(--ivory); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 .98rem/1 var(--body); text-decoration: none; cursor: pointer; border: 0;
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
}
.btn-primary { background: var(--amber); color: var(--amber-ink) !important; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--amber) 70%, transparent); }
.btn-ghost { background: transparent; color: var(--ivory) !important; box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.nav .btn { min-height: 40px; padding: 0 18px; font-size: .9rem; }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- Sections ---------- */
section { padding-block: clamp(72px, 10vw, 140px); }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Reveal (only hides what starts below the fold; see main.js) ---------- */
.reveal-pending { opacity: 0; transform: translateY(18px); }
.reveal-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 40px; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ivory); }

/* ---------- Legal / support pages ---------- */
.doc { padding-block: clamp(56px, 8vw, 104px); }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: var(--step-3); margin-block: 18px 14px; }
.doc .updated { color: var(--faint); font: 400 var(--step--1)/1.4 var(--mono); }
.doc .summary {
  margin-block: 36px; padding: 22px 24px; border-radius: var(--radius);
  background: var(--stage-2); border: 1px solid var(--line); color: var(--ivory);
}
.doc .summary p + p { margin-top: .6em; }
.doc h2 { font-family: var(--body); font-weight: 600; font-size: var(--step-1); letter-spacing: 0; margin-block: 44px 12px; }
.doc p, .doc li { color: #d6d1c8; }
.doc p + p { margin-top: 1em; }
.doc ul, .doc ol { padding-left: 1.2em; margin: .8em 0; }
.doc li + li { margin-top: .45em; }
.doc a { color: var(--amber); text-underline-offset: 3px; }
.doc strong { color: var(--ivory); font-weight: 600; }
.contact-card {
  display: grid; gap: 14px; margin-block: 32px; padding: 28px; border-radius: var(--radius);
  background: var(--stage-2); border: 1px solid var(--line);
}
.contact-card .addr { font: 500 var(--step-1)/1.2 var(--mono); color: var(--ivory); user-select: all; word-break: break-all; }
.contact-card .row { display: flex; flex-wrap: wrap; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal-pending { opacity: 1; transform: none; }
}
