/*
 * Turner PR — public site styles.
 * Mobile-first. Breakpoints: 30em (480), 48em (768), 64em (1024).
 * Brand (measured on the original turner.cz, 2026-09-12): black & white, Oswald display
 * type, signal red #FE0000 (reference names + their rules), greys #7A7A7A (slogan, quote
 * text) and #E6E9EC (quote boxes). Brand red is 4.0:1 on white, so it is used for large
 * text (≥24px), rules and fills; small red text uses --accent-deep. The theme's amber
 * #fcaf3b was only an unused WordPress theme variable — it is not a brand colour.
 * No inline styles anywhere: the CSP is `style-src 'self'`.
 */

/* ---------- Fonts ------------------------------------------------------- */
/* Oswald is a variable font: one file per subset covers weights 400–600.
   unicode-range makes English pages skip the latin-ext file entirely. */
@font-face {
  font-family: "Oswald";
  src: url("../fonts/oswald-latin-ext.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Oswald";
  src: url("../fonts/oswald-latin.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ------------------------------------------------------ */
:root {
  /* Colour — contract §8 base + derived scale (contrast on white noted). */
  --ink: #14171c;          /* 17.9:1 */
  --ink-soft: #2e3238;     /* 13:1 — long-form quote text */
  --muted: #5c626b;        /* 6.2:1 — roles, captions */
  --line: #e2e2e0;
  --mist: #ededed;
  --paper: #ffffff;
  --paper-warm: #ffffff;   /* references band — plain white, as on the original */
  --night: #070707;        /* dark slide background */
  --accent: #fe0000;       /* brand red — 4.0:1 on white: large text, rules, fills */
  --accent-deep: #d50000;  /* brand red darkened to pass AA as small text on white (5.5:1) */
  /* Slogan on the dark band. The original's grey #7a7a7a was only 4.2:1 on --ink — below AA
     for normal text and uncomfortable to read (owner feedback 2026-11-30). Same neutral grey
     family, lightened to 8.6:1 (AA and AAA). Guarded by tests/php/test-public.php. */
  --slogan-text: #b3b3b3;
  --cloud: #e6e9ec;        /* quote box background on the original */
  --quote-text: #5c626b;   /* brand grey #7a7a7a is 3.5:1 on --cloud; this grey is 5.05:1 */
  --on-ink-muted: #a9aeb5; /* 8:1 on --ink */
  --focus: var(--ink);

  /* Type */
  --font-display: "Oswald", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.1875rem, 1.08rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-3: clamp(2rem, 1.55rem + 2vw, 3.25rem);
  --step-4: clamp(2.375rem, 1.5rem + 4.1vw, 5.25rem);

  /* Space & layout */
  --gutter: clamp(1.25rem, 0.7rem + 2.4vw, 2.5rem);
  --container: 76rem;
  --section-y: clamp(4rem, 2.6rem + 6vw, 8rem);
  --header-h: 4rem;
  --chips-h: 4.5rem;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow: 0 1px 2px rgb(20 23 28 / 0.06), 0 10px 30px rgb(20 23 28 / 0.08);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (min-width: 48em) {
  :root { --header-h: 4.75rem; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor jumps (#reference, #kontakt) land below the sticky header. */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  text-wrap: balance;
}
button { font: inherit; }

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  --focus: var(--accent);
}
.skip-link:focus { top: 0.75rem; }

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

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

/* ---------- Shared type pieces ------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: var(--accent);
}

.section { padding-block: var(--section-y); }
.section-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 1.8rem + 2.5vw, 4rem);
}
.section-title {
  font-size: var(--step-3);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.section-lead {
  margin: 1rem auto 0;
  max-width: 34rem;
  color: var(--muted);
}

.page-title {
  font-size: var(--step-4);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.lead {
  margin: 1.25rem 0 0;
  max-width: 38rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.75rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn--primary { background: var(--ink); color: #fff; }
/* White on brand-red fills: ink on red reads muddy; bold button text keeps AA-large. */
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }

/* ---------- Header ------------------------------------------------------ */
/* Solid white on purpose: a translucent blurred header smeared the dark headings scrolling
   beneath it into grey smudges. (Also: backdrop-filter on the header would become the
   containing block of the position:fixed mobile menu and clip it.) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgb(20 23 28 / 0.05);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 4px;
}
.brand__logo { height: 1.625rem; width: auto; }
@media (min-width: 48em) {
  .brand__logo { height: 2rem; }
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 64em) {
  .site-nav__list { gap: 0 2rem; }
}
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
/* Amber underline grows from the left on hover / marks the current page. */
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.45rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.lang-switch:hover { background: var(--ink); color: #fff; }

/* Without JS on small screens the nav wraps under the logo as a compact row. */
@media (max-width: 47.99em) {
  html:not(.js) .site-nav { width: 100%; padding-bottom: 0.5rem; }
  html:not(.js) .site-nav__list { gap: 0 1rem; }
  html:not(.js) .lang-switch { min-height: 36px; }
}

/* Burger (JS only, small screens only) */
.nav-toggle { display: none; }
@media (max-width: 47.99em) {
  .js .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -0.625rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }
  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s var(--ease), background-color 0.2s;
  }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before,
  .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { transform: translateY(-7px); }
  .nav-toggle__bars::after { transform: translateY(7px); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: rotate(-45deg); }

  .js .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem var(--gutter) 2.5rem;
    overflow-y: auto;
    background: var(--paper);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .js .site-header.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .js .site-nav__list { flex-direction: column; align-items: stretch; }
  .js .site-nav__list > li { border-bottom: 1px solid var(--line); }
  .js .site-nav__link { width: 100%; min-height: 4.25rem; font-size: 1.75rem; }
  .js .site-nav__link::after { bottom: 1rem; right: auto; width: 2.5rem; }
  .js .site-nav__list > .site-nav__lang { border-bottom: 0; padding-top: 1.75rem; }
  .js.nav-locked, .js.nav-locked body { overflow: hidden; }
}

/* ---------- Carousel (shared) ------------------------------------------- */
/* No-JS baseline: a horizontally scroll-snapping strip — every slide reachable by swipe
   or scrollbar. carousel.js adds .is-ready and switches to transform-driven slides. */
.carousel { position: relative; }
.carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.carousel__track {
  display: flex;
  margin: 0;
  padding: 0;
}
.carousel__slide {
  /* --per-view: slides visible at once, set per carousel in CSS and read by carousel.js. */
  flex: 0 0 calc(100% / var(--per-view, 1));
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}
.carousel.is-ready .carousel__viewport {
  overflow: hidden;
  /* Vertical page scrolling stays native; horizontal drags come to the pointer handlers. */
  touch-action: pan-y pinch-zoom;
}
.carousel.is-ready .carousel__track {
  transition: transform 0.7s var(--ease);
  will-change: transform;
}
.carousel.is-ready .carousel__track.is-dragging,
.carousel.is-static .carousel__track { transition: none; }
/* Adaptive height (carousel.js syncHeight): top-align slides so each keeps its natural
   height, and ease the viewport between quote lengths instead of snapping. */
.carousel.is-adaptive .carousel__track { align-items: flex-start; }
.carousel.is-adaptive .carousel__viewport { transition: height 0.5s var(--ease); }
.carousel.is-adaptive.is-static .carousel__viewport { transition: none; }

/* Controls stay quiet: no fills or pills, muted glyphs that darken on hover. The visible
   glyphs are small, but every button keeps a 44px hit area (WCAG 2.5.5 target size). */
.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}
/* display:flex / grid would otherwise override the [hidden] attribute set by carousel.js. */
.carousel__controls[hidden],
.carousel__dot[hidden],
.carousel__btn[hidden] { display: none; }
.carousel__btn {
  display: inline-grid;
  /* Dots can scroll when space is tight; neighbouring controls must never shrink. */
  flex-shrink: 0;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
}
.carousel__btn:hover { color: var(--ink); }
.carousel__btn svg { width: 18px; height: 18px; }
.carousel__btn--toggle svg { width: 11px; height: 11px; }

.carousel__dots {
  display: flex;
  align-items: center;
  /* Extra uploaded slides must not widen the page; every dot keeps its full hit area. */
  min-width: 0;
  overflow-x: auto;
}
.carousel__dot {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  min-width: 44px;
  height: 44px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
/* #8a8f97 keeps inactive dots at 3.3:1 on white (WCAG 1.4.11 non-text contrast). */
.carousel__dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #8a8f97;
  transition: width 0.35s var(--ease), background-color 0.35s;
}
.carousel__dot:hover::before { background: var(--ink); }
.carousel__dot[aria-current="true"]::before { width: 14px; background: var(--ink); }

.carousel__status {
  min-width: 4rem;
  margin: 0;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-align: center;
}

/* ---------- Hero -------------------------------------------------------- */
.hero { background: var(--paper); }
.carousel--hero .carousel__slide {
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: 80vh;
  background: var(--paper);
}
@media (min-width: 48em) {
  .carousel--hero .carousel__slide {
    aspect-ratio: 16 / 9;
    /* Keep the slogan peeking above the fold on short laptop screens. */
    max-height: min(80vh, calc(100vh - var(--header-h) - 5rem));
  }
}
.carousel--hero .slide--dark { background: var(--night); }
/* Hero slide = size container, photo centred in it. The slide's size never depends on its
   content (width from the track, height from aspect-ratio/max-height), which is what
   container-type: size requires; cqw/cqh then give the slide size to the image below. */
.carousel--hero .carousel__slide {
  container-type: size;
  display: grid;
  /* One definite 100% × 100% cell: an auto row would size to the content, and the cover
     frame's height: 100% would then resolve against the photo instead of the slide. */
  grid-template: 100% / 100%;
  place-items: center;
}
/* The frame wraps exactly the visible photo, so the caption can anchor to the photo's own
   corner. contain: shrink-wrapped around the image; cover: the whole slide. */
.slide__frame {
  position: relative;
  min-width: 0;
  /* Until a contain photo has loaded its box is 0 × 0 (no natural size yet); clipping keeps
     the caption from flashing in the slide centre and then jumping (layout shift) — it
     appears with the photo. Once loaded the caption lies inside the photo, nothing is cut. */
  overflow: hidden;
}
.slide--cover .slide__frame { width: 100%; height: 100%; }
.slide__img {
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
/* contain: the image box IS the photo (no letterbox inside the element). Its intrinsic width
   is the `sizes` value (srcset w-descriptors: width ÷ density = sizes), i.e. the computed fit
   width; max-width/max-height clamp it to the slide with the ratio kept (both axes auto). If a
   browser falls back to sizes=100vw the clamp still lands on the same fitted box. */
.slide--contain .slide__img {
  width: auto;
  height: auto;
  max-width: 100cqw;
  max-height: 100cqh;
}
.slide--cover .slide__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Focal point (admin "ohnisko"): fx-N / fy-N classes set the custom properties; unset = centre.
     Classes instead of inline object-position because the CSP is style-src 'self'. */
  object-position: var(--fx, 50%) var(--fy, 50%);
}
.fx-0 { --fx: 0%; }   .fx-10 { --fx: 10%; } .fx-20 { --fx: 20%; } .fx-30 { --fx: 30%; }
.fx-40 { --fx: 40%; } .fx-50 { --fx: 50%; } .fx-60 { --fx: 60%; } .fx-70 { --fx: 70%; }
.fx-80 { --fx: 80%; } .fx-90 { --fx: 90%; } .fx-100 { --fx: 100%; }
.fy-0 { --fy: 0%; }   .fy-10 { --fy: 10%; } .fy-20 { --fy: 20%; } .fy-30 { --fy: 30%; }
.fy-40 { --fy: 40%; } .fy-50 { --fy: 50%; } .fy-60 { --fy: 60%; } .fy-70 { --fy: 70%; }
.fy-80 { --fy: 80%; } .fy-90 { --fy: 90%; } .fy-100 { --fy: 100%; }

/* Caption (admin "Text u fotografie", 3–5 words): a small solid chip in the bottom-left corner
   of the slide. The chip carries its own dark background, so the white text stays readable on
   any photo — light, dark or busy — without depending on the image (white on this chip is
   ≥10:1 even where it covers pure white). Bottom-left keeps it clear of the centred arrows.
   Oswald + a red rule ties it to the slogan and the reference names; small and quiet so it
   labels the photo without competing with it. */
.slide__caption {
  --caption-inset: clamp(0.625rem, 0.3rem + 1.4vw, 1.5rem);
  position: absolute;
  left: var(--caption-inset);
  bottom: var(--caption-inset);
  max-width: min(32rem, calc(100% - 2 * var(--caption-inset)));
  margin: 0;
  padding: 0.35em 0.75em 0.4em;
  border-left: 3px solid var(--accent);
  background: rgb(20 23 28 / 0.82);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.02em;
  /* A long single word must wrap inside the chip instead of widening the slide. */
  overflow-wrap: anywhere;
}
@media (min-width: 48em) {
  .slide__caption { font-size: var(--step-0); }
}

.carousel--hero .carousel__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* Hero controls follow the original: bare chevrons on the image edges and a small pager
   under the image — nothing competes with the photograph. The controls row itself stays
   static, so the absolutely positioned arrows anchor to the .carousel root (relative). */
.carousel--hero .carousel__controls { margin: 0.25rem 0 0; }
.carousel--hero .carousel__btn--prev,
.carousel--hero .carousel__btn--next {
  position: absolute;
  /* Centre on the image only: the root also contains the 44px pager row below it. */
  top: calc((100% - 44px - 0.25rem) / 2);
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  border-radius: 0;
  color: var(--muted);
  /* Soft halo keeps the glyph legible where a 'cover' photo runs underneath it. */
  filter: drop-shadow(0 0 3px rgb(255 255 255 / 0.9));
  opacity: 0.85;
}
.carousel--hero .carousel__btn--prev { left: clamp(0rem, 1vw, 1rem); }
.carousel--hero .carousel__btn--next { right: clamp(0rem, 1vw, 1rem); }
.carousel--hero .carousel__btn--prev:hover,
.carousel--hero .carousel__btn--next:hover { opacity: 1; color: var(--ink); }
.carousel--hero .carousel__btn--prev svg,
.carousel--hero .carousel__btn--next svg { width: 30px; height: 30px; }
.carousel--hero .carousel__btn--prev path,
.carousel--hero .carousel__btn--next path { stroke-width: 1.5; }
/* Dark slides (is-on-dark, set by carousel.js): light chevrons with a dark halo. */
.carousel--hero.is-on-dark .carousel__btn--prev,
.carousel--hero.is-on-dark .carousel__btn--next {
  color: rgb(255 255 255 / 0.85);
  filter: drop-shadow(0 0 3px rgb(0 0 0 / 0.6));
}
.carousel--hero.is-on-dark .carousel__btn--prev:hover,
.carousel--hero.is-on-dark .carousel__btn--next:hover { color: #fff; }
@media (max-width: 47.99em) {
  .carousel--hero .carousel__btn--prev svg,
  .carousel--hero .carousel__btn--next svg { width: 24px; height: 24px; }
}

/* ---------- Slogan ------------------------------------------------------ */
.slogan {
  padding-block: clamp(3.5rem, 2.2rem + 5vw, 7rem);
  background: var(--ink);
  /* Both lines in a light neutral grey on the dark band: 8.6:1 on --ink (see --slogan-text). */
  color: var(--slogan-text);
  text-align: center;
  --focus: #fff;
}
.slogan__title {
  font-size: var(--step-4);
  font-weight: 600;
  /* ≥1.12: Czech uppercase carries accents above the cap height (Í, Ě, Ř) — tighter
     leading makes them collide with the descenders of the line above on mobile. */
  line-height: 1.12;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.slogan__line { display: block; }
/* Same colour as line 1 (original); the modifier only staggers the entrance animation. */
.slogan__line--accent { color: inherit; }
@media (prefers-reduced-motion: no-preference) {
  .slogan__line { animation: rise 0.9s var(--ease) both; }
  .slogan__line--accent { animation-delay: 0.15s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(0.35em); }
  to { opacity: 1; transform: none; }
}

/* ---------- References -------------------------------------------------- */
.references { background: var(--paper-warm); }
/* Several references side by side, as on the original (3 per view there on desktop).
   carousel.js pages through them --per-view at a time. */
.carousel--quotes { --per-view: 1; }
@media (min-width: 48em) { .carousel--quotes { --per-view: 2; } }
@media (min-width: 72em) { .carousel--quotes { --per-view: 3; } }
.quote {
  /* The semantic figure now sits inside the slide's ARIA group. Reset its UA
     margins explicitly, rather than relying on the former combined class. */
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.25rem clamp(0.5rem, 1.2vw, 1.25rem) 0;
  text-align: center;
}
/* Author above the quote, as on the original: red name with a red rule over it
   (the original's overline), role in ink below. */
.quote__author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  margin: 0 0 1.25rem;
}
.quote__name {
  padding-top: 0.2rem;
  border-top: 2px solid var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.35rem + 0.5vw, 1.75rem); /* ≥24px: brand red passes AA-large */
  font-weight: 600;
  line-height: 1.15;
  color: var(--accent);
}
.quote__role {
  max-width: 24rem;
  font-family: var(--font-display);
  font-size: var(--step-0);
  line-height: 1.35;
  color: var(--ink);
}
/* Quote in a light-grey box with a speech-bubble tip pointing at the author. */
.quote__text {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 1.25rem clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
  background: var(--cloud);
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--quote-text);
  text-wrap: pretty;
}
.quote__text::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -9px;
  border: 9px solid transparent;
  border-top-width: 0;
  border-bottom-color: var(--cloud);
}
.quote__text p { margin: 0; }
.carousel--quotes .carousel__controls { margin-top: 1.5rem; }
@media (max-width: 47.99em) {
  /* Two full section paddings produced ~128px after the reference controls on
     phones. Keep one compact boundary without changing the adaptive quote height. */
  .references { padding-bottom: 2rem; }
  .references + .contact { padding-top: 0; }
}
@media (min-width: 48em) {
  /* Bare chevrons at the far sides of the row (original); the pager stays centred below.
     The controls row is static, so the arrows anchor to the .carousel root. */
  .carousel--quotes { padding-inline: 2.75rem; }
  .carousel--quotes .carousel__btn--prev,
  .carousel--quotes .carousel__btn--next { position: absolute; top: 38%; width: 44px; height: 64px; }
  .carousel--quotes .carousel__btn--prev { left: 0; }
  .carousel--quotes .carousel__btn--next { right: 0; }
  .carousel--quotes .carousel__btn--prev svg,
  .carousel--quotes .carousel__btn--next svg { width: 28px; height: 28px; }
  .carousel--quotes .carousel__btn--prev path,
  .carousel--quotes .carousel__btn--next path { stroke-width: 1.5; }
}
/* Ten dots do not fit a 375 px screen next to the arrows: show "3 / 10" instead. */
.carousel--quotes .carousel__status { display: none; }
@media (max-width: 29.99em) {
  .carousel--quotes .carousel__dots { display: none; }
  .carousel--quotes .carousel__status { display: block; }
}

/* ---------- Contact ----------------------------------------------------- */
.contact__grid {
  display: grid;
  gap: 1rem;
  max-width: 54rem;
  margin-inline: auto;
}
@media (min-width: 40em) {
  .contact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
.contact-card {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.contact-card:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.contact-card__name {
  position: relative;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  font-size: var(--step-2);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.contact-card__name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.5rem;
  height: 3px;
  background: var(--accent);
}
.contact-card__list {
  display: grid;
  gap: 0.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-link .icon { flex: none; width: 1.25rem; height: 1.25rem; color: var(--muted); transition: color 0.2s; }
.contact-link__text {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.2s;
}
.contact-link:hover .contact-link__text { text-decoration-color: var(--accent); }
.contact-link:hover .icon { color: var(--ink); }

/* ---------- Footer ------------------------------------------------------ */
.site-footer {
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  background: var(--ink);
  color: var(--on-ink-muted);
  --focus: var(--accent);
}
.site-footer__inner {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  text-align: center;
}
@media (min-width: 48em) {
  .site-footer__inner {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    text-align: left;
  }
  .site-footer__brand { justify-self: start; justify-items: start; }
  .site-footer__meta { justify-self: end; }
}
/* Declared after the grid block above, so the breakpoint override must follow it here —
   otherwise this base rule wins on source order and the logo centres over the tagline. */
.site-footer__brand { display: grid; justify-items: center; gap: 0.25rem; }
@media (min-width: 48em) {
  .site-footer__brand { justify-items: start; }
}
.brand--footer .brand__logo { height: 1.5rem; }
.site-footer__tagline,
.site-footer__meta {
  margin: 0;
  font-size: var(--step--1);
}
.social {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.social__link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 999px;
  color: #fff;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.social__link:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.social__link .icon { width: 20px; height: 20px; }

/* ---------- Back to top ------------------------------------------------- */
.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 30;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0s, background-color 0.2s, color 0.2s;
}
.to-top:hover { background: var(--accent); color: #fff; }
.to-top .icon { width: 22px; height: 22px; }
/* With JS it appears only after scrolling; without JS it is simply always there. */
.js .to-top:not(.is-visible) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.page--home .to-top { display: none; }

/* ---------- Projects page ----------------------------------------------- */
.page-hero {
  padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.chips {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgb(255 255 255 / 0.96);
  border-block: 1px solid var(--line);
}
.chips__list {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  /* Align the first chip with the container edge on wide screens, full-bleed scroll on phones. */
  padding: 0.75rem max(var(--gutter), (100% - var(--container)) / 2);
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
  scroll-padding-inline: var(--gutter);
  /* Fade the right edge so a clipped chip reads as "scroll for more" (scrollbar is hidden). */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent);
  -webkit-overflow-scrolling: touch;
}
.chips__list::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.125rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.9375rem;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.projects { padding-bottom: var(--section-y); }
.project {
  padding-block: clamp(2.75rem, 2rem + 3vw, 5rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + var(--chips-h));
}
.project:first-child { border-top: 0; }
@media (min-width: 64em) {
  /* Editorial split: sticky title column left, long lists right. */
  .project {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.25fr);
    gap: clamp(2rem, 5vw, 5.5rem);
    align-items: start;
  }
  .project__head {
    position: sticky;
    top: calc(var(--header-h) + var(--chips-h) + 2rem);
  }
}
.project__index {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  color: var(--accent-deep);
}
/* No `hyphens: auto`: it split "SE-RIÁLY" in the narrow sticky column. Titles are short
   slogans, so a slightly smaller size in the split layout is the better fix. */
.project__title {
  margin-bottom: 1.75rem;
  font-size: var(--step-3);
  text-transform: uppercase;
  overflow-wrap: break-word;
}
@media (min-width: 64em) {
  .project__title { font-size: clamp(2rem, 1rem + 1.6vw, 2.75rem); }
}

.prose { max-width: 50rem; }
.prose > p { max-width: 65ch; }
.prose > p:last-child { margin-bottom: 0; }
.prose h3 {
  display: table; /* shrink-wraps the underline to the text while staying a block */
  margin: 2.75rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--accent);
  font-size: 1.0625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.prose > h3:first-child { margin-top: 0; }
.prose a {
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s;
}
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul:not(.works) { padding-left: 1.25rem; }

.works {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}
.works:last-child { margin-bottom: 0; }
.works li {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
  break-inside: avoid;
}
@media (min-width: 48em) {
  /* Long lists (8+ entries) flow into two columns; short ones stay a single column. */
  .works:has(> li:nth-child(8)) { columns: 2; column-gap: 2.5rem; }
}
.works__year {
  /* Wrap the entire year range onto its own line instead of letting an inline
     nowrap fragment extend the mobile layout viewport beyond the screen. */
  display: inline-block;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.empty-note {
  padding-bottom: var(--section-y);
  color: var(--muted);
}

/* ---------- 404 --------------------------------------------------------- */
.not-found { padding-block: var(--section-y); }
.not-found__inner { text-align: center; }
.not-found__code {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(6rem, 3rem + 14vw, 13rem);
  font-weight: 600;
  line-height: 0.85;
  color: var(--ink);
  -webkit-text-stroke: 0;
}
.not-found__code::after {
  content: "";
  display: block;
  width: 4rem;
  height: 4px;
  margin: 1.5rem auto 0;
  background: var(--accent);
}
.not-found__text { margin-inline: auto; }
.not-found__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 2.5rem 0 0;
}
