/* ============================================================
   BAR&BAR — 02 BASE
   Reset, elementy, typografické primitivy, přístupnost.
   ============================================================ */

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

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-text);
  font-size: var(--t-md);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* jemné zrno přes celou stránku — drží fotografický charakter */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}
ul, ol { list-style: none; }

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }

address { font-style: normal; }

::selection { background: var(--amber); color: var(--ink); }

/* ---------- FOCUS ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 0.9rem 1.4rem;
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--t-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: translateY(-130%);
  transition: transform var(--dur-1) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); outline-offset: -4px; }

.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;
}

/* ---------- TYPOGRAFICKÉ PRIMITIVY ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.022em;
  text-transform: uppercase;
  text-wrap: balance;
}

.heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-3xl);
  line-height: 1.02;
  letter-spacing: -0.018em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* drobná utilitární typografie — protiváha oversized headlineů */
.util {
  font-size: var(--t-2xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-3);
  line-height: 1.4;
}
.util--amber { color: var(--amber); }
.util--bone { color: var(--bone-2); }

.lead {
  font-size: var(--t-lg);
  line-height: 1.5;
  color: var(--bone-2);
  max-width: 46ch;
  text-wrap: pretty;
}

.body-text { color: var(--bone-2); max-width: var(--measure); text-wrap: pretty; }
.body-text + .body-text { margin-top: 1em; }
.body-text strong { color: var(--bone); font-weight: 500; }

.amp { color: var(--bronze); }

/* ---------- LAYOUT PRIMITIVY ---------- */
.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 6rem); }

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
