/* Fonts are self-hosted (SIL Open Font License, see fonts/). */
@font-face { font-family: "League Spartan"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/league-spartan-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "League Spartan"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/league-spartan-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "League Spartan"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/league-spartan-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }

/* Layout: left-aligned single column, 1120px max. Hero splits copy | photo on wide
   screens and stacks on phones. The song list is the one bold band on the page. */
:root {
  --paper: #F3EFD3;        /* the logo's ground */
  --paper-deep: #E7DEB4;   /* banded sections */
  --card: #FBF8E8;
  --ink: #2A1C10;          /* espresso */
  --saddle: #7A4A1C;       /* the logo's brown */
  --amber: #E09A2D;        /* string-light amber */
  --muted: #5F4B36;
  --line: #CFC291;
  --qr-ground: #FFFDF2;
  --on-amber: #2A1C10;
  --on-saddle: #FBF8E8;

  --font-display: "League Spartan", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible", Verdana, "Segoe UI", system-ui, sans-serif;

  --step--1: 0.9rem;
  --step-0: 1.125rem;
  --step-1: 1.4rem;
  --step-2: 1.9rem;
  --step-3: clamp(2.1rem, 1.4rem + 2.6vw, 3.2rem);
  --step-4: clamp(4.5rem, 2rem + 10vw, 9rem);

  --radius: 6px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1E150D; --paper-deep: #2A1E13; --card: #2F2217; --ink: #F1EAD0;
    --saddle: #D9A56C; --amber: #EBAA45; --muted: #C2AE8C; --line: #4A3826;
    --qr-ground: #FFFDF2; --on-amber: #1E150D; --on-saddle: #1E150D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1E150D; --paper-deep: #2A1E13; --card: #2F2217; --ink: #F1EAD0;
  --saddle: #D9A56C; --amber: #EBAA45; --muted: #C2AE8C; --line: #4A3826;
  --qr-ground: #FFFDF2; --on-amber: #1E150D; --on-saddle: #1E150D;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--saddle); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* Logo marks are masks, so the brown follows the page's theme */
.mark {
  display: block;
  background: var(--saddle);
  -webkit-mask: var(--src) center / contain no-repeat;
          mask: var(--src) center / contain no-repeat;
}
.mark--emblem { --src: url("img/emblem.png"); width: 2.6rem; aspect-ratio: 742 / 513; }
.mark--logo { --src: url("img/logo-mark.png"); width: min(22rem, 100%); aspect-ratio: 1179 / 725; }

/* Top bar */
.topbar { border-bottom: 1px solid var(--line); }
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 24px; flex-wrap: wrap; padding-block: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding-block: 6px; }
.nav a:hover { color: var(--saddle); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 22px;
  border-radius: var(--radius); border: 2px solid var(--saddle);
  font: 700 1.05rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn--solid { background: var(--saddle); color: var(--on-saddle); }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); text-decoration: none; }
.btn--line { background: transparent; color: var(--saddle); }
.btn--line:hover { background: var(--saddle); color: var(--on-saddle); text-decoration: none; }
.btn--amber { background: var(--amber); border-color: var(--amber); color: var(--on-amber); }
.btn--amber:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); text-decoration: none; }
.btn--invert { background: var(--on-saddle); border-color: var(--on-saddle); color: var(--saddle); }
.btn--invert:hover { background: var(--amber); border-color: var(--amber); color: var(--on-amber); text-decoration: none; }
.btn--small { min-height: 38px; padding: 6px 14px; font-size: 0.95rem; background: var(--card); color: var(--saddle); border-width: 1.5px; }
.btn--small:hover { background: var(--saddle); color: var(--on-saddle); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero__inner {
  display: grid; gap: 32px 48px; align-items: center;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  padding-block: 40px 56px;
}
.hero__copy { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.hero h1 { font-size: var(--step-3); max-width: 16ch; }
.lede { font-size: var(--step-1); line-height: 1.45; color: var(--muted); max-width: 32ch; }
.hero__photo { margin: 0; }
.hero__photo img { border-radius: var(--radius); width: 100%; box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(42, 28, 16, .55); }

/* About */
.about__inner {
  display: grid; gap: 32px 56px;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  padding-block: 48px 64px; border-top: 1px solid var(--line);
}
.about__text { display: grid; gap: 18px; max-width: 62ch; min-width: 0; }
.about h2 { font-size: var(--step-2); }
.about__photos { display: grid; gap: 20px; align-content: start; }
.about__photos figure { margin: 0; }
.about__photos img { border-radius: var(--radius); width: 100%; }
.about__then { display: flex; gap: 14px; align-items: center; }
.about__then img { width: 96px; flex: none; }
.about__then figcaption { font-size: var(--step--1); color: var(--muted); }

/* Songs: the bold band */
.songs { background: var(--paper-deep); padding-block: 56px 64px; }
.songs__head { display: grid; gap: 16px; margin-bottom: 28px; }
.songs h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 18px; }
.songs__count {
  font-size: var(--step-4); color: var(--saddle); line-height: 0.85;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
}
.songs__label { font-size: var(--step-2); }
.songs__intro { max-width: 60ch; color: var(--muted); }

.songs__tools { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin-bottom: 12px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field__label { font-weight: 700; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: var(--radius);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--saddle); outline: 3px solid var(--amber); outline-offset: 1px; }
.field--search { flex: 1 1 22rem; }
.field--search input { font-size: 1.2rem; min-height: 56px; }

.toggle { display: inline-flex; border: 2px solid var(--saddle); border-radius: var(--radius); overflow: hidden; }
.toggle__btn {
  min-height: 52px; padding: 8px 18px; border: 0; cursor: pointer;
  font: 700 1rem/1 var(--font-body); background: transparent; color: var(--saddle);
}
.toggle__btn + .toggle__btn { border-left: 2px solid var(--saddle); }
.toggle__btn[aria-pressed="true"] { background: var(--saddle); color: var(--on-saddle); }

.songs__status { color: var(--muted); font-size: var(--step--1); margin-bottom: 24px; }
.songs__list { columns: 15rem auto; column-gap: 40px; }
.artist { break-inside: avoid; margin: 0 0 18px; }
.artist h3 {
  font-size: 1.15rem; font-weight: 700; color: var(--saddle);
  padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.artist ul, .titles { list-style: none; margin: 0; padding: 0; }
.artist li { padding: 2px 0; }
.titles li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--line); line-height: 1.3; }
.titles .by { display: block; font-size: var(--step--1); color: var(--muted); }
mark { background: var(--amber); color: var(--on-amber); border-radius: 2px; padding: 0 1px; }
.songs__empty { font-size: var(--step-1); font-weight: 700; max-width: 40ch; }

/* Watch */
.watch__inner {
  display: grid; gap: 32px 56px; align-items: center;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  padding-block: 64px;
}
.watch__photo { margin: 0; }
.watch__photo img { border-radius: var(--radius); width: 100%; }
.watch__body { display: grid; gap: 14px; min-width: 0; }
.watch h2 { font-size: var(--step-2); }
.watch__body > p { color: var(--muted); }
.clips { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr)); }
.clip {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; min-height: 64px;
}
.clip:hover { border-color: var(--saddle); }
.clip__play {
  flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--saddle); position: relative;
}
.clip__play::after {
  content: ""; position: absolute; left: 14px; top: 11px;
  border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--on-saddle);
}
.clip__text { display: grid; }
.clip__name { font-weight: 700; }
.clip__where { font-size: var(--step--1); color: var(--muted); }

/* Book */
.book { border-top: 1px solid var(--line); }
.book__inner {
  display: grid; gap: 32px 56px;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  padding-block: 56px 64px;
}
.book__contact { display: grid; gap: 16px; align-content: start; min-width: 0; }
.book h2 { font-size: var(--step-2); }
.contact { margin: 8px 0 0; display: grid; gap: 14px; }
.contact dt { font-weight: 700; font-size: 0.95rem; color: var(--muted); }
.contact dd { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.contact__email { font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; user-select: all; }

.book__form {
  display: grid; gap: 18px; min-width: 0;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 24px clamp(16px, 3vw, 28px);
}
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field--wide { grid-column: 1 / -1; }
.book__form .btn { justify-self: start; }
.form-error { color: var(--ink); background: var(--paper-deep); border-left: 4px solid var(--amber); padding: 10px 12px; font-weight: 700; }
.composed { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.composed p { font-size: var(--step--1); color: var(--muted); }
.composed pre {
  margin: 0; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 0.95rem/1.5 var(--font-body); background: var(--paper); padding: 12px; border-radius: var(--radius);
}
.composed .btn { justify-self: start; }

/* Tip */
.tip { background: var(--saddle); color: var(--on-saddle); }
.tip__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 48px; padding-block: 48px; }
.qr { background: var(--qr-ground); padding: 10px; border-radius: var(--radius); flex: none; }
.qr img { width: 180px; height: 180px; }
.tip__text { display: grid; gap: 14px; justify-items: start; flex: 1 1 18rem; min-width: 0; }
.tip h2 { font-size: var(--step-2); color: var(--on-saddle); }
.tip__text p { max-width: 44ch; }

/* Footer */
.footer__inner { display: grid; gap: 8px; justify-items: start; padding-block: 36px 48px; color: var(--muted); }
.footer .mark--emblem { width: 2.2rem; margin-bottom: 6px; }
.footer__small { font-size: var(--step--1); }

/* Phones */
@media (max-width: 820px) {
  .hero__inner, .about__inner, .watch__inner, .book__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__inner { padding-block: 24px 40px; }
  .hero__photo { order: -1; }
  .mark--logo { width: min(15rem, 70%); }
  .about__photos { grid-template-columns: minmax(0, 1fr); }
  .watch__photo { order: 2; }
}
@media (max-width: 520px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .songs__list { columns: 2; column-gap: 18px; font-size: 1rem; }
  .artist h3 { font-size: 1.02rem; }
  .titles li { padding: 4px 0; }
  .toggle { width: 100%; }
  .toggle__btn { flex: 1; }
  .nav { gap: 2px 16px; font-size: 1rem; }
}

/* Tip page (/tip), the page the QR code opens */
.tip-page__inner {
  max-width: 34rem; display: grid; gap: 24px; justify-items: center; text-align: center;
  padding-block: 32px 56px;
}
.tip-page .mark--logo { width: min(15rem, 70%); }
.tip-page__hello { display: grid; gap: 10px; }
.tip-page h1 { font-size: var(--step-3); }
.tip-page__hello p { color: var(--muted); font-size: var(--step-1); line-height: 1.45; }
.pay { display: grid; gap: 12px; width: 100%; }
.pay__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 68px; padding: 14px 20px; border-radius: var(--radius);
  background: var(--saddle); color: var(--on-saddle); text-decoration: none;
  border: 2px solid var(--saddle);
}
.pay__btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pay__name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.pay__state { font-weight: 700; }
.pay__btn[aria-disabled="true"] {
  background: transparent; color: var(--muted); border: 2px dashed var(--line); cursor: default;
}
.pay__btn[aria-disabled="true"]:hover { background: transparent; color: var(--muted); border-color: var(--line); }
.tip-page__cash { font-size: var(--step-1); font-weight: 700; }
.tip-page__more { display: grid; gap: 8px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 20px; width: 100%; }

/* Not found page */
.lost { max-width: 34rem; display: grid; gap: 18px; justify-items: start; padding-block: 64px; }
.lost h1 { font-size: var(--step-3); }
