/* Písmo Onest (SIL OFL 1.1, fonts/OFL.txt) z našeho serveru: návštěva úvodní stránky
   neposílá IP adresu Googlu */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/onest-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: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/onest-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;
}

/* Úvodní stránka Forge: výstup na horu. Barvy stavů dne (hotovo, částečně, odpočinek,
   zmeškáno) jsou stejné jako ve výzvách v aplikaci; modrá je primární barva aplikace.
   Noční scény (hero, S přáteli, vrchol) jsou tmavé v obou režimech: přepisují tokeny lokálně. */

:root {
  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --raised: #FFFFFF;
  --ink: #0E1630;
  --muted: #566079;
  --line: #E1E6EF;
  --blue: #2563EB;
  --blue-press: #1D4ED8;
  --on-blue: #FFFFFF;
  --empty: #E8ECF3;
  --done: #22C55E;
  --rest: #F2B33D;
  --missed: #EF5350;
  --night: #0B1222;
  --night-2: #131D35;
  --shadow: 0 1px 2px rgba(14, 22, 48, .06), 0 18px 40px -18px rgba(14, 22, 48, .25);
  --radius: 18px;
  --gutter: 24px;
  --nav-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1020;
    --surface: #111A2E;
    --raised: #16213A;
    --ink: #EDF1F9;
    --muted: #9AA6BD;
    --line: #222E47;
    --blue: #4F86F7;
    --blue-press: #6A9AFA;
    --empty: #1D2842;
    --done: #34D06E;
    --rest: #E7AA35;
    --missed: #F06461;
    --night: #060B17;
    --night-2: #0E1730;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0A1020;
  --surface: #111A2E;
  --raised: #16213A;
  --ink: #EDF1F9;
  --muted: #9AA6BD;
  --line: #222E47;
  --blue: #4F86F7;
  --blue-press: #6A9AFA;
  --empty: #1D2842;
  --done: #34D06E;
  --rest: #E7AA35;
  --missed: #F06461;
  --night: #060B17;
  --night-2: #0E1730;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* Noční scéna: stejné komponenty, tmavé tokeny */
.scene, .nav.on-dark {
  --surface: rgba(255, 255, 255, .045);
  --raised: #17223D;
  --ink: #EEF2FA;
  --muted: #A2AEC6;
  --line: rgba(255, 255, 255, .11);
  --empty: rgba(255, 255, 255, .08);
  --blue: #5B8EF8;
  --blue-press: #7AA4FA;
  --done: #34D06E;
  --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 30px 60px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }

[hidden] { display: none !important; }

a { color: inherit; }

img { display: block; max-width: 100%; height: auto; }

button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

.muted { color: var(--muted); }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus { top: 12px; }

h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.04;
  letter-spacing: -.04em;
  font-weight: 800;
  text-wrap: balance;
  max-width: 16em;
}

h3 { font-size: 20px; line-height: 1.25; letter-spacing: -.015em; font-weight: 700; }

.section-lead { margin-top: 18px; max-width: 34em; color: var(--muted); font-size: 18px; }

/* --- Režim aplikace: místo úvodní stránky jen načítání, pak Flutter --- */

#app-loading { display: none; }

html.app #landing { display: none; }

html.app body { overflow: hidden; }

html.app #app-loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 15px;
}

html.app.app-ready #app-loading { display: none; }

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Tlačítka --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 650;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}

.btn-primary { background: #2563EB; color: #FFFFFF; box-shadow: 0 10px 24px -12px rgba(37, 99, 235, .8); }
.btn-primary:hover { background: #1D4ED8; }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-quiet { min-height: 40px; padding: 0 12px; }
.btn-quiet:hover { color: var(--blue); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-large { min-height: 56px; padding: 0 30px; font-size: 17px; }

/* Magnetické tlačítko: posun nastavuje motion.js (jen myš, ne při omezení pohybu) */
.magnetic { transform: translate(var(--mx, 0), var(--my, 0)); transition: transform .25s cubic-bezier(.2, .8, .2, 1), background-color .15s; }

/* --- Horní lišta --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  color: var(--ink);
  transition: background-color .25s, border-color .25s;
}

.nav.is-scrolled { border-bottom-color: var(--line); }

.nav.on-dark { background: color-mix(in srgb, var(--night) 70%, transparent); }

.nav-row { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }

.brand-mark { width: 30px; height: 26px; color: var(--ink); --mark-cut: var(--bg); }

.nav.on-dark .brand-mark { --mark-cut: var(--night); }

.brand-name { font-weight: 800; font-size: 21px; letter-spacing: .14em; }

.nav-links { display: flex; gap: 24px; font-size: 15px; font-weight: 550; }

.nav-links a { text-decoration: none; color: var(--muted); transition: color .15s; }

.nav-links a:hover { color: var(--ink); }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* Ukazatel postupu stránkou: tenká zelená čára pod lištou */
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: calc(var(--progress, 0) * 100%);
  background: var(--done);
}

.lang { position: relative; }

.lang-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.lang-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.lang-button:hover { background: var(--surface); }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 150px;
  padding: 6px;
  border-radius: 14px;
  background: var(--raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  cursor: pointer;
}

.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--surface); }

.lang-menu [aria-checked="true"] { color: var(--blue); font-weight: 650; }

/* --- Noční scéna: obloha a hřeben --- */

.scene { position: relative; background: var(--night); color: var(--ink); overflow: hidden; isolation: isolate; }

.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1px 1px at 27% 8%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1.4px 1.4px at 44% 22%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1px 1px at 63% 12%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(1.2px 1.2px at 78% 26%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1px 1px at 91% 9%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1px 1px at 55% 34%, rgba(255, 255, 255, .35), transparent 60%),
    radial-gradient(1px 1px at 6% 38%, rgba(255, 255, 255, .35), transparent 60%),
    radial-gradient(70% 55% at 50% 105%, color-mix(in srgb, var(--rest) 22%, transparent), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}

/* --- 1. Hero: výstup za svítání ---
   Po načtení se jednou přehraje výstup po stezce na štít a scéna zůstane na vrcholu:
   hero.js animuje --p (0–1, celý výstup) a --reveal (druhý řádek nadpisu), obloha svítá. */

.climb { position: relative; margin-top: calc(var(--nav-h) * -1); background: var(--night); }

.summit { position: relative; background: var(--night); }

.climb-stage { position: relative; height: 100vh; height: 100svh; min-height: 640px; }

.climb-sky {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(90% 60% at 64% 30%, rgba(255, 170, 90, calc(var(--p, 0) * .45)), transparent 65%),
    radial-gradient(80% 50% at 64% 92%, rgba(255, 105, 120, calc(var(--p, 0) * .3)), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--night) calc(100% - var(--p, 0) * 60%), #1D2F63) 0%, color-mix(in srgb, var(--night-2) calc(100% - var(--p, 0) * 70%), #6B4A7A) 100%);
}

.climb-stars {
  position: absolute;
  inset: 0 0 35% 0;
  z-index: -3;
  opacity: calc(1 - var(--p, 0) * 1.3);
  background:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent 60%),
    radial-gradient(1px 1px at 27% 8%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1.4px 1.4px at 44% 26%, rgba(255, 255, 255, .8), transparent 60%),
    radial-gradient(1px 1px at 58% 12%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1.6px 1.6px at 76% 30%, #fff, transparent 60%),
    radial-gradient(1px 1px at 88% 9%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1px 1px at 52% 44%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1.2px 1.2px at 6% 48%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1px 1px at 36% 52%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(1.2px 1.2px at 94% 46%, rgba(255, 255, 255, .55), transparent 60%),
    radial-gradient(1px 1px at 68% 4%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1px 1px at 20% 34%, rgba(255, 255, 255, .5), transparent 60%);
}

/* Slunce vychází zpoza štítu */
.climb-sun {
  position: absolute;
  z-index: -2;
  left: var(--peak-x, 66%);
  top: var(--sun-top, 6%);
  width: 26vmin;
  height: 26vmin;
  margin-left: -13vmin;
  border-radius: 50%;
  background: radial-gradient(circle, #FFE3A1 0%, #FFB45E 45%, rgba(255, 140, 80, 0) 70%);
  transform: translateY(calc((1 - var(--p, 0)) * 55vh)) scale(calc(.8 + var(--p, 0) * .3));
}

.climb-ridges { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; }

.climb-ridges .snow { fill: rgba(238, 242, 250, .88); }
.climb-ridges .ahead { fill: none; stroke: rgba(255, 255, 255, .38); stroke-width: 2; stroke-dasharray: 2 8; stroke-linecap: round; }
.climb-ridges .trail { fill: none; stroke: var(--done); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.climb-ridges .climber { fill: var(--rest); stroke: var(--night); stroke-width: 3; transition: opacity .3s; }
.climb-ridges .climber.is-home { opacity: 0; }

/* Vlaječka tábora: zapíchne se, když k ní dojdeš */
.camp { opacity: 0; transform: scaleY(0); transition: opacity .25s, transform .55s cubic-bezier(.3, 1.6, .5, 1); }
.camp.is-reached { opacity: 1; transform: none; }
.camp line { stroke: #EEF2FA; stroke-width: 2; }
.camp path { fill: var(--rest); }
.camp.is-summit path { fill: var(--done); }
.camp text {
  fill: #EEF2FA;
  font: 650 13px "Onest", system-ui, sans-serif;
  paint-order: stroke;
  stroke: rgba(7, 12, 25, .75);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.camp.is-summit text { font-size: 15px; font-weight: 750; }

.climb-copy { position: relative; padding-top: calc(var(--nav-h) + clamp(40px, 9vh, 104px)); }

/* Nadpis vlevo ve třech řádcích, štít vpravo: nepřekrývají se */
.hero-title {
  max-width: 6.4em;
  font-size: clamp(44px, min(7.4vw, 11vh), 104px);
  line-height: .95;
  letter-spacing: -.05em;
  font-weight: 800;
}

.hero-title .line { display: block; text-wrap: balance; }

.hero-title .line2 { color: #FFD7A0; clip-path: inset(-.2em calc((1 - var(--reveal, 0)) * 100%) -.2em 0); }

.hero-title .char { display: inline-block; }

.lead { margin-top: 26px; max-width: 32em; font-size: 19.5px; color: var(--muted); text-shadow: 0 2px 18px rgba(7, 12, 25, .9); }

.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-note { margin-top: 16px; font-size: 15px; color: var(--muted); text-shadow: 0 2px 12px rgba(7, 12, 25, .9); }

.hero-note strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.climb-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36px;
  margin-inline: auto;
  width: max-content;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.climb-meter strong { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.climb-meter small { display: block; font-size: 13px; color: var(--muted); }

/* Výzva ke scrollu naskočí, až je výstup hotový */
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); opacity: 0; transition: opacity .6s .3s; }

.climb.is-done .scroll-cue { opacity: 1; }

.scroll-cue i { position: relative; width: 22px; height: 34px; border: 2px solid currentColor; border-radius: 12px; opacity: .8; }

.scroll-cue i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: currentColor;
  animation: wheel 1.6s ease-in-out infinite;
}

@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }

/* --- 2. Problém --- */

.problem { padding: 120px 0 128px; }

.kinetic {
  font-size: clamp(30px, 4.6vw, 62px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 750;
  max-width: 17em;
}

.kinetic-line { display: block; }

.kinetic-turn { margin-top: .5em; }

/* Slova při scrollu ztmavnou z šedé do plné barvy (motion.js, až když běží ScrollTrigger).
   Šedá má sama dost kontrastu, text je čitelný v každé chvíli. */
.kinetic.is-scrubbed .word { color: color-mix(in srgb, var(--ink) calc(var(--lit, 0) * 100%), var(--muted)); transition: color .2s linear; }

.fact {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  max-width: 40em;
  font-size: 18px;
  display: grid;
  gap: 4px;
}

.fact cite { font-style: normal; font-size: 13.5px; color: var(--muted); }

/* --- 3. Příběh: připnutá scéna --- */

.story { padding: 40px 0 120px; }

.story-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 56px;
}

.story-steps { list-style: none; padding: 0; }

.story-step {
  min-height: 66vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  opacity: .32;
  transition: opacity .35s;
}

.story-step.is-on { opacity: 1; }

.story-step h3 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.03em; line-height: 1.12; }

.story-step p { color: var(--muted); max-width: 26em; }

.story-step .step-shot { display: none; }

.story-stage { position: sticky; top: calc(50vh - min(26vw, 300px) + var(--nav-h) / 2); align-self: start; height: min(52vw, 600px); }

.browser {
  position: relative;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.browser-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }

.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }

.screen { position: relative; aspect-ratio: 16 / 10; background: var(--empty); }

.screen picture, .phone picture { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease, transform .9s cubic-bezier(.2, .8, .2, 1); transform: scale(1.025); }

.screen picture.is-on, .phone picture.is-on { opacity: 1; transform: none; }

.screen img, .phone img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

.story-stage { perspective: 1600px; }

.rig {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -14deg));
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.story-stage .browser { width: 88%; transform: translateZ(0); }

.story-stage .phone { transform: translateZ(110px); }

.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 14px;
  white-space: nowrap;
  background: var(--raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  animation: float 5s ease-in-out infinite;
}

.chip small { color: var(--muted); font-weight: 500; }

.chip-dot { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--done); color: #062611; font-size: 12px; font-weight: 800; }

.chip-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #22A06B; color: #fff; font-size: 12px; font-weight: 700; }

.chip-1 { left: -4%; top: 4%; transform: translateZ(200px); }
.chip-2 { right: 6%; top: -2%; transform: translateZ(170px); animation-delay: -2s; }
.chip-3 { left: 8%; bottom: 10%; transform: translateZ(240px); animation-delay: -3.5s; }

@keyframes float { 50% { translate: 0 -10px; } }

.phone {
  position: absolute;
  right: 0;
  bottom: 4%;
  width: 26%;
  aspect-ratio: 390 / 844;
  border-radius: 26px;
  border: 5px solid var(--ink);
  background: var(--empty);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* --- 4. S přáteli --- */

.together { padding: 128px 0 112px; }

.together-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }

.flow-steps { list-style: none; padding: 0; margin-top: 34px; display: grid; gap: 4px; counter-reset: flow; }

.flow-steps li {
  counter-increment: flow;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  color: var(--muted);
  font-weight: 600;
  transition: color .3s;
}

.flow-steps li::before {
  content: counter(flow);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  font-size: 13px;
  transition: background-color .3s, border-color .3s, color .3s;
}

.flow-steps li.is-on { color: var(--ink); }
.flow-steps li.is-on::before { background: var(--done); border-color: var(--done); color: #062611; }

.members { margin-top: 40px; display: grid; gap: 2px; }

.members-number { font-size: clamp(64px, 8vw, 112px); line-height: .9; letter-spacing: -.05em; font-weight: 800; font-variant-numeric: tabular-nums; }

.members span { color: var(--muted); font-size: 16px; }

.browser-dark { background: #0E1628; }

.flow img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transition: opacity .3s ease; }

.flow img.is-on { opacity: 1; }

.cursor {
  position: absolute;
  z-index: 2;
  width: 26px;
  height: 26px;
  margin: -3px 0 0 -5px;
  fill: #0E1630;
  stroke: #fff;
  stroke-width: 1.5;
  opacity: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35));
  transition: left .9s cubic-bezier(.45, 0, .2, 1), top .9s cubic-bezier(.45, 0, .2, 1), opacity .3s;
}

.cursor.no-anim { transition: opacity .3s; }

.cursor.is-click { animation: click .3s ease; }

@keyframes click { 50% { transform: scale(.78); } }

.facts {
  list-style: none;
  padding: 0;
  margin-top: 88px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.facts li { display: grid; gap: 6px; padding-top: 20px; border-top: 1px solid var(--line); }

.facts strong { font-size: 19px; letter-spacing: -.01em; }

.facts span { color: var(--muted); font-size: 15.5px; }

/* --- 5. Funkce --- */

.features { padding: 128px 0 40px; }

.bento {
  list-style: none;
  padding: 0;
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 28px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.tile p { color: var(--muted); font-size: 15.5px; }

.tile-wide { grid-column: span 2; gap: 12px; }

.tile-wide h3 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.03em; }

.tile-wide p { font-size: 17px; max-width: 30em; }

.tile-icon { width: 28px; height: 28px; fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }

/* Světlo pod kurzorem (motion.js nastaví --x a --y) */
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--x, 50%) var(--y, -40%), color-mix(in srgb, var(--blue) 10%, transparent), transparent 60%);
  pointer-events: none;
}

/* Rostoucí cíl výzvy: sloupce dní, odpočinek oranžově */
.steps-visual {
  margin-top: auto;
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(21, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
  height: 150px;
}

.steps-visual i {
  display: block;
  height: calc(var(--h) * 1%);
  border-radius: 5px 5px 2px 2px;
  background: var(--done);
  transform-origin: bottom;
}

.steps-visual i.is-rest { background: var(--rest); height: 12%; }

.steps-visual i.is-ahead { background: var(--empty); }

/* --- 6. Jak začít --- */

.trail { padding: 96px 0 120px; }

.trail-steps {
  list-style: none;
  padding: 0;
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  counter-reset: trail;
  position: relative;
}

/* Stezka mezi kroky */
.trail-steps::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 22px;
  border-top: 2px dashed var(--line);
}

.trail-steps li { position: relative; counter-increment: trail; display: grid; gap: 8px; }

.trail-steps li::before {
  content: counter(trail);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--done);
  font-weight: 750;
  color: var(--ink);
}

.trail-steps p { color: var(--muted); }

/* --- 7. Kurzy a tvůrci --- */

.courses { padding: 112px 0 120px; border-top: 1px solid var(--line); }

.courses-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: center; }

.courses-visual { position: relative; padding-bottom: 48px; }

.courses-visual .browser { margin-left: 8%; }

.lesson-card {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(340px, 62%);
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.lesson-kicker { font-size: 13px; color: var(--muted); }

.lesson-title { font-weight: 700; font-size: 17px; letter-spacing: -.01em; margin-top: 2px; }

.takeaways { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 8px; font-size: 14.5px; }

.takeaways li { display: flex; align-items: flex-start; gap: 10px; }

.takeaways li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 5px;
  border: 1.5px solid var(--line);
  background: var(--surface) no-repeat center / 12px;
  transition: background-color .3s, border-color .3s;
}

.takeaways li.is-done { color: var(--muted); }

.takeaways li.is-done::before {
  background-color: var(--done);
  border-color: var(--done);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23062611' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.creators {
  margin-top: 112px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: center;
}

.creators .btn { margin-top: 28px; }

.calc {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.calc-title { font-weight: 700; font-size: 18px; }

.calc-field { display: grid; gap: 10px; font-size: 15px; }

.calc-field > span { display: flex; justify-content: space-between; gap: 12px; }

.calc-field output { font-weight: 700; font-variant-numeric: tabular-nums; }

.calc input[type="range"] { width: 100%; accent-color: var(--blue); height: 28px; margin: 0; }

.calc-plans { list-style: none; padding: 0; display: grid; gap: 8px; }

.calc-plans li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  transition: border-color .2s, background-color .2s;
}

.calc-plans strong { font-size: 16px; }

.calc-plans small { color: var(--muted); font-size: 13px; grid-column: 1; }

.calc-plans .amount { grid-row: span 2; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.calc-plans li.is-best { border-color: var(--done); background: color-mix(in srgb, var(--done) 9%, transparent); }

.calc-note { font-size: 13px; color: var(--muted); }

/* --- 8. Srovnání --- */

.compare { padding: 112px 0; background: var(--surface); border-block: 1px solid var(--line); }

.compare-scroll { margin-top: 40px; overflow-x: auto; }

.compare-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; }

.compare-table th, .compare-table td { padding: 16px 12px; border-bottom: 1px solid var(--line); text-align: center; }

.compare-table tbody th { text-align: left; font-weight: 550; }

.compare-table thead th { font-size: 15px; font-weight: 700; color: var(--muted); }

.compare-table thead th:first-of-type { color: var(--ink); }

.compare-table td:nth-child(2) { background: color-mix(in srgb, var(--blue) 6%, transparent); }

.compare-table .yes { color: var(--done); font-weight: 800; font-size: 18px; }

.compare-table .no { color: var(--muted); }

.compare-note { margin-top: 20px; color: var(--muted); font-size: 15px; }

/* --- 9. Ceny --- */

.pricing { padding: 120px 0; }

.pricing-switches { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.switch { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }

.switch button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.switch [aria-checked="true"] { background: var(--ink); color: var(--bg); }

.plans { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.plan.is-pick { border: 2px solid var(--blue); box-shadow: var(--shadow); }

.plan-name { font-weight: 750; font-size: 20px; }

.plan-badge {
  position: absolute;
  top: 26px;
  right: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--done) 16%, transparent);
  color: color-mix(in srgb, var(--done) 70%, var(--ink));
  font-size: 12.5px;
  font-weight: 650;
}

.plan-price { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }

.plan-price strong { font-size: 48px; line-height: 1; letter-spacing: -.04em; font-weight: 800; }

.plan-price span { color: var(--muted); font-size: 15px; }

.plan-sub { min-height: 1.4em; font-size: 14px; color: var(--muted); }

.plan ul { list-style: none; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 9px; font-size: 15px; }

.plan li { display: flex; gap: 10px; }

.plan li::before { content: "✓"; color: var(--done); font-weight: 800; }

.plan .btn { margin-top: auto; }

.pricing-note { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* --- 10. FAQ --- */

.faq { padding: 40px 0 128px; }

.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; }

.faq-list { border-top: 1px solid var(--line); }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  font-weight: 650;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after { content: "+"; flex: none; font-size: 24px; line-height: 1; color: var(--muted); transition: transform .25s; }

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p { padding: 0 40px 22px 0; color: var(--muted); max-width: 40em; }

/* --- 11. Vrchol: stejná scéna jako hero, štít uprostřed pod textem --- */

.summit .climb-stage { height: auto; min-height: 0; padding: 128px 0 600px; text-align: center; }

.summit-copy { position: relative; display: grid; justify-items: center; }

.summit h2 { font-size: clamp(44px, 7vw, 96px); letter-spacing: -.05em; max-width: none; text-shadow: 0 2px 24px rgba(7, 12, 25, .8); }

.summit .section-lead { margin: 18px auto 32px; }

/* --- Patička --- */

.footer { padding: 36px 0 44px; font-size: 14px; background: #0B1227; color: #A9B4CA; }

.footer .brand-mark { color: #EEF2FA; --mark-cut: #0B1227; width: 24px; height: 21px; }

.footer .brand-name { color: #EEF2FA; font-size: 17px; }

.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

.footer nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }

.footer a { text-decoration: none; }

.footer a:hover { color: #EEF2FA; }

.footer .muted { color: inherit; }

/* Odkaz na veřejný katalog kurzů (courses/) v sekci Kurzy */
.courses-browse { margin-top: 28px; }

/* --- Šířky --- */

@media (max-width: 1000px) {
  .nav-links { display: none; }
  .story-grid, .together-grid, .courses-grid, .creators, .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .story-stage { display: none; }
  .story-step { min-height: 0; opacity: 1; padding: 28px 0; border-top: 1px solid var(--line); }
  .story-step .step-shot {
    display: block;
    width: min(260px, 70%);
    margin-top: 18px;
    border-radius: 22px;
    border: 4px solid var(--ink);
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  .story-step .step-shot img { width: 100%; height: auto; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: 1fr; max-width: 520px; }
  .facts { grid-template-columns: 1fr; gap: 20px; margin-top: 64px; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --nav-h: 60px; }
  body { font-size: 16px; }
  .btn-quiet { display: none; }
  .climb-stage { height: auto; min-height: 0; padding-bottom: 400px; }
  .climb-copy { padding-top: calc(var(--nav-h) + 28px); }
  .lead { margin-top: 18px; font-size: 17px; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .btn { flex: 1 1 100%; min-height: 50px; }
  .climb-meter { display: none; }
  .camp text { font-size: 11.5px; }
  .problem { padding: 88px 0; }
  .together, .features, .courses, .pricing, .compare { padding-top: 88px; padding-bottom: 88px; }
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; }
  .steps-visual { height: 140px; gap: 3px; }
  .trail-steps { grid-template-columns: 1fr; gap: 28px; }
  .trail-steps::before { left: 22px; right: auto; top: 22px; bottom: 22px; border-top: 0; border-left: 2px dashed var(--line); }
  .trail-steps li { grid-template-columns: 46px 1fr; column-gap: 16px; }
  .trail-steps li::before { grid-row: span 2; margin: 0; }
  .courses-visual .browser { margin-left: 0; }
  .lesson-card { position: relative; width: 100%; margin-top: -28px; left: auto; }
  .courses-visual { padding-bottom: 0; }
  .creators { margin-top: 80px; }
  .calc { padding: 20px; }
  .faq details p { padding-right: 0; }
  .compare-table { min-width: 0; font-size: 14.5px; }
  .compare-table th, .compare-table td { padding: 12px 6px; }
  .compare-table thead th { font-size: 13px; }
  .summit .climb-stage { padding: 88px 0 440px; }
  .footer nav { margin-left: 0; }
}

/* Nízké okno: výškoměr by narazil do textu (výšky ukazují vlaječky) */
@media (max-height: 700px) {
  .climb-meter { display: none; }
}

/* Omezený pohyb: nic se nehýbe samo, vše je rovnou ve výsledném stavu */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .magnetic { transform: none; }
  .kinetic.is-scrubbed .word { color: var(--ink); }
  .camp { opacity: 1; transform: none; }
}
