/*
 * site.css — the visual design system for music.rjnestor.com.
 *
 * Direction (decided 2026-07-22): a person-forward, editorial frame with no genre of its
 * own — the one constant is R.J. Nestor. A cool, non-seasonal palette pulled from the
 * headshot (porcelain, slate-teal from the eyes, petrol, dusty blue from the shirt, charcoal
 * from the piano). Literata for headlines/body, IBM Plex Sans for nav/labels/buttons.
 * Porcelain-light is the default; a warm-charcoal dark mode is the alternate.
 *
 * Mobile-first: base rules target small screens; one min-width query layers on the desktop
 * layout. Numerals are lining everywhere (no descending figures — a hard preference).
 */

/* ============================ fonts (self-hosted) ============================ */
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400 600;           /* variable range */
  font-display: swap;
  src: url("/assets/fonts/literata-400-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/literata-400-600-italic.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/plex-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/plex-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/plex-600-normal.woff2") format("woff2");
}

/* ============================ design tokens ============================ */
:root {
  color-scheme: light;

  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* raw palette */
  --porcelain: #eef0ee;
  --ink: #22262a;
  --slate: #3f8f96;
  --slate-dk: #357a80;
  --petrol: #1f5a63;
  --petrol-dk: #184851;
  --dusty: #7f97a6;
  --charcoal: #1b1e21;

  /* semantic tokens — components reference these; dark mode remaps them */
  --bg: var(--porcelain);
  --surface: #f5f6f4;
  --surface-2: #e8ebe8;
  --text: var(--ink);
  --text-soft: #5f7076;
  --accent: var(--petrol);          /* primary links / filled buttons */
  --accent-strong: var(--petrol-dk);
  --accent-2: var(--slate-dk);      /* secondary accent */
  --on-accent: #eef0ee;

  --hair: #d7dcd8;                   /* soft card hairline */
  --rule: rgba(34, 38, 42, 0.9);    /* strong editorial rule */

  --tint-slate: #e3eeed;
  --tint-petrol: #dde9ea;
  --tint-dusty: #e8edf0;

  --footer-bg: var(--charcoal);
  --footer-text: #b8c1bd;
  --footer-strong: #eef0ee;
  --footer-accent: var(--slate);
  --footer-rule: rgba(255, 255, 255, 0.12);

  --radius: 0.7rem;
  --radius-sm: 0.4rem;
  --shadow: 0 2px 10px rgba(20, 30, 30, 0.07);
  --shadow-lift: 0 6px 22px rgba(20, 30, 30, 0.12);
  --maxw: 66rem;
}

/* dark tokens, shared by the explicit toggle and the OS preference */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191c1f;
  --surface: #22272b;
  --surface-2: #2a2f34;
  --text: #e7e9e6;
  --text-soft: #9aabad;
  --accent: var(--slate);           /* petrol is too dark on charcoal — slate leads */
  --accent-strong: #59a6ac;
  --accent-2: #6fb2b8;
  --on-accent: #0f1416;
  --hair: rgba(255, 255, 255, 0.11);
  --rule: rgba(231, 233, 230, 0.7);
  --tint-slate: rgba(63, 143, 150, 0.15);
  --tint-petrol: rgba(31, 90, 99, 0.28);
  --tint-dusty: rgba(127, 151, 166, 0.13);
  --footer-bg: #131619;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-lift: 0 6px 22px rgba(0, 0, 0, 0.4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #191c1f;
    --surface: #22272b;
    --surface-2: #2a2f34;
    --text: #e7e9e6;
    --text-soft: #9aabad;
    --accent: var(--slate);
    --accent-strong: #59a6ac;
    --accent-2: #6fb2b8;
    --on-accent: #0f1416;
    --hair: rgba(255, 255, 255, 0.11);
    --rule: rgba(231, 233, 230, 0.7);
    --tint-slate: rgba(63, 143, 150, 0.15);
    --tint-petrol: rgba(31, 90, 99, 0.28);
    --tint-dusty: rgba(127, 151, 166, 0.13);
    --footer-bg: #131619;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 6px 22px rgba(0, 0, 0, 0.4);
  }
}

/* ============================ base ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.012em; line-height: 1.14; }

/* shared width container */
.site-header__inner,
.site-main,
.site-footer__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  padding: 0.5rem 1rem; background: var(--accent); color: var(--on-accent);
  font-family: var(--font-ui); border-radius: 0 0 var(--radius-sm) 0; z-index: 20;
}
.skip-link:focus { left: 0; }

/* the reusable button */
.btn {
  display: inline-block;
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600;
  padding: 0.7rem 1.2rem; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--fill { background: var(--accent); color: var(--on-accent); }
.btn--fill:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn--outline { color: var(--accent); border-color: var(--accent); background: none; }
.btn--outline:hover { color: var(--accent-strong); border-color: var(--accent-strong); }

/* ============================ header + nav ============================ */
.site-header { background: var(--bg); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 15; }
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1rem;
}
.site-logo { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--text); }
.site-logo__name { font-family: var(--font-serif); font-weight: 600; font-size: 1.4rem; letter-spacing: -0.01em; }
.site-logo__tagline {
  font-family: var(--font-ui); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.17em; text-transform: uppercase; color: var(--text-soft); margin-top: 0.15rem;
}

.header-controls { display: flex; align-items: center; gap: 0.5rem; order: 3; }

.theme-toggle {
  font-family: var(--font-ui); color: var(--text-soft);
  width: 2.2rem; height: 2.2rem; padding: 0; line-height: 1;
  background: transparent; border: 1px solid var(--hair); border-radius: 50%;
  cursor: pointer; font-size: 0.95rem;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle__icon::before { content: "\263E"; }              /* ☾ → switch to dark */
:root[data-theme="dark"] .theme-toggle__icon::before { content: "\2600"; }   /* ☀ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__icon::before { content: "\2600"; }
}

.nav-toggle {
  font-family: var(--font-ui); font-weight: 500; color: var(--text);
  padding: 0.5rem 0.8rem; background: transparent;
  border: 1px solid var(--hair); border-radius: var(--radius-sm); cursor: pointer;
}

.site-nav { display: none; width: 100%; }
body.nav-open .site-nav { display: block; }
.site-nav__list {
  list-style: none; margin: 0; padding: 0.5rem 0 0;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.site-nav__link {
  display: block; padding: 0.5rem 0; text-decoration: none;
  font-family: var(--font-ui); font-size: 0.95rem; font-weight: 500; color: var(--text-soft);
}
.site-nav__link:hover { color: var(--accent); }
.site-nav__link--active { color: var(--accent); font-weight: 600; }

/* ============================ generic page header ============================ */
.page-header { margin: 2.5rem 0 1.75rem; }
.page-header__title { margin: 0 0 0.3rem; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-header__lede { margin: 0; color: var(--text-soft); font-size: 1.1rem; max-width: 46ch; }

/* ============================ home: hero ============================ */
.hero { border-bottom: 1px solid var(--hair); }
.hero__inner { display: grid; grid-template-columns: 1fr; gap: 0; }
.hero__text { padding: 2.75rem 0 2.5rem; }
.hero__kicker {
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 0.9rem;
}
.hero__title { margin: 0 0 1rem; font-size: clamp(2.2rem, 6vw, 3.2rem); }
.hero__lede { margin: 0 0 1.75rem; font-size: 1.15rem; color: var(--text); max-width: 34ch; }
.hero__lede .hero__name { color: var(--accent); font-style: italic; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__media {
  position: relative; min-height: 18rem; border-radius: var(--radius);
  overflow: hidden; border-left: 5px solid var(--slate); box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }

/* ============================ home: two co-equal pillars ============================ */
.pillars { padding: 3rem 0 1rem; text-align: center; }
.pillars__eyebrow {
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft); margin: 0 0 0.4rem;
}
.pillars__heading { margin: 0 0 2rem; font-size: clamp(1.6rem, 3.5vw, 2rem); }
.pillars__inner { display: grid; gap: 1.25rem; text-align: left; }
.pillar { border-radius: var(--radius); padding: 1.9rem 1.9rem 1.7rem; border: 1px solid var(--hair); }
.pillar--commissions { background: var(--tint-slate); }
.pillar--catalog { background: var(--tint-petrol); }
.pillar__eyebrow {
  font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 0.6rem;
}
.pillar--commissions .pillar__eyebrow { color: var(--accent-2); }
.pillar--catalog .pillar__eyebrow { color: var(--accent); }
.pillar__title { margin: 0 0 0.6rem; font-size: 1.5rem; }
.pillar__blurb { margin: 0 0 1.2rem; color: var(--text-soft); font-size: 1.02rem; }
.pillar__cta { font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.pillar--commissions .pillar__cta { color: var(--accent-2); }
.pillar--catalog .pillar__cta { color: var(--accent); }
.pillar__cta:hover { text-decoration: underline; }

/* ============================ home: featured catalog tiles ============================ */
.featured { padding: 3rem 0 1rem; }
.featured__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.featured__title { margin: 0; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.featured__all { font-family: var(--font-ui); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
.tile {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 9.5rem; padding: 1.2rem 1.15rem; border-radius: var(--radius);
  color: #eef0ee; text-decoration: none; transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); color: #eef0ee; }
.tile__kind {
  font-family: var(--font-ui); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.82; margin: 0 0 0.5rem;
}
.tile__title { font-family: var(--font-serif); font-weight: 600; font-size: 1.2rem; line-height: 1.15; margin: 0; }
.tile__status { font-family: var(--font-ui); font-size: 0.74rem; opacity: 0.85; margin: 0.45rem 0 0; }
.tile--0 { background: var(--charcoal); }
.tile--1 { background: var(--petrol); }
.tile--2 { background: var(--slate-dk); }
.tile--3 { background: #5f7887; }

/* ============================ home: listen strip ============================ */
.listen-strip {
  margin: 3rem 0 3.5rem; padding: 1.8rem 1.9rem; border-radius: var(--radius);
  background: var(--tint-dusty); display: flex; align-items: center;
  justify-content: space-between; gap: 1.25rem; flex-wrap: wrap;
}
.listen-strip__title { margin: 0 0 0.25rem; font-size: 1.35rem; }
.listen-strip__text { margin: 0; color: var(--text-soft); font-size: 0.98rem; }

/* ============================ catalog grid ============================ */
.work-grid {
  list-style: none; margin: 0 0 3rem; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.work-card {
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.work-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.work-card__link { display: block; height: 100%; padding: 1.25rem 1.3rem 1.4rem; text-decoration: none; color: var(--text); border-top: 3px solid var(--slate); }
.work-card--publisher .work-card__link,
.work-card--arrangeme .work-card__link { border-top-color: var(--petrol); }
.work-card--free .work-card__link { border-top-color: var(--dusty); }
.work-card__title { margin: 0 0 0.35rem; font-size: 1.2rem; }
.work-card__kind { margin: 0; color: var(--text-soft); font-family: var(--font-ui); font-size: 0.85rem; }
.work-card__status {
  margin: 0.9rem 0 0; font-family: var(--font-ui); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-2);
}
.empty-state { color: var(--text-soft); padding: 2rem 0 4rem; font-size: 1.1rem; }

/* ============================ work detail ============================ */
.work-detail { padding: 2.5rem 0 3.5rem; max-width: 44rem; }
.work-detail__header { margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
.work-detail__title { margin: 0 0 0.4rem; font-size: clamp(2rem, 5vw, 2.8rem); }
.work-detail__kind { margin: 0; color: var(--text-soft); font-family: var(--font-ui); font-size: 0.95rem; }
.work-detail__description { font-size: 1.15rem; line-height: 1.65; margin-bottom: 2rem; }

.work-facets { margin: 0 0 2rem; display: grid; gap: 0.75rem; }
.work-facets__group { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: baseline; }
.work-facets__dimension {
  margin: 0; min-width: 8rem; font-family: var(--font-ui); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-soft);
}
.work-facets__values { margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.facet {
  display: inline-block; padding: 0.2rem 0.7rem; border-radius: 1rem;
  background: var(--tint-slate); color: var(--accent-2);
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 500;
}
.work-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem;
  padding-top: 1.5rem; border-top: 1px solid var(--hair);
}
.work-cta__link {
  display: inline-block; font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600;
  padding: 0.7rem 1.2rem; border-radius: var(--radius-sm); text-decoration: none;
  background: var(--accent); color: var(--on-accent); border: 1.5px solid var(--accent);
}
.work-cta__link:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.work-cta__link--publisher { background: var(--accent-2); border-color: var(--accent-2); }
.work-cta__pending,
.work-cta__soon,
.work-cta__unknown { margin: 0; color: var(--text-soft); font-style: italic; }

/* ============================ stub pages + not found ============================ */
.commissions-body, .about-body { padding-bottom: 4rem; max-width: 44rem; }
[data-placeholder] { color: var(--text-soft); font-style: italic; font-size: 1.1rem; }
.not-found { padding: 4rem 0 5rem; text-align: center; }
.not-found__title { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 0.75rem; }
.not-found__message { color: var(--text-soft); font-size: 1.1rem; }

/* ============================ footer ============================ */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 4rem; }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem; padding-block: 2.25rem;
}
.site-footer__brand { display: flex; flex-direction: column; }
.site-footer__name { font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; color: var(--footer-strong); }
.site-footer__url { font-family: var(--font-ui); font-size: 0.8rem; color: var(--footer-accent); margin-top: 0.2rem; }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer__link { color: var(--footer-text); text-decoration: none; font-family: var(--font-ui); font-size: 0.9rem; }
.site-footer__link:hover { color: var(--footer-accent); }
.site-footer__copyright {
  margin: 0; width: 100%; border-top: 1px solid var(--footer-rule); padding-top: 1.1rem;
  font-family: var(--font-ui); font-size: 0.78rem; color: var(--footer-text); opacity: 0.75;
}

/* ============================ desktop ============================ */
@media (min-width: 48em) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; order: 2; }
  .site-nav__list { flex-direction: row; gap: 1.5rem; padding: 0; align-items: center; }

  .hero__inner { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; }
  .hero__text { padding: 4rem 0; }
  .hero__media { min-height: 26rem; margin-bottom: 0; }

  .pillars__inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .btn:hover, .tile:hover, .work-card:hover { transform: none; }
}
