/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --ink:        #12141c;
  --ink-soft:   #1b1f30;
  --ink-line:   #34395a;
  --paper:      #f1e9d8;
  --paper-edge: #d8c9a3;
  --gold:       #c9a227;
  --gold-soft:  #e0c667;
  --burgundy:   #7c2340;
  --burgundy-soft: #9c3454;
  --ivory:      #ede7da;
  --ivory-dim:  #b9b3a4;
  --ink-text:   #211c12;
  --muted:      #6f6a5c;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --wrap: 1120px;
}

* { box-sizing: border-box; }
/* Keep the `hidden` attribute working even when a rule below sets display. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 20, 28, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ivory);
}

.main-nav {
  display: flex;
  gap: 2.2rem;
}
.main-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ivory-dim);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--gold-soft); }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right 0.25s ease;
}
.main-nav a:hover::after { right: 0; }

/* Small share pill in the top-right of the header. min-width keeps
   the box from jumping when the label swaps to "Copied!". */
.share-btn {
  background: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ivory-dim);
  border: 1px solid rgba(237,231,218,0.22);
  border-radius: 999px;
  padding: 5px 14px;
  min-width: 86px;
  text-align: center;
  line-height: 1.45;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.share-btn:hover { color: var(--gold-soft); border-color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 1.5px;
  background: var(--ivory);
  display: block;
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 88px 0 0; }
.hero-copy { max-width: 640px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 14px;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  color: var(--ivory);
  font-weight: 600;
}

.hero-sub {
  margin: 22px 0 30px;
  max-width: 46ch;
  color: var(--ivory-dim);
  font-size: 1.05rem;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 3px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--burgundy); color: var(--ivory); }
.btn-primary:hover { background: var(--burgundy-soft); }
.btn-ghost { border-color: rgba(237,231,218,0.35); color: var(--ivory); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }

/* staff-line section divider */
.staff-divider {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 46px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.staff-divider span {
  display: block;
  height: 1px;
  background: rgba(201,162,39,0.22);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 20px 0 90px; }
.section-dark { background: var(--ink-soft); }
.section-dark .section { padding-bottom: 90px; }

.section-title {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  color: var(--ivory);
  margin-bottom: 14px;
}
.section-sub {
  color: var(--ivory-dim);
  max-width: 58ch;
  margin: 0 0 40px;
  font-size: 1.02rem;
}
.section-sub a { color: var(--gold-soft); text-decoration: none; border-bottom: 1px solid rgba(201,162,39,0.4); }
.section-sub a:hover { color: var(--gold); }

/* ============================================================
   CARD GRID
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.card-grid--extras { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: var(--paper);
  color: var(--ink-text);
  border-radius: 2px;
  box-shadow: 0 1px 0 var(--paper-edge), 0 14px 30px rgba(0,0,0,0.28);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 1px 0 var(--paper-edge), 0 20px 36px rgba(0,0,0,0.34);
}

.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

/* Gold star for personal favorites. Sits inline in the top row, just
   left of the duration. margin-left:auto pushes it over to sit with
   the duration rather than centering in the space-between row. */
.card-fav-star {
  margin-left: auto;
  margin-right: 6px;
  align-self: center;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--gold);
  position: relative;
  top: -4px;
}

.score-fav-star {
  color: var(--gold);
  font-size: 0.5em;
  margin-left: 14px;
  vertical-align: middle;
  position: relative;
  top: -0.15em;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.card-opus { color: var(--burgundy); font-weight: 500; }

.card-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  width: fit-content;
}
.card-badge--pending {
  background: rgba(124, 35, 64, 0.12);
  color: var(--burgundy);
  border: 1px solid rgba(124, 35, 64, 0.35);
}

.card-title { font-size: 1.22rem; line-height: 1.25; }
.card-title-link { color: inherit; text-decoration: none; }
.card-title-link:hover { color: var(--burgundy); }
.card-instrumentation {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.card-blurb { margin: 0; font-size: 0.92rem; color: #43402f; flex: 1; }

.card-audio { width: 100%; height: 32px; margin-top: 4px; }

.card-buy-row { margin-top: 6px; }
.btn-buy {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--burgundy);
  color: var(--paper);
  border: none;
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
}
.btn-buy:hover { background: var(--burgundy-soft); }
.btn-buy--pending {
  background: transparent;
  border: 1px dashed var(--paper-edge);
  color: var(--muted);
  cursor: default;
}
.btn-buy--pending:hover { background: transparent; }

/* ============================================================
   SCORE DETAIL PAGE
   ============================================================ */
.score-back-btn { display: inline-block; margin-bottom: 24px; }
.score-duration {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ivory-dim);
  margin: 0 0 18px;
}
.score-blurb { color: var(--ivory-dim); font-size: 1.02rem; max-width: 60ch; margin: 0 0 24px; }
.score-download-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--gold-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,162,39,0.4);
  font-size: 0.92rem;
}
.score-download-link:hover { color: var(--gold); }
.score-request-piece-display { color: var(--ivory-dim); margin: 0 0 20px; font-size: 0.92rem; }
#score-audio-wrap .card-audio { max-width: 420px; margin: 0 0 20px; }

/* ---- watermarked sample page ---- */
.score-preview { margin: 34px 0 0; max-width: 560px; }
.score-preview-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--paper-edge);
  border-radius: 3px;
  background: var(--paper);
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
  line-height: 0;
}
/* Portrait pages (the drumline charts) would run very tall as a
   thumbnail, so cap the height and crop from the top. The lightbox
   still shows the whole page. */
.score-preview-btn img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 520px;
  object-fit: cover;
  object-position: top;
}
.score-preview-btn:hover { border-color: var(--gold); }
.score-preview-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(18,20,28,0.88);
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 2px;
  line-height: 1.4;
}
.score-preview figcaption {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 10px;
  max-width: 52ch;
}

/* ---- lightbox ---- */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(9,10,14,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  overflow: auto;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  background: var(--paper);
  border-radius: 3px;
  cursor: default;
}
.lightbox-close {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 91;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(237,231,218,0.28);
  border-radius: 50%;
  background: rgba(18,20,28,0.9);
  color: var(--ivory);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { border-color: var(--gold); color: var(--gold-soft); }

/* ============================================================
   COMMISSIONS
   ============================================================ */
.commission-form { max-width: 640px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.commission-form label {
  display: block;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--ivory-dim);
}
.label-optional { color: var(--muted); font-weight: 400; }
.commission-form input,
.commission-form select,
.commission-form textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 11px 13px;
  background: rgba(237,231,218,0.05);
  border: 1px solid rgba(237,231,218,0.22);
  border-radius: 3px;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.commission-form textarea { resize: vertical; }
.commission-form input::placeholder,
.commission-form textarea::placeholder { color: var(--muted); }
.commission-form input:focus,
.commission-form select:focus,
.commission-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.commission-form select { cursor: pointer; }
.form-hp { position: absolute; left: -9999px; }
.commission-success {
  max-width: 640px;
  margin-top: 6px;
  padding: 18px 20px;
  background: rgba(201,162,39,0.1);
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: 3px;
  color: var(--ivory);
}
.commission-success p { margin: 0; }

/* ============================================================
   ELSEWHERE / PROGRAM LIST
   ============================================================ */
.elsewhere-notice {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--burgundy);
  background: rgba(124, 35, 64, 0.12);
  border: 1px solid rgba(124, 35, 64, 0.35);
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 28px;
}
.program-list { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.program-list li { border-bottom: 1px solid rgba(237,231,218,0.14); }
.program-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 4px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ivory);
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.program-list a:hover { color: var(--gold-soft); padding-left: 10px; }
.program-list .arrow { color: var(--gold); font-size: 1rem; }
.gear-pending {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ivory-dim);
}
.gear-note { font-family: var(--font-body); font-size: 0.85rem; color: var(--muted); }

/* Expandable gear groups (Sticks > Drumsticks > ...) */
.gear-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ivory);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.gear-summary::-webkit-details-marker { display: none; }
.gear-summary::after {
  content: "+";
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
}
.gear-group[open] > .gear-summary::after { content: "\2013"; }
.gear-summary:hover { color: var(--gold-soft); padding-left: 10px; }
.gear-sublist {
  margin: 0 0 8px;
  padding-left: 22px;
  border-left: 1px solid rgba(237,231,218,0.14);
}
.gear-sublist > li:last-child { border-bottom: none; }
.gear-sublist a,
.gear-sublist .gear-pending,
.gear-sublist .gear-summary { padding: 14px 4px; font-size: 1rem; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-content { max-width: 720px; }
.about-copy { color: var(--ivory-dim); font-size: 1.05rem; max-width: 62ch; }
.about-contact { margin-top: 6px; }
.about-contact a { color: var(--gold-soft); text-decoration: none; border-bottom: 1px solid rgba(201,162,39,0.4); }
.about-contact a:hover { color: var(--gold); }
.about-tip-btn { display: inline-block; margin-top: 20px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { padding: 34px 0 46px; border-top: 1px solid rgba(237,231,218,0.1); }
.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ivory-dim);
}
.footer-row a { text-decoration: none; color: var(--ivory-dim); }
.footer-row a:hover { color: var(--gold-soft); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  .main-nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    gap: 0;
    padding: 8px 28px 20px;
    border-bottom: 1px solid rgba(201,162,39,0.18);
    display: none;
  }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid rgba(237,231,218,0.08); }
  body.nav-open .main-nav { display: flex; }
  .nav-toggle { display: flex; }
  .share-btn { margin-left: auto; margin-right: 6px; }
  .wrap { padding: 0 20px; }
  .card-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
