/* ============================================================
   Tequilky Slavia Malé Hoštice — landing page
   Monochrome editorial, matching the main site's design language.
   ============================================================ */

:root {
  --bg:          #ffffff;
  --bg-subtle:   #f6f6f6;
  --ink:         #0f0f0f;
  --text:        #3d3d3d;
  --muted:       #6b6b6b;
  --faint:       #a3a3a3;
  --rule:        #e5e5e5;
  --rule-strong: #0f0f0f;

  --measure: 34rem;        /* prose line length */
  --gutter:  clamp(1rem, 5vw, 4rem);
  --shell:   72rem;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0c0c0c;
    --bg-subtle:   #151515;
    --ink:         #f2f2f2;
    --text:        #c2c2c2;
    --muted:       #8f8f8f;
    --faint:       #6a6a6a;
    --rule:        #262626;
    --rule-strong: #f2f2f2;
  }
}

:root[data-theme="dark"] {
  --bg:          #0c0c0c;
  --bg-subtle:   #151515;
  --ink:         #f2f2f2;
  --text:        #c2c2c2;
  --muted:       #8f8f8f;
  --faint:       #6a6a6a;
  --rule:        #262626;
  --rule-strong: #f2f2f2;
}

/* ──────────────────────────  base  ────────────────────────── */

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

html {
  scroll-behavior: smooth;
  /* clear the sticky header when jumping to an anchor */
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
strong { color: var(--ink); font-weight: 500; }

::selection { background: var(--ink); color: var(--bg); }

a { color: inherit; }

:where(a, button):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: .75rem 1.25rem; z-index: 100; text-decoration: none;
}
.skip:focus { left: 0; }

/* ──────────────────────────  top bar  ────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.topbar__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 var(--gutter);
  height: 3.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.topnav {
  display: flex; align-items: center; gap: .25rem;
  list-style: none; margin: 0; padding: 0;
}

.topnav a {
  display: block;
  padding: .4rem .7rem;
  font-size: .8125rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}
.topnav a:hover { color: var(--ink); }

.topnav__cta {
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink) !important;
  margin-left: .5rem;
  transition: border-color .15s ease;
}
.topnav__cta:hover { border-color: var(--rule-strong); }

/* The nav is secondary to the page itself — below 40rem the page reads
   top-to-bottom anyway, so we hide the links and keep the one CTA. */
@media (max-width: 40rem) {
  .topnav li:not(:last-child) { display: none; }
  .topnav__cta { margin-left: 0; }
}

/* ──────────────────────────  hero  ────────────────────────── */

.hero {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(4rem, 12vw, 9rem) var(--gutter) 0;
}

.eyebrow {
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.hero__title {
  font-size: clamp(3.25rem, 13vw, 8rem);
  letter-spacing: -0.045em;
  line-height: .92;
  margin-bottom: 2rem;
}

.hero__lede {
  max-width: 30rem;
  font-size: clamp(1.0625rem, 2.2vw, 1.3125rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text);
  text-wrap: pretty;
}

/* stat strip ------------------------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  border-top: 1px solid var(--rule-strong);
}

.stat {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem 1.5rem 0;
  border-right: 1px solid var(--rule);
}
.stat:last-child { border-right: 0; }
.stat:not(:first-child) { padding-left: 1.25rem; }

.stat dt {
  order: 2;
  font-size: .6875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .5rem;
}
.stat dd {
  order: 1;
  margin: 0;
  color: var(--ink);
  line-height: 1;
}

.stat__num {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat__plus { font-size: 1.5rem; font-weight: 300; color: var(--faint); }


@media (max-width: 40rem) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .stat:nth-child(odd)  { padding-left: 0; }
}

/* ──────────────────────────  section shell  ────────────────────────── */

.section {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  border-top: 1px solid var(--rule);
}

.section__label {
  font-size: .6875rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
  position: sticky;
  top: 5rem;
  align-self: start;
}

.section__body { min-width: 0; }

.section__title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  margin-bottom: 2rem;
}

@media (max-width: 52rem) {
  .section { grid-template-columns: 1fr; }
  .section__label { position: static; margin-bottom: .5rem; }
}

/* Invert the closing pitch so the ask lands with weight. The band goes
   full-bleed, but its padding keeps the content on the same grid as every
   other section. Colours are literals, not var(--ink) — a custom property
   redeclared here would also apply to this rule's own declarations. */
.section--invert {
  max-width: none;
  border-top: 0;
  padding-inline: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  background: #0f0f0f;
  /* Inherited colour is computed at :root, so restate it for the band. */
  color: var(--text);

  --bg:          #0f0f0f;
  --ink:         #ffffff;
  --text:        #cfcfcf;
  --muted:       #9c9c9c;
  --faint:       #7d7d7d;
  --rule:        #303030;
  --rule-strong: #ffffff;
}

/* On a dark page a near-black band would vanish, so lift it into a surface. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .section--invert {
    background: #171717;
    border-top: 1px solid #262626;
    --bg:          #171717;
    --ink:         #f2f2f2;
    --text:        #c2c2c2;
    --muted:       #8f8f8f;
    --faint:       #6a6a6a;
    --rule:        #303030;
    --rule-strong: #f2f2f2;
  }
}

:root[data-theme="dark"] .section--invert {
  background: #171717;
  border-top: 1px solid #262626;
  --bg:          #171717;
  --ink:         #f2f2f2;
  --text:        #c2c2c2;
  --muted:       #8f8f8f;
  --faint:       #6a6a6a;
  --rule:        #303030;
  --rule-strong: #f2f2f2;
}

/* ──────────────────────────  prose  ────────────────────────── */

.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1.25rem; }
/* Resolve --text here rather than inheriting body's already-computed
   colour, so prose follows whatever section it sits in (see .section--invert). */
.prose p { color: var(--text); text-wrap: pretty; }

.prose__lead {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink);
}

.pullquote {
  max-width: var(--measure);
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--rule-strong);
  font-size: clamp(1.1875rem, 3vw, 1.5rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: pretty;
}

/* ──────────────────────────  medals  ────────────────────────── */
/* Monochrome, so rank is encoded by fill — and always repeated in text. */

.medal {
  width: .625rem; height: .625rem;
  border-radius: 50%;
  border: 1px solid var(--ink);
  flex: 0 0 auto;
}
.medal--gold   { background: var(--ink); }
.medal--silver { background: linear-gradient(to right, var(--ink) 0 50%, transparent 50% 100%); }
.medal--bronze { background: transparent; }
.medal--none   { border-color: var(--rule); }

/* tally ----------------------------------------------------- */

.tally {
  display: flex; flex-wrap: wrap; gap: 2rem;
  list-style: none; margin: 0 0 3rem; padding: 0;
}
.tally li { display: flex; align-items: baseline; gap: .625rem; }
.tally .medal { transform: translateY(-1px); }
.tally__num {
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
}
.tally__what { font-size: .875rem; color: var(--muted); }

/* year list ------------------------------------------------- */

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

.year {
  display: grid;
  grid-template-columns: 4.25rem .625rem 1fr;
  column-gap: 1rem;
  align-items: baseline;
  padding: 1.125rem 0;
  border-top: 1px solid var(--rule);
}
.year:last-child { border-bottom: 1px solid var(--rule); }

.year__n {
  color: var(--faint);
  font-size: .9375rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.year--medal .year__n { color: var(--ink); }

.year .medal { transform: translateY(-1px); }

.year__result {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 400;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .625rem;
}
.year--medal .year__result { font-weight: 500; }
.year--off .year__result { color: var(--muted); font-weight: 300; }

.year__rank {
  font-size: .8125rem;
  font-weight: 400;
  color: var(--muted);
}

.year__note {
  grid-column: 3;
  margin-top: .375rem;
  font-size: .875rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: var(--measure);
  text-wrap: pretty;
}

@media (max-width: 30rem) {
  .year { grid-template-columns: 3.25rem .625rem 1fr; column-gap: .75rem; }
}

/* ──────────────────────────  representation table  ────────────────────────── */

.repre {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0 3.5rem;
  font-size: .9375rem;
}

.repre caption { text-align: left; }

.repre th, .repre td {
  text-align: left;
  padding: .875rem 1rem .875rem 0;
  border-top: 1px solid var(--rule);
  vertical-align: baseline;
}

.repre thead th {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 0;
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: .75rem;
}

.repre tbody th {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

.repre tbody tr:last-child th,
.repre tbody tr:last-child td { border-bottom: 1px solid var(--rule); }

.repre .num {
  font-variant-numeric: tabular-nums;
  width: 4.5rem;
}
/* keep "2008–2019" on one line — the en dash is a break opportunity */
.repre td:nth-child(4) { white-space: nowrap; }
.repre td:last-child { color: var(--muted); font-size: .875rem; }

/* Below 46rem the five columns stop fitting, so each row becomes a
   labelled block instead of a horizontal scroll. */
@media (max-width: 46rem) {
  .repre, .repre tbody, .repre tr, .repre th, .repre td { display: block; }
  .repre thead { display: none; }

  .repre tbody tr {
    border-top: 1px solid var(--rule);
    padding: 1.125rem 0;
  }
  .repre tbody tr:last-child { border-bottom: 1px solid var(--rule); }

  .repre th, .repre td { border: 0; padding: 0; }

  .repre tbody th {
    font-size: 1.0625rem;
    margin-bottom: .5rem;
    white-space: normal;
  }

  .repre td { display: flex; gap: .625rem; padding: .1875rem 0; }
  .repre td::before {
    content: attr(data-label);
    flex: 0 0 4.5rem;
    font-size: .6875rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
    line-height: 1.9;
  }
  .repre .num { width: auto; }
}

/* player figures -------------------------------------------- */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.figure__name {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: .25rem;
}
.figure__meta {
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  margin-bottom: .875rem;
}
.figure__text {
  font-size: .875rem;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

/* ──────────────────────────  staff  ────────────────────────── */

.staff { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }

.staff__row {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: .5rem 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.staff__row:last-child { border-bottom: 1px solid var(--rule); }

.staff__name { color: var(--ink); font-size: 1.0625rem; font-weight: 400; }
.staff__role { font-size: .8125rem; color: var(--muted); letter-spacing: .02em; }

/* ──────────────────────────  call to action  ────────────────────────── */

.cta {
  margin-top: 2.75rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}

.btn {
  display: inline-block;
  padding: .8125rem 1.75rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--ink);
  font-size: .9375rem;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.cta__note {
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--muted);
}

/* ──────────────────────────  footer  ────────────────────────── */

.footer { border-top: 1px solid var(--rule); }

.footer__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 3rem var(--gutter);
}

.footer__name { color: var(--ink); font-size: 1rem; font-weight: 400; }
.footer__sub  { font-size: .875rem; color: var(--muted); margin-top: .25rem; }
.footer__copy { font-size: .75rem; color: var(--faint); margin-top: 2rem; }

/* ──────────────────────────  footer social  ────────────────────────── */

.footer__social { margin-top: 1.25rem; }

.footer__social a {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  font-size: .875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}
.footer__social a:hover { color: var(--ink); }

.footer__social svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
  flex: 0 0 auto;
}

/* ──────────────────────────  hero photograph  ────────────────────────── */

.heroshot {
  max-width: var(--shell);
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding-inline: var(--gutter);
}

.heroshot img {
  display: block;
  width: 100%;
  height: auto;
  /* the source is 960px wide, so cap the upscale and crop rather than blur */
  max-height: 60vh;
  object-fit: cover;
  background: var(--bg-subtle);
}

.statband {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(3rem, 7vw, 5rem);
}

/* ──────────────────────────  crest in the wordmark  ────────────────────────── */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.wordmark img {
  display: block;
  height: 1.75rem;
  width: auto;
}
