/* ============================================================
   LAYOUT — grid systém, navigace, sekce
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;   /* zabraňuje horizontálnímu scrollu */
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-surface);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- CONTAINER --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* --- NAVIGACE --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;          /* nepřesahuje viewport */
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.site-nav.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  box-sizing: border-box;   /* padding nezpůsobí přetečení */
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  letter-spacing: 0.01em;
  line-height: 1;
}

.nav-logo span {
  color: var(--color-primary-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-primary-dark);
  transition: width var(--transition-base);
}

.nav-links a:hover { color: var(--color-text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--color-accent);
  color: var(--color-text) !important;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-weight: var(--weight-semibold) !important;
  transition: background var(--transition-fast), transform var(--transition-spring) !important;
}

.nav-cta:hover {
  background: var(--color-accent-dark) !important;
  transform: translateY(-1px);
}

.nav-cta::after { display: none !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- SEKCE --- */
.section {
  padding-block: var(--section-gap);
}

.section--alt {
  background: var(--color-surface-2);
}

.section--dark {
  background: var(--color-text);
  color: var(--color-white);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-inline: auto;
  line-height: var(--leading-loose);
}

/* --- FOOTER --- */
.site-footer {
  background: var(--color-text);
  color: var(--color-white);
  padding-block: var(--space-12) var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}

.footer-brand .nav-logo {
  color: var(--color-white);
  margin-bottom: var(--space-4);
  display: block;
}

.footer-brand p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  line-height: var(--leading-loose);
  max-width: 28ch;
}

.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: var(--space-4);
}

.footer-col a, .footer-col p {
  display: block;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-2);
  transition: color var(--transition-fast);
}

.footer-col a:hover { color: var(--color-primary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
}

/* --- RESPONZIVITA --- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-6) var(--container-pad);
    gap: var(--space-5);
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.25s ease;
  }

  .nav-links.open a { font-size: var(--text-base); }
  .nav-cta { align-self: flex-start; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
