/* Mászóverseny components. Plain HTML + CSS, every class prefixed mv-.
   Colours, fonts, spacing, radii and shadows come from tokens.css (tokens.json).
   Only motion lives here, because tokens.json has no motion family. */
:root {
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 320ms;
}

/* ---------- Base ---------- */
.mv { font-family: var(--font-body); color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.mv *, .mv *::before, .mv *::after { box-sizing: border-box; }
.mv :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mv-wrap { max-width: var(--max-w-content); margin-inline: auto; padding-inline: var(--space-6); }
.mv-wrap--wide { max-width: var(--max-w-wide); }
.mv-wrap--prose { max-width: var(--max-w-prose); }
@media (max-width: 768px) { .mv-wrap { padding-inline: var(--space-4); } }

.mv-eyebrow { margin: 0 0 var(--space-3); font-family: var(--font-display); font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-ink); }
.mv-link { font-family: var(--font-display); font-weight: 500; color: var(--brand-ink); text-decoration: none; border-bottom: 1px solid transparent; transition: color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard); }
.mv-link:hover { border-bottom-color: currentColor; }
.mv-link--chevron::after { content: " \203A"; }

/* ---------- Wordmark (type only, no logo file yet) ---------- */
.mv-wordmark { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.mv-wordmark b { font-weight: 700; color: var(--brand); }
.mv-on-earth .mv-wordmark, .mv-wordmark--on-earth { color: var(--on-earth); }
.mv-on-earth .mv-wordmark b, .mv-wordmark--on-earth b { color: var(--flash); }

/* ---------- Logo (inline SVG lockup; files in the Logos asset group) ---------- */
.mv-logo { display: inline-flex; align-items: center; flex: none; line-height: 0; text-decoration: none; }
.mv-logo__svg { display: block; height: 32px; width: auto; }
.mv-footer .mv-logo__svg { height: 36px; }
.mv-logo__tile { fill: var(--brand); }
.mv-logo__ridge { fill: none; stroke: #ffffff; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.mv-logo__hold { fill: var(--flash); }
.mv-logo__ink { fill: var(--ink); }
.mv-logo__brand { fill: var(--brand); }
@media (max-width: 768px) { .mv-logo__svg { height: 28px; } }

/* ---------- Button ---------- */
.mv-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-3) var(--space-5); border-radius: var(--radius-pill); border: 1px solid transparent; font-family: var(--font-display); font-size: 20px; line-height: 30px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard); }
.mv-btn--primary { background: var(--action); color: var(--on-action); }
.mv-btn--primary:hover { background: var(--flash); color: var(--on-flash); }
.mv-btn--ink { background: var(--ink); color: var(--surface); }
.mv-btn--ink:hover { background: var(--ink-2); }
.mv-btn--ghost { background: transparent; color: var(--ink); border-color: var(--control-border); }
.mv-btn--ghost:hover { border-color: var(--ink); }
.mv-btn--on-earth { background: var(--on-earth); color: var(--earth); }
.mv-btn--on-earth:hover { background: var(--flash); color: var(--on-flash); }
.mv-btn--sm { padding: var(--space-2) var(--space-4); font-size: 15px; line-height: 22px; }
.mv-btn--lg { padding: var(--space-4) var(--space-6); font-size: 22px; line-height: 28px; }
.mv-btn[disabled], .mv-btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.mv-on-earth :focus-visible { outline-color: var(--on-earth); }
@media (max-width: 768px) { .mv-btn { font-size: 18px; line-height: 26px; } .mv-btn--sm { font-size: 15px; line-height: 22px; } }

/* ---------- GlobalNav ---------- */
.mv-nav { position: sticky; top: 0; z-index: 50; background: var(--frost); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hairline); }
.mv-nav__bar { display: flex; align-items: center; gap: var(--space-6); height: var(--nav-height); }
.mv-nav__links { display: flex; gap: var(--space-5); margin: 0 auto 0 0; padding: 0; list-style: none; }
.mv-nav__links a { font-family: var(--font-display); font-size: 16px; line-height: 24px; font-weight: 400; text-transform: capitalize; color: var(--ink-2); text-decoration: none; transition: color var(--dur-fast) var(--ease-standard); }
.mv-nav__links a:hover, .mv-nav__links a[aria-current="page"] { color: var(--ink); }
.mv-nav__links a[aria-current="page"] { font-weight: 500; }
.mv-nav__toggle { display: none; margin-left: auto; padding: var(--space-2); border: 0; background: transparent; color: var(--ink); font: 500 15px/22px var(--font-display); cursor: pointer; }
@media (max-width: 768px) {
  .mv-nav__links { display: none; }
  .mv-nav__toggle { display: inline-flex; }
  .mv-nav__cta { display: none; }
  .mv-nav[data-open] .mv-nav__links { display: flex; flex-direction: column; gap: var(--space-4); position: absolute; top: var(--nav-height); left: 0; right: 0; padding: var(--space-5) var(--space-4); background: var(--surface); border-bottom: 1px solid var(--hairline); }
}

/* ---------- Hero (Apple register) ---------- */
.mv-hero { padding-block: var(--space-10) var(--space-9); text-align: center; background: var(--surface); }
.mv-hero__title { margin: 0 auto var(--space-5); max-width: 18ch; font-family: var(--font-display); font-size: clamp(38px, 5.5vw, 64px); line-height: 1.05; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
.mv-hero__subtitle { margin: 0 auto var(--space-7); max-width: 56ch; font-family: var(--font-body); font-size: clamp(18px, 2.4vw, 22px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.mv-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-5); }
.mv-hero__proof { margin: var(--space-6) 0 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.35; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 768px) { .mv-hero { padding-block: var(--space-8) var(--space-7); } }

/* ---------- PosterBand (Nike register) ---------- */
.mv-poster { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: 520px; padding-block: var(--space-11) var(--space-8); background: var(--earth); color: var(--on-earth); }
.mv-poster__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.mv-poster--photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--scrim) 0%, var(--scrim) 35%, rgba(0, 0, 0, 0) 75%); }
.mv-poster__inner { width: 100%; }
.mv-poster__kicker { margin: 0 0 var(--space-4); font-family: var(--font-mono); font-size: 13px; line-height: 1.35; letter-spacing: 0.04em; text-transform: uppercase; color: var(--on-earth-muted); font-variant-numeric: tabular-nums; }
.mv-poster__title { margin: 0 0 var(--space-6); font-family: var(--font-poster); font-stretch: 62%; font-weight: 900; font-size: clamp(64px, 13vw, 160px); line-height: 0.86; letter-spacing: -0.01em; text-transform: uppercase; color: var(--on-earth); text-wrap: balance; }
.mv-poster__title em { font-style: normal; color: var(--flash); }
.mv-poster__title--md { font-size: clamp(48px, 8vw, 96px); line-height: 0.9; }
.mv-poster__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.mv-poster .mv-link { color: var(--on-earth); }

/* ---------- Section and TileGrid ---------- */
.mv-section { padding-block: var(--space-9); background: var(--surface); }
.mv-section--alt { background: var(--surface-alt); }
.mv-section--earth { background: var(--earth); color: var(--on-earth); }
.mv-section__head { margin: 0 auto var(--space-7); max-width: 40ch; text-align: center; }
.mv-section__title { margin: 0; font-family: var(--font-display); font-size: clamp(32px, 4vw, 48px); line-height: 1.08; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
@media (max-width: 768px) { .mv-section { padding-block: var(--space-8); } }

.mv-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.mv-tile { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); min-height: 420px; padding: var(--space-8) var(--space-6) var(--space-6); border-radius: var(--radius-xl); background: var(--surface-alt); color: var(--ink); text-align: center; overflow: hidden; }
.mv-tile--earth { background: var(--earth); color: var(--on-earth); }
.mv-tile--earth .mv-eyebrow { color: var(--flash); }
.mv-tile--earth .mv-tile__text { color: var(--on-earth-muted); }
.mv-tile--earth .mv-link { color: var(--on-earth); }
.mv-tile__title { margin: 0; font-family: var(--font-display); font-size: clamp(32px, 3.6vw, 48px); line-height: 1.08; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
.mv-tile__text { margin: 0; max-width: 34ch; font-family: var(--font-body); font-size: 20px; line-height: 1.5; color: var(--ink-2); }
.mv-tile__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-5); margin-top: var(--space-2); }
.mv-tile__media { margin-top: auto; width: 100%; }
.mv-tile__numeral { font-family: var(--font-display); font-size: clamp(56px, 7vw, 80px); line-height: 1; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 768px) { .mv-tiles { grid-template-columns: minmax(0, 1fr); } .mv-tile { min-height: 0; padding: var(--space-7) var(--space-5) var(--space-5); } }

/* ---------- EventCard (frameless, Nike product card) ---------- */
.mv-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-7) var(--space-5); }
.mv-event { display: flex; flex-direction: column; gap: var(--space-1); color: var(--ink); text-decoration: none; min-width: 0; }
.mv-event__media { position: relative; aspect-ratio: 4 / 3; max-width: 100%; margin-bottom: var(--space-3); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-alt); }
.mv-event__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-standard); }
.mv-event:hover .mv-event__media img { transform: scale(1.03); }
.mv-event__date { position: absolute; left: var(--space-3); top: var(--space-3); display: grid; justify-items: center; min-width: 56px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-lg); background: var(--earth); color: var(--on-earth); font-family: var(--font-poster); font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: 1; }
.mv-event__date-day { font-size: 32px; }
.mv-event__date-month { font-size: 14px; letter-spacing: 0.06em; color: var(--on-earth-muted); }
.mv-event__state { font-family: var(--font-display); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--brand-ink); }
.mv-event__state--closed { color: var(--muted); }
.mv-event__title { margin: 0; font-family: var(--font-display); font-size: 20px; line-height: 24px; font-weight: 600; }
.mv-event__meta { margin: 0; font-family: var(--font-notes); font-size: 16px; line-height: 24px; color: var(--muted); }
.mv-event__spots { margin: var(--space-1) 0 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.35; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mv-event:hover .mv-event__title { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- StatusLamp (Hol a Szikla) ---------- */
.mv-lamp { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink); }
.mv-lamp::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: var(--radius-pill); background: var(--status-none); box-shadow: 0 0 0 1px var(--control-border); }
.mv-lamp--dry::before { background: var(--status-dry); }
.mv-lamp--maybe::before { background: var(--status-maybe); }
.mv-lamp--wet::before { background: var(--status-wet); }
.mv-lamp--lg::before { width: 20px; height: 20px; }
.mv-lamp__note { font-family: var(--font-notes); font-weight: 400; color: var(--muted); }
.mv-days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.mv-days li { display: grid; justify-items: center; gap: var(--space-1); padding: var(--space-3) var(--space-2); border-radius: var(--radius-lg); background: var(--surface-alt); font-family: var(--font-notes); font-size: 14px; line-height: 20px; color: var(--muted); }
.mv-days .mv-lamp { font-size: 0; gap: 0; }
.mv-days b { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); }

/* ---------- GradeBadge ---------- */
.mv-grade { display: inline-flex; align-items: center; gap: var(--space-2); padding: 2px var(--space-3) 2px 2px; border-radius: var(--radius-pill); border: 1px solid var(--hairline); background: var(--surface-raised); font-family: var(--font-mono); font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.mv-grade__tape { width: 24px; height: 24px; border-radius: var(--radius-pill); background: var(--tape-yellow); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.mv-grade__scale { font-family: var(--font-notes); font-size: 13px; font-weight: 400; color: var(--muted); }
.mv-grade--yellow .mv-grade__tape { background: var(--tape-yellow); }
.mv-grade--orange .mv-grade__tape { background: var(--tape-orange); }
.mv-grade--red .mv-grade__tape { background: var(--tape-red); }
.mv-grade--green .mv-grade__tape { background: var(--tape-green); }
.mv-grade--blue .mv-grade__tape { background: var(--tape-blue); }
.mv-grade--purple .mv-grade__tape { background: var(--tape-purple); }
.mv-grade--black .mv-grade__tape { background: var(--tape-black); box-shadow: 0 0 0 1px var(--control-border); }
.mv-grade--white .mv-grade__tape { background: var(--tape-white); box-shadow: inset 0 0 0 1px var(--control-border); }

/* ---------- ResultsTable ---------- */
.mv-results-scroll { overflow-x: auto; max-width: 100%; }
.mv-results { width: 100%; min-width: 560px; border-collapse: collapse; font-family: var(--font-notes); font-size: 16px; line-height: 24px; color: var(--ink); }
.mv-results caption { padding-bottom: var(--space-4); text-align: left; font-family: var(--font-display); font-size: 20px; line-height: 24px; font-weight: 600; }
.mv-results th { padding: var(--space-2) var(--space-3); text-align: left; font-family: var(--font-display); font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); }
.mv-results td { padding: var(--space-3); border-bottom: 1px solid var(--hairline); vertical-align: baseline; }
.mv-results .mv-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-results td:first-child { width: 3.5em; font-family: var(--font-poster); font-stretch: 62%; font-weight: 800; font-size: 28px; line-height: 1; }
.mv-results tr.mv-podium td:first-child { color: var(--brand-ink); }
.mv-results .mv-athlete { font-family: var(--font-display); font-weight: 500; }
.mv-results .mv-club { color: var(--muted); }

/* ---------- Prose (article body) ---------- */
.mv-prose { max-width: var(--max-w-prose); font-family: var(--font-body); font-size: 20px; line-height: 32px; color: var(--ink); }
.mv-prose > * { margin: 0 0 1em; }
.mv-prose h1, .mv-prose h2, .mv-prose h3, .mv-prose h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; color: var(--ink); text-wrap: balance; margin: 1.6em 0 0.5em; }
.mv-prose h1 { font-size: 50px; line-height: 60px; margin-top: 0; }
.mv-prose h2 { font-size: 40px; line-height: 48px; }
.mv-prose h3 { font-size: 32px; line-height: 38.4px; }
.mv-prose h4 { font-size: 20px; line-height: 24px; }
.mv-prose p { text-wrap: pretty; }
.mv-prose a { color: var(--brand-ink); text-decoration: none; border-bottom: 1px solid transparent; transition: color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard); }
.mv-prose a:hover { border-bottom-color: currentColor; }
.mv-prose blockquote { margin: var(--space-6) 0; padding: var(--space-2) var(--space-5); border-left: 3px solid var(--brand); font-style: italic; color: var(--ink-2); }
.mv-prose .mv-note, .mv-note { font-family: var(--font-notes); font-size: 18px; line-height: 28px; color: var(--muted); }
.mv-prose code { padding: 1px 6px; border-radius: var(--radius-sm); background: var(--surface-alt); font-family: var(--font-mono); font-size: 0.8em; }
.mv-prose ul, .mv-prose ol { padding-left: 1.2em; }
.mv-prose li + li { margin-top: 0.35em; }
.mv-prose figure img { border-radius: var(--radius-lg); }
.mv-prose figcaption { margin-top: var(--space-2); font-family: var(--font-notes); font-size: 14px; line-height: 20px; color: var(--muted); }
@media (max-width: 768px) {
  .mv-prose { font-size: 18px; line-height: 28px; }
  .mv-prose h1 { font-size: 36px; line-height: 44px; }
  .mv-prose h2 { font-size: 30px; line-height: 38px; }
  .mv-prose h3 { font-size: 24px; line-height: 30px; }
  .mv-prose h4 { font-size: 18px; line-height: 24px; }
}

/* ---------- FormField ---------- */
.mv-field { display: grid; gap: var(--space-2); max-width: 420px; }
.mv-field__label { font-family: var(--font-display); font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); }
.mv-field__input { width: 100%; padding: var(--space-3) var(--space-4); border: 1px solid var(--control-border); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink); font-family: var(--font-display); font-size: 17px; line-height: 24px; transition: border-color var(--dur-fast) var(--ease-standard); }
.mv-field__input::placeholder { color: var(--muted); }
.mv-field__input:hover { border-color: var(--ink-2); }
.mv-field__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--ink); }
.mv-field__help { margin: 0; font-family: var(--font-notes); font-size: 16px; line-height: 24px; color: var(--muted); }
.mv-field--error .mv-field__input { border-color: var(--status-wet); box-shadow: 0 0 0 1px var(--status-wet); }
.mv-field--error .mv-field__help { color: var(--ink); }
.mv-field--error .mv-field__help::before { content: "! "; font-weight: 700; color: var(--status-wet); }

/* ---------- Footer ---------- */
.mv-footer { padding-block: var(--space-8) var(--space-6); background: var(--surface-alt); font-family: var(--font-notes); font-size: 14px; line-height: 20px; color: var(--muted); }
.mv-footer__cols { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: var(--space-6); padding-bottom: var(--space-6); border-bottom: 1px solid var(--hairline); }
.mv-footer__about { margin: var(--space-3) 0 0; max-width: 30ch; }
.mv-footer h4 { margin: 0 0 var(--space-3); font-family: var(--font-display); font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.mv-footer ul { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.mv-footer a { color: var(--ink-2); text-decoration: none; }
.mv-footer a:hover { color: var(--ink); text-decoration: underline; }
.mv-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-5); }
@media (max-width: 768px) { .mv-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mv-footer__brand { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  .mv *, .mv *::before, .mv *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .mv-event:hover .mv-event__media img { transform: none; }
}
