/* ==========================================================================
   Base – reset, typografie, layout
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--s-10);
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: clip;
}

body {
  min-height: 100svh;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: break-word;
}

::selection {
  background: var(--c-gold-soft);
  color: var(--c-ink);
}

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* sekce poptávky dostává po skoku z CTA fokus (main.js) – obrys kolem celé sekce by jen rušil */
[data-offer-target]:focus {
  outline: none;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-gap);
}

/* ---------- Typografie ---------- */

.h1,
.h2,
.display,
.h3,
.h4 {
  font-family: var(--ff-display);
  font-weight: var(--fw-regular);
  letter-spacing: -0.02em; /* změřeno z designu */
  text-wrap: balance;
}

.h1 {
  font-size: var(--fs-h1);
  line-height: 1.125; /* 64/72 */
}

.h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
}

.display {
  font-size: var(--fs-display);
  line-height: 1.2;
}

.h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  font-weight: var(--fw-medium);
}

.h4 {
  font-size: var(--fs-h4);
  line-height: 1.333;
  font-weight: var(--fw-medium);
  letter-spacing: 0;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.444;
  letter-spacing: -0.01em;
}

.text-muted {
  color: var(--c-muted);
}

.accent {
  color: var(--c-gold);
}

/* ---------- Utility ---------- */

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

/* slova spojená &nbsp; (doplňuje VT.keepNbsp před SplitText) */
.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: var(--s-2);
  left: var(--s-2);
  z-index: 100;
  padding: var(--s-1) var(--s-2);
  background: var(--c-ink);
  color: var(--c-white);
  border-radius: var(--r-sm);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus-visible {
  transform: none;
}

/* SplitText – maska řádků (padding kvůli háčkům a čárkám nad písmeny) */
.split-line-mask {
  padding-block: 0.12em;
  margin-block: -0.12em;
}

/* ---------- Omezený pohyb ---------- */

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

/* ---------- Dotyk a bezpečné okraje (notch, home indikátor) ---------- */

a,
button,
summary,
label,
input,
select,
textarea,
[role="button"] {
  touch-action: manipulation; /* bez 300ms zpoždění a dvojklikového zoomu */
}

html {
  -webkit-tap-highlight-color: rgba(198, 147, 80, 0.2);
}

@supports (padding: max(0px)) {
  .container {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
}

/* odstavce a položky bez osamoceného posledního slova na řádku */
p,
li,
dd,
figcaption {
  text-wrap: pretty;
}
