/* ==========================================================================
   Base — reset, document defaults, animations, accessibility helpers
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Fixed header + in-page anchors */
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--c-ink);
  color: var(--c-ink);
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Nothing may ever cause a horizontal scrollbar */
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote, fieldset, legend {
  margin: 0;
  padding: 0;
}

fieldset { border: 0; min-width: 0; }
legend { display: block; padding: 0; }

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

img { height: auto; }

a { color: var(--c-red); }
@media (hover: hover) {
  a:hover { color: #FF2A3A; }
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

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

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

strong { font-weight: 600; }

/* Components below set explicit display values; [hidden] must still win. */
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Keyframes (from the export)
   -------------------------------------------------------------------------- */

@keyframes dcup {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes omRise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@keyframes omPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(218, 0, 15, .35); }
  70%      { box-shadow: 0 0 0 16px rgba(218, 0, 15, 0); }
}

/* Zvýraznění v hlavním nadpisu se po otevření stránky „přetáhne“ zleva
   doprava. clip-path, ne scaleX — ten by gradient roztáhl. */
@keyframes markWipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes omFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

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

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  z-index: 100;
  transform: translate(-50%, -200%);
  background: var(--c-white);
  color: var(--c-ink);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  text-decoration: none;
  transition: transform .2s ease;
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
  color: var(--c-ink);
}

/* One consistent focus ring everywhere, visible on light and dark. */
:focus-visible {
  outline: 3px solid #FF6A3D;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Inputs get the ring on the border instead, so it hugs the field. */
.input:focus-visible {
  outline: 3px solid rgba(218, 0, 15, .35);
  outline-offset: 1px;
  border-color: var(--c-red);
}

/* --------------------------------------------------------------------------
   Touch input

   Hover styles live inside `@media (hover: hover)` throughout this project —
   never as a rule that a later query has to undo. On a touch screen the
   browser applies :hover on tap and has no way to clear it (the finger is
   already gone), so the state sticks until you tap elsewhere.

   The query asks about the *primary* input, not the screen size: an iPad with
   a Magic Keyboard reports `hover: hover`, a touch laptop reports whichever
   input the browser considers primary. So this is deliberately not tied to a
   width breakpoint.

   Touch gets its feedback from :active instead, which fires on press and
   clears itself on release on every input type.
   -------------------------------------------------------------------------- */

:where(a, button, label, summary) {
  -webkit-tap-highlight-color: rgba(218, 0, 15, .12);
}

@media (hover: none) {
  /* Jen skutečné ovládací prvky. Karty, pilulky měst a řádky seznamů jsou
     <li> a <div> — nikam nevedou, takže by stisk sliboval interakci, která
     neexistuje. Jejich hover na desktopu je jen oživení, na dotyku správně
     nemá protějšek. */
  .btn:active,
  .footer__link:active,
  .contact-card__link:active {
    transform: scale(.97);
  }

  .level:active {
    border-color: rgba(240, 98, 15, .55);
    background: #FFF1EC;
  }

  .faq__q:active { opacity: .7; }

  .gdpr a:active,
  .sent__foot a:active { color: var(--c-orange); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
