/* ==========================================================================
   Noah David Music
   One old vineyard painting, with the words lettered onto it.

   1. Fonts            5. Painted parts (strokes, fields, canvases, labels)
   2. Tokens + themes  6. Views (home, music, album, song, about, contact, 404)
   3. Base             7. Footer
   4. World + header   8. Motion
   ========================================================================== */

/* 1. Fonts (self-hosted; licences sit beside the files in fonts/) -------------- */
@font-face {
  font-family: "IM Fell Double Pica";
  src: url("../fonts/im-fell-double-pica-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IM Fell Double Pica";
  src: url("../fonts/im-fell-double-pica-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-italic-variable.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}

/* 2. Tokens ------------------------------------------------------------------ */
:root {
  /* Noah's palette, exactly as chosen */
  --sage:  #4f6c40;
  --vine:  #2d6826;
  --plum:  #5d3d54;
  --bark:  #4d3020;   /* dark brown */
  --earth: #5c4033;   /* warm brown */

  /* Added only for legibility and depth */
  --parchment:     #ecdcbb;  /* text on the dark ground */
  --parchment-dim: #cbb793;  /* secondary text */
  --umber:         #1d130c;  /* deepest ground */
  --umber-2:       #281a11;  /* raised ground */
  --ink:           #24160d;  /* text on parchment */

  /* Album theme. These are the defaults (Sour Grape(s)); js/theme.js overwrites
     them from the "theme" block of the current album in js/albums.js. */
  --field:      #5d3d54;                 /* the big painted colour field */
  --field-deep: #3d2637;                 /* its shadow side */
  --field-ink:  #f1e3c8;                 /* text on the field */
  --field-2:    #4f6c40;                 /* second field: sage, deepening into vine green */
  --field-2-deep:#2d6826;
  --field-2-ink:#fbf2de;
  --accent:     #dcc0d2;                 /* small accents on the dark ground */
  --glaze:      rgba(93, 61, 84, 0.20);  /* tint laid over the painting */

  --serif: "IM Fell Double Pica", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans:  "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 34rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

/* Colours that glide when the theme changes (album pages carry their own). */
@property --field      { syntax: "<color>"; inherits: true; initial-value: #5d3d54; }
@property --field-deep { syntax: "<color>"; inherits: true; initial-value: #3d2637; }
@property --field-2    { syntax: "<color>"; inherits: true; initial-value: #4f6c40; }
@property --field-2-deep { syntax: "<color>"; inherits: true; initial-value: #2d6826; }
@property --accent     { syntax: "<color>"; inherits: true; initial-value: #dcc0d2; }
@property --glaze      { syntax: "<color>"; inherits: true; initial-value: rgba(93, 61, 84, 0.2); }

/* 3. Base ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--umber);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 100%;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--earth) var(--umber);
  scroll-padding-top: 5rem;
  transition: --field 0.7s ease, --field-deep 0.7s ease, --field-2 0.7s ease, --field-2-deep 0.7s ease, --accent 0.7s ease, --glaze 0.7s ease;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: clip;
  font-size: 1.0625rem;
  font-weight: 400;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  /* the umber ground is never flat: a slow drift from raised to deep */
  background:
    radial-gradient(120% 70% at 20% 0%, var(--umber-2) 0%, transparent 70%),
    var(--umber);
}
main { flex: 1 0 auto; position: relative; z-index: 1; }
main:focus { outline: none; }

::selection { background: var(--field); color: var(--field-ink); }

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  text-wrap: balance;
}
p { text-wrap: pretty; }
i, em, cite { font-style: italic; }
abbr[title] { text-decoration: none; }

a { color: inherit; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }

:focus-visible {
  outline: 2px solid var(--parchment);
  outline-offset: 4px;
  border-radius: 2px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 72rem);
  margin-inline: auto;
}

.skip {
  position: absolute; left: var(--gutter); top: 0.75rem; z-index: 60;
  padding: 0.6rem 1rem;
  background: var(--parchment); color: var(--ink);
  font-weight: 600; text-decoration: none;
  transform: translateY(-300%);
}
.skip:focus { transform: none; outline-color: var(--parchment); }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* running text */
.lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.05rem + 0.75vw, 1.5625rem);
  line-height: 1.42;
  max-width: 36rem;
}
.link {
  display: inline-block; padding-block: 0.625rem; /* a 44px target; inline-block keeps the spaces around italic titles */
  font-weight: 550;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.26em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.link:hover { color: var(--accent); text-decoration-color: currentColor; }
.field .link { text-decoration-color: currentColor; }
.field .link:hover { color: #fff8e6; }

.page-title {
  font-size: clamp(2.75rem, 1.6rem + 5vw, 5rem);
  letter-spacing: -0.012em;
  line-height: 1;
}
.page-title:focus { outline: none; }

/* a small, honest marker for text that is still a placeholder */
.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.75rem; font-weight: 600; line-height: 1;
  letter-spacing: 0.01em;
  padding: 0.3em 0.55em 0.32em;
  border: 1px dashed currentColor;
  border-radius: 2px;
  vertical-align: 0.12em;
  white-space: nowrap;
}
.tag--todo { color: var(--accent); margin-right: 0.35em; }
.label .tag--todo { color: var(--plum); }

/* Scripture is set as scripture: verse numbers in the margin, the reference beneath. */
.scripture { font-family: var(--serif); }
.scripture p + p { margin-top: 0.5em; }
.scripture footer {
  margin-top: 1.1em;
  font-family: var(--sans);
  font-size: 0.875rem; font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--parchment-dim);
}
.scripture cite { font-style: normal; }
.vnum {
  font-family: var(--sans);
  font-size: 0.42em; font-weight: 650;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--accent);
  vertical-align: 0.95em;
  margin-right: 0.5em;
  user-select: none;
}

/* 4. World + header ---------------------------------------------------------- */
/* The painting hangs from the top right corner and dissolves into the ground. */
.world {
  position: absolute; top: 0; right: 0; z-index: 0;
  width: min(62vw, 58rem);
  aspect-ratio: 1212 / 1684;
  max-height: 100%;          /* never taller than the page, so short pages do not grow a blank tail */
  pointer-events: none;
  overflow: hidden;
  transform-origin: 100% 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 22%, #000 46%), linear-gradient(to bottom, #000 58%, transparent 96%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 22%, #000 46%), linear-gradient(to bottom, #000 58%, transparent 96%);
  mask-composite: intersect;
  transition: opacity 0.9s var(--ease-out);
}
.world__img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 0;
  transform-origin: 62% 0;
}
.world::after {            /* the album's glaze over the varnish */
  content: ""; position: absolute; inset: 0;
  background: var(--glaze);
  mix-blend-mode: color;
}
body:not([data-route="home"]) .world { opacity: 0.4; }

/* canvas tooth over everything, like paint sitting on linen */
.weave {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: url("../assets/canvas-weave.webp") 0 0 / 192px 192px;
  opacity: 0.55;
}

.top { position: relative; z-index: 5; }
.top__in {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: clamp(1rem, 2.4vw, 1.75rem);
}
.top__home {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--parchment);
}
.mark { flex: none; color: var(--accent); transition: transform 0.5s var(--ease-out); transform-origin: 55% 12%; }
.top__home:hover .mark { transform: rotate(-9deg); }
.top__name {
  font-family: var(--serif); font-size: 1.375rem; line-height: 1; white-space: nowrap;
  transition: opacity 0.4s ease;
}
body[data-route="home"] .top__name { opacity: 0; }   /* the masthead already says it */

.nav ul { display: flex; gap: clamp(0.25rem, 2vw, 1.5rem); }
.nav a {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 0.6rem;
  font-size: 1rem; font-weight: 550;
  text-decoration: none;
  color: var(--parchment);
}
.nav a::after {            /* one short brush mark under the page you are on */
  content: ""; position: absolute; left: 0.3rem; right: 0.1rem; bottom: 0.42rem; height: 0.42rem;
  background: var(--accent);
  -webkit-mask: url("../assets/stroke-2.webp") center / 100% 100% no-repeat;
  mask: url("../assets/stroke-2.webp") center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.45s var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { clip-path: inset(0 0 0 0); }

/* 5. Painted parts ----------------------------------------------------------- */
/* 5a. Brush-stroke button: one loaded stroke of parchment paint */
.stroke-btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem;
  padding: 0.8rem 3.1rem 0.85rem 1.75rem;
  font-family: var(--sans); font-size: 1rem; font-weight: 650; line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}
.stroke-btn::before, .stroke-btn::after {
  content: ""; position: absolute; inset: -0.15rem -0.5rem; z-index: -1;
  -webkit-mask: url("../assets/stroke.webp") center / 100% 100% no-repeat;
  mask: url("../assets/stroke.webp") center / 100% 100% no-repeat;
}
.stroke-btn::before { background: var(--parchment); }
.stroke-btn::after {       /* a second pass of the brush on hover */
  background: #fff6df;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s var(--ease-out);
}
.stroke-btn:hover::after, .stroke-btn:focus-visible::after { clip-path: inset(0 0 0 0); }
.stroke-btn:active { transform: translateY(1px); }

/* 5b. Colour fields: wide areas of paint with brushed top and bottom edges */
.field {
  --f: var(--field); --f-low: var(--field-deep); --f-ink: var(--field-ink);
  --edge: clamp(2.75rem, 6vw, 5.25rem);
  position: relative; z-index: 1;
  color: var(--f-ink);
  padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(4rem, 8vw, 7rem);
  margin-block: calc(var(--edge) + clamp(1rem, 3vw, 2.5rem));
}
.field::before {           /* the paint itself, running past the box into both ragged edges */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: calc(-1 * var(--edge)); bottom: calc(-1 * var(--edge));
  background:
    url("../assets/wash.webp") 0 0 / 720px auto,
    linear-gradient(180deg, var(--f) 0%, var(--f) 42%, var(--f-low) 128%);
  -webkit-mask:
    url("../assets/brush-edge-top.webp") 30% 0 / auto var(--edge) repeat-x,
    url("../assets/brush-edge-bottom.webp") 70% 100% / auto var(--edge) repeat-x,
    linear-gradient(#000, #000) 0 calc(var(--edge) - 1px) / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat;
  mask:
    url("../assets/brush-edge-top.webp") 30% 0 / auto var(--edge) repeat-x,
    url("../assets/brush-edge-bottom.webp") 70% 100% / auto var(--edge) repeat-x,
    linear-gradient(#000, #000) 0 calc(var(--edge) - 1px) / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat;
}
.field--links { --f: var(--field-2); --f-low: var(--field-2-deep); --f-ink: var(--field-2-ink); }
.field :focus-visible { outline-color: var(--f-ink); }
.field ::selection { background: var(--parchment); color: var(--ink); }

/* 5c. Canvases: anything that is a picture hangs in a dark wood frame */
.canvas {
  display: block; position: relative;
  padding: clamp(0.5rem, 1vw, 0.8rem);
  background:
    url("../assets/wash.webp") 0 0 / 420px auto,
    linear-gradient(140deg, #6b4c3b 0%, var(--earth) 18%, var(--bark) 58%, #382212 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 204, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 1.6rem 2.6rem -1.3rem rgba(6, 3, 1, 0.85),
    0 0.2rem 0.5rem rgba(6, 3, 1, 0.45);
  transform-origin: 50% -6%;
  transition: transform 0.9s var(--ease-out);
}
.canvas img {
  width: 100%;
  box-shadow: 0 0 0 1px rgba(8, 4, 2, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}
a.canvas { text-decoration: none; }
a.canvas:hover, a:hover > .canvas { transform: rotate(-0.7deg); }   /* it hangs from one nail */
a.canvas:focus-visible { outline-offset: 6px; }

/* 5d. Wall labels: the parchment card beside a picture in a gallery */
.label {
  background: linear-gradient(rgba(236, 220, 187, 0.5), rgba(236, 220, 187, 0.5)), url("../assets/wash.webp") 40px 60px / 520px auto, var(--parchment);
  color: var(--ink);
  padding: 0.95rem 1.15rem 1.05rem;
  font-size: 0.9375rem; line-height: 1.45;
  box-shadow: 0 0.5rem 1rem -0.55rem rgba(6, 3, 1, 0.8), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}
.label__title { font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; }
.label__meta { margin-top: 0.35rem; font-weight: 600; }
.label__note { margin-top: 0.15rem; color: #5a4433; }
.label :focus-visible { outline-color: var(--ink); }
.label ::selection { background: var(--bark); color: var(--parchment); }

/* "soon" items: named, but plainly not links yet */
.soon { color: var(--parchment-dim); }

/* 6. Views --------------------------------------------------------------------- */
.js .view { display: none; }
.js .view.is-active { display: block; }
.view:empty { display: none; }
.view--notfound { display: none; }                          /* never part of the no-script page */
.view--notfound.is-active, .view--notfound.is-static { display: block; }
.noscript { padding-block: 1rem; color: var(--parchment-dim); font-size: 0.9375rem; }
.field noscript p { margin-top: 0.75rem; max-width: var(--measure); }

.view--music, .view--album, .view--song, .view--about, .view--contact, .view--notfound {
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(4rem, 9vw, 7rem);
}

/* 6a. Home */
.hero {
  position: relative;
  padding-top: clamp(1.5rem, 5vh, 3.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.masthead {
  font-size: clamp(3.25rem, 1.4rem + 11.6vw, 10.5rem);
  line-height: 0.86;
  letter-spacing: -0.022em;
  margin-left: -0.04em;
  color: #f3e6ca;
  filter: url("#brush");
  text-wrap: nowrap;
}
.scripture--opening {
  margin-top: clamp(1.75rem, 4.5vh, 3.25rem);
  max-width: 35rem;
  font-size: clamp(1.3125rem, 1.05rem + 1.15vw, 2rem);
  line-height: 1.36;
}
.hero__lede {
  margin-top: clamp(1.75rem, 4vh, 2.75rem);
  max-width: 31rem;
  font-family: var(--sans);
  font-size: 1.0625rem; line-height: 1.6;
  color: var(--parchment-dim);
}
.hero__go { margin-top: 1.75rem; }

.feature {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
}
.feature__cover { max-width: 30rem; width: 100%; }
.feature__title { font-size: clamp(2.75rem, 1.5rem + 5.2vw, 5.5rem); line-height: 0.98; letter-spacing: -0.015em; }
.feature__when { margin-top: 0.9rem; font-family: var(--serif); font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem); line-height: 1.25; }
.feature__sum { margin-top: 1.25rem; max-width: 31rem; }
.feature__go { margin-top: 1.9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.feature__go .soon { color: var(--f-ink); font-size: 0.9375rem; }

.who {
  display: grid; gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 23.75rem) minmax(0, 1fr);
  align-items: center;
  padding-block: 0 clamp(0.5rem, 2vw, 1.5rem);
}
.who h2 { font-size: clamp(2.125rem, 1.4rem + 3vw, 3.5rem); max-width: 13em; }
.who__text p { margin-top: 1.25rem; max-width: var(--measure); }
.canvas--portrait { max-width: 23.75rem; width: 100%; }

.field--links h2 { font-size: clamp(2.125rem, 1.4rem + 3vw, 3.5rem); }
.field--links { margin-bottom: 0; }
.who { position: relative; z-index: 2; margin-top: calc(-1 * clamp(4rem, 9vw, 8.5rem)); align-items: end; }
.who__text { padding-bottom: clamp(0rem, 3vw, 2.5rem); }

/* links block (home + contact page) */
.links { display: grid; gap: 2.25rem clamp(2rem, 5vw, 4rem); grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2.25rem; }
.links h3, .links .links__h { font-family: var(--sans); font-size: 0.9375rem; font-weight: 650; letter-spacing: 0.005em; line-height: 1.3; }
.links ul { margin-top: 0.7rem; }
.links li { font-family: var(--serif); font-size: 1.375rem; line-height: 1.5; }
.links li a { text-decoration-thickness: 0.06em; text-underline-offset: 0.22em; }
.links li a:hover { text-decoration-thickness: 0.12em; }
.links__state { font-family: var(--sans); font-size: 0.8125rem; font-weight: 550; margin-left: 0.5em; white-space: nowrap; }
.links__note { margin-top: 0.7rem; font-size: 0.9375rem; max-width: 22rem; }
.links__mail { font-family: var(--serif); font-size: 1.375rem; line-height: 1.4; margin-top: 0.7rem; overflow-wrap: anywhere; }

/* 6b. Music: three canvases on the wall */
.music__intro { margin-top: 1.25rem; color: var(--parchment); }
.gallery {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  display: grid; gap: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  grid-template-areas: "a b" "a c" "a .";
  grid-template-rows: auto auto 1fr;
  align-items: start;
}
.hang { display: grid; gap: 1rem; align-content: start; }
.hang:nth-child(1) { grid-area: a; }
.hang:nth-child(2) { grid-area: b; }
.hang:nth-child(3) { grid-area: c; }
.hang:nth-child(n+2) { grid-template-columns: minmax(0, 13.5rem) minmax(0, 1fr); align-items: end; gap: 1.1rem; }
.hang .label { justify-self: start; min-width: 12rem; max-width: 22rem; }
.hang:nth-child(n+2) .label { min-width: 0; }
.hang:nth-child(n+2) .label__title { font-size: 1.25rem; }
.label__title a { text-decoration: none; }
.label__title a:hover { text-decoration: underline; text-decoration-thickness: 0.06em; }

/* 6c. Album */
.crumbs { font-size: 0.9375rem; font-weight: 500; color: var(--parchment-dim); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.15rem 0; }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 0.6rem; opacity: 0.6; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 0.25em; }
.crumbs a:hover { color: var(--parchment); }

.album__grid {
  margin-top: clamp(1rem, 3vw, 2rem);
  display: grid; gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
}
.album__side { position: sticky; top: 2rem; display: grid; gap: 1rem; }
.album__side .label { justify-self: start; }
.album__title { font-size: clamp(3rem, 1.6rem + 5.6vw, 5.75rem); line-height: 0.96; letter-spacing: -0.015em; }
.album__when { margin-top: 0.9rem; font-family: var(--serif); font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem); line-height: 1.25; color: var(--accent); }
.album__sum { margin-top: 1.4rem; max-width: var(--measure); }
.album h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem); margin-top: clamp(2.75rem, 5vw, 3.75rem); }
.album .scripture { margin-top: 2rem; max-width: 33rem; font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.5rem); line-height: 1.4; }

.threads { margin-top: 1.5rem; display: grid; gap: 1.5rem; max-width: var(--measure); }
.threads h3 { font-size: 1.4375rem; line-height: 1.15; }
.threads p { margin-top: 0.3rem; color: var(--parchment-dim); }

.album__hear { margin-top: 1.1rem; max-width: var(--measure); color: var(--parchment-dim); }
.album__hear strong { color: var(--parchment); font-weight: 600; }

.tracks__note { margin-top: 0.75rem; max-width: var(--measure); color: var(--parchment-dim); font-size: 0.9375rem; }
.tracks { margin-top: 1.25rem; border-top: 1px solid var(--earth); }
.tracks li { border-bottom: 1px solid var(--earth); }
.tracks a {
  display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; align-items: baseline; gap: 0.25rem 0.75rem;
  padding: 0.95rem 0.6rem 0.95rem 0.35rem;
  text-decoration: none;
  transition: background-color 0.25s ease;
}
.tracks a:hover { background: rgba(236, 220, 187, 0.07); }
.tracks__n { font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums lining-nums; color: var(--accent); }
.tracks__t { font-family: var(--serif); font-size: 1.4375rem; line-height: 1.2; }
.tracks a:hover .tracks__t { text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.2em; }
.tracks__k { font-size: 0.875rem; color: var(--parchment-dim); text-align: right; }

.empty {
  margin-top: 2rem; max-width: var(--measure);
  padding: 1.5rem 1.6rem 1.6rem;
  border: 1px dashed var(--earth);
}
.empty h2 { margin-top: 0; }
.empty p { margin-top: 0.6rem; color: var(--parchment-dim); }
.empty p:last-child { margin-top: 1.1rem; color: var(--parchment); }

/* 6d. Song: liner notes */
.song__head { margin-top: clamp(1rem, 3vw, 2rem); }
.song__title { font-size: clamp(2.75rem, 1.6rem + 5vw, 5rem); line-height: 1; letter-spacing: -0.012em; }
.song__where { margin-top: 0.9rem; color: var(--parchment-dim); }
.song__where .tag { margin-left: 0.5em; }
.song__grid {
  margin-top: clamp(2.25rem, 5vw, 3.75rem);
  display: grid; gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 24rem) minmax(0, 1fr);
  align-items: start;
}
.behind { position: sticky; top: 2rem; }
.behind.label { padding: 1.5rem 1.6rem 1.7rem; font-size: 1rem; line-height: 1.6; }
.behind h2 { font-size: 1.75rem; }
.behind__part + .behind__part { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(77, 48, 32, 0.28); }
.behind h2 + .behind__part { margin-top: 1.1rem; }
.behind .scripture { font-size: 1.3125rem; line-height: 1.4; }
.behind .scripture footer { color: #5a4433; }
.behind__story p + p { margin-top: 0.9em; }
.behind figure img { width: 100%; box-shadow: 0 0 0 1px rgba(36, 22, 13, 0.35); }
.behind figcaption { margin-top: 0.6rem; font-size: 0.875rem; color: #5a4433; }

.lyrics h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem); }
.lyrics__body { margin-top: 1.4rem; font-size: 1.125rem; line-height: 1.75; max-width: 38rem; }
.lyrics__body .l { display: block; padding-left: 1.5em; text-indent: -1.5em; }   /* a long line turns over with a hanging indent */
.lyrics__body p + p, .lyrics__body p + h3, .lyrics__body h3 + p { margin-top: 1.4em; }
.lyrics__body h3 + p { margin-top: 0.35em; }
.lyrics__body h3 {
  font-family: var(--sans); font-size: 0.875rem; font-weight: 650; line-height: 1.4;
  color: var(--accent);
}

.pager {
  margin-top: clamp(3rem, 7vw, 5rem); padding-top: 1.5rem;
  border-top: 1px solid var(--earth);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.pager a { display: grid; gap: 0.15rem; text-decoration: none; padding: 0.4rem 0; min-height: 44px; }
.pager a:last-child:not(:first-child), .pager .pager__next { text-align: right; justify-items: end; grid-column: 2; }
.pager__dir { font-size: 0.875rem; font-weight: 550; color: var(--parchment-dim); }
.pager__t { font-family: var(--serif); font-size: 1.375rem; line-height: 1.2; }
.pager a:hover .pager__t { text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.2em; }

/* 6e. About */
.view--about, .view--contact { padding-bottom: 0; }
.about__top {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  display: grid; gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 21.25rem);
  align-items: start;
}
.about__intro p + p { margin-top: 1.3rem; max-width: var(--measure); }
.about h2, .about__album h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.about__album-intro, .about__faith p { margin-top: 1.1rem; max-width: var(--measure); }
.about__album .threads {
  grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none;
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
  margin-block: 2.25rem 2.5rem;
}
.about__album .threads p { color: inherit; opacity: 0.9; }
.scripture--psalm {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
  font-size: clamp(1.625rem, 1.1rem + 2.4vw, 2.875rem); line-height: 1.22;
  max-width: 22em;
}

/* 6f. Contact + 404 */
.contact .lede, .notfound .lede { margin-top: 1.4rem; }
.view--contact .field { margin-bottom: 0; }
.view--contact .links { margin-top: 0; }
.notfound { padding-block: clamp(2rem, 8vh, 6rem); }
.notfound__go { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }

/* 7. Footer --------------------------------------------------------------------- */
.foot {
  --edge: clamp(2.25rem, 5vw, 4rem);
  position: relative; z-index: 0;
  background: url("../assets/wash.webp") 0 0 / 720px auto, linear-gradient(180deg, #2f1d12, #21150d);
  margin-top: var(--edge);
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 5vw, 3.5rem);
}
.foot::before {            /* the dark band is brushed on too */
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: var(--edge);
  background: #2f1d12;
  -webkit-mask: url("../assets/brush-edge-top.webp") 82% 0 / auto 100% repeat-x;
  mask: url("../assets/brush-edge-top.webp") 82% 0 / auto 100% repeat-x;
}
/* on pages that end in a colour field, that field's own ragged edge lands on the footer */
body[data-route="home"] .foot, body[data-route="contact"] .foot { margin-top: 0; padding-top: calc(clamp(3rem, 7vw, 5rem) + 3rem); }
body[data-route="home"] .foot::before, body[data-route="contact"] .foot::before { display: none; }
.scripture--foot { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem); line-height: 1.3; max-width: 26em; }
body[data-route="about"] .scripture--foot { display: none; }   /* the About page already ends on it */
.foot__cols {
  margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.5rem;
  border-top: 1px solid var(--bark);
  display: grid; grid-template-columns: auto minmax(0, 34rem); justify-content: space-between; gap: 1.5rem 3rem;
}
body[data-route="about"] .foot__cols { margin-top: 0; padding-top: 0; border-top: 0; }
.foot__nav ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.foot__nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 550; text-decoration: none; }
.foot__nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.26em; }
.colophon { font-size: 0.875rem; line-height: 1.55; color: var(--parchment-dim); }
.colophon p + p { margin-top: 0.5rem; }

/* Narrow screens ----------------------------------------------------------------- */
@media (max-width: 60rem) {
  .gallery { grid-template-columns: 1fr 1fr; grid-template-areas: "a a" "b c"; grid-template-rows: none; }
  .hang:nth-child(n+2) { grid-template-columns: 1fr; align-items: start; }
  .song__grid { grid-template-columns: 1fr; }
  .behind { position: static; max-width: 34rem; }
  .about__album .threads { grid-template-columns: 1fr; }
}
@media (max-width: 45rem) {
  .world {
    width: 100%;
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 82%);
    mask-image: linear-gradient(to bottom, #000 30%, transparent 82%);
    -webkit-mask-composite: source-over; mask-composite: add;
    opacity: 0.62;
  }
  body:not([data-route="home"]) .world { opacity: 0.3; }
  .top__name { font-size: 1.1875rem; white-space: nowrap; }
  .masthead { filter: url("#brush-sm"); }
  .feature, .who, .album__grid, .about__top { grid-template-columns: 1fr; }
  .feature__cover, .canvas--portrait { max-width: min(100%, 22rem); }
  .album__side { position: static; }
  .album__side .canvas { max-width: 24rem; }
  .about__portrait { order: -1; max-width: 16rem; }
  .links { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c"; }
  .top__in { gap: 0.5rem; }
  .top__home { gap: 0.45rem; }
  .mark { width: 22px; height: 22px; }
  .nav ul { gap: 0; }
  .nav a { font-size: 0.9375rem; padding-inline: 0.42rem; }
  .nav li:last-child a { padding-right: 0; }
  .nav a::after { left: 0.2rem; right: 0; }
  .hang:nth-child(n+2) { grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); align-items: end; }
  .foot__cols { grid-template-columns: 1fr; }
  .tracks a { grid-template-columns: 2.25rem minmax(0, 1fr); }
  .tracks__k { grid-column: 2; text-align: left; }
  .pager { grid-template-columns: 1fr; }
  .pager a:last-child:not(:first-child), .pager .pager__next { grid-column: 1; }
}
@media (max-width: 22.4rem) {       /* very small phones: the grape mark alone is the way home */
  .top__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* 8. Motion ------------------------------------------------------------------- */
/* One authored moment: on first load the painting comes up out of the ground and
   the lettering bleeds in after it. Everything is visible by default; these only
   describe where it comes from. */
@keyframes paint-up   { from { opacity: 0; filter: blur(18px) saturate(0.3); transform: scale(1.04); } }
@keyframes bleed-in   { from { opacity: 0; filter: blur(7px); } }
@keyframes letter-in  { from { opacity: 0; letter-spacing: 0.02em; } }
@keyframes view-in    { from { opacity: 0; } }
@keyframes sway       { from { transform: rotate(-0.45deg); } to { transform: rotate(0.45deg); } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .world__img { animation: sway 17s ease-in-out infinite alternate; }

  .is-first .world { animation: paint-up 2.2s var(--ease-out) both; }
  .is-first .masthead { animation: letter-in 1.5s var(--ease-out) 0.25s both; }
  .is-first .scripture--opening p,
  .is-first .scripture--opening footer,
  .is-first .hero__lede,
  .is-first .hero__go { animation: bleed-in 1.3s var(--ease-out) both; }
  .is-first .scripture--opening p:nth-child(1) { animation-delay: 0.7s; }
  .is-first .scripture--opening p:nth-child(2) { animation-delay: 1.05s; }
  .is-first .scripture--opening footer { animation-delay: 1.35s; }
  .is-first .hero__lede { animation-delay: 1.55s; }
  .is-first .hero__go { animation-delay: 1.7s; }

  .js .view.is-active:not(.is-initial) { animation: view-in 0.45s ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  html { transition: none; }
  .world, .canvas, .mark, .stroke-btn::after, .nav a::after { transition: none; }
}

/* Fallback when the brush masks cannot load (page opened from a folder, see index.html) */
.no-mask .field::before, .no-mask .stroke-btn::before, .no-mask .stroke-btn::after,
.no-mask .nav a::after { -webkit-mask: none; mask: none; }
.no-mask .nav a::after { height: 2px; bottom: 0.5rem; }
.no-mask .foot::before { display: none; }

/* Print: just the words */
@media print {
  .world, .weave, .top, .foot__nav, .skip { display: none; }
  html, body, .field, .foot { background: #fff; color: #000; }
}
