/* lukecrfl.com – Road to 12
   Brand: #1A1A2E, #F5F5F5, #00B4D8, Montserrat. Jeden tmavý motiv (značka je tmavá). */

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #12121f;
  --surface: #1a1a2e;
  --line: #2b2b45;
  --text: #f5f5f5;
  --muted: #a6a9c0;
  --accent: #00b4d8;
  --accent-ink: #06121a;
  --radius: 14px;
  --radius-media: 22px;
  --ease-odhal: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-pruzina: cubic-bezier(0.3, 1.7, 0.5, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(16px, 5vw, 64px);
  /* obsah max 1200px, na širokých monitorech se zbytek rozdělí do okrajů */
  --pad-x: max(var(--pad), calc((100% - 1200px) / 2));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: clip;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
.accent { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.95; }
h2 { font-size: clamp(2.4rem, 7vw, 4.6rem); }

/* ---------- hero ---------- */
.hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  align-content: end;
  position: relative;
}
.hero-media { position: absolute; inset: 0 0 auto 0; height: 58dvh; overflow: hidden; }
.hero-video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgb(18 18 31 / 0) 40%, var(--bg) 100%);
}
.hero-text { position: relative; padding: 0 var(--pad) max(28px, env(safe-area-inset-bottom)); }
.handle { display: inline-block; font-weight: 700; font-size: 0.9rem; color: var(--muted); text-decoration: none; margin-bottom: 10px; }
.handle:hover { color: var(--text); }
h1 { font-size: clamp(3.6rem, 17vw, 8.5rem); line-height: 0.9; }
.lead { color: var(--muted); max-width: 46ch; margin: 14px 0 20px; font-size: 1rem; }

/* skóre 8 → 12 (plovoucí karta, jen desktop) */
.skore { display: none; }

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    /* na vysokých monitorech nesmí hero odjet ke spodku obrazovky */
    min-height: min(100dvh, 940px);
    align-content: center;
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    padding: 40px var(--pad-x);
  }
  .hero-text { order: -1; padding: 0; }
  .hero-media {
    position: relative; inset: auto; height: min(84dvh, 780px); aspect-ratio: 9 / 16; justify-self: center;
    border-radius: var(--radius-media); overflow: visible;
  }
  .hero-video { border-radius: var(--radius-media); box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.7); }
  .hero-media::after { display: none; }
  .lead { font-size: 1.1rem; }
  .skore {
    display: flex; align-items: baseline; gap: 10px;
    position: absolute; left: -48px; bottom: 56px;
    padding: 14px 20px; border-radius: var(--radius);
    background: rgb(26 26 46 / 0.82); border: 1px solid var(--line);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    font-weight: 900; font-size: 2.2rem; line-height: 1;
  }
  .skore-sipka { color: var(--muted); font-size: 1.4rem; }
}

/* ---------- formulář ---------- */
.signup { max-width: 520px; }
.signup label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; }
.signup-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.signup input[type="email"] {
  min-width: 0; height: 56px; padding: 0 16px;
  font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 200ms ease;
}
.signup input::placeholder { color: #8a8da6; }
.signup input:focus { outline: none; border-color: var(--accent); }
.signup input[aria-invalid="true"] { border-color: #ff6b6b; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 24px; white-space: nowrap;
  font: inherit; font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--accent-ink); background: var(--accent); border: 0; border-radius: var(--radius);
  cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.small { margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); }
.stav { margin: 10px 0 0; font-size: 0.95rem; font-weight: 600; min-height: 1.5em; }
.stav.chyba { color: #ff8a8a; }
.stav.ok { color: var(--accent); }
.signup.hotovo .signup-row, .signup.hotovo label, .signup.hotovo .small { display: none; }
.signup.hotovo .stav { font-size: 1.1rem; }

/* ---------- kde jsem ---------- */
.stav-sekce, .obsah, .zaver { padding: clamp(72px, 12vw, 140px) var(--pad-x); }
.cisla { display: flex; gap: clamp(32px, 8vw, 96px); margin: 36px 0 28px; }
.cisla p { margin: 0; display: grid; }
.velke { font-weight: 900; font-size: clamp(4.5rem, 16vw, 9rem); line-height: 0.9; }
.popis { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.opakovani { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; max-width: 760px; }
.opakovani li { height: 56px; border-radius: 6px; border: 1px solid var(--line); }
.opakovani li.hotovo { background: var(--accent); border-color: var(--accent); }
.pozn { color: var(--muted); margin: 22px 0 0; max-width: 40ch; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .opakovani li.hotovo {
      transform-origin: bottom;
      animation: tycka linear both;
      animation-timeline: view();
      animation-range: entry 10% cover calc(30% + var(--i) * 2.5%);
    }
  }
}
@keyframes tycka { from { transform: scaleY(0.08); opacity: 0.3; } }

/* ---------- pás ---------- */
.pruh { border-block: 1px solid var(--line); padding: 18px 0; }
.pruh span {
  font-weight: 900; text-transform: uppercase; font-size: clamp(1.6rem, 5vw, 3rem); padding-right: 0.8em;
}
/* variabilní písmo má překrývající se obrysy: tah zdvojit a zakrýt výplní v barvě pozadí, vnitřní čáry zmizí */
.pruh span:nth-child(even) { color: var(--bg); -webkit-text-stroke: 3px var(--accent); paint-order: stroke fill; }

/* ---------- co dostaneš ---------- */
.polozky { display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 760px) { .polozky { grid-template-columns: 1fr 1fr; } }
.polozka { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.polozka h3 { font-size: 1.35rem; line-height: 1.1; margin-bottom: 12px; }
.polozka p { margin: 0; color: var(--muted); }

/* ---------- závěr a patička ---------- */
.zaver { border-top: 1px solid var(--line); }
.zaver h2 { margin-bottom: 28px; }

/* kde jsem + závěr: na střed, ať se střídá s levým hero a kartami */
.stav-sekce, .zaver { text-align: center; }
.stav-sekce .cisla { justify-content: center; }
.stav-sekce .opakovani, .stav-sekce .pozn, .zaver .signup { margin-inline: auto; }
.paticka { display: flex; gap: 24px; padding: 28px var(--pad-x) max(28px, env(safe-area-inset-bottom)); color: var(--muted); font-size: 0.85rem; }
.paticka a { text-decoration: none; }
.paticka a:hover { color: var(--text); }

/* ---------- textové stránky (privacy, welcome) ---------- */
.text { max-width: 720px; padding: clamp(48px, 10vw, 110px) var(--pad); }
.text h1 { font-size: clamp(2.6rem, 9vw, 4.6rem); margin-bottom: 28px; }
.text h2 { font-size: 1.2rem; line-height: 1.2; margin: 36px 0 10px; }
.text p, .text li { color: var(--muted); }
.text strong { color: var(--text); }
.zpet { display: inline-block; margin-top: 32px; font-weight: 700; color: var(--accent); text-decoration: none; }

/* ================= pohyb (podle skillu pohyb-jankalac) ================= */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 700ms var(--ease-odhal), transform 700ms var(--ease-odhal); transition-delay: calc(var(--d, 0) * 90ms); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 0; transition: opacity 400ms ease; }
  .js .reveal.in { opacity: 1; }
}

.slovo { display: inline-block; overflow: clip; overflow-clip-margin: 0.04em; vertical-align: top; padding-block: 0.12em 0.06em; margin-block: -0.12em -0.06em; }
.slovo > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .js .slova.reveal { opacity: 1; transform: none; }
  .js .slova:not(.hned) .slovo > span { transform: translateY(110%); transition: transform 900ms var(--ease-odhal); transition-delay: calc(var(--d, 0) * 90ms + var(--s) * 55ms); }
  .js .slova.in .slovo > span { transform: none; }
  .slova.hned .slovo > span { animation: slovo-nahoru 1000ms var(--ease-odhal) both; animation-delay: calc(120ms + var(--s) * 80ms); }
  .hero .lead, .hero .signup, .hero .handle { animation: vyjed 900ms var(--ease-odhal) both; animation-delay: 380ms; }
  .hero .signup { animation-delay: 480ms; }
  .hero-video { animation: priblizeni 1800ms var(--ease-odhal) both; }
  @media (min-width: 900px) { .hero-video { animation: odkryj 1400ms var(--ease-odhal) both; } }
  .skore { animation: vyjed 900ms var(--ease-pruzina) both; animation-delay: 900ms; }
}
@keyframes slovo-nahoru { from { transform: translateY(110%); } }
@keyframes priblizeni { from { transform: scale(1.12); opacity: 0.3; } }
@keyframes vyjed { from { opacity: 0; transform: translateY(24px); } }
@keyframes odkryj { from { clip-path: inset(10% 8% 10% 8% round var(--radius-media)); opacity: 0.4; } to { clip-path: inset(0 round var(--radius-media)); } }

[data-pocitadlo] { font-variant-numeric: tabular-nums; display: inline-block; }
@media (prefers-reduced-motion: no-preference) { [data-pocitadlo].dosedlo { animation: dosednuti 600ms var(--ease-pruzina); } }
@keyframes dosednuti { 40% { transform: scale(1.08); } }

[data-magnet] { transition: translate 500ms var(--ease-pruzina), transform 160ms var(--ease-out), filter 200ms ease; }
[data-magnet].tahne { transition: translate 120ms linear, transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { filter: brightness(1.08); }
  .btn .sipka { transition: transform 450ms var(--ease-pruzina); }
  .btn:hover .sipka { transform: translateX(5px); }
}

[data-svetlo] { position: relative; isolation: isolate; }
[data-svetlo]::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--accent) 18%, transparent), transparent 65%);
  transition: opacity 300ms ease; }
@media (hover: hover) and (pointer: fine) { [data-svetlo]:hover::after { opacity: 1; } }

@media (min-width: 900px) {
  [data-naklon] { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 700ms var(--ease-odhal); }
  [data-naklon].tahne { transition: transform 140ms linear; }
  [data-naklon] .plovak { translate: calc(var(--px, 0) * -16px) calc(var(--py, 0) * -16px); transition: translate 700ms var(--ease-odhal); }
  [data-naklon].tahne .plovak { transition: translate 140ms linear; }
}

.pruh { overflow: hidden; white-space: nowrap; user-select: none; }
.pruh-in { display: inline-flex; will-change: transform; }
.pruh-sada { display: inline-flex; align-items: center; flex: none; }
@media (prefers-reduced-motion: reduce) { .pruh-sada[aria-hidden] { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-media { background: url("/media/hero.webp") 50% 30% / cover; }
}
