/* ============================================================
   Saint Howl — sainthowl.com

   The site is built as a printed object, not a screen. Everything
   here comes from the band's own screen-printed sticker sheet:
   the spot colours are sampled off those files, the wordmark is
   their actual lettering placed as artwork, and photographs get a
   real halftone dot screen rather than sitting flat.

   Spot colours, sampled:
     teal    #37AB9C   from 01_wordmark-banner_teal
     red     #DF4127   from 07_dragon_teal
     yellow  #FFF300   process yellow, the wordmark ink
     ochre   #E9C50C   from 09_wordmark_yellow-circle
     ink     #17190C   the Green Electric Chapel cover's shadow
   ============================================================ */

/* Suffix Serif, Jen Wagner Type. Commercial licence held by the band: web +
   commercial. Served from this site only — the files are gitignored so the
   licence is not breached by publishing them. */
@font-face {
  font-family: "Text Serif";
  src: url("/fonts/suffixserif-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Text Serif";
  src: url("/fonts/suffixserif-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Text Serif";
  src: url("/fonts/suffixserif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Text Serif";
  src: url("/fonts/suffixserif-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Text Serif";
  src: url("/fonts/suffixserif-mediumitalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Text Serif";
  src: url("/fonts/suffixserif-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plexmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plexmono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper:      #EDE6D6;
  --paper-deep: #E2D9C3;
  --ink:        #17190C;
  --ink-soft:   #5A5B47;

  --teal:   #37AB9C;
  --red:    #DF4127;
  --yellow: #FFF300;
  --ochre:  #E9C50C;

  --serif: "Text Serif", Georgia, "Times New Roman", serif;
  --mono:  "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

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

  color-scheme: light;
}

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

html { background: var(--paper); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.0625rem, 0.98rem + 0.42vw, 1.25rem);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Paper fibre, tiled into the background rather than laid over the page, so it
   scrolls with the content and leaves no seam. A procedural SVG noise texture,
   the same category of thing as a CSS gradient: not an image, not generated art. */
body {
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23p)' opacity='0.16'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

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

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--gutter); top: 1rem; z-index: 10000;
  background: var(--red); color: var(--paper);
  padding: 0.6rem 1rem;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Caption type: printed small copy. Dates, venues, credits, labels. */
.meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---------- the wordmark, placed as artwork ----------
   Their own lettering, masked so it can take any spot colour. */

.wordmark {
  display: block;
  width: clamp(11rem, 26vw, 17rem);
  aspect-ratio: 1600 / 502;
  background-color: var(--ink);
  -webkit-mask: url("/assets/brand/wordmark.png") no-repeat center / contain;
  mask: url("/assets/brand/wordmark.png") no-repeat center / contain;
  transition: background-color 120ms ease;
}
.wordmark:hover { background-color: var(--red); }

.wordmark--large {
  width: min(100%, 46rem);
  background-color: var(--red);
}

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

.masthead { padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 2.5vw, 1.5rem); }

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

/* The rule under the masthead is a printed bar, not a hairline. */
.bar {
  height: 7px;
  background: var(--ink);
  position: relative;
}
.bar::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(2px, 2px);
  background: var(--teal);
  mix-blend-mode: multiply;
  z-index: -1;
}
.bar--red::after { background: var(--red); }

.nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.nav a {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--red); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.nav__sep { color: var(--teal); user-select: none; font-size: 0.6875rem; }

/* ---------- headings, printed slightly out of register ----------
   In a real two-colour print the plates never line up perfectly and the
   second colour shows at the edges. That is what this is. */

.h-print {
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 2px -2px 0 var(--teal);
}
.h-print--red { text-shadow: 2px -2px 0 var(--red); }

.page-head { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 3.5vw, 2.5rem); }
.page-head h1 {
  margin: 0.6rem 0 0;
  font-size: clamp(2.5rem, 1.5rem + 5vw, 5rem);
  max-width: 16ch;
}
.page-head > p { margin: 1.25rem 0 0; max-width: var(--measure); }

main { flex: 1 0 auto; }

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.3em; }
.prose a { border-bottom: 2px solid var(--teal); }
.prose a:hover { border-bottom-color: var(--red); color: var(--red); }
.prose h2 { font-weight: 500; font-size: 1.5rem; margin: 2.4em 0 0.6em; }
.prose blockquote {
  margin: 2em 0;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 5px solid var(--red);
  font-style: italic;
}

/* ---------- the feed ---------- */

.entry {
  display: grid;
  gap: 0.5rem;
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 2px solid var(--ink);
}
.entry:last-child { border-bottom: 0; }
@media (min-width: 46rem) {
  .entry { grid-template-columns: 9rem 1fr; gap: 0 2.5rem; align-items: start; }
}
.entry__date { padding-top: 0.6rem; }
.entry__title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.125rem);
  line-height: 1.16;
  letter-spacing: -0.018em;
  max-width: 24ch;
}
.entry__body { margin: 0.6rem 0 0; max-width: var(--measure); font-size: 0.9375em; }

/* Links read as rubber-stamped tags, not underlined web text. */
.stamp {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 0.5rem 0.8rem;
}
.stamp:hover { background: var(--red); }
.stamp--teal { background: var(--teal); color: var(--ink); }
.stamp--teal:hover { background: var(--red); color: var(--paper); }

/* ---------- shows ---------- */

.show {
  display: grid;
  gap: 0.3rem;
  padding-block: 1.4rem;
  border-bottom: 2px solid var(--ink);
}
@media (min-width: 46rem) {
  .show { grid-template-columns: 9rem 1fr auto; gap: 0 2.5rem; align-items: center; }
}
.show__city { font-size: 1.25rem; letter-spacing: -0.01em; }
.show__venue { color: var(--ink-soft); font-size: 0.9375rem; }
.show--past { border-bottom-width: 1px; }
.show--past .show__city { font-size: 1.0625rem; color: var(--ink-soft); }

/* ---------- releases ---------- */

.release { display: grid; gap: 1.75rem; padding-block: clamp(1.5rem, 4vw, 2.5rem); }
@media (min-width: 40rem) {
  .release { grid-template-columns: minmax(0, 15rem) 1fr; gap: 2.75rem; align-items: start; }
}
.release__cover { aspect-ratio: 1; background: var(--paper-deep); }
.release__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.release__title {
  margin: 0.35rem 0 0;
  font-weight: 400;
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.listen { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }

/* ---------- halftone photographs ----------
   A real dot screen laid over the image in multiply, the way their merch
   is printed. The photograph underneath is untouched. */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: clamp(0.85rem, 2vw, 1.4rem);
}
.shot { margin: 0; }
.shot__frame { position: relative; background: var(--paper-deep); overflow: hidden; }
.shot__frame img { display: block; width: 100%; height: auto; }
.shot__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.5;
  background-image: radial-gradient(circle at 50% 50%, rgba(23,25,12,0.85) 0.9px, transparent 1.1px);
  background-size: 3.5px 3.5px;
}
.shot figcaption { margin-top: 0.5rem; }

/* ---------- placeholders ----------
   Deliberately conspicuous. A missing asset must look missing. */

.placeholder {
  display: grid;
  place-content: center;
  gap: 0.4rem;
  text-align: center;
  min-height: 11rem;
  padding: 1.5rem;
  background:
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(223,65,39,0.13) 10px 20px),
    var(--paper-deep);
  border: 2px dashed var(--red);
}
.placeholder__label { color: var(--red); font-weight: 500; }
.placeholder__note { color: var(--ink-soft); font-size: 0.875rem; max-width: 30ch; margin: 0 auto; }

/* ---------- the seal ----------
   Their own circular sticker, placed as a sticker is placed: off-axis. */

.seal {
  width: clamp(5.5rem, 13vw, 8.5rem);
  height: auto;
  transform: rotate(-8deg);
}

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

footer.site { flex-shrink: 0; margin-top: clamp(3rem, 7vw, 5rem); }
footer.site .inner {
  padding-block: 1.75rem 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: flex-end;
  justify-content: space-between;
}
footer.site .links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* The dragon print, placed on the dead end like a sticker slapped on a wall. */
.lost {
  display: block;
  width: min(100%, 30rem);
  height: auto;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  transform: rotate(-2.5deg);
}

/* ---------- spacing classes ----------
   These replace inline style attributes, which the site's own
   Content-Security-Policy (style-src 'self') silently drops in production. */

.tagline        { margin-top: 1.25rem; }
.lede           { margin-top: 0.5rem; }
.footer-name    { margin: 0 0 0.6rem; }
.section-label  { margin: 4rem 0 0.75rem; }
.gap-above      { margin-top: 2rem; }
.gap-above-lg   { margin-top: 3.5rem; }
.band           { padding-block: 2rem; }
.prose--piece   { padding-top: 2.5rem; }
.bar--thin      { height: 3px; }
.stamp--inline  { margin-top: 0; }

/* ---------- deeper paper ----------
   One noise layer reads as digital grain. Real stock has fine fibre AND a
   slower mottle from how the pulp settled, so this lays both down at very
   different scales, plus a faint edge shade so the sheet has a body. */

body {
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23f)' opacity='0.20'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='700' height='700' filter='url(%23m)' opacity='0.13'/%3E%3C/svg%3E");
  background-repeat: repeat, repeat;
  background-size: 260px 260px, 700px 700px;
}

/* ---------- ink behaviour ----------
   A screen-printed bar does not have a ruled edge; the ink catches and breaks
   along it. The SVG displacement filter in base.njk roughens the boundary. */

.bar {
  filter: url(#roughen);
}

/* Where two plates overlap, real ink darkens rather than covering. */
.bar::after { mix-blend-mode: multiply; }

/* Flat CSS colour reads as a swatch. A dot screen over the fill makes the
   stamps read as ink laid on paper. */
.stamp {
  position: relative;
  overflow: hidden;
  filter: url(#roughen-tight);
}
.stamp::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: screen;
  background-image: radial-gradient(circle at 50% 50%, rgba(237,230,214,0.9) 0.6px, transparent 0.8px);
  background-size: 3px 3px;
}
.stamp--teal::after { mix-blend-mode: multiply; opacity: 0.16;
  background-image: radial-gradient(circle at 50% 50%, rgba(23,25,12,0.9) 0.6px, transparent 0.8px); }

/* The placeholder hatching is a printed fill too. */
.placeholder { filter: url(#roughen-tight); }

/* Nothing on a printed sheet is perfectly square to the page. */
.release__cover { transform: rotate(-0.35deg); }
.filters { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- the coupon ----------
   A mail-order slip: cut line, a ruled field to write on, a stamp to send it.
   The shape a band's sign-up actually took before it was a modal. */

.coupon {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: 3px;
  background: repeating-linear-gradient(
    90deg, var(--ink) 0 8px, transparent 8px 15px
  ),
  repeating-linear-gradient(
    180deg, var(--ink) 0 8px, transparent 8px 15px
  ),
  repeating-linear-gradient(
    90deg, var(--ink) 0 8px, transparent 8px 15px
  ),
  repeating-linear-gradient(
    180deg, var(--ink) 0 8px, transparent 8px 15px
  );
  background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100%;
  background-position: 0 0, 100% 0, 0 100%, 0 0;
  background-repeat: no-repeat;
  transform: rotate(-0.4deg);
}
.coupon__inner { padding: clamp(1.5rem, 4vw, 2.5rem); }
.coupon__label { margin: 0; }
.coupon__lede {
  margin: 0.6rem 0 1.5rem;
  max-width: 34ch;
  font-size: 1.125rem;
  line-height: 1.45;
}

.coupon__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.9rem 1rem;
  /* A slip, not a banner: the field and its stamp stay one object. */
  max-width: 30rem;
}

/* A ruled line to write on, not a rounded box. */
.coupon__field {
  flex: 1 1 13rem;
  min-width: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  padding: 0.35rem 0.1rem;
  appearance: none;
}
.coupon__field::placeholder { color: var(--ink-soft); opacity: 0.75; }
.coupon__field:focus {
  outline: 0;
  border-bottom-color: var(--red);
  background: rgba(223, 65, 39, 0.06);
}
.coupon__form .stamp { flex: 0 0 auto; }
.coupon__fine { margin: 1.1rem 0 0; }

.coupon code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(23, 25, 12, 0.07);
  padding: 0.1em 0.35em;
}

/* ---------- the player ----------
   A foreign object placed on the sheet: the band's own frame around someone
   else's box, so it sits on the paper instead of floating over it. */
.player {
  margin: 1.6rem 0 1.75rem;
  padding: 3px;
  background: var(--ink);
  max-width: 34rem;
}
.player iframe { display: block; border: 0; background: var(--paper-deep); }
.listen__label { margin: 0 0 0.6rem; }

/* ---------- lightbox ----------
   Enhancement only: without the script the gallery is still a grid of
   photographs. With it, a photograph can actually be looked at. */

.shot__frame img { cursor: zoom-in; }
.shot__frame img:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

html.is-lit { overflow: hidden; }

/* A class-level display value beats the browser's [hidden] rule, so hiding it
   has to be stated explicitly or el.hidden silently does nothing. */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(23, 25, 12, 0.94);
}
.lightbox__frame {
  display: grid;
  gap: 0.75rem;
  max-width: min(100%, 68rem);
  max-height: 100%;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  margin-inline: auto;
  border: 3px solid var(--paper);
}
.lightbox__cap { color: var(--paper); text-align: center; margin: 0; }
.lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--yellow);
  border: 0;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
}
.lightbox__close:hover { background: var(--red); color: var(--paper); }
