/* ==========================================================================
   EUROMONT CB — design proposal 01 "Auböck pure"  (revision 2)
   Fixed white sidebar, full-bleed hero with white title plates on a red
   spine, flat logo colours (orange leads, red acts, yellow details).
   Type: Tailwind steps, switched at fixed breakpoints (640/1024/1536/2200).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette — taken from the logo */
  --red: #e30613;          /* white on red 4.9:1, red on white 4.9:1 */
  --red-deep: #b9040f;     /* hover / pressed */
  --orange: #f28c00;       /* ink on orange 7.2:1 — never white text */
  --orange-deep: #e86e07;  /* JSME band, ink on it 5.4:1 */
  --yellow: #ffd500;       /* details only */
  --yellow-soft: #fff1b0;  /* third reference-tile field, ink 15:1 */

  /* Neutrals — text, hairlines, quiet surfaces */
  --ink: #1d1d1f;
  --ink-2: #47494e;        /* 9:1 on white */
  --line: #e2e2df;
  --line-strong: #85888d;  /* form borders, 3.5:1 */
  --paper: #f6f5f2;
  --white: #ffffff;
  --focus: var(--ink);

  /* Type — Tailwind steps as "size/line-height" pairs, used via `font:` */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --t-sm: 0.875rem/1.25rem;   /* 14/20 */
  --t-base: 1rem/1.5rem;      /* 16/24 */
  --t-lg: 1.125rem/1.75rem;   /* 18/28 */
  --t-xl: 1.25rem/1.75rem;    /* 20/28 */
  --t-2xl: 1.5rem/2rem;       /* 24/32 */
  --t-3xl: 1.875rem/2.25rem;  /* 30/36 */
  --t-4xl: 2.25rem/2.5rem;    /* 36/40 */
  --t-5xl: 3rem/1;            /* 48 */
  --t-6xl: 3.75rem/1;         /* 60 */
  --t-7xl: 4.5rem/1;          /* 72 */

  /* Type roles — the only sizes the pages use; stepped per breakpoint below */
  --type-small: var(--t-sm);
  --type-body: var(--t-base);
  --type-lead: var(--t-lg);
  --type-h3: var(--t-xl);
  --type-h2: var(--t-3xl);
  --type-h1: var(--t-4xl);
  --type-plate: var(--t-xl);
  --type-plate-desc: var(--t-sm);

  /* Motion — one curve, three durations, shared by slider, hovers and reveals */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 200ms;
  --dur: 600ms;
  --dur-slow: 1200ms;
  --stagger: 90ms;
  --slide: 7000ms;

  /* Layout */
  --gutter: 16px;
  --container: 1360px;
  --measure: 64ch;
  --section: 64px;
  --bar-h: 64px;
  --sidebar-w: 0px;
  --plate-x: 16px;
  --plate-w: auto;
}

@media (min-width: 40em) {   /* 640 */
  :root {
    --type-h1: var(--t-5xl);
    --type-plate: var(--t-3xl);
    --type-plate-desc: var(--t-base);
    --gutter: 32px;
    --section: 80px;
    --plate-x: 40px;
    --plate-w: 480px;
  }
}
@media (min-width: 64em) {   /* 1024 */
  :root {
    --type-lead: var(--t-xl);
    --type-h3: var(--t-2xl);
    --type-h2: var(--t-4xl);
    --type-h1: var(--t-6xl);
    --type-plate: var(--t-4xl);
    --type-plate-desc: var(--t-lg);
    --gutter: 56px;
    --section: 112px;
    --sidebar-w: 280px;
    --plate-x: 64px;
    --plate-w: 560px;
  }
}
@media (min-width: 96em) {   /* 1536 */
  :root {
    --type-body: var(--t-lg);
    --type-plate: var(--t-5xl);
    --type-plate-desc: var(--t-xl);
    --gutter: 72px;
    --section: 128px;
    --sidebar-w: 296px;
    --container: 1600px;
    --plate-x: 96px;
    --plate-w: 700px;
  }
}
@media (min-width: 137.5em) { /* 2200 */
  :root {
    --type-lead: var(--t-2xl);
    --type-h2: var(--t-5xl);
    --type-h1: var(--t-7xl);
    --type-plate: var(--t-6xl);
    --type-plate-desc: var(--t-2xl);
    --container: 1960px;
    --section: 160px;
    --plate-x: 140px;
    --plate-w: 880px;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  padding-left: var(--sidebar-w);
  font: 400 var(--type-body) var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, address, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { flex: none; }
p { text-wrap: pretty; }

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

/* In-page targets land below the mobile bar, flush on desktop */
[id] { scroll-margin-top: var(--bar-h); }
@media (min-width: 64em) {
  [id] { scroll-margin-top: 0; }
}
/* Menu targets (Certifikace, Kontakt) sit on the section heading */
.anchor { scroll-margin-top: calc(var(--bar-h) + 24px); }
@media (min-width: 64em) {
  .anchor { scroll-margin-top: 40px; }
}

.visually-hidden {
  position: absolute !important; /* utility: must win over component positioning */
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* ---------- Headings & text roles ---------- */
.h1 { font: 700 var(--type-h1) var(--font); letter-spacing: -0.025em; text-wrap: balance; }
.h2 { font: 600 var(--type-h2) var(--font); letter-spacing: -0.02em; text-wrap: balance; }
.h3 { font: 600 var(--type-h3) var(--font); letter-spacing: -0.01em; }
.lead { max-width: 56ch; font: 400 var(--type-lead) var(--font); color: var(--ink-2); }
.small { font: 400 var(--type-small) var(--font); }

/* ---------- Buttons (square, sentence case) & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 2px solid transparent;
  font: 600 var(--t-base) var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-deep); }
.btn--white { background: var(--white); color: var(--ink); }
.btn--white:hover { color: var(--red); }
.btn--line { border-color: currentColor; background: transparent; }
.btn--line:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--outline { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn--outline:hover { border-color: var(--red); color: var(--red); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-block: 10px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
  transition: color var(--dur-fast) var(--ease);
}
.link-arrow svg { width: 18px; height: 18px; color: var(--red); transition: transform var(--dur-fast) var(--ease); }
.link-arrow:hover { color: var(--red); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow--back:hover svg { transform: translateX(-4px); }

/* ==========================================================================
   Site header — mobile top bar / desktop fixed white sidebar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bar-h);
  padding-inline: 16px 8px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.brand { display: block; padding-block: 8px; }
.brand img { width: 132px; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 48px;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  background: none;
  font: 500 var(--t-base) var(--font);
  cursor: pointer;
}
.menu-toggle__icon { position: relative; width: 24px; height: 12px; }
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transition: transform var(--dur-fast) var(--ease);
}
.menu-toggle__icon::before { top: 0; }
.menu-toggle__icon::after { bottom: 0; }
.site-header.is-open .menu-toggle__icon::before { transform: translateY(5px) rotate(45deg); }
.site-header.is-open .menu-toggle__icon::after { transform: translateY(-5px) rotate(-45deg); }

.site-nav {
  position: fixed;
  inset: var(--bar-h) 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px 24px 48px;
  background: var(--white);
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast);
}
.site-header.is-open .site-nav {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.site-nav__group { --rule: var(--red); border-left: 2px solid var(--rule); }
.site-nav__group--secondary { --rule: var(--orange); }
.site-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 6px 0 6px 20px;
  font: 400 var(--t-xl) var(--font);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.site-nav__link::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -3px;
  width: 4px;
  background: var(--rule);
  transform: scaleY(0);
  transition: transform var(--dur-fast) var(--ease);
}
.site-nav__link:hover { color: var(--red); }
.site-nav__link:hover::before,
.site-nav__link[aria-current="page"]::before { transform: scaleY(1); }
.site-nav__link[aria-current="page"] { font-weight: 600; }
.site-nav__contact { display: grid; gap: 2px; font: 400 var(--type-small) var(--font); color: var(--ink-2); }
.site-nav__contact a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.site-nav__contact a:hover { color: var(--red); }

@media (min-width: 64em) {
  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    height: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 44px 0 28px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .brand { padding: 0 32px; }
  .brand img { width: 200px; }
  .menu-toggle { display: none; }
  .site-nav {
    position: static;
    flex: 1;
    gap: 28px;
    padding: clamp(40px, 13vh, 150px) 32px 0 36px;
    overflow: visible;
    background: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-nav__link { min-height: 44px; font: 400 var(--t-base) var(--font); }
  .site-nav__contact { margin-top: auto; padding-top: 32px; }
  .site-nav__contact a { min-height: 36px; }
}

/* ==========================================================================
   Title plates — one composition everywhere (hero, detail cover, photo band)
   A red spine on the left; the title plate (content width) and the
   description plate (fixed group width) share it; the button closes it.
   ========================================================================== */
.plates {
  position: absolute;
  z-index: 2;
  left: var(--plate-x);
  right: var(--plate-x);
  bottom: 24px;
  display: grid;
  justify-items: start;
  border-left: 6px solid var(--red);
}
@media (min-width: 40em) {
  .plates { right: auto; width: min(var(--plate-w), 100% - 2 * var(--plate-x)); }
}
.plate { background: var(--white); color: var(--ink); }
.plate--title {
  max-width: 100%;
  padding: 14px 20px 4px;
  font: 700 var(--type-plate) var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-wrap: balance;
}
.plate--desc {
  width: 100%;
  padding: 8px 20px 18px;
  font: 400 var(--type-plate-desc) var(--font);
}
.plates__cta { min-height: 52px; padding: 0 20px; }
@media (min-width: 40em) {
  .plate--title { padding: 24px 32px 6px; }
  .plate--desc { padding: 10px 32px 28px; }
  .plates__cta { min-height: 56px; padding: 0 32px; }
}
@media (min-width: 96em) {
  .plate--title { padding: 32px 40px 8px; }
  .plate--desc { padding: 14px 40px 36px; }
  .plates__cta { min-height: 64px; padding: 0 40px; font: 600 var(--t-lg) var(--font); }
}

/* Soft photo scrim so white plates separate from snow and sky */
.scrim::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 45% 0 0;
  background: linear-gradient(to top, rgba(29, 29, 31, 0.4), rgba(29, 29, 31, 0));
  pointer-events: none;
}

/* ==========================================================================
   Home — hero slider
   ========================================================================== */
.hero {
  --enter: 250ms; /* first load: text enters almost at once */
  position: relative;
  height: clamp(440px, calc(100vh - var(--bar-h) - 56px), 680px);
  height: clamp(440px, calc(100svh - var(--bar-h) - 56px), 680px);
  overflow: hidden;
  background: var(--paper);
}
.hero.is-cycling { --enter: calc(var(--dur-fast) + 450ms); } /* after exit + part of the crossfade */
@media (min-width: 64em) {
  .hero { height: 100vh; height: 100svh; min-height: 600px; max-height: 1240px; }
}
.hero__viewport { position: absolute; inset: 0; touch-action: pan-y; }

.hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.hero__slide.is-active,
.hero__slide.is-leaving { opacity: 1; visibility: visible; }
.hero__slide.is-active { z-index: 1; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

.hero .plates { bottom: 72px; }
@media (min-width: 40em) { .hero .plates { bottom: 96px; } }
@media (min-width: 64em) { .hero .plates { bottom: 120px; } }
@media (min-width: 96em) { .hero .plates { bottom: 150px; } }
@media (min-width: 137.5em) { .hero .plates { bottom: 190px; } }

/* --- Choreography ---------------------------------------------------------
   1. outgoing text group fades out            0 → 200 ms
   2. incoming photo crossfades over the old   200 → 1400 ms, slow zoom 1.06 → 1
   3. title plate unfolds from the red spine   --enter
   4. description, then button rise in         + 1 / + 2 staggers
   The progress line is the autoplay timer itself (its end advances).      */
@media (prefers-reduced-motion: no-preference) {
  .hero.is-cycling .hero__slide.is-active {
    animation: hero-photo-in var(--dur-slow) var(--ease) var(--dur-fast) both;
  }
  .hero__slide.is-active .hero__img,
  .hero__slide.is-leaving .hero__img {
    animation: hero-zoom calc(var(--slide) + var(--dur-slow)) linear both;
  }
  .hero__slide.is-leaving .plates {
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease);
  }
  .hero__slide.is-active .plate--title {
    animation: plate-unfold var(--dur) var(--ease) var(--enter) both;
  }
  .hero__slide.is-active .plate--desc {
    animation: rise var(--dur) var(--ease) calc(var(--enter) + var(--stagger)) both;
  }
  .hero__slide.is-active .plates__cta {
    animation: rise var(--dur) var(--ease) calc(var(--enter) + 2 * var(--stagger)) both;
  }
}
@keyframes hero-photo-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes plate-unfold {
  from { clip-path: inset(0 100% 0 0); transform: translateX(-12px); }
  to { clip-path: inset(0 0 0 0); transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Centred navigation cluster on the hero's bottom edge */
.hero__nav {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  height: 56px;
  background: var(--white);
}
.hero__count {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 16px;
  font: 500 var(--t-sm) var(--font);
  font-variant-numeric: tabular-nums;
}
.hero__count-current { font-weight: 700; }
.hero__progress {
  position: relative;
  width: 72px;
  height: 2px;
  overflow: hidden;
  background: var(--line);
}
.hero__progress-fill {
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
}
.hero.is-autoplay .hero__progress-fill { animation: hero-progress var(--slide) linear both; }
.hero.is-paused .hero__progress-fill { animation-play-state: paused; }
.hero:not(.is-autoplay) .hero__progress-fill { transform: scaleX(1); }
.hero:not(.is-autoplay) .hero__pause { display: none; }
@keyframes hero-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero__btn {
  display: grid;
  place-items: center;
  width: 56px;
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.hero__btn:hover { color: var(--red); }
.hero__btn svg { width: 22px; height: 22px; }
.hero__btn:focus-visible { outline-offset: -3px; }
.hero__pause { border-left: 1px solid var(--line); }
.hero__pause .icon-play { display: none; }
.hero__pause[aria-pressed="true"] .icon-play { display: block; }
.hero__pause[aria-pressed="true"] .icon-pause { display: none; }
.hero__all { display: none; }

@media (min-width: 40em) {
  .hero__nav { left: 50%; right: auto; height: 64px; transform: translateX(-50%); }
  .hero__btn { width: 64px; }
  .hero__count { flex: none; padding: 0 8px; }
  .hero__all {
    display: flex;
    align-items: center;
    padding: 0 28px;
    border-left: 1px solid var(--line);
    font: 600 var(--t-base) var(--font);
    white-space: nowrap;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
  }
  .hero__all:hover { color: var(--red); }
  .hero__all:focus-visible { outline-offset: -3px; }
}

/* ==========================================================================
   Home — "Realizujeme" strip
   ========================================================================== */
.now__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 20px;
  padding-block: 48px;
}
.now__label {
  grid-row: 1;
  align-self: start;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 600 var(--t-base) var(--font);
  color: var(--red);
}
.now__text { max-width: var(--measure); margin-top: 8px; color: var(--ink-2); }
.now__link { margin-top: 12px; }
.now__all {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding: 20px 24px;
  border-top: 4px solid var(--yellow);
  background: var(--paper);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease);
}
.now__all:hover { background: #efeee9; }
.now__all-title { display: block; font: 600 var(--type-lead) var(--font); }
.now__all-meta { display: block; color: var(--ink-2); font: 400 var(--type-small) var(--font); }
.now__all svg { width: 28px; height: 28px; color: var(--red); transition: transform var(--dur-fast) var(--ease); }
.now__all:hover svg { transform: translateX(4px); }
@media (min-width: 64em) {
  .now__inner {
    grid-template-columns: auto minmax(0, 1fr) minmax(260px, 340px);
    gap: 0 48px;
    padding-block: 0;
  }
  .now__label { align-self: center; }
  .now__body { padding-block: 80px; }
  .now__all {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin: 0;
    padding: 32px 36px;
  }
}

/* ==========================================================================
   Home — O společnosti (orange field + deep-orange JSME band)
   ========================================================================== */
.about { padding-top: var(--section); background: var(--orange); }
.about__grid { display: grid; gap: 24px; }
.about__text { display: grid; gap: 1em; max-width: var(--measure); }
.about__text--intro p:first-child { font: 400 var(--type-lead) var(--font); }
@media (min-width: 64em) {
  .about__grid { grid-template-columns: minmax(200px, 1fr) minmax(0, 2.2fr); gap: 48px; }
  .about__grid--rest .about__text { grid-column: 2; }
}
.about__band { margin-top: var(--section); background: var(--orange-deep); }
@media (min-width: 64em) {
  /* Auböck detail: the band stops short of the right edge */
  .about__band { margin-right: clamp(40px, 7vw, 200px); }
}
.jsme { display: grid; gap: 36px; padding-block: 56px; }
@media (min-width: 40em) { .jsme { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
@media (min-width: 64em) { .jsme { padding-block: 72px; } }
.jsme__text { max-width: 30ch; margin-top: 6px; }
.jsme__item::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 24px;
  background: var(--yellow);
}
.about__grid--rest { padding-block: var(--section); }

/* ==========================================================================
   Home — Documents (red band) — cards share rows via subgrid
   ========================================================================== */
.docs { --focus: var(--white); padding-block: var(--section); background: var(--red); color: var(--white); }
.docs__head { margin-bottom: 40px; }
@media (min-width: 64em) { .docs__head { margin-bottom: 56px; } }
.docs__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  max-width: 1180px;
}
@media (min-width: 56em) { .docs__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; } }
.docs__grid > li,
.doc {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
}
.doc { text-decoration: none; padding-bottom: 32px; }
.doc__frame {
  padding: 10px;
  background: var(--white);
  transition: transform var(--dur) var(--ease);
}
.doc__frame img { width: 100%; aspect-ratio: 1700 / 2338; object-fit: cover; }
.doc:hover .doc__frame { transform: translateY(-4px); }
.doc__label { padding-top: 16px; font: 600 var(--type-body) var(--font); }
.doc__hint {
  display: inline-flex;
  align-items: center;
  align-self: end;
  gap: 8px;
  padding-top: 8px;
  font: 400 var(--type-small) var(--font);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.doc__hint svg { width: 16px; height: 16px; }

/* ==========================================================================
   Home — Kontakt
   ========================================================================== */
.contact { padding-block: var(--section); }
.contact__lead {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 48px;
  margin-top: 24px;
  font: 600 var(--type-h3) var(--font);
}
.contact__lead a {
  padding-block: 6px;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.contact__lead a:hover { color: var(--red); }
.contact__grid { display: grid; gap: 36px; margin-top: 56px; }
@media (min-width: 48em) { .contact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 80em) { .contact__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; } }
.contact__col { padding-top: 20px; border-top: 1px solid var(--ink); }
.contact__col h3 { margin-bottom: 12px; font: 600 var(--type-body) var(--font); color: var(--ink-2); }
.contact__col p + p { margin-top: 14px; }
.contact__col a { text-decoration: none; }
.contact__col a:hover { color: var(--red); text-decoration: underline; }
.contact__tel { display: inline-flex; align-items: center; min-height: 44px; }
.contact__dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; }
.contact__dl dt { color: var(--ink-2); }
.contact__dl dd { white-space: nowrap; }
.contact__note { max-width: 46ch; margin-top: 16px; font: 400 var(--type-small) var(--font); color: var(--ink-2); }

/* ==========================================================================
   Footer (orange, company name set in type — no logo sticker)
   ========================================================================== */
.site-footer { padding: 64px 0 72px; background: var(--orange); color: var(--ink); }
@media (min-width: 64em) { .site-footer { padding: 88px 0 80px; } }
.site-footer__grid { display: grid; gap: 28px; }
@media (min-width: 48em) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; } }
.site-footer__name { font: 700 var(--type-h3) var(--font); letter-spacing: -0.01em; }
.site-footer__company address { margin-top: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 40px; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid rgba(29, 29, 31, 0.4);
  font: 400 var(--type-small) var(--font);
}

/* ==========================================================================
   Inner page head
   ========================================================================== */
.page-head { padding-block: 56px 40px; border-bottom: 1px solid var(--line); }
@media (min-width: 64em) { .page-head { padding-block: 112px 56px; } }
.page-head__inner { display: grid; gap: 16px; }

/* ==========================================================================
   Reference listing — alternating half photo / half colour tiles
   ========================================================================== */
.refs-wrap {
  container: refs / inline-size;
  max-width: 2600px;
  margin-inline: auto;
  padding: 32px var(--gutter) var(--section);
}
.refs { display: grid; gap: 16px; }
.ref { --tile-ink: var(--ink); display: grid; background: var(--tile-bg); color: var(--tile-ink); }
.ref--orange { --tile-bg: var(--orange); }
.ref--red { --tile-bg: var(--red); --tile-ink: var(--white); --focus: var(--white); }
.ref--yellow { --tile-bg: var(--yellow-soft); }

.ref__media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper); }
.ref__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.ref:hover .ref__media img { transform: scale(1.03); }
.ref__body { align-self: center; padding: 28px 24px 32px; }
@container refs (min-width: 640px) { .ref__body { padding: 48px; } }
.ref__desc { max-width: 50ch; margin-top: 10px; }
.ref__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; }
.ref__status { font: 500 var(--type-small) var(--font); }
.ref--orange .ref__more,
.ref--red .ref__more { background: var(--white); }
.ref--orange .ref__more { color: var(--ink); }
.ref--red .ref__more { color: var(--red); }
.ref--orange .ref__more:hover { color: var(--red); }
.ref--red .ref__more:hover { color: var(--red-deep); }
.ref--yellow .ref__status { color: var(--ink-2); }

@container refs (min-width: 640px) {
  .ref { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref__media { aspect-ratio: auto; min-height: 37.5cqi; }
  .ref:nth-child(even) .ref__media { order: 2; }
}
/* From ~1500 px of listing width: two tiles per row, checkerboard alternation */
@container refs (min-width: 1500px) {
  .refs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref__media { min-height: 18.5cqi; }
  .ref:nth-child(even) .ref__media { order: 0; }
  .ref:nth-child(4n + 3) .ref__media,
  .ref:nth-child(4n + 4) .ref__media { order: 2; }
}

/* ==========================================================================
   Reference detail
   ========================================================================== */
.crumbs { border-bottom: 1px solid var(--line); font: 400 var(--type-small) var(--font); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 56px; padding-block: 6px; }
.crumbs li { display: flex; align-items: center; gap: 12px; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--red); }

.cover {
  position: relative;
  height: clamp(420px, 72vh, 900px);
  height: clamp(420px, 72svh, 900px);
  overflow: hidden;
  background: var(--paper);
}
.cover__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.cover .plates,
.band .plates { bottom: 24px; }
@media (min-width: 64em) {
  .cover .plates,
  .band .plates { bottom: 72px; }
}

.facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 48px;
  padding-block: 32px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 64em) { .facts { padding-block: 40px; } }
.facts__status {
  font: 700 var(--type-h2) var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
}
.facts__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }

.gallery-section { padding-block: 56px; }
@media (min-width: 64em) { .gallery-section { padding-block: 96px; } }
.gallery-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  margin-bottom: 32px;
}
.gallery-section__hint { color: var(--ink-2); font: 400 var(--type-small) var(--font); }

/* Justified gallery: CSS fallback = wrapped flex; JS assigns exact row sizes */
.gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery__item { position: relative; display: block; flex: 1 1 300px; overflow: hidden; background: var(--paper); cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur) var(--ease); }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__item:focus-visible { outline-offset: 2px; }
.gallery.is-justified .gallery__item { flex: none; width: var(--gw); height: var(--gh); }

.pager { display: grid; gap: 12px; padding-bottom: 56px; }
@media (min-width: 48em) { .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 64em) { .pager { padding-bottom: 96px; } }
.pager__link {
  display: grid;
  grid-template-columns: clamp(96px, 12vw, 160px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 12px;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.pager__link:hover { border-color: var(--red); }
.pager__link img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pager__dir { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font: 400 var(--type-small) var(--font); }
.pager__dir svg { width: 16px; height: 16px; color: var(--red); }
.pager__title { display: block; margin-top: 4px; font: 600 var(--type-lead) var(--font); }
@media (min-width: 48em) {
  .pager__link--next { grid-template-columns: minmax(0, 1fr) clamp(96px, 12vw, 160px); text-align: right; }
  .pager__link--next img { order: 2; }
  .pager__link--next .pager__dir { justify-content: flex-end; }
}

/* CTA band — red, white text */
.cta { --focus: var(--white); padding-block: 64px; background: var(--red); color: var(--white); }
@media (min-width: 64em) { .cta { padding-block: 96px; } }
.cta__inner { display: grid; gap: 28px; }
@media (min-width: 64em) { .cta__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 48px; } }
.cta__text { max-width: 52ch; margin-top: 12px; font: 400 var(--type-lead) var(--font); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Services
   ========================================================================== */
.services { padding-block: var(--section); }
.services__grid { display: grid; gap: 64px; }
@media (min-width: 56em) {
  /* subgrid keeps both lists starting on the same line */
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; row-gap: 0; }
  .service { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; }
}
.service { --bar: var(--orange); }
.service--low { --bar: var(--red); }
.service__lead { max-width: 46ch; margin-top: 12px; color: var(--ink-2); }
.service__list { margin-top: 32px; border-top: 2px solid var(--ink); }
.service__list li {
  position: relative;
  padding: 14px 0 14px 24px;
  border-bottom: 1px solid var(--line);
  font: 400 var(--type-lead) var(--font);
}
.service__list li::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  width: 4px;
  height: 1lh;
  background: var(--bar);
  transform: scaleY(0.72);
  transition: transform var(--dur-fast) var(--ease);
}
.service__list li:hover::before { transform: scaleY(1); }

.band { position: relative; height: clamp(420px, 44vw, 760px); overflow: hidden; background: var(--paper); }
.band__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }

.picks { padding-block: var(--section); }
.picks__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: 32px;
}
.picks__grid { display: grid; gap: 40px 24px; }
@media (min-width: 48em) { .picks__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pick { display: grid; align-content: start; gap: 16px; text-decoration: none; }
.pick__media { overflow: hidden; }
.pick__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.pick:hover .pick__media img { transform: scale(1.03); }
.pick__title,
.pick__desc { display: block; }
.pick__title { font: 600 var(--type-lead) var(--font); transition: color var(--dur-fast) var(--ease); }
.pick:hover .pick__title { color: var(--red); }
.pick__desc { margin-top: 4px; color: var(--ink-2); font: 400 var(--type-small) var(--font); }

/* ==========================================================================
   Careers
   ========================================================================== */
.jobs { padding-block: var(--section); }
.jobs__grid { display: grid; gap: 64px; }
@media (min-width: 80em) { .jobs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; } }
.job {
  --job-accent: var(--red);
  container: job / inline-size;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 28px;
  border-top: 6px solid var(--job-accent);
}
.job--orange { --job-accent: var(--orange); }
.job__cols { display: grid; gap: 32px; align-self: stretch; margin-top: 28px; }
@container job (min-width: 540px) {
  .job__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
}
.job__list { margin-top: 12px; border-top: 1px solid var(--line); }
.job__list li { padding-block: 10px; border-bottom: 1px solid var(--line); }
.job__foot { margin-top: auto; padding-top: 32px; }

.apply { padding-block: var(--section); background: var(--paper); }
.apply__head { margin-bottom: 32px; }
@media (min-width: 64em) { .apply__head { margin-bottom: 48px; } }
.apply__grid { display: grid; gap: 32px; }
@media (min-width: 75em) {
  .apply__grid { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 48px; align-items: start; }
}

.form { display: grid; gap: 20px; padding: 24px; border-top: 6px solid var(--red); background: var(--white); }
@media (min-width: 40em) { .form { padding: 40px; } }
@media (min-width: 96em) { .form { padding: 52px; } }
.form__row { display: grid; gap: 20px; }
@media (min-width: 40em) { .form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form__required { color: var(--ink-2); font: 400 var(--type-small) var(--font); }
.field { display: grid; gap: 8px; }
.field label { font: 600 var(--type-small) var(--font); }
.field__req { color: var(--red); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--white);
  font: 400 var(--t-base) var(--font);
  transition: border-color var(--dur-fast) var(--ease);
}
.field select {
  padding-right: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e30613' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
}
.field textarea { min-height: 168px; resize: vertical; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--ink); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline-offset: 0; border-color: var(--ink); }
.field input:user-invalid,
.field textarea:user-invalid { border-color: var(--red); box-shadow: inset 4px 0 0 var(--red); }
.form__foot { display: grid; gap: 14px; justify-items: start; }
.form__consent { max-width: 48ch; color: var(--ink-2); font: 400 var(--type-small) var(--font); text-wrap: pretty; }
.form__status { padding: 14px 18px; border-left: 4px solid var(--orange); background: var(--paper); font-weight: 600; }
.form__status:empty { display: none; }

.apply-contact { padding: 24px; background: var(--orange); color: var(--ink); }
@media (min-width: 40em) { .apply-contact { padding: 40px; } }
.apply-contact__text { margin-top: 8px; }
.apply-contact__people { display: grid; gap: 20px; margin-top: 28px; }
.apply-contact__person { padding-top: 16px; border-top: 1px solid rgba(29, 29, 31, 0.45); }
.apply-contact__role { font: 400 var(--type-small) var(--font); }
.apply-contact__name { margin-top: 2px; font: 600 var(--type-lead) var(--font); }
.apply-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.apply-contact a:hover { text-decoration-thickness: 2px; }

/* ==========================================================================
   Lightbox (documents + gallery) — light viewing mode
   ========================================================================== */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox::backdrop { background: rgba(246, 245, 242, 0.98); }
.lightbox__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 20px;
  font: 500 var(--t-sm) var(--font);
  font-variant-numeric: tabular-nums;
}
.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 clamp(8px, 7vw, 112px);
  touch-action: pan-y;
}
.lightbox__img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  object-fit: contain;
  background: var(--white);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.45);
}
.lightbox__caption { min-height: 56px; padding: 14px 20px 20px; text-align: center; font-weight: 600; }
.lightbox__btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.lightbox__btn:hover { color: var(--red); border-color: var(--red); }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: clamp(8px, 2vw, 32px); }
.lightbox__nav--next { right: clamp(8px, 2vw, 32px); }
.lightbox.is-single .lightbox__nav { display: none; }
@media (max-width: 47.99em) {
  .lightbox__stage { padding: 0 8px; }
  .lightbox__nav { width: 44px; height: 44px; background: rgba(255, 255, 255, 0.92); }
  .lightbox__nav--prev { left: 12px; }
  .lightbox__nav--next { right: 12px; }
}

/* ==========================================================================
   Scroll reveal — one pattern site-wide. JS adds .reveal-item only when
   motion is allowed, so content is never hidden without JS.
   ========================================================================== */
.reveal-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur) var(--ease) var(--reveal-delay, 0ms), transform var(--dur) var(--ease) var(--reveal-delay, 0ms);
}
.reveal-item.is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion: switch off every transition/animation ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important; /* accessibility override, intentional */
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
