@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/figtree-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/figtree-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #00095B;
  --navy-2: #0B1A7A;
  --line: #1B2A78;
  --blue: #0562D2;
  --sky: #9FC3FF;
  --red: #D7141A;
  --ink: #00095B;
  --muted: #3A4566;
  --soft: #D6DDEA;
  --white: #FFFFFF;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--navy);
  color: var(--white);
  line-height: 1.45;
}
img { display: block; max-width: 100%; }
a { color: var(--sky); }
a:hover { color: var(--white); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

/* ---------- Header ---------- */
.top {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 18px; }
.brand .ford { height: 40px; width: auto; }
.brand .facr { height: 50px; width: auto; }
.brand { text-decoration: none; }
.claim {
  color: var(--white);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.15;
  max-width: 112px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
@media (max-width: 639px) {
  .brand { gap: 10px; }
  .brand .ford { height: 30px; }
  .brand .facr { height: 40px; }
  .claim { max-width: 130px; padding-left: 10px; }
  .top-link .long { display: none; }
}
@media (min-width: 640px) {
  .claim { font-size: 17px; max-width: none; padding-left: 20px; margin-left: 4px; }
}
.top-link {
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 12px 0;
}

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.content {
  padding: 24px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 820px;
}
.photo {
  position: relative;
  min-height: 260px;
  background: url(assets/auta.webp) 50% 60% / cover no-repeat, var(--navy-2);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 28px 16px;
}
.photo-logos {
  display: flex;
  align-items: center;
  gap: 28px;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.55));
}
.photo-logos .ford { width: 190px; height: auto; }
.photo-logos .facr { width: 76px; height: auto; }

@media (min-width: 1024px) {
  .layout {
    grid-template-columns: minmax(0, 820px) minmax(320px, 1fr);
    min-height: calc(100vh - 76px);
  }
  .content { padding: 40px 56px 40px 64px; }
  .photo {
    position: sticky;
    top: 0;
    height: calc(100vh - 76px);
    min-height: 560px;
    padding: 48px 36px;
  }
  /* Logos scale with the photo column so a narrow column never overflows the page. */
  .photo-logos { gap: 9%; width: 100%; max-width: 464px; justify-content: center; }
  .photo-logos .ford { width: 64%; }
  .photo-logos .facr { width: 26%; }
}

/* ---------- Typography ---------- */
h1 {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 48px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.01em;
}
.lead { margin: 0; font-size: 17px; color: var(--soft); max-width: 440px; }
.kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sky);
}
.note { margin: 2px 0 0; font-size: 14px; color: var(--soft); }

/* ---------- Countdown ---------- */
.intro-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.countdown { display: flex; gap: 8px; }
.countdown div {
  width: 70px;
  padding: 8px 0;
  border-radius: 12px;
  background: var(--navy-2);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown strong { font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; color: var(--soft); margin-top: 3px; }
@media (max-width: 1023px) {
  .countdown { width: 100%; }
  .countdown div { flex: 1; width: auto; }
}

/* ---------- Guide cards ---------- */
.cards { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
}
.card img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; }
.card-meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--blue);
  border-radius: 999px;
  padding: 4px 10px;
}
.tag.red { background: var(--red); }
.who { font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.card-body { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-size: 24px; font-weight: 900; line-height: 1.1; }
.card-quote { font-size: 15px; color: var(--muted); }
.cta {
  grid-column: 1 / -1;
  display: block;
  text-align: center;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  border-radius: 999px;
  padding: 15px 22px;
  transition: background 0.15s;
}
.cta:hover { background: var(--blue); color: var(--white); }

@media (min-width: 1024px) {
  /* Desktop card: tag + name on top, flush left with the photo; below it the photo
     and a full-width text column with the CTA underneath, so titles stay on one line. */
  .card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px 22px;
    padding: 18px 22px 20px 18px;
    align-items: start;
  }
  .card-meta { grid-column: 1 / -1; grid-row: 1; flex-direction: row; align-items: center; gap: 10px; }
  .card img { width: 112px; height: 112px; grid-column: 1; grid-row: 2 / 4; }
  .card-body { grid-column: 2; grid-row: 2; gap: 4px; }
  .cta { grid-column: 2; grid-row: 3; justify-self: start; white-space: nowrap; padding: 12px 22px; margin-top: 2px; }
  .card-title { font-size: 26px; }
}

/* ---------- Prize ---------- */
.prize { display: flex; gap: 20px; align-items: center; margin-top: 18px; }
.prize img {
  width: 120px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}
.prize-text { display: flex; flex-direction: column; gap: 6px; }
.prize-title { font-size: 26px; font-weight: 900; line-height: 1.05; }
.prize-sub { font-size: 15px; color: var(--soft); }
@media (min-width: 1024px) {
  .prize { gap: 32px; margin-top: auto; padding-top: 24px; }
  .prize img { width: 230px; }
  .prize-title { font-size: 38px; }
  .prize-sub { font-size: 17px; }
}

/* ---------- States ---------- */
/* Hide everything that doesn't belong to the current state; matching blocks keep their own display. */
body[data-current="kolo1"] [data-state]:not([data-state~="kolo1"]),
body[data-current="zapas"] [data-state]:not([data-state~="zapas"]),
body[data-current="kolo2"] [data-state]:not([data-state~="kolo2"]),
body[data-current="konec"] [data-state]:not([data-state~="konec"]) { display: none; }

.panel {
  background: var(--navy-2);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel strong { font-size: 20px; }
.panel p { margin: 0; color: var(--soft); }
.live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 8px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

.cta-light {
  align-self: flex-start;
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 14px 22px;
}
.cta-light:hover { background: var(--sky); color: var(--navy); }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 22px clamp(16px, 4vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--soft);
}
.foot a { padding: 6px 0; }
.powered {
  flex-basis: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}
.powered:hover { color: var(--sky); }
.powered img { height: 24px; width: auto; }

/* ---------- Rules page ---------- */
.rules { background: #EEF1F7; color: var(--ink); }
.rules-hero { padding: 40px 16px 48px; }
.rules-wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.rules-hero h1 { color: var(--ink); }
.rules-hero .kicker { color: var(--blue); }
.rules-hero .lead { color: var(--muted); max-width: 720px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.fact { background: var(--white); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.fact .kicker { color: var(--blue); font-size: 12px; }
.fact strong { font-size: 20px; line-height: 1.2; }
.fact p { margin: 0; color: var(--muted); }
.data-strip { background: var(--navy); color: var(--white); border-radius: 18px; padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.data-strip p { margin: 0; flex: 1 1 420px; color: var(--soft); }
.legal { background: var(--white); padding: 40px 16px 72px; }
.legal details { max-width: 820px; margin: 0 auto; }
.legal summary { cursor: pointer; font-size: 24px; font-weight: 900; padding: 14px 0; border-bottom: 2px solid var(--ink); }
.legal-body { padding-top: 16px; display: flex; flex-direction: column; gap: 22px; font-size: 16px; line-height: 1.65; color: #1F2A4D; }
.legal-body h2 { margin: 0 0 6px; font-size: 19px; color: var(--ink); }
.legal-body p, .legal-body ul { margin: 0 0 10px; }
.legal-body a { color: var(--blue); }
.fill { background: #FFE9A8; padding: 0 4px; border-radius: 4px; }
.rules .top { background: var(--navy); }
.rules .foot { background: var(--navy); }
