@font-face {
  font-family: "Big Shoulders Display";
  src: url("/assets/fonts/BigShouldersDisplay-ExtraBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/SchibstedGrotesk-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3ebdd;
  --paper-deep: #eae0cc;
  --text: #111010;
  --text-body: #2a2520;
  --text-muted: #5c5142;
  --line-number: #6a5e4c;
  --rule: rgba(17, 16, 16, 0.16);
  --gold: #ffa514;
  --gold-hover: #ec9200;
  --brick: #ae3a25;
  --night: #0b0a09;
  --night-text: #f3ebdd;
  --night-body: #d6ccbb;
  --night-muted: #a0957f;
  --night-rule: rgba(243, 235, 221, 0.18);
  --shell: min(100% - 80px, 1200px);
  --display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  --lyric: "Fraunces", Georgia, serif;
  --ui: "Schibsted Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  min-width: 0;
  margin: 0;
  background: var(--paper);
  color: var(--text-body);
  font-family: var(--ui);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, figure, ol { margin-top: 0; }
:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--paper);
}
.night :focus-visible, .site-footer :focus-visible {
  outline-color: var(--night-text);
  box-shadow: 0 0 0 6px var(--night);
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 11px 16px;
  transform: translateY(-160%);
  background: var(--gold);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.shell { width: var(--shell); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-header .shell {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; min-height: 48px; align-items: center; }
.brand img { width: auto; height: 30px; }
.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
}
.header-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Shared type */
.label {
  margin-bottom: 14px;
  color: var(--text);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.label-brick { color: var(--brick); }
.display {
  margin-bottom: 0;
  color: var(--text);
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Hero */
.hero {
  display: flex;
  /* Ends short of the screen so the songsheet's staff peeks in below. */
  min-height: calc(100vh - 73px - 96px);
  min-height: calc(100svh - 73px - 96px);
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
  padding-top: clamp(48px, 10vh, 128px);
}
.hero h1 { font-size: clamp(2.75rem, 1.4rem + 3.6vw, 4.4rem); }
.hero h1 span { display: block; }
.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  margin-top: 28px;
}
.hero-intro { max-width: 52ch; margin: 0; color: var(--text-body); font-size: 1.12rem; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.hero-scarf { display: flex; flex: 1; align-items: center; padding-bottom: 24px; }
.scroll-cue { display: flex; justify-content: center; padding-bottom: 12px; }
.scroll-cue::after {
  content: "";
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(45deg);
}
.hero-scarf svg { display: block; width: 86%; height: auto; margin-left: 7%; flex: none; }
.primary-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms ease;
}
.primary-action:hover { background: var(--gold-hover); }
.launch-status { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* Flow: every part of Standsong feeds the matchday pack and the ground.
   Blocks sit on a musical staff; notes travel the wires as you scroll. */
.flow { margin: 72px 0 0; }
.flow-head { padding-bottom: 14px; border-bottom: 1px solid var(--text); }
.flow-head .label { margin: 0; }
.flow-map { position: relative; aspect-ratio: 1000 / 380; margin-top: 28px; }
.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.staff-lines line { stroke: rgba(17, 16, 16, 0.14); stroke-width: 1; }
.wire { fill: none; stroke: var(--line-number); stroke-width: 1.5; stroke-dasharray: 5 6; }
.wire-out { stroke: var(--text); stroke-dasharray: none; stroke-width: 2; }
.note { display: none; fill: var(--gold); stroke: var(--text); stroke-width: 1.5; }
.note line { stroke: var(--text); stroke-width: 2; }
.note .flag { fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; }
.flow-block {
  position: absolute;
  display: grid;
  gap: 4px;
  width: 24%;
  padding: 14px 16px;
  border: 1.5px solid var(--text);
  border-radius: 4px;
  background: var(--paper);
}
.flow-block strong { font-family: var(--display); font-size: clamp(1.1rem, 0.7rem + 0.8vw, 1.45rem); font-weight: 800; line-height: 1; text-transform: uppercase; }
.flow-block span { color: var(--text-muted); font-size: 0.86rem; line-height: 1.3; }
.in-1 { top: 0; left: 0; }
.in-2 { top: 34%; left: 0; }
.in-3 { top: 68%; left: 0; }
.flow-core {
  top: 32%; left: 40%; width: 20%; min-height: 36%;
  align-content: center;
  border-color: var(--night);
  background: var(--night);
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7.5px var(--gold);
}
.flow-core span { color: var(--night-muted); }
.flow-core strong { color: var(--night-text); font-size: clamp(1.3rem, 0.8rem + 1vw, 1.8rem); }
.flow-out { top: 34%; left: 76%; border-color: var(--gold); border-width: 2px; }

/* Motion that follows the scroll, only where supported and wanted. The page
   is complete and still without it. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .wire {
      stroke-dasharray: 1 1;
      animation: wire-draw linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 40%;
    }
    .flow-block {
      animation: block-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
    .note {
      display: block;
      offset-rotate: 0deg;
      animation: note-run linear both;
      animation-timeline: view();
      animation-range: cover 20% cover 70%;
    }
    .note-1 { offset-path: path("M240 57 C320 57 320 190 400 190"); }
    .note-2 { offset-path: path("M240 186 C320 186 320 190 400 190"); }
    .note-3 { offset-path: path("M240 315 C320 315 320 190 400 190"); }
    .note-4 { offset-path: path("M600 190 C680 190 680 186 760 186"); }
    .hero-scarf svg {
      animation: scarf-sway linear both;
      animation-timeline: scroll(root);
      animation-range: 0 70vh;
    }
    .scroll-cue::after { animation: cue-bob 1.6s ease-in-out 3; }
  }
}
@keyframes wire-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes block-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes note-run { from { offset-distance: 0%; opacity: 0; } 15% { opacity: 1; } to { offset-distance: 100%; opacity: 1; } }
@keyframes scarf-sway { from { transform: rotate(0deg); } to { transform: rotate(1.6deg) translateY(10px); } }
@keyframes cue-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 6px; } }

/* Songsheet */
.songsheet { padding-block: 96px; border-top: 1px solid var(--rule); }
.songsheet .label { margin-bottom: 20px; }
.staff {
  height: 33px;
  margin-bottom: 4px;
  border-top: 2px solid var(--text);
  background: repeating-linear-gradient(to bottom, transparent 0 7px, rgba(17, 16, 16, 0.3) 7px 8px);
}
.songsheet ol { margin: 0; padding: 0; list-style: none; }
.songsheet li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 220px;
  align-items: baseline;
  gap: 6px 24px;
  padding-block: 30px;
  border-bottom: 1px solid var(--rule);
}
.line-number {
  color: var(--line-number);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.songsheet h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--lyric);
  font-size: clamp(2rem, 1.2rem + 2.4vw, 3.4rem);
  font-weight: 420;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  line-height: 1.1;
  text-wrap: balance;
}
.song-tag { margin: 0; }
.song-tag strong {
  display: block;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}
.song-tag span { display: block; margin-top: 6px; color: var(--text-muted); font-size: 0.9rem; }

/* Matchday night band */
.night { padding-block: 88px; background: var(--night); color: var(--night-body); }
.night .shell {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 24px;
}
.night .label { grid-column: 1 / -1; margin-bottom: 0; color: var(--gold); }
.night h2 {
  grid-column: 1 / span 7;
  color: var(--night-text);
  font-size: clamp(2.6rem, 1.5rem + 3.2vw, 4.25rem);
}
.night p:last-child { grid-column: 9 / span 4; margin: 0; font-size: 1.05rem; }

/* Chant Call-Ups */
.call-ups { padding-block: 88px; }
.call-ups .shell {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 24px;
}
.call-ups-copy { grid-column: 1 / span 5; }
.call-ups h2 { font-size: clamp(2rem, 1.5rem + 1.4vw, 2.6rem); }
.call-ups h2 span, .proof h2 span { display: block; }
.call-ups h2 span + span { margin-top: 0.3em; }
.call-ups-copy p:last-child { margin: 24px 0 0; }
.call-up-example { grid-column: 7 / span 6; margin: 0; padding-top: 18px; border-top: 2px solid var(--text); }
.example-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.example-head .label { margin: 0; color: var(--brick); }
.call-up-example h3 {
  margin: 14px 0 28px;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li { position: relative; padding-top: 26px; }
.timeline li::before {
  position: absolute;
  top: 6px;
  right: -16px;
  left: 0;
  height: 2px;
  background: var(--text);
  content: "";
}
.timeline li:last-child::before { right: 0; }
.timeline li::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--text);
  background: var(--paper);
  content: "";
}
.timeline li:first-child::after { background: var(--gold); }
.timeline strong { display: block; color: var(--text); font-size: 1rem; font-weight: 700; }
.timeline span { display: block; margin-top: 4px; color: var(--text-body); font-size: 0.92rem; line-height: 1.45; }
.call-up-example figcaption { margin-top: 28px; color: var(--text-muted); font-size: 0.85rem; }

/* Proof ledger */
.proof { padding-block: 88px; background: var(--paper-deep); }
.proof h2 { font-size: clamp(2.1rem, 1.5rem + 1.8vw, 3.1rem); }
.ledger { margin: 40px 0 0; padding: 0; border-top: 2px solid var(--text); list-style: none; }
.ledger li {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 4px 24px;
  align-items: baseline;
  padding-block: 18px;
  border-bottom: 1px solid var(--rule);
}
.ledger strong {
  color: var(--text);
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
}
.ledger mark { padding: 0 6px; background: var(--gold); color: var(--text); }
.ledger p { margin: 0; }
.ledger-note { max-width: 62ch; margin: 24px 0 0; color: var(--text-muted); font-size: 0.95rem; }

/* Store */
.store { padding-block: 88px 96px; }
.store .shell {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 24px;
}
.store h2 { grid-column: 1 / span 6; font-size: clamp(2.6rem, 1.5rem + 3.2vw, 4.25rem); }
.store-copy { grid-column: 8 / span 5; }
.store-copy p { margin: 0; }
.store-copy .store-note { margin-top: 8px; color: var(--text-muted); font-size: 0.9rem; }
.contact-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  margin-top: 16px;
  color: var(--text);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Footer */
.site-footer { padding-block: 40px; background: var(--night); color: var(--night-muted); }
.site-footer .shell { display: grid; grid-template-columns: 1fr 2fr; align-items: center; gap: 32px; }
.footer-wordmark { width: auto; height: 22px; }
.footer-brand p { margin: 8px 0 0; font-size: 0.8rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 22px; }
.site-footer a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  color: var(--night-body);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.site-footer a:hover { color: var(--night-text); text-decoration: underline; text-underline-offset: 5px; }

@media (max-width: 900px) {
  :root { --shell: min(100% - 40px, 1200px); }
  .night .shell, .call-ups .shell, .store .shell { grid-template-columns: 1fr; }
  .night h2, .night p:last-child, .call-ups-copy,
  .call-up-example, .store h2, .store-copy { grid-column: 1 / -1; }
  .songsheet li { grid-template-columns: 32px minmax(0, 1fr); }
  .song-tag { grid-column: 2; }
  .song-tag strong { display: inline; font-size: 1.1rem; }
  .song-tag span { display: inline; margin: 0 0 0 8px; }
  .hero-scarf svg { width: 100%; margin-left: 0; }
  .site-footer .shell { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
}

/* The flow stacks whenever it would be cramped: narrow screens or large
   text (an em breakpoint follows the reader's font size). */
@media (max-width: 64em) {
  .flow-map { display: grid; gap: 14px; aspect-ratio: auto; }
  .flow-lines { display: none; }
  .flow-block, .flow-core, .flow-out { position: relative; inset: auto; width: auto; min-height: 0; }
  .flow-core { margin-block: 10px; }
  .flow-block + .flow-block::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 28px;
    height: 14px;
    border-left: 1.5px dashed var(--line-number);
  }
  .flow-core::before { top: -26px; height: 24px; }
  .flow-out::before { top: -26px; height: 24px; }
}

@media (max-width: 580px) {
  .header-nav a:not(:last-child) { display: none; }
  .brand img { height: 26px; }
  .hero { gap: 32px; padding-top: 40px; }
  .hero-scarf svg { width: 116%; margin-left: -8%; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3rem); }
  .hero-intro { font-size: 1.05rem; }
  .hero-actions, .primary-action { width: 100%; }
  .songsheet { padding-block: 56px; }
  .songsheet li { grid-template-columns: 22px minmax(0, 1fr); gap: 6px 12px; padding-block: 22px; }
  .songsheet h3 { font-size: 1.85rem; }
  .night, .call-ups, .proof, .store { padding-block: 56px; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline li { padding: 0 0 20px 32px; }
  .timeline li::before { top: 0; right: auto; bottom: 0; left: 6px; width: 2px; height: auto; }
  .timeline li:last-child::before { display: none; }
  .ledger li { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .primary-action { transition: none; }
}
