/* sanktfrejsdag.dk */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #1f2236;        /* AGF's mørkeblå (primærfarven på agf.dk) */
  --navy-deep: #171a2b;
  --blue: #2d4465;        /* AGF's lyseblå (sekundærfarven på agf.dk) */
  --blue-soft: #3b5680;
  --white: #ffffff;
  --ink: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.66);
  --faint: rgba(255, 255, 255, 0.16);
  --hair: rgba(255, 255, 255, 0.12);
  --down: #ff9a94;        /* nedrykning - lys rød, læsbar på marineblå */
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(100svh, 58rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 9vh, 6rem) 0 clamp(3rem, 8vh, 5rem);
  background:
    radial-gradient(60rem 36rem at 78% 30%, rgba(59, 86, 128, 0.55), transparent 65%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
}

/* Glorien: to tynde ringe bag datoen */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 50%;
  right: max(-14rem, -22vw);
  width: min(46rem, 110vw);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--hair);
  transform: translateY(-50%);
  pointer-events: none;
}
.hero::after {
  width: min(34rem, 82vw);
  right: max(-8rem, -12vw);
  border-color: rgba(255, 255, 255, 0.2);
}

.hero .wrap { position: relative; z-index: 1; width: 100%; }

.question {
  margin: 0.9rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 4.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--ink);
}

.answer {
  margin: clamp(1.5rem, 5vh, 3rem) 0 0;
}
.answer__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.answer__date {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3rem, 12.5vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--white);
  font-variant-numeric: lining-nums;
}
.answer__date small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.34em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
}

.lede {
  max-width: 40rem;
  margin: clamp(1.5rem, 4vh, 2.5rem) 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink);
}
.lede strong { color: var(--white); font-weight: 600; }

.scroll-hint {
  display: inline-block;
  margin-top: clamp(2rem, 6vh, 3.5rem);
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 0.15rem;
}
.scroll-hint:hover { color: var(--white); border-color: var(--white); }

/* ---------- Sektioner ---------- */

section { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.band { background: var(--navy-deep); }

h2 {
  margin: 0.5rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--white);
}
.section-intro { max-width: 42rem; margin: 1rem 0 0; color: var(--muted); }

/* Vejen til runde 19 */
.road {
  list-style: none;
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--faint);
}
.road li {
  position: relative;
  padding: 1.4rem 1rem 0 0;
}
.road li::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--navy-deep);
  border: 1px solid var(--muted);
}
.road li.is-goal::before {
  background: var(--white);
  border-color: var(--white);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.14);
}
.road__round {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.road__match {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--white);
}
.road__date { display: block; margin-top: 0.3rem; font-size: 0.9rem; color: var(--muted); }
.road li.is-goal .road__round { color: var(--white); }

/* Tre fakta */
.facts {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 0.5rem;
  overflow: hidden;
}
.facts li { background: var(--navy-deep); padding: 1.5rem 1.4rem 1.6rem; }
.facts h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--white);
}
.facts p { margin: 0.5rem 0 0; font-size: 0.96rem; color: var(--muted); }

/* Hvad er Sankt Frejs dag */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.about p { margin: 0 0 1rem; }
.about p:last-child { margin-bottom: 0; }
.about .pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.3;
  color: var(--white);
}

/* ---------- Nøgletal ---------- */
.records {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
}
.records li { border-top: 1px solid var(--faint); padding-top: 1rem; }
.records dt, .records .k {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.records .v {
  display: block; margin-top: 0.35rem;
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.15; color: var(--white);
}
.records .d { display: block; margin-top: 0.3rem; font-size: 0.92rem; color: var(--muted); }

/* ---------- Tabel over sæsoner ---------- */

.seasons {
  width: 100%;
  margin-top: clamp(2rem, 5vw, 3rem);
  border-collapse: collapse;
  font-variant-numeric: tabular-nums lining-nums;
}
.seasons caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.seasons th {
  padding: 0 1rem 0.75rem 0;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--faint);
  white-space: nowrap;
}
.seasons td {
  padding: 0.95rem 1rem 0.95rem 0;
  vertical-align: top;
  border-bottom: 1px solid var(--hair);
}
.seasons th:last-child, .seasons td:last-child { padding-right: 0; }
.seasons tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }

.c-season { font-weight: 600; color: var(--white); white-space: nowrap; }
.c-date { font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; color: var(--white); white-space: nowrap; }
.c-round { width: 26%; min-width: 9.5rem; }
.c-match { color: var(--ink); }
.c-match small, .note { display: block; margin-top: 0.2rem; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }

.round { display: flex; align-items: baseline; gap: 0.35rem; white-space: nowrap; }
.round b { font-weight: 600; color: var(--white); }
.round span { font-size: 0.85rem; color: var(--muted); }
.bar {
  position: relative;
  height: 4px;
  margin-top: 0.55rem;
  border-radius: 2px;
  background: var(--faint);
}
.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--at);
  border-radius: 2px;
  background: var(--white);
}
.bar i::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 3px var(--navy);
}

/* Nedrykning og sæsoner uden for Superligaen */
tr.is-down .c-date,
tr.is-down .round b { color: var(--down); }
tr.is-down .bar i,
tr.is-down .bar i::after { background: var(--down); }
tr.is-away td { color: var(--muted); font-style: italic; padding-top: 0.6rem; padding-bottom: 0.6rem; }
tr.is-away .c-season { font-weight: 400; font-style: normal; color: var(--muted); }
tr.is-best .c-season::after {
  content: "tidligst";
  margin-left: 0.6rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--faint);
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; font-size: 0.85rem; color: var(--muted); }
.legend li::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.5rem; border-radius: 50%; background: var(--white); }
.legend li.l-down::before { background: var(--down); }

/* ---------- Metode og bund ---------- */

.method { max-width: 46rem; }
.method h3 { margin: 2rem 0 0.4rem; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; color: var(--white); }
.method p { margin: 0 0 0.9rem; color: var(--ink); }
.method ul { margin: 0 0 0.9rem; padding-left: 1.2rem; }
.method li { margin-bottom: 0.4rem; }

footer {
  border-top: 1px solid var(--hair);
  padding: 2rem 0 3rem;
  font-size: 0.85rem;
  color: var(--muted);
}
footer p { margin: 0 0 0.4rem; max-width: 46rem; }

/* ---------- Mindre skærme ---------- */

@media (max-width: 52rem) {
  .road { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--faint); margin-left: 4px; }
  .road li { padding: 0 0 1.5rem 1.5rem; }
  .road li:last-child { padding-bottom: 0; }
  .road li::before { top: 0.35rem; left: -5px; }
  .facts, .records { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }

  /* tabellen bliver til kort */
  .seasons thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .seasons, .seasons tbody { display: block; }
  .seasons tr {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.15rem 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--hair);
  }
  .seasons td { display: block; padding: 0; border: 0; }
  .seasons tbody tr:hover td { background: none; }
  .c-season { grid-column: 1; }
  .c-date { grid-column: 2; text-align: right; white-space: normal; }
  .c-round { grid-column: 1 / -1; width: auto; margin-top: 0.5rem; }
  .c-match { grid-column: 1 / -1; margin-top: 0.6rem; font-size: 0.95rem; }
  tr.is-away { padding: 0.7rem 0; }
  tr.is-away td { padding: 0; }
  tr.is-away .c-rest { grid-column: 2; text-align: right; }
}

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

@media print {
  body, .band, .hero { background: #fff !important; color: #000; }
  .hero { min-height: 0; }
  .hero::before, .hero::after, .scroll-hint { display: none; }
  * { color: #000 !important; }
}
