/* Die Gelbe Wand — matchday poster, not a fixture table.
   Warm coal ground lit from the wall, one mass of signal yellow, condensed lettering. */

:root {
  --kohle: #0e0e0c;
  --stahl: #17170f;
  --signal: #fde100;
  --beton: #7c7c6e;
  --kalk: #f2f0e9;
  --rost: #d8503a;

  --display: "Big Shoulders Display", "Arial Narrow", "Haettenschweiler", sans-serif;
  --body: Manrope, "Segoe UI", system-ui, sans-serif;
  --meta: Manrope, "Segoe UI", system-ui, sans-serif;

  --gutter: max(1.25rem, calc((100vw - 1240px) / 2));
  --rule: 1px solid #26261d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--kohle);
  color: var(--kalk);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient ground: floodlight spill from the wall, warmed coal underneath. Fixed
   rather than background-attachment, which stutters badly on mobile Safari. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(90% 65% at 88% -8%, rgba(253, 225, 0, 0.17), transparent 62%),
    radial-gradient(70% 55% at 4% 4%, rgba(190, 150, 40, 0.1), transparent 65%),
    radial-gradient(120% 70% at 50% 108%, rgba(253, 225, 0, 0.06), transparent 60%),
    linear-gradient(178deg, #16160f 0%, #101009 42%, var(--kohle) 100%);
}

a {
  color: inherit;
}

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

/* ---------- top rail ---------- */

.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: var(--rule);
  /* Frosted so the poster keeps showing through as it scrolls under. */
  background: rgba(14, 14, 12, 0.62);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

/* Without backdrop-filter the translucent bar would let text collide with text. */
@supports not (backdrop-filter: blur(2px)) {
  .rail {
    background: #0f0f0b;
  }
}

.rail-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding: 0.7rem var(--gutter);
}

.monogram {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  margin-right: auto;
}

.monogram span {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--kohle);
  background: var(--signal);
  padding: 0.15em 0.3em 0.1em;
}

.monogram em {
  font-family: var(--meta);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--beton);
}

.rail-status {
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-family: var(--meta);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--beton);
}

.rail-action {
  white-space: nowrap;
  font-family: var(--meta);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kalk);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--beton);
  /* Keeps the control at a 24px tap target. */
  padding: 0.3rem 0;
  min-height: 24px;
  cursor: pointer;
}

.rail-action:hover {
  color: var(--signal);
  border-color: var(--signal);
}

.rail-action[disabled] {
  opacity: 0.4;
  cursor: progress;
}

/* Reading progress, driven by the scroll position itself. Chrome, Edge and
   Safari run this natively; Firefox still hides it behind a flag, and there the
   bar simply stays empty, which costs nothing. */

.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 30;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #ffee63, var(--signal));
}

@supports (animation-timeline: scroll()) {
  @keyframes read {
    to {
      transform: scaleX(1);
    }
  }

  .progress span {
    animation: read linear both;
    animation-timeline: scroll(root block);
  }
}

/* ---------- hero: type on the left, the wall on the right ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(160px, 21vw, 280px);
  align-items: stretch;
  min-height: min(70vh, 640px);
  border-bottom: var(--rule);
}

/* A little of the wall's light spills across the black beside it. */
.hero-copy {
  background: linear-gradient(90deg, transparent 45%, rgba(253, 225, 0, 0.06) 100%);
  padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem) clamp(1.75rem, 5vw, 3rem) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  min-width: 0;
}

.eyebrow {
  margin: 0;
  font-family: var(--meta);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
}

.eyebrow .sep {
  color: var(--beton);
  margin: 0 0.5rem;
}

.eyebrow .quiet {
  color: var(--beton);
}

.hero-title {
  /* The headline breaks its own margin — the poster runs off the sheet. */
  margin: 0 0 0 calc(clamp(0.35rem, 2vw, 1.4rem) * -1);
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(3rem, 12.5vw, 9.5rem);
  /* Big Shoulders sets its diaeresis very high, so tighter leading than this drops
     the dots of a second-line Ü into the line above. */
  line-height: 1.06;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}

.hero-title .versus {
  display: block;
  font-size: 0.19em;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--beton);
  margin-bottom: 0.5em;
}

.hero-when {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 1.4rem;
  font-family: var(--meta);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-when b {
  font-weight: 600;
  color: var(--kalk);
}

.hero-when span {
  color: var(--beton);
}

.hero-empty {
  font-family: var(--meta);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--beton);
  text-transform: uppercase;
}

/* the wall itself */

.wall {
  position: relative;
  background: linear-gradient(197deg, #ffee63 0%, var(--signal) 42%, #eccd00 100%);
  color: var(--kohle);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.5rem, 1.4vw, 1rem);
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(0.75rem, 1.6vw, 1.25rem);
  transform-origin: bottom center;
}

.wall[data-state="loading"] {
  background: repeating-linear-gradient(
    -45deg,
    #2a2a1e 0 12px,
    #232319 12px 24px
  );
}

.wall-label {
  position: absolute;
  top: clamp(1rem, 2.5vw, 1.75rem);
  right: clamp(0.6rem, 1.4vw, 1rem);
  writing-mode: vertical-rl;
  font-family: var(--meta);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(14, 14, 12, 0.45);
}

.wall[data-state="loading"] .wall-label {
  color: var(--beton);
}

.tick {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0 0.7rem;
  padding: 0.35rem 0;
  border-top: 1px solid rgba(14, 14, 12, 0.22);
}

.tick:last-of-type {
  border-bottom: 1px solid rgba(14, 14, 12, 0.22);
}

.tick b {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.6rem, 6.2vw, 4.4rem);
  /* Big Shoulders needs more than 1em of line box; the roll mask clips to it, and
     0.8 was cutting the tops off the digits. */
  line-height: 1.16;
  /* Margins sit outside the mask, so the stack stays tight without clipping. */
  margin: -0.18em 0 -0.12em;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.tick span {
  font-family: var(--meta);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(14, 14, 12, 0.6);
}

.wall-live {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.85;
}

.wall-live small {
  display: block;
  font-family: var(--meta);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  margin-top: 0.8rem;
  color: rgba(14, 14, 12, 0.65);
}

/* ---------- sheets ---------- */

.sheet {
  padding: clamp(2.75rem, 7vw, 5rem) var(--gutter) 0;
}

.sheet-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--kalk) 0%, rgba(242, 240, 233, 0.5) 55%, rgba(242, 240, 233, 0.12) 100%) 1;
}

.sheet-head h2 {
  margin: 0;
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
}

.sheet-note {
  margin: 0;
  margin-right: auto;
  font-family: var(--meta);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--beton);
}

.toggles {
  display: flex;
  gap: 1rem;
  /* One more competition than fits simply scrolls instead of breaking the row. */
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.toggles::-webkit-scrollbar {
  display: none;
}

.toggles button {
  white-space: nowrap;
  font-family: var(--meta);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--beton);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.25rem 0 0.35rem;
  min-height: 24px;
  cursor: pointer;
}

.toggles button:hover {
  color: var(--kalk);
}

.toggles button[aria-pressed="true"] {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

/* form guide: filled = Sieg, half = Unentschieden, hollow = Niederlage */

.form {
  display: flex;
  gap: 5px;
  align-items: center;
}

.form i {
  width: 13px;
  height: 13px;
  border: 1px solid var(--beton);
}

.form i.W {
  background: var(--signal);
  border-color: var(--signal);
}

.form i.D {
  background: linear-gradient(135deg, var(--signal) 0 50%, transparent 50% 100%);
  border-color: var(--signal);
}

.form i.L {
  border-color: var(--rost);
}

/* ---------- fixture lines ---------- */

.fixtures {
  list-style: none;
  margin: 0;
  padding: 0;
}

.month {
  margin-left: clamp(0rem, -1rem + 3vw, 1.1rem);
  font-family: var(--meta);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--beton);
  padding: 1.6rem 0 0.5rem;
}

.fixture {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 clamp(0.75rem, 2vw, 1.75rem);
  padding: clamp(0.9rem, 2vw, 1.35rem) clamp(0.5rem, 1.5vw, 1rem);
  margin: 0 clamp(-0.5rem, -1.5vw, -1rem);
  border-bottom: var(--rule);
  transition: background-color 140ms linear, color 140ms linear;
}

.fixture:hover,
.fixture:focus-within {
  background: linear-gradient(92deg, #ffea4d 0%, var(--signal) 55%, #f0d400 100%);
  color: var(--kohle);
}

.fixture .no {
  font-family: var(--meta);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--beton);
  font-variant-numeric: tabular-nums;
}

.fixture:hover .no,
.fixture:focus-within .no {
  color: rgba(14, 14, 12, 0.55);
}

.fixture .who {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.6vw, 1rem);
  min-width: 0;
}

.mark {
  flex: none;
  width: 11px;
  height: 11px;
  border: 2px solid var(--signal);
}

.mark.home {
  background: var(--signal);
}

.fixture:hover .mark,
.fixture:focus-within .mark {
  border-color: var(--kohle);
}

.fixture:hover .mark.home,
.fixture:focus-within .mark.home {
  background: var(--kohle);
}

.fixture .name {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.3rem, 3.4vw, 2.05rem);
  /* Same reason as the countdown: 1 clips the caps inside the ellipsis overflow. */
  line-height: 1.2;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture .comp {
  font-family: var(--meta);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--beton);
  white-space: nowrap;
}

.fixture:hover .comp,
.fixture:focus-within .comp {
  color: rgba(14, 14, 12, 0.6);
}

.fixture .when {
  font-variant-numeric: tabular-nums;
  font-family: var(--meta);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cupmark {
  font-style: normal;
  color: var(--signal);
}

.fixture:hover .cupmark,
.fixture:focus-within .cupmark {
  color: var(--kohle);
}

.fixture .when small {
  display: block;
  font-size: 0.66rem;
  color: var(--beton);
  letter-spacing: 0.14em;
}

.fixture:hover .when small,
.fixture:focus-within .when small {
  color: rgba(14, 14, 12, 0.6);
}

/* The score carries the result: yellow won, cream drew, rust lost. */

.fixture .score {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--beton);
}

.fixture .score[data-r="W"] {
  color: var(--signal);
}

.fixture .score[data-r="D"] {
  color: var(--kalk);
}

.fixture .score[data-r="L"] {
  color: var(--rost);
}

.fixture:hover .score,
.fixture:focus-within .score {
  color: var(--kohle);
}

.more {
  display: block;
  margin: 1.75rem 0 0;
  padding: 0.3rem 0 0.35rem;
  min-height: 24px;
  font-family: var(--meta);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kalk);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--beton);
  cursor: pointer;
}

.more:hover {
  color: var(--signal);
  border-color: var(--signal);
}

.blank {
  font-family: var(--meta);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--beton);
  padding: 2.5rem 0;
}

.legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  font-family: var(--meta);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--beton);
}

.legend .mark {
  margin-left: 0.75rem;
}

.legend .mark:first-child {
  margin-left: 0;
}


/* ---------- bento: the season in numbers ----------
   Deliberately uneven — the tiles carry different kinds of fact, and forcing
   them into equal cells would flatten that. */

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 148px;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  border: 1px solid #26261d;
  border-radius: 4px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
}

.cell h3 {
  margin: 0;
  font-family: var(--meta);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--beton);
}

.cell .figure {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.cell .under {
  font-family: var(--meta);
  font-size: 0.78rem;
  color: var(--beton);
}

.cell .under b {
  color: var(--kalk);
  font-weight: 600;
}

/* The two tiles that carry the headline numbers get the yellow and the room. */
.cell.lead {
  grid-column: span 2;
  background: linear-gradient(155deg, rgba(253, 225, 0, 0.14), rgba(253, 225, 0, 0.03));
  border-color: rgba(253, 225, 0, 0.28);
}

.cell.lead .figure {
  font-size: clamp(3rem, 8vw, 5.2rem);
  color: var(--signal);
}

.cell.wide {
  grid-column: span 2;
}

.cell .split {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.cell .score[data-r="W"] {
  color: var(--signal);
}

.cell .score[data-r="D"] {
  color: var(--kalk);
}

.cell .score[data-r="L"] {
  color: var(--rost);
}

.cell .split .sep {
  color: var(--beton);
  font-size: 0.6em;
}

.cell .bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: #23231b;
}

.cell .bar i {
  display: block;
  height: 100%;
}

.cell .bar i.w {
  background: var(--signal);
}

.cell .bar i.d {
  background: #5f5f52;
}

.cell .bar i.l {
  background: var(--rost);
}

@media (max-width: 900px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cell.lead,
  .cell.wide {
    grid-column: span 2;
  }
}

/* Two tiles across still read fine on a normal phone; only the narrowest
   screens need the single file. */
@media (max-width: 380px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
  }

  /* span 2 would conjure an implicit second column out of a single-column grid. */
  .cell.lead,
  .cell.wide {
    grid-column: auto;
  }

  .cell {
    min-height: 0;
    gap: 0.9rem;
  }
}

/* ---------- foot ---------- */

.foot {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) 3rem;
}

.foot p {
  margin: 0;
  text-wrap: pretty;
  font-family: var(--meta);
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--beton);
  max-width: 62ch;
  line-height: 1.9;
}

.foot a {
  color: var(--signal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ---------- motion ---------- */

/* Timelines live in app.js (GSAP). Nothing here hides content, so the page still
   reads if the animation layer never loads. */

.tick b {
  display: block;
  overflow: hidden;
}

.tick b i {
  display: block;
  line-height: 1.16;
  font-style: normal;
  /* Set from the countdown itself: the digits gain weight as kickoff closes in. */
  font-variation-settings: "wght" var(--tick-wght, 900);
}

.word,
.word > span {
  display: inline-block;
}

.word {
  overflow: hidden;
  vertical-align: top;
  /* The mask has to leave room for umlauts, or MÜNCHEN reads as MUNCHEN. The
     negative margin puts the extra space back so the poster stack stays tight. */
  padding-top: 0.22em;
  margin-top: -0.22em;
}

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .hero-copy {
    padding: clamp(2rem, 8vw, 3rem) var(--gutter);
  }

  .wall {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1.1rem var(--gutter);
    transform-origin: center;
  }

  .wall-label {
    display: none;
  }

  .tick {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border-top: 0;
    text-align: center;
    padding: 0;
  }

  .tick:last-of-type {
    border-bottom: 0;
  }

  .tick b {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }

  .fixture {
    grid-template-columns: 2.4rem minmax(0, 1fr);
    row-gap: 0.4rem;
  }

  .fixture .when {
    grid-column: 2;
    text-align: left;
    /* A long competition name has to be allowed to wrap on a narrow phone. */
    white-space: normal;
  }

  .fixture .when small {
    display: inline;
    margin-left: 0.6rem;
  }

  .sheet-head {
    gap: 0.6rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

}
