/* ==========================================================================
   Hasiace systémy SAPFIR | TeploZima — landing page
   Mission-critical industrial editorial. Mobile-first.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette (zadané) */
  --brand-red: #EE3135;
  --brand-blue: #30318C;
  --hero-bg: #0B1020;
  --ink: #111827;
  --muted: #5F6878;
  --surface: #F7F8FC;
  --white: #FFFFFF;
  --border: #D9DEE8;

  /* Odvodené funkčné roly */
  --cta-red: #D1262B;        /* brand-red stmavená: biely text ~5:1 */
  --cta-red-hover: #B01E23;
  --on-dark: #FFFFFF;
  --on-dark-muted: #B9C0CE;
  --border-dark: #2C3450;
  --input-border: #8C94A6;   /* ≥3:1 na bielej */
  --disabled-bg: #C5CBD8;
  --disabled-ink: #3D4454;
  --focus: var(--brand-blue);
  --focus-on-dark: #AFB1FF;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-meta: 0.875rem;       /* 14 px — metadata, ovládacie prvky */
  --fs-small: 0.9375rem;     /* 15 px — nápovedy formulára */
  --fs-body: 1rem;           /* 16 px */
  --fs-lead: 1.0625rem;
  --fs-h3: 1.25rem;
  --fs-h2: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  --fs-h1: clamp(2.125rem, 1.35rem + 2.5vw, 3.5rem);

  /* Spacing — 8 px base */
  --s-1: 0.5rem;   /* 8 */
  --s-2: 1rem;     /* 16 */
  --s-3: 1.5rem;   /* 24 */
  --s-4: 2rem;     /* 32 */
  --s-5: 2.5rem;   /* 40 */
  --s-6: 3rem;     /* 48 */
  --s-7: 3.5rem;   /* 56 */
  --s-8: 4rem;     /* 64 */
  --s-12: 6rem;    /* 96 */
  --section-y: clamp(4rem, 3rem + 4vw, 7.5rem);

  /* Shape & motion */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 150ms;
  --dur: 300ms;
  --dur-slow: 550ms;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-h: 64px;
  --sticky-h: 0px;
}

@media (min-width: 1024px) {
  :root {
    --header-h: 72px;
    --fs-body: 1.0625rem;
    --fs-lead: 1.1875rem;
    --fs-h3: 1.375rem;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-2));
}

@media (max-width: 767.98px) {
  html { scroll-padding-bottom: 88px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  overflow-x: clip;
}

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

h1, h2, h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h2 { font-size: var(--fs-h2); font-weight: 750; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--brand-blue); text-underline-offset: 0.18em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.icon { width: 20px; height: 20px; flex: none; }

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

/* ---------- Skip link & progress ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-2);
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: var(--s-1); }

.scroll-progress {
  display: none;
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}
.js .scroll-progress { display: block; }
.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--brand-red);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.btn--lg { min-height: 56px; padding: 14px 26px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--cta-red); color: var(--white); }
.btn--primary:hover { background: var(--cta-red-hover); }
.btn--primary:active { background: var(--cta-red-hover); transform: translateY(1px); }

.btn--outline-dark { background: transparent; color: var(--on-dark); border-color: #7B8398; }
.btn--outline-dark:hover { border-color: var(--on-dark); background: #161C31; }

.btn[disabled],
.btn[disabled]:hover {
  background: var(--disabled-bg);
  color: var(--disabled-ink);
  border-color: transparent;
  cursor: not-allowed;
  transform: none;
}

.btn-sub {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 500;
}

.btn[aria-busy="true"]::after {
  content: "";
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.brand img { width: auto; height: 26px; }

.site-nav { display: none; }

.btn--header { min-height: 44px; padding: 8px 14px; font-size: 0.9375rem; gap: 8px; }
.btn--header .icon { width: 18px; height: 18px; }
.label-desktop {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (min-width: 400px) {
  .brand img { height: 30px; }
}

@media (min-width: 1024px) {
  .brand img { height: 44px; }
  .site-nav { display: block; margin-left: auto; }
  .site-nav ul { display: flex; gap: var(--s-3); list-style: none; }
  .site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--ink);
    font-size: 0.9375rem;
    font-weight: 550;
    white-space: nowrap;
    text-decoration: none;
  }
  .site-nav a:hover { color: var(--brand-blue); text-decoration: underline; text-decoration-thickness: 2px; }
  .btn--header { margin-left: var(--s-3); padding-inline: 18px; }
}

/* Slovo „Zavolať“ v hlavičke až od 1200 px, pod tým sa logo, menu a tlačidlo nezmestia. */
@media (min-width: 1200px) {
  .label-desktop { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

/* ---------- Shared section patterns ---------- */
.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }
.section--dark {
  background: var(--hero-bg);
  color: var(--on-dark);
  --focus: var(--focus-on-dark);
}
.section--dark a:not(.btn) { color: var(--on-dark); }

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--brand-red);
}
.section--dark .kicker { color: var(--on-dark-muted); }

.section-head { max-width: 46rem; }
.section-intro {
  margin-top: var(--s-3);
  max-width: 40rem;
  font-size: var(--fs-lead);
  color: var(--muted);
}
.section--dark .section-intro { color: var(--on-dark-muted); }

.split { display: grid; gap: var(--s-5); }
@media (min-width: 1024px) {
  .split {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--s-3);
    align-items: start;
  }
  .split-aside { grid-column: 1 / span 5; }
  .split-aside--narrow { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + var(--s-4)); }
  .split-main { grid-column: 7 / -1; }
  .split-aside--narrow + .split-main { grid-column: 6 / -1; }
}

/* Reveal (iba s JS, iba mimo prvého viewportu, iba bez reduced motion) */
[data-reveal] {
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.reveal-pending { opacity: 0; transform: translateY(16px); }

/* ---------- 1 · Hero ---------- */
.hero {
  background: var(--hero-bg);
  color: var(--on-dark);
  padding-block: var(--s-3) var(--s-6);
  --focus: var(--focus-on-dark);
}
.hero-grid { display: grid; gap: var(--s-5); }

.eyebrow {
  margin-bottom: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.45;
  text-transform: uppercase;
  color: var(--brand-red);
}

.hero h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.h1-line { display: block; }

.hero-lead {
  margin-top: var(--s-3);
  max-width: 36rem;
  font-size: var(--fs-lead);
  color: var(--on-dark-muted);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: var(--s-4);
}

/* Oddeľovač sedí v medzere pred položkou; na začiatku každého riadku ho oreže clip-path. */
.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: var(--s-3) 0 0 -28px;
  clip-path: inset(0 0 0 28px);
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--on-dark-muted);
}
.trust-line li { position: relative; margin-left: 28px; }
.trust-line li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -16px;
  width: 4px;
  height: 4px;
  background: var(--brand-red);
  transform: translateY(-50%);
}

.hero-media { margin: 0; min-width: 0; }
.video-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
}
.hero-video { width: 100%; height: 100%; object-fit: cover; }

.video-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px var(--s-2);
  margin-top: 12px;
}
.video-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px 8px 12px;
  border: 1px solid #5A627C;
  border-radius: var(--radius);
  background: transparent;
  color: var(--on-dark);
  font: inherit;
  font-size: var(--fs-meta);
  font-weight: 650;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease);
}
.video-toggle:hover { border-color: var(--on-dark); }
.video-toggle .icon { width: 18px; height: 18px; }

.video-fullscreen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #5A627C;
  border-radius: var(--radius);
  background: transparent;
  color: var(--on-dark);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease);
}
.video-fullscreen:hover { border-color: var(--on-dark); }
.video-fullscreen .icon { width: 18px; height: 18px; }
.video-toggle .icon-pause,
.video-toggle .icon-replay { display: none; }
.video-toggle[data-state="playing"] .icon-play { display: none; }
.video-toggle[data-state="playing"] .icon-pause { display: block; }
.video-toggle[data-state="ended"] .icon-play { display: none; }
.video-toggle[data-state="ended"] .icon-replay { display: block; }

.video-phases {
  display: flex;
  flex: 1 1 260px;
  gap: 6px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--on-dark-muted);
}
.video-phases li {
  flex: 1;
  padding-top: 8px;
  border-top: 2px solid var(--border-dark);
  white-space: nowrap;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.phase-num { color: #7E869B; }
.video-phases li.is-active { color: var(--on-dark); border-top-color: var(--brand-red); }
.video-phases li:nth-child(2).is-active { border-top-color: var(--on-dark); }
.video-phases li:nth-child(3).is-active { border-top-color: var(--focus-on-dark); }
.video-phases li.is-active .phase-num { color: inherit; }

.hero-caption {
  margin-top: 12px;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--on-dark-muted);
}

/* Mobil a tablet: video hneď pod hlavičkou, text nasleduje. DOM poradie (h1 prvý) zostáva kvôli čítačkám. */
@media (max-width: 1023.98px) {
  .hero-media { order: -1; }
}

@media (min-width: 560px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (min-width: 1024px) {
  .hero { padding-block: var(--s-7) var(--s-8); }
  .hero-grid {
    grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    gap: var(--s-7);
    align-items: center;
  }
  .hero-actions { margin-top: var(--s-5); }
}

/* ---------- Riziko v číslach ---------- */
.stats-band {
  padding-block: var(--s-5);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.stats-grid { display: grid; gap: var(--s-3); }
.stats-copy .kicker { line-height: 1.4; }
.stats-lead { max-width: 30rem; font-size: var(--fs-lead); font-weight: 600; line-height: 1.45; }

.stats { display: grid; list-style: none; }
.stat {
  display: grid;
  grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr);
  column-gap: var(--s-2);
  align-items: baseline;
  padding-block: 12px;
  border-top: 1px solid var(--border);
}
.stat:last-child { border-bottom: 1px solid var(--border); }
.stat-value {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-label { font-size: var(--fs-small); line-height: 1.45; color: var(--muted); }

.stats-source {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s-3); }
  .stat {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
    align-content: start;
    padding-block: var(--s-2) 0;
    border-bottom: 0;
  }
  .stat:last-child { border-bottom: 0; }
}

@media (min-width: 1024px) {
  .stats-band { padding-block: var(--s-6); }
  .stats-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--s-3);
    row-gap: var(--s-3);
    align-items: start;
  }
  .stats-copy { grid-column: 1 / span 4; }
  .stats { grid-column: 5 / -1; }
  .stats-source { grid-column: 5 / -1; }
}

/* ---------- 2 · Hlavné výhody ---------- */
/* Mobil 1 stĺpec, tablet a menší desktop 2 stĺpce, široký desktop 3 stĺpce × 2 riadky. */
.benefits {
  display: grid;
  margin-top: var(--s-5);
  list-style: none;
}
.benefit {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  column-gap: var(--s-2);
  align-content: start;
  padding-block: var(--s-3);
  border-top: 1px solid var(--border);
}
.benefit-num {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  color: var(--brand-red);  /* ≥24 px: large text, 4.1:1 */
}
.benefit h3 { font-size: 1.1875rem; }
.benefit p { margin-top: var(--s-1); max-width: 34rem; color: var(--muted); }

.benefits-cta {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-3);
  padding-top: var(--s-4);
  border-top: 2px solid var(--ink);
}
.benefits-cta p { max-width: 34rem; font-size: var(--fs-lead); font-weight: 600; }
.benefits-cta .btn { justify-content: flex-start; text-align: left; }

@media (min-width: 768px) {
  .benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-5) var(--s-4);
    margin-top: var(--s-6);
  }
  .benefit { grid-template-columns: minmax(0, 1fr); padding: var(--s-3) 0 0; }
  .benefit-num { grid-row: auto; margin-bottom: var(--s-2); }
  .benefits-cta {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--s-6);
    margin-top: var(--s-6);
  }
}

@media (min-width: 1200px) {
  .benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s-5); }
  .benefit-num { font-size: 2.25rem; }
}

/* ---------- 3 · Ako funguje ---------- */
.steps { display: grid; margin-top: var(--s-6); list-style: none; }
.step {
  --step-color: var(--brand-red);
  padding: 0 0 var(--s-5) var(--s-3);
  border-left: 2px solid var(--step-color);
}
.step:nth-child(2) { --step-color: var(--on-dark); }
.step:nth-child(3) { --step-color: var(--focus-on-dark); padding-bottom: 0; }

.step-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.step-num {
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  color: var(--on-dark);
}
.step h3 { margin-top: var(--s-2); }
.step p:not(.step-label) { margin-top: var(--s-1); max-width: 26rem; color: var(--on-dark-muted); }

@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s-4); margin-top: var(--s-7); }
  .step,
  .step:nth-child(3) { padding: var(--s-3) 0 0; border-left: 0; border-top: 2px solid var(--step-color); }
  .step-num { font-size: 3.5rem; }
}

/* Atmosférické video pozadie sekcie. Statický obrázok leží pod videom a zostáva viditeľný,
   kým video nehrá (bez JS, reduced motion, Save-Data, chyba prehrávania). */
.section--media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.section-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-bg);
}
.section-bg-poster,
.section-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.section-bg-video {
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
}
.section-bg-video.is-playing { opacity: 1; }
/* Navy vrstva, silnejšia pod nadpisom. Nad najsvetlejším pixelom slučky pri minimálnom krytí 70 %:
   on-dark-muted ≈ 4,8 : 1, biela ≈ 8,8 : 1. Farebné čiary krokov sú doplnkové, krok nesie číslo a názov. */
.section-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(11 16 32 / 0.84) 0%, rgb(11 16 32 / 0.7) 45%, rgb(11 16 32 / 0.74) 100%);
}

/* ---------- 4 · Kde chráni ---------- */
.risk-grid {
  display: grid;
  gap: var(--s-5) var(--s-3);
  margin-top: var(--s-6);
  list-style: none;
}
.risk { min-width: 0; }
.risk-media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.risk-media img { width: 100%; height: 100%; object-fit: cover; }

.risk-body {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: var(--s-1);
  margin-top: var(--s-2);
}
.risk-num {
  grid-row: span 2;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
}
.risk-body h3 { font-size: 1.1875rem; }
.risk-body p { margin-top: 4px; color: var(--muted); }

@media (min-width: 768px) {
  .risk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk:first-child { grid-column: 1 / -1; }
  .risk:first-child .risk-media { aspect-ratio: 16 / 9; }
}

@media (min-width: 1024px) {
  .risk-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: var(--s-6); }
  .risk:nth-child(1) { grid-column: 1 / span 7; grid-row: 1 / span 2; display: flex; flex-direction: column; }
  .risk:nth-child(1) .risk-media { aspect-ratio: auto; flex: 1; min-height: 420px; }
  .risk:nth-child(2),
  .risk:nth-child(3) { grid-column: 8 / -1; }
  .risk:nth-child(4) { grid-column: 1 / span 5; }
  .risk:nth-child(5) { grid-column: 6 / -1; }
  .risk:nth-child(n+2) .risk-media { aspect-ratio: auto; height: clamp(200px, 17vw, 240px); }
  .risk:nth-child(n+4) .risk-media { height: clamp(220px, 20vw, 280px); }
}

.cta-band {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-8);
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.cta-band p { margin-top: 4px; color: var(--muted); }
.cta-band .btn { justify-content: flex-start; text-align: left; }

@media (min-width: 768px) {
  .cta-band { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: var(--s-4); }
}

/* ---------- 5 · Realizácie ---------- */
.case {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-6);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
}
.case + .case { margin-top: var(--s-8); }

.case-index {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.case h3 { margin-top: var(--s-1); font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); }

.case-text { margin-top: var(--s-3); color: var(--muted); max-width: 34rem; }

.protected { margin: var(--s-3) 0 0; }
.protected dt {
  margin-bottom: var(--s-1);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.protected dd {
  margin: 0;
  padding-block: 10px;
  border-top: 1px solid var(--border);
  font-weight: 600;
}
.protected dd:last-child { border-bottom: 1px solid var(--border); }

.references {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
}
.references h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); }
.references-list {
  display: grid;
  column-gap: var(--s-4);
  list-style: none;
}
.references-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.references-list li:first-child { border-top: 1px solid var(--border); }
/* Šípka = tvar #i-arrow-right zo sprite, farbu drží background cez masku. */
.references-list li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: calc((1.6em - 16px) / 2);
  background: var(--cta-red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
.gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #E6E9F0;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 8px;
  background: var(--hero-bg);
  color: var(--on-dark);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  line-height: 1.4;
}

/* Mobile: veľký záber + dva zábery vedľa seba (nie tri drobné stĺpce) */
.gallery--cemmac .g-a { grid-column: 1 / -1; aspect-ratio: 7 / 6; }
.gallery--cemmac .g-b,
.gallery--cemmac .g-c { aspect-ratio: 3 / 4; }

.gallery--budmerice .g-a { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.gallery--budmerice .g-b { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
.gallery--budmerice .g-c { grid-column: 1 / -1; aspect-ratio: 4 / 3; }

@media (min-width: 768px) {
  .gallery--cemmac .g-a { aspect-ratio: 16 / 10; }
  .gallery--budmerice .g-b,
  .gallery--budmerice .g-c { grid-column: auto; aspect-ratio: 1 / 1; }
}

@media (min-width: 768px) {
  .references-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .references-list li:nth-child(2) { border-top: 1px solid var(--border); }
}

@media (min-width: 1024px) {
  .case {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--s-3);
    align-items: start;
  }
  .case-copy { grid-column: 1 / span 4; grid-row: 1; }
  .case-gallery { grid-column: 6 / -1; grid-row: 1; }
  .case--reverse .case-copy { grid-column: 9 / -1; }
  .case--reverse .case-gallery { grid-column: 1 / span 7; }

  .gallery--cemmac {
    grid-template-columns: 2fr 1fr 1fr;
    grid-auto-rows: clamp(340px, 33vw, 460px);
  }
  .gallery--cemmac .g-a { grid-column: auto; }
  .gallery .g-a,
  .gallery .g-b,
  .gallery .g-c { aspect-ratio: auto; }

  .gallery--budmerice {
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: repeat(2, clamp(170px, 16.5vw, 226px));
  }
  .gallery--budmerice .g-a { grid-column: 1; grid-row: 1; }
  .gallery--budmerice .g-b { grid-column: 1; grid-row: 2; }
  .gallery--budmerice .g-c { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- 6 · Produkty ---------- */
.products-head { display: grid; gap: var(--s-3); }
.products-head .kicker { margin-bottom: var(--s-2); }
.products-head .section-intro { margin-top: 0; }

.products { margin-top: var(--s-6); }

/* Natívny vodorovný posun: funguje dotykom, trackpadom aj bez JS. */
.products-track {
  --products-gap: var(--s-2);
  display: flex;
  gap: var(--products-gap);
  margin: 0;
  padding: 0 0 var(--s-2);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  border-radius: var(--radius-lg);
}
.products-track:focus-visible { outline-offset: 4px; }
.js .products-track { scrollbar-width: none; }
.js .products-track::-webkit-scrollbar { display: none; }

/* position: relative drží absolútne pozicionované .visually-hidden v karte,
   inak by karty mimo zoznamu rozťahovali šírku stránky. */
.product {
  position: relative;
  display: flex;
  flex: 0 0 82%;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  scroll-snap-align: start;
}

.product-media {
  position: relative;
  aspect-ratio: 10 / 9;
  background: #B2B2B2;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 8px;
  background: var(--hero-bg);
  color: var(--on-dark);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  line-height: 1.4;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--s-3);
}
.product-body h3 { font-size: 1.25rem; }
.product-use { margin-top: 6px; color: var(--muted); }

.product-specs { margin: var(--s-3) 0 var(--s-3); }
.product-specs div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  padding-block: 8px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  line-height: 1.45;
}
.product-specs dt { color: var(--muted); }
.product-specs dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }

/* Úzke displeje: hodnota pod popisom, aby sa dlhé hodnoty nelámali do úzkeho stĺpca. */
@media (max-width: 419.98px) {
  .product-specs div { display: grid; gap: 2px; }
  .product-specs dd { text-align: left; }
}

.product-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px var(--s-2);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.product-price span {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
}
.product-price strong { font-size: 1.25rem; font-weight: 750; white-space: nowrap; }

.product-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: 48px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
.product-link .icon { width: 18px; height: 18px; color: var(--brand-blue); }
.product-link:hover { color: var(--brand-blue); text-decoration: underline; text-decoration-thickness: 2px; }

.products-ui {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-2);
}
.products-ui[hidden] { display: none; }
.products-progress {
  flex: 1;
  height: 2px;
  overflow: hidden;
  background: var(--border);
}
.products-progress span {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--brand-red);
}
.products-count {
  min-width: 4.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.products-buttons { display: flex; gap: var(--s-1); }
.products-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.products-btn:hover { border-color: var(--ink); color: var(--brand-blue); }
.products-btn[aria-disabled="true"],
.products-btn[aria-disabled="true"]:hover { border-color: var(--border); color: #9AA2B3; cursor: default; }

.products-foot {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-4);
  font-size: var(--fs-small);
  color: var(--muted);
}
.products-note { max-width: 40rem; }
.products-consult a { color: var(--brand-blue); font-weight: 700; white-space: nowrap; }

@media (min-width: 560px) {
  .product { flex-basis: calc((100% - var(--products-gap)) / 1.7); }
}

@media (min-width: 768px) {
  .products-track { --products-gap: var(--s-3); }
  .product { flex-basis: calc((100% - 2 * var(--products-gap)) / 2.3); }
}

@media (min-width: 1024px) {
  .products-head {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--s-3);
    align-items: end;
  }
  .products-head > div { grid-column: 1 / span 6; }
  .products-head .section-intro { grid-column: 7 / -1; }
  .product { flex-basis: calc((100% - 3 * var(--products-gap)) / 3.3); }
  .products-ui { gap: var(--s-3); }
  .products-foot { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: var(--s-6); }
}

/* ---------- 7 · FAQ ---------- */
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: 44px;
  padding-block: 20px;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin: 6px 6px 0 0;
  border-right: 2px solid var(--brand-blue);
  border-bottom: 2px solid var(--brand-blue);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 10px; }
.faq summary:hover { color: var(--brand-blue); }
.faq-answer { padding-bottom: var(--s-3); max-width: 42rem; color: var(--muted); }
.faq-answer p + p { margin-top: var(--s-1); }

/* ---------- 8 · Obchodníci ---------- */
.btn--outline { background: var(--white); color: var(--ink); border-color: var(--border); }
.btn--outline:hover { border-color: var(--ink); }

.team {
  display: grid;
  gap: var(--s-6);
  margin-top: var(--s-6);
  list-style: none;
}
.person {
  position: relative;
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  column-gap: var(--s-2);
  grid-template-rows: auto 1fr;
  align-items: start;
}
.person-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #E3EAF4;
}
.person-photo--placeholder {
  display: grid;
  place-items: center;
  padding: var(--s-1);
  border: 1px dashed var(--input-border);
  background: repeating-linear-gradient(135deg, var(--surface) 0 10px, #E9ECF2 10px 20px);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}
.person-role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cta-red);
}
.person-name { margin-top: 4px; font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); font-weight: 750; line-height: 1.15; }
.person-contacts { margin-top: var(--s-2); list-style: none; }
.person-contacts li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 10px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  overflow-wrap: anywhere;
}
.person-contacts li:last-child { border-bottom: 1px solid var(--border); }
.person-contacts .icon { width: 16px; height: 16px; color: var(--muted); }
.person-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--s-2);
}
.person-actions .btn { flex: 1 1 auto; }

@media (min-width: 560px) {
  .person { grid-template-columns: 11rem minmax(0, 1fr); column-gap: var(--s-3); }
  .person-photo { grid-row: span 2; }
  .person-actions { grid-column: 2; margin-top: var(--s-3); }
  .person-actions .btn { flex: 0 0 auto; }
}
@media (min-width: 1024px) {
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-5); }
}
@media (min-width: 1200px) {
  .person { grid-template-columns: 14.375rem minmax(0, 1fr); }
}

/* ---------- 8 · Final CTA + form ---------- */
.final-grid { display: grid; gap: var(--s-6); }
.final h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); }
.final-lead { margin-top: var(--s-3); max-width: 34rem; font-size: var(--fs-lead); color: var(--on-dark-muted); }
.final-copy .btn { margin-top: var(--s-4); }

.prep { margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--border-dark); max-width: 30rem; }
.prep-title {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.prep ul { margin-top: 12px; list-style: none; }
.prep li { display: flex; gap: 12px; padding-block: 6px; }
.prep li::before { content: ""; flex: none; width: 12px; height: 2px; margin-top: 0.8em; background: var(--brand-red); }

.callback {
  --focus: var(--brand-blue);
  padding: var(--s-3);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
}
.callback h3 { font-size: 1.375rem; }
.callback h3:focus { outline: none; }
.callback-intro { margin-top: 6px; color: var(--muted); }

.field { margin-top: 20px; }
.field label { display: block; margin-bottom: 6px; font-weight: 650; }
.field-opt { font-weight: 400; color: var(--muted); }

.field input[type="text"],
.field input[type="tel"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field input[type="text"]:hover,
.field input[type="tel"]:hover { border-color: var(--ink); }
.field input:focus-visible { outline-offset: 1px; }

.field-hint { margin-top: 6px; font-size: var(--fs-small); color: var(--muted); }
.field-error { font-size: var(--fs-small); font-weight: 650; color: var(--cta-red); }
.field-error:not(:empty) { margin-top: 6px; }

.field.is-invalid input[type="tel"] { border-color: var(--cta-red); box-shadow: inset 0 0 0 1px var(--cta-red); }

.field--check {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  margin-top: var(--s-3);
}
.field--check input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--brand-blue);
  cursor: pointer;
}
.field--check label { margin: 0; font-weight: 400; font-size: var(--fs-small); line-height: 1.5; cursor: pointer; }
.field--check .field-error { grid-column: 2; }
.field--check.is-invalid input { outline: 2px solid var(--cta-red); outline-offset: 2px; }

/* Honeypot proti botom: mimo obrazovky, mimo poradia tabulátora aj čítačiek. */
.field-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.callback-submit { margin-top: var(--s-3); }

.callback-status { margin-top: var(--s-2); }
.status {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  line-height: 1.5;
}
/* Biela karta vo vnútri tmavej sekcie: odkazy vrátiť na brand-blue. */
.section--dark .callback a:not(.btn) { color: var(--brand-blue); }
.callback .status a { font-weight: 700; white-space: nowrap; }
.callback noscript .status { margin-top: var(--s-2); }
.status--loading { background: var(--surface); border: 1px solid var(--border); }
.status--success { background: var(--surface); border: 1px solid var(--brand-blue); border-left-width: 4px; }
.status--error { background: #FDF0F0; border: 1px solid var(--cta-red); border-left-width: 4px; }

.callback[data-state="loading"] .callback-submit { cursor: progress; }

@media (min-width: 768px) {
  .callback { padding: var(--s-4); }
}

@media (min-width: 1024px) {
  .final-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-3); align-items: start; }
  .final-copy { grid-column: 1 / span 6; }
  .final-form { grid-column: 8 / -1; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--s-5);
  background: var(--white);
  border-top: 1px solid var(--border);
}
.footer-inner { display: grid; gap: var(--s-3); }
.brand--footer img { height: 28px; }
.footer-text { color: var(--muted); }
.footer-text p:first-child { color: var(--ink); font-weight: 650; }
.footer-note { margin-top: 4px; max-width: 34rem; font-size: var(--fs-small); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px var(--s-3); list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-phone { color: var(--ink); font-weight: 750; font-size: 1.125rem; text-decoration: none; }
.footer-phone:hover { text-decoration: underline; }

@media (min-width: 1024px) {
  .footer-inner { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--s-6); }
}

/* ---------- Mobile sticky CTA ---------- */
.sticky-call {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--border);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.sticky-call.is-visible {
  transform: none;
  visibility: visible;
  transition: transform var(--dur) var(--ease), visibility 0s;
}
.sticky-call .btn { min-height: 52px; }

@media (min-width: 768px) {
  .sticky-call { display: none !important; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .reveal-pending { opacity: 1; transform: none; }
  .section-bg-video { display: none; }
}
