/* TAGRA.EU — Base styles
   Reset, body typography, headings (section + hero), eyebrow,
   buttons, container, animation primitives.
   
   Heading styles match TRUCKMALL.cz: UPPERCASE 36/30px section H2
   with the 3-stop blue gradient --heading-gradient (TRUCKMALL stops
   #0b2c4a → #134a8e → #1f5fa6, tokens.css). Hero H2 stays
   mixed-case + larger (intentional differentiation).
   
   Last refactor: 2026-05-13.
*/

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
html { scroll-padding-top: calc(var(--nav-h, 64px) + 12px); }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-page);
  /* Body has NO top padding — hero sections extend behind the
     transparent liquid-glass nav. !important to override any
     inline rules that might still set padding-top. */
  padding-top: 0 !important;
  -webkit-font-smoothing: antialiased;
}

/* === Container === */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* === Section headings (TRUCKMALL style) ===
   Used on all section H2 / .section-h2 across the site.
   .hero-h2 below overrides with larger, mixed-case styling. */
h2, .section-h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin: 0 0 14px;
  padding: 0.12em 0.15em 0.08em 0;
  display: inline-block;
  max-width: 100%;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h2, .section-h2 {
    background: var(--heading-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
@media (max-width: 768px) {
  h2:not(.hero-h2), .section-h2 { font-size: 30px; }
}

/* === Hero heading — larger, mixed-case ===
   Applies to <h1> page headings AND any <h2 class="hero-h2"> hero
   pattern. The TRUCKMALL gradient (--heading-gradient) is shared with
   section H2, only the size and casing differ. */
h1, h2.hero-h2, .hero-h2 {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: uppercase;  /* uniform cap-height for product names */
  margin: 0 0 16px;
  padding: 0 0 0.08em 0;
  display: inline-block;      /* tight box so gradient spans the text */
  max-width: 100%;
  color: var(--blue-mid);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1, h2.hero-h2, .hero-h2 {
    background: var(--heading-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

@media (max-width: 768px) {
  h1, h2.hero-h2, .hero-h2 { font-size: 42px; }
}
/* Safety: never apply section-heading styling to h1/h2 in the nav or footer.
   Bez tohoto dědí patičkové nadpisy modrý přechodový text určený pro obsahové
   H2, který je na tmavém pozadí patičky neviditelný. */
nav h1, nav h2,
footer h1, footer h2, .site-footer h2 {
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: inherit;
  margin: 0;
  padding: 0;
}

/* === Smaller headings === */
h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--blue-dark);
  margin: 0 0 12px;
}
h4 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--strong);
  margin: 0 0 10px;
}

/* === Eyebrow (small green uppercase label above headings) === */
.eyebrow, .section-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-brand);
  margin: 0 0 12px;
}

/* === Body text === */
p { margin: 0 0 16px; line-height: 1.6; }
p:last-child { margin-bottom: 0; }
p.lead {
  font-size: 19px;
  color: var(--text2);
  max-width: 640px;
  margin: 0 auto 32px;
}
strong { font-weight: 700; color: var(--strong); }

/* === Links === */
a {
  color: var(--green-brand);
  text-decoration: none;
  text-underline-offset: 0.18em;
  transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover, a:focus {
  color: var(--green-cta);
  text-decoration: underline;
}

/* === Buttons === */
.btn,
.btn-cta,
.btn-outline,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 99px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: inherit;
}
.btn-cta,
.btn-primary {
  background: linear-gradient(135deg, var(--green-brand) 0%, var(--green-cta) 100%);
  color: #fff !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(110, 155, 18, 0.30),
              0 1px 0 rgba(255, 255, 255, 0.25) inset;
}
.btn-cta::before,
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.20), transparent 60%);
  pointer-events: none;
}
.btn-cta > *,
.btn-primary > * { position: relative; z-index: 1; }

.btn-cta:hover,
.btn-cta:focus-visible,
.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(140deg, #79a517 0%, #527311 100%);
  transform: scale(1.02);
  box-shadow: 0 10px 26px rgba(110, 155, 18, 0.45),
              0 0 0 4px rgba(110, 155, 18, 0.12),
              0 1px 0 rgba(255, 255, 255, 0.3) inset;
  text-decoration: none !important;
}

/* Sekundární / outline varianta je na tagra.app plná modrá → modrý gradient
   (stejný vzor jako .btn-cta.tmx-dec-jump na TRUCKMALL). */
.btn-outline,
.btn-secondary {
  background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-mid) 100%);
  color: #fff !important;
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(19, 74, 142, 0.28),
              0 1px 0 rgba(255, 255, 255, 0.25) inset;
}
.btn-outline::before,
.btn-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.18), transparent 60%);
  pointer-events: none;
}
.btn-outline > *,
.btn-secondary > * { position: relative; z-index: 1; }

.btn-outline:hover,
.btn-outline:focus-visible,
.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: linear-gradient(140deg, #2a6dc4 0%, #134a8e 100%);
  color: #fff !important;
  transform: scale(1.02);
  box-shadow: 0 10px 26px rgba(19, 74, 142, 0.42),
              0 0 0 4px rgba(19, 74, 142, 0.12),
              0 1px 0 rgba(255, 255, 255, 0.3) inset;
  text-decoration: none !important;
}
.btn-cta--sm { padding: 10px 22px; font-size: 15px; }

/* === Animation primitives === */
.anim-up,
.rev-anim {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-up.on,
.rev-anim.on { opacity: 1; transform: translateY(0); }

.fly-left, .fly-right {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.fly-left  { transform: translateX(-60px); }
.fly-right { transform: translateX(60px); }
.fly-left.on, .fly-right.on { opacity: 1; transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
  .anim-up, .rev-anim, .fly-left, .fly-right {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* === Scroll progress bar (used on some pages) === */
#scroll-progress,
#tmx-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--green-brand), var(--blue-light));
  z-index: 999999;
  transition: width 0.1s ease-out;
  pointer-events: none;
}

/* === Bands (full-width section backgrounds) === */
.band, .tmx-band {
  position: relative;
  padding: 80px 0;
  background: var(--bg-page);
}
.band--gray,    .tmx-band--gray    { background: var(--bg-gray); }
.band--blue,    .tmx-band--blue    { background: var(--bg-apple-solid); }
.band--hero,    .tmx-band--hero    {
  background: linear-gradient(180deg, var(--bg-apple-solid) 0%, var(--bg-page) 100%);
}

/* Hero colour variants per product page.
   - Company (fleet)     → blue:  apple-solid blue tint
   - Trucker (driver)    → green: subtle green wash
   - Control (enforce)   → gray:  neutral light gray (default-ish) */
.band--hero--blue {
  background: linear-gradient(180deg, #eef4fb 0%, #ffffff 100%);
}
.band--hero--green {
  background: linear-gradient(180deg, #e9f3d8 0%, #f3f8e8 52%, #ffffff 100%);
}
.band--hero--gray {
  background: linear-gradient(180deg, #ededf2 0%, #ffffff 100%);
}
@media (max-width: 768px) {
  .band, .tmx-band { padding: 50px 0; }
}

/* === Hero band ===
   Used on driver/, fleet/ and any "<section class='band band--hero'>"
   page. Centred content with comfortable top/bottom padding, matching
   .enf-hero on the enforcement page. */
.band--hero {
  text-align: center;
  /* Top padding accounts for the fixed transparent nav (64px) + breathing room */
  padding: calc(var(--nav-h, 64px) + 60px) 0 60px;
}
@media (max-width: 768px) {
  /* Odsazení musí být větší než výška pevné navigace (64 px), jinak obsah
     leze pod lištu. Zjištěno 14. 8. 2026 na mobilu. */
  .band--hero {
    padding: calc(var(--nav-h, 64px) + 24px) 0 44px;
  }
}
/* The intro paragraph below an H1 hero on subpages. */
p.lead {
  font-size: 21px;
  line-height: 1.5;
  max-width: 640px;
  margin: 16px auto 32px;
  color: var(--text2, #6e6e73);
}
@media (max-width: 768px) {
  p.lead { font-size: 18px; }
}


/* === Odkaz na přeskočení navigace (WCAG 2.4.1, úroveň A) ===
   Skrytý mimo obrazovku, zviditelní se až při navigaci klávesnicí. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--blue-mid, #134a8e); color: #fff;
  padding: 12px 20px; border-radius: 0 0 8px 0;
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.skip-link:focus {
  left: 0; outline: 3px solid var(--green-brand, #6E9B12); outline-offset: 2px;
}


/* === Vizuálně skrytý text pro čtečky obrazovek ===
   Používá se pro nadpisy, které drží správnou hierarchii úrovní,
   aniž by měnily vizuální podobu stránky. */
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}


/* === Poměr stran obrázků ===
   Atributy width/height na <img> rezervují místo (brání poskakování layoutu),
   ale jakmile šířku přebije CSS, musí se výška dopočítat — jinak se obrázek
   roztáhne. Platí pro obrázky, které nemají výšku určenou vlastním pravidlem. */
img[width][height]:not([style*="height"]) { height: auto; }
