/* ==========================================================================
   M3K - spolecny designovy system
   Vychazi z vizualniho jazyka Mberu: Manrope + Barlow Condensed, akcent #ff873f,
   tmavy podklad, hranate tvary. Sdileny webem m3ksoft.cz i m3ksound.cz.
   ========================================================================== */

/* --- Designove tokeny --------------------------------------------------- */
:root {
  color-scheme: dark;
  --bg: #101112;
  --surface: #191b1d;
  --surface-2: #1d1f21;
  --line: #343638;
  --line-soft: #2a2c2e;
  --text: #f5f6f7;
  --text-dim: #c3c6c9;
  --muted: #afb3b6;
  --accent: #ff873f;
  --accent-hover: #ffa76f;
  --on-accent: #17100c;
  --radius: 5px;
  --radius-lg: 8px;
  --wrap: 1240px;
}

/* --- Reset a zaklad ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg, video { max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s, background .2s, border-color .2s;
}
a:hover { color: var(--accent); }

button, a, summary { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

/* Preskocit na obsah - viditelne az pri fokusu z klavesnice */
.skip {
  position: absolute;
  left: 20px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius);
  font-weight: 700;
}
.skip:focus { top: 12px; color: var(--bg); }

/* --- Typografie --------------------------------------------------------- */
h1, h2, h3 { margin: 0; letter-spacing: -.03em; }

h1 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(3.4rem, 7vw, 6.4rem);
  font-weight: 700;
  line-height: .99;
  letter-spacing: -.025em;
}
h1 em { font-style: normal; color: var(--accent); }

h2 {
  font-size: clamp(1.9rem, 3.3vw, 3rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.045em;
}

h3 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.025em;
}

p { margin: 0; }

.eyebrow {
  margin: 0 0 22px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--accent);
}

.lead {
  max-width: 52ch;
  color: var(--text-dim);
  font-size: 1.125rem;
  line-height: 1.8;
}

.meta { margin-top: 22px; font-size: .8rem; color: var(--muted); }

/* --- Layout ------------------------------------------------------------- */
.wrap {
  width: min(var(--wrap), calc(100% - 80px));
  margin-inline: auto;
}

.section { padding-block: 90px; }

.section-heading {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 46px;
}
.section-heading > p { max-width: 450px; margin: 0; color: var(--muted); }

/* Pruh s klicovymi pojmy */
.strip { border-block: 1px solid var(--line); background: #161719; }
.strip-inner {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding-block: 24px;
  font-size: .9rem;
  font-weight: 600;
}
.strip-inner span::before { content: ' / '; margin-right: 12px; color: var(--accent); }

/* --- Hlavicka ----------------------------------------------------------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 104px;
  border-bottom: 1px solid var(--line);
}
.header > nav:first-of-type { margin-left: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1.5px;
}
.brand-dot { color: var(--accent); }

nav { display: flex; gap: 34px; font-size: .9rem; font-weight: 600; }

nav a[aria-current] { color: var(--accent); }

/* Prepinac jazyka */
.language-nav { gap: 3px; margin-left: auto; }
.language-nav a {
  padding: 6px 8px;
  border: 1px solid transparent;
  font-size: .8rem;
}
.language-nav a[aria-current] {
  border-color: var(--line);
  border-radius: 4px;
  color: var(--accent);
}

/* --- Tlacitka ----------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 16px 25px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 800;
  line-height: 1.5;
  cursor: pointer;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }

.button.secondary {
  background: transparent;
  border-color: #6b6d6f;
  color: var(--text);
}
.button.secondary:hover { background: #2d3033; border-color: #6b6d6f; color: #fff; }

.button.small { min-height: 44px; padding: 10px 18px; font-size: .875rem; }

.button[aria-disabled="true"] {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

.text-link {
  padding-block: 5px;
  border-bottom: 1px solid #6f7173;
  font-size: .9rem;
  font-weight: 700;
}

.actions {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* --- Karty -------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  padding: 34px;
  border: 1px solid #3c3e40;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.card.featured {
  border-color: var(--accent);
  background: linear-gradient(130deg, #30251e, #202020 60%);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

/* Odrazkovy seznam s akcentem */
.rich-list { margin: 6px 0 30px; padding: 0; list-style: none; }
.rich-list li { position: relative; padding: 8px 0 8px 26px; font-size: .94rem; }
.rich-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); }

/* --- Hero podstranek ---------------------------------------------------- */
/* Jednosloupcovy hero. Dvousloupcovy hero s vizualem ma Mber ve vlastnim CSS. */
.page-hero { padding-block: 78px 56px; }
.page-hero h1 { max-width: 16ch; }
.page-hero .lead { margin-top: 26px; }

/* Drobecek zpet na prehled */
.crumb { padding-block: 26px 0; font-size: .85rem; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }

/* --- Karta programu ----------------------------------------------------- */
.prog-card { gap: 0; }

.prog-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.prog-ico {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: rgba(255, 135, 63, .12);
}
.prog-ico svg { width: 30px; height: 30px; stroke: var(--accent); fill: none; }

.prog-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.prog-kind {
  margin-top: 4px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

.prog-desc { margin-bottom: 20px; color: var(--muted); font-size: .95rem; }

.prog-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* --- Hodnoty / trojice sdeleni ------------------------------------------ */
.val-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.val { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.val h3 { margin-bottom: 10px; font-size: 1.1rem; font-weight: 700; }
.val p { color: var(--muted); font-size: .9rem; }

/* --- Kontakt ------------------------------------------------------------ */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.contact p:not(.eyebrow) { max-width: 450px; margin-top: 24px; color: var(--muted); }
.contact-right p { font-size: .875rem; }

.email {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid #6c6d6e;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -.03em;
}
.email span { color: var(--accent); }

@media (max-width: 720px) {
  .contact { grid-template-columns: 1fr; gap: 30px; }
  .contact p:not(.eyebrow) { margin-top: 20px; }
  .email { font-size: 1.4rem; }
  .page-hero { padding-block: 46px 40px; }
}

/* --- Odznaky ------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 30px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.badge.dev .dot { background: #f5c542; }

.pill {
  padding: 6px 10px;
  border: 1px solid #57514c;
  border-radius: 30px;
  font-size: .75rem;
  line-height: 1.5;
  color: #d0c8c1;
}

/* --- Upozorneni --------------------------------------------------------- */
.note {
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 135, 63, .28);
  border-radius: var(--radius);
  background: rgba(255, 135, 63, .07);
  font-size: .85rem;
  line-height: 1.6;
  color: var(--muted);
}
.note b, .note strong { color: var(--text); }

/* --- Paticka ------------------------------------------------------------ */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.footer p { font-size: .8rem; color: var(--muted); }
.footer .footer-nav {
  flex-basis: 100%;
  margin-top: 4px;
  font-size: .8rem;
  color: var(--muted);
}
.footer .footer-nav a { font-weight: 600; color: var(--muted); }
.footer .footer-nav a:hover { color: var(--accent); }
.footer .trademarks { flex-basis: 100%; margin-top: 0; font-size: .75rem; }

/* --- Postupne odkryvani sekci ------------------------------------------- */
/* Zamerne opacity:1 jako vychozi stav: kdyz se skript nenacte nebo selze,
   obsah je videt. Schovava az skript (.is-hidden), ktery ho pak odkryva. */
[data-reveal] { transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-hidden { opacity: 0; transform: translateY(24px); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Schodovite zpozdeni resi CSS, aby skript nemusel zapisovat inline styl. */
[data-reveal]:nth-of-type(4n+2) { transition-delay: .06s; }
[data-reveal]:nth-of-type(4n+3) { transition-delay: .12s; }
[data-reveal]:nth-of-type(4n+4) { transition-delay: .18s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal].is-hidden { opacity: 1; transform: none; transition: none; }
}

/* --- Responzivita ------------------------------------------------------- */
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 48px); }
  .header { flex-wrap: wrap; gap: 16px; padding-block: 18px; }
  .header > nav:first-of-type { margin-left: 0; }
  .section-heading { gap: 35px; }
  .strip-inner { font-size: .8rem; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px); }
  .header { min-height: 84px; gap: 14px; }
  .header > nav:first-of-type { order: 3; flex-basis: 100%; }
  .header > .button { display: none; }
  nav { gap: 16px; font-size: .8rem; }
  .language-nav { margin-left: auto; }
  .brand { font-size: 1.7rem; }
  .lead { font-size: 1.05rem; }
  .section { padding-block: 58px; }
  .section-heading { grid-template-columns: 1fr; gap: 22px; margin-bottom: 30px; }
  .eyebrow { margin-bottom: 16px; font-size: .75rem; letter-spacing: .1em; }
  .strip-inner { flex-wrap: wrap; gap: 12px 24px; padding-block: 20px; }
  .card { padding: 26px 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .actions { gap: 20px; }
  .button { padding-inline: 20px; }
  .footer { align-items: start; }
  .footer .brand { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
