/* gammatiming.com landing – tokens shared with the result pages (docs/design.md) */
:root {
  --ink: #141416;
  --ink-2: #0b0b0c;
  --red: #c30900;
  --red-dark: #9e0700;
  --red-bright: #ff3b2f;
  --red-light: #ff8a80;
  --bg: #f5f6f7;
  --surface: #ffffff;
  --line: #dcdde1;
  --field: #c9cbd1;
  --muted: #5b5e66;
  --muted-2: #4a4d55;
  --on-dark: #dadbdf;
  --on-dark-muted: #b9bbc1;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(20, 20, 22, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); }
a:hover { color: var(--red-dark); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-lg { height: 56px; padding: 0 26px; font-size: 17px; border-radius: 12px; }
.btn-block { width: 100%; height: 52px; font-size: 16px; }
.btn-red, .btn-red:hover { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-dark, .btn-dark:hover { background: var(--ink); color: #fff; }
.btn-light, .btn-light:hover { background: #fff; color: var(--ink); }
.btn-light svg { color: var(--red); }
.btn-outline, .btn-outline:hover { border: 2px solid rgba(255, 255, 255, 0.5); color: #fff; }
.btn-outline:hover { border-color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

.hero-lanes {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(180deg, transparent 0 46px, rgba(255, 255, 255, 0.03) 46px 48px);
}

/* Finish line: two checker columns and a red band on the right */
.hero-finish {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 50px;
  display: flex;
}
.hero-finish span {
  width: 12px;
  background-image: repeating-linear-gradient(180deg, #fff 0 12px, var(--ink) 12px 24px);
}
.hero-finish span + span {
  background-image: repeating-linear-gradient(180deg, var(--ink) 0 12px, #fff 12px 24px);
}
.hero-finish i { flex: 1; background: var(--red); }

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding-right: 66px;
}
.nav-logo { line-height: 0; margin-right: auto; }
.nav-logo img { height: 32px; width: auto; }

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.1); }

.nav-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 12px;
  right: 12px;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #1f2024;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.nav-menu.is-open { display: flex; }
.nav-menu a:not(.btn) {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px;
  border-radius: 8px;
}
.nav-menu a:not(.btn):hover { background: rgba(255, 255, 255, 0.08); }
.nav-menu .btn { margin-top: 6px; }

.hero-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 40px;
  padding-right: 66px;
}

.eyebrow,
.kicker {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow { color: var(--red-light); font-weight: 600; }
.kicker-light { color: var(--red-light); }

.hero-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.hero-badge { display: block; flex: none; width: auto; height: 120px; }

/* Live clock next to the badge (landing.js); only with JS, nothing to show without it. */
.hero-clock { display: none; }
.js .hero-clock {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  min-width: 0;
  padding-left: 16px;
}
/* Red divider and the red word of the headline: flash on every whole second, then
   fade (synced in landing.js) */
.js .hero-clock::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--red);
}
.is-ticking .hero-clock::before {
  animation: clock-pulse 1s ease-out infinite;
  animation-delay: var(--pulse-delay, 0s);
}
.is-ticking .hero h1 em {
  animation: word-pulse 1s ease-out infinite;
  animation-delay: var(--pulse-delay, 0s);
}
@keyframes clock-pulse { from { opacity: 1; } to { opacity: 0.35; } }
@keyframes word-pulse { from { opacity: 1; } to { opacity: 0.75; } }
@media (prefers-reduced-motion: reduce) {
  .is-ticking .hero-clock::before, .is-ticking .hero h1 em { animation: none; }
}
.clock-time {
  font-family: var(--display);
  font-weight: 700;
  font-size: 29px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.clock-ms { color: var(--red-bright); font-size: 0.7em; }
.clock-date {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--on-dark-muted);
}

.hero h1 {
  margin-top: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 58px;
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--red-bright); }

.lead {
  margin: 18px 0 0;
  font-size: 17px;
  color: var(--on-dark);
  max-width: 540px;
}

.actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Result card ---------- */
.result-card {
  background: var(--surface);
  color: var(--ink);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Loads with the race list (landing.js): fades in once the data is there, and the
   current/recent block opens smoothly instead of jumping. Only with JS; the
   fallback animation shows the card anyway if the script never runs. */
.js .result-card:not(.is-ready) {
  opacity: 0;
  transform: translateY(14px);
  animation: rc-fallback 0s 4s forwards;
}
.result-card { transition: opacity 0.5s ease, transform 0.5s ease; }
@keyframes rc-fallback { to { opacity: 1; transform: none; } }

.rc-reveal[hidden] { display: none; }
.rc-reveal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 0fr;
  min-width: 0;
  transition: grid-template-rows 0.5s ease;
}
.result-card.is-ready .rc-reveal { grid-template-rows: 1fr; }
.rc-reveal-inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 16px; }
.rc-reveal.is-open .rc-reveal-inner { overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  .result-card, .rc-reveal { transition: none; }
  .js .result-card:not(.is-ready) { transform: none; }
}

.rc-label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.dot { width: 10px; height: 10px; border-radius: 5px; background: var(--red); }

.rc-race { display: block; margin-top: 8px; color: var(--ink); text-decoration: none; }
.rc-race:hover { color: var(--ink); }
.rc-name { display: block; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; }
.rc-date { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); }

.search { margin-top: 14px; display: flex; gap: 8px; }
.search input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--field);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
}
.search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 20, 22, 0.12); }

.rc-recent { border-top: 1px solid #ecedef; padding-top: 12px; }
.rc-sub {
  margin: 0 0 4px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.rc-recent ul { list-style: none; margin: 0; padding: 0; }
.rc-recent a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #ecedef;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.rc-recent a span { font-weight: 400; font-size: 14px; color: var(--muted); white-space: nowrap; }
.rc-recent a:hover { color: var(--red); }

/* ---------- Numbers ---------- */
.numbers { background: var(--surface); border-bottom: 1px solid var(--line); }
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-top: 28px;
  padding-bottom: 28px;
}
.numbers strong { display: block; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.numbers span { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding-top: 56px; padding-bottom: 8px; }
.section h2 {
  margin-top: 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 40px;
  line-height: 0.95;
  max-width: 760px;
}

.cards {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card h3 { margin-top: 14px; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; }
.card p { margin: 8px 0 0; color: var(--muted-2); }

.sports {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.sport {
  position: relative;
  overflow: hidden;
  min-height: 120px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.sport-icon { margin-bottom: auto; padding-bottom: 16px; box-sizing: content-box; color: var(--red-light); }
.sport::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--red); }
.sport strong { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; }
.sport span { margin-top: 4px; font-size: 14px; color: var(--on-dark-muted); }

.refs {
  margin-top: 56px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 48px 0;
}
.refs-list {
  margin: 16px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.25;
}
.refs-list .slash { color: var(--red); padding: 0 6px; }

.quotes {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.quotes figure {
  margin: 0;
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.quotes blockquote { margin: 0; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.05; }
.quotes figcaption { margin-top: 14px; color: var(--muted); }
.quotes .is-red { background: var(--red); color: #fff; box-shadow: none; }
.quotes .is-red figcaption { color: #ffe1de; }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
  margin-top: 64px;
  background: var(--ink);
  color: #fff;
}
.contact-finish {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 14px;
  background-image: repeating-linear-gradient(180deg, #fff 0 14px, var(--ink) 14px 28px);
}
.contact-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 56px;
  padding-bottom: 56px;
  padding-left: 36px;
}
.contact h2 { margin-top: 8px; font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 0.92; }
.motto { margin: 12px 0 0; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0.04em; color: var(--red-light); }
.contact-actions p { margin: 12px 0 0; color: var(--on-dark-muted); font-size: 15px; }
.contact-actions p a, .contact-actions p a:hover { color: #fff; }
.contact-actions .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

.footer { background: var(--ink-2); color: #8a8d95; font-size: 14px; }
.footer-body {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
}
.footer img { height: 28px; width: auto; opacity: 0.8; }

/* ---------- Tablet and up ---------- */
@media (min-width: 720px) {
  .wrap { padding-left: 32px; padding-right: 32px; }
  .nav, .hero-body { padding-right: 82px; }
  .hero h1 { font-size: 80px; }
  .hero-brand { gap: 24px; }
  .js .hero-clock { padding-left: 24px; }
  .clock-time { font-size: 56px; }
  .clock-date { font-size: 16px; }
  .numbers-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .numbers strong { font-size: 52px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sports { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section h2 { font-size: 52px; }
  .refs-list { font-size: 34px; }
  .contact h2 { font-size: 64px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1000px) {
  /* Finish line is 140px wide; keep nav and hero content clear of it on any width. */
  .hero-finish { width: 140px; }
  .hero-finish span { width: 22px; }
  .hero-finish span:first-child { background-image: repeating-linear-gradient(180deg, var(--ink) 0 22px, #fff 22px 44px); }
  .hero-finish span + span { background-image: repeating-linear-gradient(180deg, #fff 0 22px, var(--ink) 22px 44px); }

  .nav { padding-right: max(32px, min(172px, calc(172px - (100vw - 1200px) / 2))); gap: 28px; }
  .nav-logo img { height: 40px; }
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 0;
    background: none;
    box-shadow: none;
  }
  .nav-menu a:not(.btn) { padding: 6px 0; }
  .nav-menu a:not(.btn):hover { background: none; text-decoration: underline; text-underline-offset: 6px; }
  .nav-menu .btn { margin-top: 0; height: 44px; }
  .nav-lang {
    padding: 6px 10px !important;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px !important;
  }

  .hero-body {
    flex-direction: row;
    align-items: center;
    gap: 56px;
    padding-top: 48px;
    padding-bottom: 88px;
    padding-right: max(32px, min(172px, calc(172px - (100vw - 1200px) / 2)));
  }
  .hero-text { flex: 1 1 0; max-width: 640px; }
  .hero h1 { font-size: clamp(84px, 8.7vw, 104px); }
  .hero-brand { margin-bottom: 28px; }
  .hero-badge { height: 160px; }
  .clock-time { font-size: clamp(46px, 5vw, 66px); }
  .clock-date { font-size: 17px; }
  .lead { font-size: 20px; }
  .result-card { flex: 0 0 clamp(340px, 33vw, 400px); padding: 24px; }

  .section { padding-top: 96px; }
  .section h2 { font-size: 60px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .card { padding: 28px; }
  .sports { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sport { min-height: 180px; padding: 20px; }
  .refs { padding: 72px 0; }
  .contact-body { flex-direction: row; align-items: flex-end; justify-content: space-between; padding-top: 88px; padding-bottom: 88px; padding-left: 48px; }
  .contact h2 { font-size: 72px; }
}

/* ---------- Text pages (Adatkezelés, Impresszum) ---------- */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.page-bar { background: var(--ink); color: #fff; }
.page-bar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.page-bar .nav-logo { margin-right: 0; }
.page-bar .nav-lang {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}
.page-main { flex: 1; max-width: 860px; padding-top: 40px; padding-bottom: 64px; }
.page-main h1 { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
.page-note { color: var(--muted); font-style: italic; }

.legal { margin-top: 24px; font-size: 16px; line-height: 1.6; color: #2c2e33; overflow-wrap: anywhere; }
.legal h2 {
  margin: 40px 0 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
  color: var(--ink);
}
.legal h3 { margin: 28px 0 8px; font-size: 18px; font-weight: 700; color: var(--ink); }
.legal p { margin: 0 0 12px; }
.legal ul, .legal ol { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin-bottom: 4px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; display: block; overflow-x: auto; }
.legal td, .legal th { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
.legal .facts { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.legal .facts dt { font-weight: 600; color: var(--muted-2); }
.legal .facts dd { margin: 0; }
@media (max-width: 560px) {
  .legal .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .legal .facts dd { margin-bottom: 10px; }
  .page-main h1 { font-size: 36px; }
}

.footer a, .footer a:hover { color: #dadbdf; }

/* Back to top: as on the result pages (src/app/@components/ui/gt-header) */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 24px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; }
}
