/* Globální styly — realizace.wattery.cz */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Fixní hlavička leží nad obsahem → obsah odsadíme o její výšku.
   --header-h měří JS v Header.astro (fallback pro první render). */
main {
  padding-top: var(--header-h, 4.25rem);
}
/* Homepage s full-screen hero (fotky jako pozadí): hlavička leží PŘES hero,
   obsah bez odsazení. */
body.has-immersive-hero main {
  padding-top: 0;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--page-bg);
  background-image: var(--page-glow);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Layout utility ---------- */

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.section-head .kicker {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.6rem;
}

.section-head p {
  color: var(--text-soft);
  margin: 0;
}

/* ---------- Tlačítka ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 6px 24px -6px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 10px 30px -6px var(--accent-glow);
}

.btn-ghost {
  border-color: var(--accent);
  color: var(--accent-text);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--chip-bg);
}

/* Ghost tlačítko na tmavém podkladu (karty, CTA bloky) */
.on-dark .btn-ghost {
  color: var(--accent);
}

/* ---------- Chips / štítky ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  color: var(--accent-text);
}

.chip-ukazka {
  background: #ffe9c2;
  color: #7a5200;
}

[data-theme='dark'] .chip-ukazka {
  background: rgba(255, 200, 100, 0.18);
  color: #ffd27a;
}

/* ---------- Accessibility ---------- */

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

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

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