/*
 * Fortelino – styl webu. Vychází z design/canvas/Main.dc.html a Hodina.dc.html.
 * Musí běžet v Chrome z ~2018 (Chrome 70): proto žádné clamp(), min()/max(), aspect-ratio
 * ani gap ve flexboxu (gap je jen v gridu); proměnlivé rozměry řeší media queries.
 */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 800;
  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 800;
  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;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/caveat-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: 'Caveat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/caveat-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 {
  --ink: #18202E;
  --btn: #1F2A44;
  --btn-hover: #0F1830;
  --text-2: #4A5468;
  --text-3: #5E687B;
  --text-lead: #333C4D;
  --line: #E4E8EE;
  --orange: #F28C28;
  --padx: 16px;
  --pady: 56px;
  --h2: 30px;
}
@media (min-width: 700px) {
  :root { --padx: 32px; --pady: 72px; --h2: 36px; }
}
@media (min-width: 1100px) {
  :root { --padx: 56px; --pady: 96px; --h2: 42px; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: 'Figtree', system-ui, sans-serif;
  min-height: 100vh;
}

a { color: var(--btn); }
a:hover { color: var(--btn-hover); }
a:focus, button:focus, input:focus { outline: 3px solid var(--orange); outline-offset: 2px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: 0; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

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

/* Čtverečkovaný podklad (sešit) */
.grid-bg {
  background-color: #F7F9FC;
  background-image: linear-gradient(#E6EEF8 1px, transparent 1px), linear-gradient(90deg, #E6EEF8 1px, transparent 1px);
  background-size: 28px 28px;
}

.inner { max-width: 1200px; margin: 0 auto; }

/* Tlačítka */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 0;
  background: var(--btn);
  color: #FFFFFF;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--btn-hover); color: #FFFFFF; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 17px; }
.btn-ghost { background: transparent; color: var(--btn); border: 1.5px solid #C5CCD8; padding: 0 22px; }
.btn-ghost:hover { background: #F2F5FA; color: var(--btn-hover); }

/* Hlavička */
.site-header { padding: 0 var(--padx); border-bottom: 1px solid var(--line); }
.site-header .inner {
  min-height: 68px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 800; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; margin: 8px 0; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; margin: 4px 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 0 20px; font-weight: 600; font-size: 16px; text-decoration: none; }
.site-nav a.btn { padding: 0 18px; font-size: 15px; font-weight: 700; color: #FFFFFF; }
@media (max-width: 520px) {
  .site-nav a { margin-left: 0; margin-right: 18px; }
  .site-nav a.btn { margin-right: 0; }
}

/* Hero */
.hero { padding: 24px 12px 40px; text-align: center; }
.hero img { display: block; width: 100%; max-width: 1240px; height: auto; margin: 0 auto; mix-blend-mode: multiply; }
@media (min-width: 700px) { .hero { padding: 32px 24px 56px; } }
@media (min-width: 1100px) { .hero { padding: 48px 40px 72px; } }

/* Jedna věta a dvě tlačítka */
.lead-section { padding: 36px var(--padx); text-align: center; }
@media (min-width: 700px) { .lead-section { padding: 48px var(--padx); } }
@media (min-width: 1100px) { .lead-section { padding: 60px var(--padx); } }
.lead { margin: 0 auto 24px; max-width: 34em; font-size: 19px; line-height: 1.5; color: var(--text-lead); }
@media (min-width: 700px) { .lead { font-size: 21px; } }
@media (min-width: 1100px) { .lead { font-size: 23px; } }
.lead strong { color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; margin: -6px; }
.cta .btn { margin: 6px; }

/* Sekce */
.section { padding: var(--pady) var(--padx); }
.section h2 { margin: 0; font-weight: 800; font-size: var(--h2); line-height: 1.15; letter-spacing: -0.02em; }
.underline { position: relative; white-space: nowrap; }
.underline svg { position: absolute; left: 0; right: 0; bottom: -10px; width: 100%; height: 12px; }
.section-intro { margin: 12px 0 0; font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 38em; }

/* Tři kroky */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-gap: 20px; gap: 20px; }
.step { background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.step-num { display: block; font-family: 'Caveat', cursive; font-weight: 600; font-size: 40px; line-height: 1; margin-bottom: 10px; }
.step h3 { margin: 0 0 10px; font-size: 20px; font-weight: 700; }
.step p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-2); }

/* Mapa dovedností */
.filters { margin-top: 26px; }
.seg { display: inline-flex; flex-wrap: wrap; padding: 2px; background: #EFF2F6; border-radius: 12px; }
.seg button {
  min-height: 44px; margin: 2px; padding: 0 18px; border: 0; border-radius: 8px; background: transparent;
  color: #3E4B53; font-family: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: #FFFFFF; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(24, 35, 43, .12); }
.chips { margin-top: 18px; }
.chips button {
  min-height: 44px; margin: 0 8px 8px 0; padding: 0 16px; border: 1px solid #B9C6C9; border-radius: 999px; background: #FFFFFF;
  color: var(--ink); font-family: inherit; font-weight: 500; font-size: 14px; cursor: pointer;
}
.chips button[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: #FFFFFF; font-weight: 600; }
.map-summary { margin: 8px 0 18px; font-size: 15px; color: var(--text-3); }
.skills { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.skill { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.skill-main { flex: 1 1 280px; min-width: 0; margin-right: 24px; }
.skill-name { display: block; font-size: 18px; font-weight: 600; }
.skill-review { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--text-3); background: #EEF2F1; border-radius: 999px; padding: 2px 10px; }
.skill-ex { display: block; font-family: 'Caveat', cursive; font-weight: 600; font-size: 22px; color: var(--text-3); }
.skill-action { display: flex; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.skill-game { font-size: 15px; color: var(--text-2); margin-right: 16px; }
.skill-soon { font-size: 15px; color: var(--text-3); }
.map-error { margin: 0; font-size: 17px; color: var(--text-2); }

/* Novinky */
.news { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
.news-text { flex: 1 1 380px; margin: 0 32px 24px 0; }
.news-text h2 { font-size: 28px; }
@media (min-width: 700px) { .news-text h2 { font-size: 34px; } }
@media (min-width: 1100px) { .news-text h2 { font-size: 38px; } }
.news-text p { margin: 12px 0 0; font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 30em; }
.news-form { flex: 1 1 420px; display: flex; flex-wrap: wrap; align-items: flex-end; margin-bottom: 24px; }
.field { flex: 1 1 260px; margin: 0 10px 10px 0; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.field input {
  display: block; width: 100%; min-height: 52px; padding: 0 16px; border: 1.5px solid #AEB7C6; border-radius: 10px;
  background: #FFFFFF; color: var(--ink); font-family: inherit; font-size: 17px;
}
.news-form .btn { min-height: 52px; padding: 0 24px; font-size: 17px; margin-bottom: 10px; }
.news-msg { flex: 1 1 100%; margin: 0; min-height: 1.5em; font-size: 15px; color: var(--text-2); }

/* Patička */
.site-footer { border-top: 1px solid var(--line); padding: 28px var(--padx); }
.site-footer .inner { display: flex; flex-wrap: wrap; justify-content: space-between; font-size: 14px; color: var(--text-3); }
.site-footer span { margin: 0 12px 8px 0; }

/* Obrazovka hodiny */
.lesson { padding: 20px; min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 700px) { .lesson { padding: 28px; } }
@media (min-width: 1100px) { .lesson { padding: 40px; } }
.lesson-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 16px; text-decoration: none; }
.back svg { margin-right: 6px; }
.lesson-brand { font-weight: 800; font-size: 20px; }
.lesson-body { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; }
.qr-panel { flex: 0 1 440px; width: 100%; max-width: 440px; margin: 16px 20px; text-align: center; }
@media (min-width: 1100px) { .qr-panel, .lesson-info { margin-left: 40px; margin-right: 40px; } }
.qr-link { margin: 0; font-size: 15px; line-height: 1.4; word-break: break-all; }
.qr-link a { color: var(--text-2); }
.qr-frame { border: 1px solid #DCE3E1; border-radius: 16px; padding: 12px; background: #FFFFFF; }
.qr-frame svg { display: block; width: 100%; height: auto; max-width: 400px; margin: 0 auto; }
.qr-help { margin: 20px 0 8px; font-size: 17px; color: #3E4B53; }
.qr-code { margin: 0; font-size: 56px; line-height: 1; font-weight: 500; letter-spacing: 0.06em; }
.lesson-info { flex: 1 1 400px; max-width: 540px; margin: 16px 20px; }
.lesson-info h1 { margin: 0; font-weight: 800; font-size: 38px; line-height: 1.08; letter-spacing: -0.02em; }
@media (min-width: 1100px) { .lesson-info h1 { font-size: 52px; } }
.lesson-skill { margin: 8px 0 0; font-size: 19px; color: #3E4B53; }
.lesson-chips { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; }
.lesson-chips li { margin: 0 8px 8px 0; font-size: 14px; font-weight: 600; background: #EEF2F1; border-radius: 999px; padding: 6px 12px; }
.lesson-players { margin: 20px 0 0; padding: 0; border: 0; }
.lesson-players legend { padding: 0 0 8px; font-size: 15px; font-weight: 700; }
.lesson-note { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--text-3); }
.lesson-config { margin: 20px 0 0; }
.lesson-config summary { padding: 12px 0; font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; }
.lesson-config .lesson-players { margin-top: 14px; }
.seg button:disabled { opacity: .4; cursor: default; }
.lesson-actions { margin-top: 28px; }
.lesson-msg { max-width: 540px; margin: 40px auto; text-align: center; }
.lesson-msg p { font-size: 19px; color: #3E4B53; }

.step-1 { color: #E8483B; }
.step-2 { color: #2E9E5B; }
.step-3 { color: #2F6FD6; }

[hidden] { display: none !important; }
