/* ==========================================================================
   PolishJazz.com - the layer behind the front door
   Ground: printing-ink black. Colour arrives only from the sleeves.
   Each record page sets --accent / --accent-alt from its own cover.
   ========================================================================== */

:root {
  --ink:        #12100E;   /* warm near-black - printing ink, not device black */
  --ink-2:      #1C1917;   /* raised surfaces */
  --rule:       #332F2B;
  --paper:      #F2EEE8;   /* uncoated stock, for type */
  --paper-dim:  #A39C93;
  --accent:     #E8368F;   /* overridden per record */
  --accent-alt: #37B26B;

  --display: "Helvetica Neue", "Arial Narrow", Helvetica, Arial, sans-serif;
  --body:    Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype",
             Palatino, Georgia, serif;
  --mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
             "Liberation Mono", monospace;

  --measure: 34rem;
  --gutter:  clamp(1.25rem, 5vw, 5rem);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: clamp(1.02rem, 0.96rem + 0.28vw, 1.18rem);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* --- shared shell --------------------------------------------------------- */

.wrap { max-width: 78rem; margin: 0 auto; padding-inline: var(--gutter); }

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-block: 1.2rem;
  font-family: var(--mono);
  font-size: clamp(0.66rem, 0.6rem + 0.3vw, 0.74rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-dim);
  border-bottom: 1px solid var(--rule);
}
/* Breadcrumb is a convenience, not the only route home - shed it when tight */
@media (max-width: 26rem) {
  .topbar .crumb { display: none; }
}
.topbar a { text-decoration: none; }
.topbar a:hover { color: var(--accent); }

.langs { display: flex; gap: 0.9rem; }
.langs [aria-current="true"] { color: var(--paper); }

/* --- masthead ------------------------------------------------------------- */

.masthead { padding-block: clamp(2.5rem, 8vw, 6rem) clamp(2rem, 5vw, 4rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4rem;
}

.artist {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.6rem);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0 0 0.35rem;
  color: var(--paper-dim);
}

.record-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.2rem, 1rem + 11vw, 9rem);
  letter-spacing: -0.045em;
  line-height: 0.86;
  margin: 0;
  /* the one flourish: title split across the sleeve's two colours */
  /* hard split, no blend - the sleeve's two inks, not a gradient */
  background: linear-gradient(to right, var(--accent) 0 52%, var(--accent-alt) 52% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- the plate (cover) ---------------------------------------------------- */

.plate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-bottom: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 52rem) {
  .plate-row { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

.plate {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.plate img { width: 100%; height: 100%; object-fit: cover; }

/* Placeholder when no sleeve image is on file - designed, not broken */
.plate--empty {
  display: grid;
  align-content: center;
  gap: 0.7rem;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  font-family: var(--mono);
  border-color: var(--accent);
}
.plate--empty span { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-dim); }
.plate--empty strong { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 400; color: var(--accent); letter-spacing: -0.01em; }

/* --- metadata rail -------------------------------------------------------- */

.facts { margin: 0; font-family: var(--mono); font-size: 0.84rem; line-height: 1.5; }
.facts > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-block: 0.62rem;
  border-bottom: 1px solid var(--rule);
}
.facts dt { color: var(--paper-dim); letter-spacing: 0.09em; text-transform: uppercase; font-size: 0.72rem; }
.facts dd { margin: 0; }

/* --- essay ---------------------------------------------------------------- */

.essay { max-width: var(--measure); }
.essay p { margin: 0 0 1.35em; }
.essay p:first-of-type { font-size: 1.16em; line-height: 1.5; }
.essay p:first-of-type::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 700;
  font-size: 3.1em;
  line-height: 0.78;
  padding: 0.06em 0.1em 0 0;
  color: var(--accent);
}
.essay em { color: var(--paper); }

/* --- sections ------------------------------------------------------------- */

.band { padding-block: clamp(2.2rem, 6vw, 4rem); border-top: 1px solid var(--rule); }

.band h2 {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin: 0 0 1.5rem;
}

.lineup { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 0.9rem; }
/* flex so wrapped names hang under the text, not under the marker */
.lineup li { display: flex; gap: 0.8rem; padding-block: 0.42rem; border-bottom: 1px solid var(--rule); }
.lineup li::before { content: ""; flex: 0 0 auto; width: 0.5rem; height: 0.5rem; margin-top: 0.42em; background: var(--accent-alt); }

.tracks { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.tracks li {
  counter-increment: t;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--display);
  font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.5rem);
  letter-spacing: -0.01em;
}
.tracks li::before {
  content: counter(t, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.tracks .dur { margin-left: auto; font-family: var(--mono); font-size: 0.8rem; color: var(--paper-dim); }

/* --- listen --------------------------------------------------------------- */

.links { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.links a {
  display: inline-block;
  padding: 0.72rem 1.3rem;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.18s, color 0.18s, background-color 0.18s;
}
.links a:hover { border-color: var(--accent); color: var(--ink); background: var(--accent); }

.note {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--paper-dim);
  border-left: 2px solid var(--accent-alt);
  padding-left: 1rem;
  margin-top: 1.6rem;
  max-width: var(--measure);
}

/* --- index grid ----------------------------------------------------------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.card { border: 1px solid var(--rule); padding: 1.3rem; text-decoration: none; display: block; height: 100%; transition: border-color 0.18s, transform 0.18s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .c-year { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; color: var(--accent); }
.card .c-artist { font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; margin-top: 0.6rem; color: var(--paper-dim); }
.card .c-title { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1.05; margin-top: 0.15rem; }
.card .c-label { font-family: var(--mono); font-size: 0.74rem; color: var(--paper-dim); margin-top: 0.9rem; }

.rows { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.86rem; }
.rows th { text-align: left; font-weight: 400; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); padding-block: 0.7rem; border-bottom: 1px solid var(--rule); }
.rows td { padding-block: 0.72rem; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.rows tr:hover td { color: var(--accent); }

/* --- footer --------------------------------------------------------------- */

.foot {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--paper-dim);
}
.foot a { text-decoration: none; }

/* --- the threshold -------------------------------------------------------- */
/* One orchestrated moment: the page arrives desaturated and resolves into
   the sleeve's colour. Justified by the site's concept, used exactly once.  */

@media (prefers-reduced-motion: no-preference) {
  .oz { animation: oz-in 1100ms cubic-bezier(0.22, 0.61, 0.36, 1) both; }
  @keyframes oz-in {
    from { filter: saturate(0) contrast(1.15); opacity: 0.55; transform: translateY(10px); }
    to   { filter: none; opacity: 1; transform: none; }
  }
  .oz-late { animation-delay: 260ms; }
}

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

/* ==========================================================================
   Main site pages (listen, story, reviews, podcasts, contact)
   House colours are red + bone; record pages override with sleeve colours.
   ========================================================================== */

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: 140px; height: auto; }
.brand:hover img { opacity: 0.75; }

.sitenav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.sitenav a { text-decoration: none; white-space: nowrap; }
.sitenav a[aria-current="page"] { color: var(--accent); }

/* topbar carries the logo now, so let it breathe and wrap sanely */
.topbar:has(.brand) { align-items: center; padding-block: 1.6rem; }
@media (max-width: 44rem) {
  .topbar:has(.brand) { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .brand img { width: 120px; }
}

/* --- long-form content ---------------------------------------------------- */

.prose { padding-bottom: clamp(2rem, 6vw, 4rem); }

.prose > .band:first-child { border-top: 0; padding-top: 0; }

.prose p { max-width: var(--measure); margin: 0 0 1.3em; }

.prose h2 {
  margin-top: clamp(2.2rem, 5vw, 3.4rem);
  padding-top: clamp(1.4rem, 3vw, 2rem);
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin: 0 0 1.4rem;
}

/* Section headings inside the story pages read as chapter marks */
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.prose h3, .entry-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 1rem + 1.6vw, 2.1rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.entry {
  padding-block: clamp(1.6rem, 4vw, 2.6rem);
  border-top: 1px solid var(--rule);
}
.entry:first-of-type { border-top: 0; padding-top: 0; }
.entry-title a { text-decoration: none; }
.entry-title a:hover { color: var(--accent); }

/* An era marker in the story: the years become the structural device */
.prose h3::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 0.9rem;
}
.entry-title::before { display: none; }

/* Inline link runs (Apple | Spotify) read as buttons */
.prose p > a[href^="https://podcasts."],
.prose p > a[href^="https://open.spotify"],
.prose p > a[href^="https://music.apple"] {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.3rem 0.4rem 0.3rem 0;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.18s, color 0.18s, background-color 0.18s;
}
.prose p > a[href^="https://podcasts."]:hover,
.prose p > a[href^="https://open.spotify"]:hover,
.prose p > a[href^="https://music.apple"]:hover {
  border-color: var(--accent); background: var(--accent); color: var(--ink);
}

.prose a { color: var(--paper); text-decoration-color: var(--accent); }
.prose a:hover { color: var(--accent); }

.social { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 0.9rem; }
.social a { text-decoration: none; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.72rem; }
.social a:hover { color: var(--accent); }
