/* Cantionale — the whole stylesheet. Served with a content hash in the URL (routes/cantionale.js).
   2026-10-07, Robin: «CANTIONALE … dette kan være logoen vår … helt sånn»: Italiana capitals,
   widely spaced, the C in red. «I like the text style and how text is placed»: the serif text,
   the Italiana section titles and the single calm column stay.
   2026-10-07 (v4), Robin: «jeg liker sånn anthropic stil, sånn typewriter avis stil. men likevel
   classy og profesjonell» and «blå er fargen vår, ikke grønn». So: the serif for reading, a
   typewriter monospace for labels, meta lines, credits and numbers, headings in spaced Italiana
   capitals like the logo, thin rules and a newspaper grid on wide screens. Deep ink-blue; red is
   only the C of the logo. */

/* Italiana © 2011 Santiago Orozco, SIL Open Font License 1.1 — see italiana-OFL.txt next to this
   file. Self-hosted: the page never calls Google. `block` so the logo never jumps from a fallback. */
@font-face {
  font-family: "Italiana";
  src: url("italiana.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

/* 2026-10-07, Robin: «dette skal byttes med C-en i logoen … går det an uten at den blir et bilde på
   nettsiden og resten av bokstaven blir bokstaver?» The logo's C, as text: Cormorant Garamond Bold,
   subset to the single letter C (about 1 KB). © 2015 the Cormorant Project Authors, SIL Open Font
   License 1.1, see cormorant-OFL.txt next to this file. */
@font-face {
  font-family: "Cantionale C";
  src: url("cantionale-c.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: block;
  unicode-range: U+0043;
}

:root {
  color-scheme: light dark;
  --paper: #fafaf8;
  --raised: #ffffff;
  --ink: #111a2c;
  --soft: #5b6476;
  --rule: #dfe2e9;
  --red: #b4302a;        /* the C of the logo, nothing else */
  --blue: #1f3d8a;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, "Palatino Linotype", Palatino, serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --display: "Italiana", var(--serif);
  --measure: 42rem;
  --wide: 68rem;
  --gutter: 1.25rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #090d16;
    --raised: #111827;
    --ink: #e9ecf3;
    --soft: #98a1b4;
    --rule: #1d2536;
    --red: #e0534a;
    --blue: #8ea8f0;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--serif);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; transition: text-decoration-color 0.2s ease, color 0.2s ease; }
a:hover { text-decoration-color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -3rem; background: var(--ink); color: var(--paper); padding: 0.4rem 0.8rem; z-index: 5; }
.skip:focus { top: 0.5rem; }

/* ---- Frame ---- */
.top, .foot-in { max-width: var(--wide); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
main { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter) 4rem; }
.page-home main { max-width: var(--wide); }

/* The logo: Italiana capitals, widely spaced, the C in red. */
/* 2026-10-07, Robin: the header logo was too small and thin; Italiana's hairlines nearly vanished.
   Bigger, a little tighter, and a hairline of stroke in the ink colour so the thin strokes hold at
   header size. Italiana has one weight; the stroke is in em, so it grows with the word. */
.wordmark {
  font-family: var(--display); font-weight: 400; font-size: clamp(1.15rem, 4.6vw, 1.45rem); line-height: 1;
  letter-spacing: 0.16em; margin-right: -0.16em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; color: var(--ink);
  -webkit-text-stroke: 0.022em currentColor;
}
/* The C of the logo: a bold high-contrast serif in the ink colour, with a red copy struck behind it
   to the left and a thin gap between, like Robin's picture. The C stays a real letter, so the word
   is one piece of text for selection; the red copy is a pseudo-element (no alternative text, and the
   logo link already says «Cantionale»), cut to its left half so red only shows outside the curve.
   A shadow in the page colour on the real C makes the gap. All in em, so it scales with the word.
   Cormorant's capitals are 0.625em tall and Italiana's 0.7em: 1.16em lines the C up with the rest
   and lets it stand a touch taller. */
.wordmark .initial, .hero-mark .initial {
  position: relative; z-index: 0; display: inline-block;
  font-family: "Cantionale C", var(--serif); font-weight: 700; font-size: 1.16em; line-height: 1;
  color: var(--ink); -webkit-text-stroke: 0;
  text-shadow: -0.045em 0 0 var(--paper);
}
.wordmark .initial::before, .hero-mark .initial::before {
  content: "C";
  content: "C" / "";
  position: absolute; z-index: -1; left: -0.088em; top: 0;
  color: var(--red); text-shadow: none;
  -webkit-clip-path: inset(0 52% 0 0); clip-path: inset(0 52% 0 0);
}

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 1.25rem; padding-bottom: 1.25rem;
}
.top-wrap { border-bottom: 1px solid var(--rule); }
.top-right { display: flex; align-items: center; gap: 0.9rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.top nav { display: flex; gap: 1.1rem; }
.top nav a { text-decoration: none; color: var(--soft); padding: 0.3rem 0; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }
.top nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--blue); }
.top nav .nav-songs { display: none; }

/* Search in the top bar: an icon on a phone, a small field from tablet width. */
.top-search { display: none; }
.top-search input {
  width: 11rem; font: 0.8rem var(--mono); text-transform: none; letter-spacing: 0; color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent);
  border: 1px solid transparent; border-radius: 2px; padding: 0.42rem 0.9rem; -webkit-appearance: none; appearance: none;
  transition: width 0.25s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.top-search input::placeholder { color: var(--soft); }
.top-search input:focus { outline: none; border-color: var(--blue); background: var(--raised); width: 14rem; }
.search-icon { display: inline-flex; color: var(--soft); padding: 0.25rem; border-radius: 2px; }
.search-icon:hover { color: var(--ink); }

/* The language picker: a quiet two-letter code. */
.lang-pick { position: relative; }
.lang-pick summary {
  list-style: none; cursor: pointer; color: var(--soft); font-size: 0.8rem; letter-spacing: 0.08em;
  padding: 0.3rem 0.55rem; border: 1px solid var(--rule); border-radius: 2px; user-select: none;
}
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary:hover, .lang-pick[open] summary { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.lang-pick ul {
  position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 10; list-style: none; margin: 0; padding: 0.35rem;
  min-width: 9rem; background: var(--raised); border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: 0 12px 32px rgba(5, 12, 30, 0.14);
}
.lang-pick a { display: block; text-transform: none; letter-spacing: 0; padding: 0.45rem 0.7rem; border-radius: 3px; text-decoration: none; color: var(--ink); }
.lang-pick a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.lang-pick a[aria-current] { color: var(--blue); }

/* 2026-10-07, Robin: a fuller footer, like anthropic.com: a dark ink-blue band in both themes,
   the logo large and light, headed link groups, then a bottom row. The band sets its own colours,
   so the logo's C (its gap is drawn in --paper) sits right on it. */
.foot {
  --paper: #0b1222; --ink: #eef1f7; --soft: #9aa4b8; --rule: #222c44;
  background: var(--paper); color: var(--soft); font-family: var(--mono); font-size: 0.8rem;
  margin-top: 2rem;
}
@media (prefers-color-scheme: dark) { .foot { --paper: #04060c; --rule: #182033; border-top: 1px solid #1b2336; } }
.foot-in { padding-top: 3rem; padding-bottom: 2.4rem; }
.foot-mark { margin: 0 0 2.6rem; }
.foot-mark .wordmark { font-size: clamp(1.6rem, 7vw, 2.2rem); color: var(--ink); }
.foot-cols { display: grid; grid-template-columns: 1fr; gap: 2.2rem 2rem; }
.foot-col h2 {
  margin: 0 0 0.5rem; font-family: var(--mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
}
.foot-col ul { list-style: none; margin: 0; padding: 0; line-height: 2.25; }
.foot-col a { color: var(--soft); text-decoration: none; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom {
  margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.8rem 2rem; font-size: 0.74rem;
}
.foot-bottom p { margin: 0; }
.foot-langs { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.foot-langs a { color: var(--soft); text-decoration: none; }
.foot-langs a:hover, .foot-langs a[aria-current] { color: var(--ink); }
.foot :focus-visible { outline-color: var(--ink); }
.wordmark.small { font-size: 0.9rem; -webkit-text-stroke: 0.03em currentColor; }
/* At header and footer size the red strike needs a little more room to be seen at all. */
.wordmark .initial { text-shadow: -0.06em 0 0 var(--paper); }
.wordmark .initial::before { left: -0.12em; }

.store {
  display: inline-block; font-family: var(--mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  color: var(--paper); background: var(--ink); border-radius: 2px; padding: 0.32rem 0.9rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.store:hover { background: var(--blue); transform: translateY(-1px); }
.store.big { font-size: 0.82rem; padding: 0.85rem 1.6rem; }
.soon { font-family: var(--mono); font-size: 0.74rem; color: var(--soft); }

/* ---- Type ---- */
h1, h2 { font-weight: 600; line-height: 1.15; text-wrap: balance; }
/* Page headings in the logo's voice: Italiana capitals, spaced. */
.page-title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.14em; margin-right: -0.14em;
  font-size: clamp(1.7rem, 6.4vw, 2.6rem); line-height: 1.15; margin: 1.6rem 0 1.1rem;
  -webkit-text-stroke: 0.028em currentColor;
}
.page-title.display { font-size: clamp(2rem, 8vw, 3rem); }
.label {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--soft); margin: 2.4rem 0 0.6rem; padding-bottom: 0.45rem; border-bottom: 1px solid var(--rule);
}
.eyebrow { margin: 1.6rem 0 0; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; }
.eyebrow a { color: var(--blue); text-decoration: none; }
.eyebrow + .page-title { margin-top: 0.4rem; }
.lead { font-size: 1.2rem; line-height: 1.55; }
.facts, .subtitle { color: var(--soft); margin: 0.2rem 0; }
.subtitle { font-style: italic; }
.facts { font-family: var(--mono); font-size: 0.78rem; }
.bio { max-width: 36rem; }
.prose p { max-width: 36rem; }
.more { margin-top: 2rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.more a { text-decoration: none; color: var(--blue); }
.more a:hover { text-decoration: underline; }
.more a + a { margin-left: 1.4rem; }
.count { font-family: var(--mono); font-size: 0.78rem; color: var(--soft); margin: 0.6rem 0 0.2rem; }

/* ---- Search (the song list) ---- */
.search { margin: 0.6rem 0 1.2rem; scroll-margin-top: 1rem; }
.search-row { display: flex; gap: 0.5rem; }
.search input {
  flex: 1; min-width: 0; font: 1rem var(--mono); color: var(--ink); background: transparent;
  border: 0; border-bottom: 1.5px solid var(--rule); border-radius: 0; padding: 0.6rem 0.1rem; -webkit-appearance: none; appearance: none;
}
.search input:focus { outline: none; border-bottom-color: var(--blue); }
.search input::placeholder { color: var(--soft); opacity: 0.85; }
.search button {
  font: 500 0.74rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper); background: var(--ink); border: 0; border-radius: 2px;
  padding: 0.5rem 1.1rem; cursor: pointer; transition: background-color 0.2s ease;
}
.search button:hover { background: var(--blue); }
.search .clear { display: inline-block; margin-top: 0.4rem; font-family: var(--mono); font-size: 0.85rem; color: var(--soft); }

/* ---- Lists ---- */
.rows, .links { list-style: none; margin: 0; padding: 0; }
.rows li, .links li { border-bottom: 1px solid var(--rule); }
.rows .row, .links a {
  display: flex; align-items: baseline; gap: 0.9rem; padding: 0.7rem 0.6rem; margin: 0 -0.6rem; text-decoration: none; min-height: 2.75rem;
  border-radius: 3px; transition: background-color 0.2s ease;
}
.rows a.row:hover, .links a:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.rows a.row:hover .title, .links a:hover > span:first-child { text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 0.18em; }
.rows .t { flex: 1; min-width: 0; }
.rows .title { display: block; }
.sub { display: block; font-family: var(--mono); font-size: 0.74rem; color: var(--soft); margin-top: 0.15rem; }
.links a { justify-content: space-between; }
.links .sub { margin: 0; text-align: right; white-space: nowrap; }
.rows .n {
  flex: 0 0 2.6rem; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 0.85rem; font-weight: 400; color: var(--blue); line-height: 1.75;
}
.rows .off .title { color: var(--soft); }
.tag {
  flex: none; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--soft); border: 1px solid var(--rule); border-radius: 2px; padding: 0.05rem 0.5rem; align-self: center;
}

.letters { display: flex; flex-wrap: wrap; gap: 0.15rem; margin: 0.8rem 0 0.4rem; font-family: var(--mono); font-size: 0.82rem; }
.letters a { display: inline-block; min-width: 2.1rem; padding: 0.35rem 0; text-align: center; text-decoration: none; color: var(--soft); border-radius: 3px; }
.letters a:hover { color: var(--blue); background: color-mix(in srgb, var(--blue) 8%, transparent); }
.group { scroll-margin-top: 1rem; }
.letter { font-family: var(--display); font-size: 2rem; font-weight: 400; color: var(--blue); margin: 2rem 0 0.2rem; line-height: 1; }

.inline-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; margin: 0.4rem 0; }
.inline-links a { text-decoration: none; border-bottom: 1px solid var(--rule); padding: 0.25rem 0; }
.inline-links a:hover { border-bottom-color: var(--blue); }

/* ---- Front page: the logo, the count, the app ---- */
.hero { padding: 2.6rem 0 1.4rem; text-align: center; }
.hero-mark {
  font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 9.2vw, 5.4rem);
  line-height: 1; letter-spacing: 0.2em; margin-right: -0.2em; white-space: nowrap;
}
.hero-mark .l { display: inline-block; }
/* What the word means, right under the logo. */
/* The word as a dictionary entry, in the typewriter face. One line on desktop; wraps on a phone. */
.hero-meaning { margin: 1.2rem auto 0; max-width: 30rem; font-family: var(--mono); font-size: 0.8rem; line-height: 1.6; }
.hero-meaning a { color: var(--soft); text-decoration: none; }
.hero-meaning .hw { color: var(--ink); font-weight: 600; letter-spacing: 0.02em; }
.hero-meaning .pos { font-style: italic; }
.hero-meaning .dash { color: var(--blue); }
.hero-meaning a:hover .def { color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 0.2em; }

/* The counts: three icons, a number each. */
.hero-stats {
  list-style: none; margin: 2.4rem auto 0; padding: 0; max-width: 34rem;
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.hero-stats li { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; }
.hero-stats li + li { border-left: 1px solid var(--rule); }
.stat-icon { color: var(--blue); display: inline-flex; }
.stat-n { font-family: var(--serif); font-size: clamp(1.7rem, 6.5vw, 2.3rem); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.stat-label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }
.hero-cta { margin: 2.2rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.6rem 1rem; }

/* The drifting band of real titles. Pauses under the pointer or keyboard focus. */
.band {
  overflow: hidden; margin: 2.2rem calc(var(--gutter) * -1) 0.4rem; padding: 0.2rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.band-track { display: flex; width: max-content; list-style: none; margin: 0; padding: 0.6rem 0; }
.band li { padding-right: 2.4rem; white-space: nowrap; font-style: italic; font-size: 1.05rem; }
.band li::before { content: ""; display: inline-block; width: 0.32rem; height: 0.32rem; border-radius: 50%; background: var(--blue); margin-right: 0.9rem; vertical-align: 0.2em; opacity: 0.85; }
.band a { text-decoration: none; color: var(--soft); transition: color 0.25s ease; }
.band a:hover, .band a:focus-visible { color: var(--ink); }

/* The story sections (front and About). */
.story { margin: 3rem 0 0; }
.story p { max-width: 36rem; }
.story .story-title, .browse .story-title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em;
  font-size: clamp(1.4rem, 5vw, 1.7rem); line-height: 1.25; margin: 0 0 0.8rem;
  /* 2026-10-07, Robin: «vanskelig å lese pga tynne streker». Italiana has one
     weight; a thin stroke in the text colour thickens the hairlines. */
  -webkit-text-stroke: 0.035em currentColor;
}
.story .write { font-family: var(--mono); font-size: 0.76rem; color: var(--soft); }
.browse { margin-top: 3.4rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.browse h3.label { margin-top: 1.6rem; }
.front-sec .label { margin-top: 2.4rem; }

/* ---- The name: a short page to read ---- */
.reading { max-width: 34rem; margin: 0 auto; padding-top: 1.6rem; }
.reading p { font-size: 1.15rem; line-height: 1.7; }

/* ---- Song page: clean text, no distractions ---- */
.song { text-align: center; padding-top: 1.6rem; }
.song-head h1 { font-size: clamp(2rem, 7vw, 2.9rem); margin: 0.4rem auto 0.6rem; letter-spacing: -0.01em; max-width: 22ch; }
.credits { margin: 0.25rem 0; color: var(--soft); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; }
.credits a { color: inherit; }
.credits .role { font-size: 0.72rem; }
.original { font-style: italic; }
.lyrics { font-size: 1.2rem; line-height: 1.7; margin: 2.6rem auto 0; max-width: 32rem; }
.verse { margin: 0 0 1.6em; }
.verse p { margin: 0; }
.vn {
  display: block; margin-bottom: 0.25rem;
  font-family: var(--mono); font-size: 0.7rem; color: var(--blue); font-variant-numeric: tabular-nums; letter-spacing: 0.08em;
}
.chorus { font-style: italic; }
.chorus .vn { font-style: normal; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.66rem; }
.note {
  margin: 2.4rem auto; max-width: 32rem; padding: 1rem 1.2rem; border-radius: 3px; text-align: left;
  background: color-mix(in srgb, var(--ink) 4%, transparent); font-size: 1rem;
}

/* Below the words: quiet facts, small. */
.song-facts {
  margin: 3.2rem auto 0; padding-top: 1.4rem; border-top: 1px solid var(--rule); max-width: 32rem;
  text-align: left; font-family: var(--mono); font-size: 0.78rem; color: var(--soft);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.4rem 2rem;
}
.fact .label { margin: 0.8rem 0 0.3rem; font-size: 0.66rem; }
.fact ul { list-style: none; margin: 0; padding: 0; }
.fact a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; text-decoration: none; color: var(--soft); }
.fact a:hover { color: var(--ink); }
.fact .num, .fact .num-text { font-variant-numeric: tabular-nums; color: var(--ink); }
.fact .num-text { color: var(--soft); }

/* Our own app, once, on song pages. Closable; cantionale.js remembers. */
.app-banner {
  position: fixed; left: 50%; bottom: calc(0.8rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  width: min(30rem, calc(100% - 1.6rem));
  display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0.6rem 0.6rem 1rem;
  background: var(--raised); color: var(--ink); border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: 0 10px 30px rgba(5, 12, 30, 0.16); font-family: var(--mono); font-size: 0.76rem;
}
.app-banner-off .app-banner { display: none; }
.ab-text { flex: 1; min-width: 0; }
.ab-get { flex: none; text-decoration: none; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.7rem; color: var(--paper); background: var(--ink); border-radius: 2px; padding: 0.4rem 0.9rem; }
.ab-get:hover { background: var(--blue); }
.ab-close { flex: none; font: 1.3rem/1 var(--mono); color: var(--soft); background: none; border: 0; padding: 0.2rem 0.45rem; cursor: pointer; border-radius: 3px; }
.ab-close:hover { color: var(--ink); }
body.page-song { padding-bottom: 5.5rem; }
.app-banner-off body.page-song { padding-bottom: 0; }

@media (min-width: 40rem) {
  .top-search { display: block; }
  .search-icon { display: none; }
  .top nav .nav-songs { display: inline; }
}

@media (min-width: 52rem) {
  :root { --gutter: 2rem; }
  body { font-size: 1.125rem; }
  .top { padding-top: 1.8rem; padding-bottom: 1.8rem; }
  .hero { padding-top: 4.5rem; }
  .story-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 3rem; border-top: 1px solid var(--ink); }
  .story-grid .story { margin: 0; padding: 1.6rem 2rem 0.4rem; }
  .story-grid .story:first-child { padding-left: 0; }
  .story-grid .story:last-child { padding-right: 0; }
  .story-grid .story + .story { border-left: 1px solid var(--rule); }
  .story-grid .story p { max-width: none; font-size: 1.02rem; }
  .browse { max-width: var(--measure); margin-left: auto; margin-right: auto; }
  .foot-cols { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .hero-meaning { max-width: none; white-space: nowrap; }
  .lyrics { font-size: 1.28rem; }
}

/* ---- Motion. Only when the reader allows it; at rest everything is visible. None on song pages. ---- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* The logo arrives letter by letter: the red C first. Opacity and transform only. */
  .hero-mark .l { animation: letter 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .hero-mark .l:nth-child(1) { animation-delay: 0.05s; }
  .hero-mark .l:nth-child(2) { animation-delay: 0.2s; }
  .hero-mark .l:nth-child(3) { animation-delay: 0.26s; }
  .hero-mark .l:nth-child(4) { animation-delay: 0.32s; }
  .hero-mark .l:nth-child(5) { animation-delay: 0.38s; }
  .hero-mark .l:nth-child(6) { animation-delay: 0.44s; }
  .hero-mark .l:nth-child(7) { animation-delay: 0.5s; }
  .hero-mark .l:nth-child(8) { animation-delay: 0.56s; }
  .hero-mark .l:nth-child(9) { animation-delay: 0.62s; }
  .hero-mark .l:nth-child(10) { animation-delay: 0.68s; }
  .hero-meaning { animation: rise 0.9s 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .hero-stats li { animation: rise 0.9s 1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .hero-stats li:nth-child(2) { animation-delay: 1.1s; }
  .hero-stats li:nth-child(3) { animation-delay: 1.2s; }
  .hero-cta { animation: rise 0.9s 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }

  /* The titles drift, slowly, on their own compositor layer. */
  .band-track { animation: drift 120s linear infinite; will-change: transform; }
  .band:hover .band-track, .band:focus-within .band-track { animation-play-state: paused; }

  /* Sections rise in on scroll; the class is set by cantionale.js only when it can show them again. */
  .motion .reveal { opacity: 0; transform: translate3d(0, 1.1rem, 0); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .motion .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  /* Static: the titles sit still, wrapped and centred, without the loop copy. */
  .band-track { flex-wrap: wrap; justify-content: center; width: auto; row-gap: 0.4rem; }
  .band li:nth-child(n+9) { display: none; }
  .band li[aria-hidden="true"] { display: none; }
}
@keyframes letter { from { opacity: 0; transform: translate3d(0, 0.18em, 0); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 0.8rem, 0); } to { opacity: 1; transform: none; } }
@keyframes drift { to { transform: translate3d(-50%, 0, 0); } }
@media print {
  .motion .reveal { opacity: 1; transform: none; }
  .band, .app-banner, .top-right, .foot { display: none; }
}
