/* The Kings of Hearts / The New Olds
   Shared stylesheet. No framework, no build step. */

@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&family=Playfair+Display:ital,wght@1,900&family=Space+Mono:wght@400;700&family=Caveat:wght@700&display=swap");
/* Caveat is a TEMP stand-in for the Canva script used for ages. Swap it here and in --font-age. */


/* ---------- Tokens ---------- */

:root {
  /* Colors, sampled from the finished covers. */
  --cream: #FCF6EA;   /* "NEW" on the front, sampled from the dirt road */
  --gold: #EDAB20;    /* "Old" on both covers, sampled from the soybeans */
  --maroon: #5D181A;  /* "NEW" on the back, sampled from the old brick */
  --green: #30362F;   /* tree line, front cover */
  --ink: #202420;     /* tree line shadows, near-black */

  --panel: rgba(252, 246, 234, 0.84); /* cream, translucent. Keep in step with --cream. */

  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-italic: "Playfair Display", Georgia, serif;
  --font-body: "Libre Caslon Text", Georgia, serif;
  --font-mono: "Space Mono", ui-monospace, "Courier New", monospace;
  --font-age: "Caveat", cursive; /* TEMP. Ages only. */

  --gutter: clamp(20px, 5vw, 72px);
  --page: 76rem;
  --measure: 34rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 2rem;
  --space-4: 4rem;
  --space-5: clamp(5rem, 12vw, 10rem);
}


/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--maroon);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  /* Keeps the footer at the bottom on short pages. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease;
}
a:hover,
a:focus-visible { color: var(--gold); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

::selection {
  background: var(--gold);
  color: var(--cream);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: var(--measure); }

.section { margin-top: var(--space-5); }

/* Full-bleed image. Breaks out of .wrap. */
.bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.bleed img {
  width: 100%;
  object-fit: cover;
}

/* Text on a photo. Soft translucent cream, like the back cover. */
.over-photo {
  position: relative;
}
.over-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.panel {
  background: var(--panel);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: var(--space-3);
  max-width: var(--measure);
}


/* ---------- Type roles ---------- */

/* Mono label: small caps, tracked wide. Section labels, verse/chorus, metadata. */
.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.7;
}

.meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  line-height: 1.7;
}

/* Band name in small type. Set like the front cover, in dark green. */
.band {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--green);
}

/* Ages. Handwritten, gold. Nothing else uses this face. */
.age {
  font-family: var(--font-age);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}


/* ---------- Header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  padding-top: var(--space-3);
}

.site-header .band:hover,
.site-header .band:focus-visible { color: var(--gold); }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
}
.nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] { color: var(--gold); }


/* ---------- Title lockup ----------
   Three stacked lines. Everything is sized in em off --lockup,
   so changing one number scales the whole thing. */

.lockup {
  --lockup: clamp(4.5rem, 24vw, 11rem);
  font-size: var(--lockup);
  font-weight: 400;
  line-height: 1;
  color: var(--maroon); /* back cover treatment: maroon NEW and s, gold Old */
}

.lockup span { display: block; }

.lockup-the {
  font-family: var(--font-mono);
  font-size: 0.16em;
  letter-spacing: 0.9em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 0.35em;
}

.lockup-new {
  font-family: var(--font-display);
  font-size: 1em;
  line-height: 0.82;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-left: -0.04em; /* optical: pulls the N onto the left edge */
}

.lockup-olds {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 900;
  font-size: 1.12em;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: -0.04em;
  margin-left: -0.03em;
  color: var(--maroon); /* the "s" */
}
.lockup-olds .old {
  display: inline;
  color: var(--gold);
}


/* ---------- Home ---------- */

.hero {
  display: grid;
  gap: var(--space-4);
  padding-top: var(--space-5);
}

.hero-cover img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--green); /* holds the square until the photo loads */
  color: transparent;     /* hides alt text if the file is missing */
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: end;
    gap: var(--space-4) clamp(3rem, 6vw, 6rem);
  }
  .lockup { --lockup: clamp(6rem, 11vw, 10rem); }
}

.byline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-top: var(--space-3);
}
.about {
  max-width: 28rem;
  margin-top: var(--space-2);
}

/* Listen button. Square, flat, no shadow. */
.button {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--maroon);
  padding: 1.1em 2.2em 1.1em 2.5em;
  transition: background 150ms ease, color 150ms ease;
}
.button:hover,
.button:focus-visible {
  background: var(--gold);
  color: var(--cream);
}


/* Before release: same shape as the button, outlined, not clickable. */
.button.is-soon {
  background: transparent;
  color: var(--maroon);
  box-shadow: inset 0 0 0 1px var(--maroon);
  cursor: default;
}
.button.is-soon:hover { background: transparent; color: var(--maroon); }

.listen-soon {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  max-width: var(--measure);
}


/* ---------- Track list ---------- */

.tracks .label { margin-bottom: var(--space-3); }

/* What the record is. Cream panel over the road from the cover, like the back cover. */
.record-note {
  background: var(--green) url("images/the-road.jpg") center / cover no-repeat;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  margin-top: var(--space-4);
}
.record-note .panel { max-width: none; }
.record-note .panel > * + * { margin-top: 1em; }

.note-ages {
  font-weight: 400;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.note-ages .age { font-size: clamp(3.5rem, 2.5rem + 4vw, 5rem); }
.note-to {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--maroon);
}
.note-sign {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--maroon);
}
.label-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--maroon);
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
}

@media (min-width: 900px) {
  .tracks {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: clamp(3rem, 5vw, 5rem);
    align-items: start;
  }
  .tracks-label { grid-column: 1 / -1; }
  .record-note { margin-top: 0; }
}

.tracklist {
  display: grid;
  gap: 0.35rem;
}

.tracklist a {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  align-items: baseline;
  column-gap: var(--space-2);
}

.tracklist .age { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.4rem); }

.tracklist .title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
  line-height: 1.3;
  color: var(--maroon);
  transition: color 150ms ease;
}
.tracklist a:hover .title,
.tracklist a:focus-visible .title { color: var(--gold); }


/* ---------- Listen links ---------- */

.listen .label { margin-bottom: var(--space-3); }

.listen-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}
.listen-links a {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
}


/* ---------- Songs page ----------
   The list is the index. Each song opens in place. */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-5);
  margin-bottom: var(--space-3);
}

.text-button {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--maroon);
  background: none;
  border: 0;
  padding: 0.25em 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
}
.text-button:hover { color: var(--gold); }

.songlist { display: grid; gap: 0.35rem; }

.song summary {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  align-items: baseline;
  column-gap: var(--space-2);
  cursor: pointer;
  list-style: none;
}
.song summary::-webkit-details-marker { display: none; }

.song .age { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.4rem); }

.song .title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
  line-height: 1.3;
  color: var(--maroon);
  transition: color 150ms ease;
}
.song summary:hover .title { color: var(--gold); }
.song summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* Plus when closed, minus when open. Drawn in CSS so no font needs the glyph. */
.toggle {
  position: relative;
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-left: 0.6em;
  vertical-align: 0.25em;
  opacity: 0.5;
}
.toggle::before,
.toggle::after {
  content: "";
  position: absolute;
  background: var(--maroon);
}
.toggle::before { left: 0; right: 0; top: calc(50% - 1px); height: 2px; }
.toggle::after { top: 0; bottom: 0; left: calc(50% - 1px); width: 2px; }
.song[open] .toggle::after { display: none; }
.nowrap { white-space: nowrap; }
.song { scroll-margin-top: var(--space-3); }

/* Lyrics hang off the title's left edge. */
.lyrics {
  padding: var(--space-2) 0 var(--space-4) calc(2.5rem + var(--space-2));
}
.song-credit {
  color: var(--ink);
  margin-bottom: var(--space-3);
  max-width: var(--measure);
}

/* Two columns on wide screens, like the lyric book. */
@media (min-width: 900px) {
  .stanzas {
    column-count: 2;
    column-gap: var(--space-4);
    max-width: 52rem;
  }
}
@media (max-width: 599px) {
  .lyrics { padding-left: 0; }
}

.stanza {
  break-inside: avoid;
  margin-bottom: var(--space-3);
}
.stanza .label {
  display: block;
  margin-bottom: 0.6rem;
}
.stanza p { line-height: 1.55; }

/* Smooth open where the browser supports it. Others just open. */
:root { interpolate-size: allow-keywords; }
.song::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 350ms ease, content-visibility 350ms allow-discrete;
}
.song[open]::details-content { block-size: auto; }

@media (prefers-reduced-motion: reduce) {
  .song::details-content { transition: none; }
}


/* ---------- Long reading: story, credits (ready for later) ---------- */

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.25em; }
.prose h2 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.2;
  margin-top: var(--space-4);
}
.prose h2 + * { margin-top: var(--space-2); }
.prose a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

/* Story */
.story-contents ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin-bottom: var(--space-4);
}
.story-contents a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}
.story-contents a:hover,
.story-contents a:focus-visible { color: var(--gold); }

.story section { scroll-margin-top: var(--space-3); }
.story section + section { margin-top: var(--space-5); }
.story h2 { margin-top: 0; }
.story section > * + * { margin-top: 1.25em; }
.story section > h2 + * { margin-top: var(--space-2); }
.memorial-section .meta { color: var(--ink); margin-top: 0.5rem; }

/* Marks unfinished text. Remove the class when the real text goes in. */
.placeholder { opacity: 0.45; font-style: italic; }

.photo { margin-block: var(--space-5); }
.photo figcaption { margin-top: var(--space-1); color: var(--ink); }
.photo.bleed figcaption { padding-inline: var(--gutter); }

/* Credits */
.credit-block {
  max-width: 44rem;
  margin-top: var(--space-4);
}
.credit-block + .credit-block { margin-top: var(--space-5); }
.credit-block > * + * { margin-top: 1.1em; }

.credit-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.7;
  margin-bottom: var(--space-3);
}

/* Top of the credits: band small, album large. */
.credit-band {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--green);
}
.credit-block > .credit-band-sub {
  margin-top: 0.4em;
  font-size: 1rem;
  color: var(--ink);
}
.credit-block > .credit-album {
  margin-top: var(--space-3);
  font-weight: 400;
  line-height: 1.1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2em 0.6em;
}
.credit-key {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--maroon);
}
.credit-album-title {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(2.25rem, 1.6rem + 2.5vw, 3.5rem);
  color: var(--maroon);
}
.credit-album + * { margin-top: var(--space-3); }

.band-italic {
  font-style: italic;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.2;
  color: var(--maroon);
}

.roster li + li { margin-top: 0.5rem; }
.roster .name { font-weight: 700; }
.roster .meta { margin-left: 0.6em; color: var(--ink); }
.photo-note { color: var(--ink); }

/* Long name lists flow into columns on wide screens. */
.names {
  columns: 2 14rem;
  column-gap: var(--space-4);
}
.names li { break-inside: avoid; padding-bottom: 0.35rem; }

.memorial-line {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  line-height: 1.5;
}
.memorial-line .meta { color: var(--ink); }

.dedication p {
  font-style: italic;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}
.dedication p + p { margin-top: 0.2em; }
.dedication .dedication-line {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  margin-top: 0.4em;
}


/* ---------- Contact ---------- */

.contact { margin-top: var(--space-3); }
.contact-email {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.contact-place {
  margin-top: var(--space-2);
  color: var(--ink);
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4);
}


/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-5);
  padding-bottom: var(--space-3);
  color: var(--ink);
  opacity: 0.85;
}


/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
