/* ==========================================================================
   BASE — reset, root typography, layout primitives
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; }

body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd, ul, ol { margin: 0; }

ul[class], ol[class] { padding: 0; list-style: none; }

body {
  min-height: 100vh;
  background: var(--c-surface);
  color: var(--c-ink);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
table { border-collapse: collapse; border-spacing: 0; }
a { color: inherit; }

/* Visible keyboard focus. Neither frame specifies a focus state, so this is
   an added accessibility floor rather than a design decision. */
:focus-visible {
  outline: 3px solid var(--c-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* The header is sticky, so in-page anchors (#kontakt, #programi, #raspored)
   need an offset or the target lands right under it. --header-h is kept in
   sync with the header's real (breakpoint-dependent) height by nav.js; this
   is just the value before JS runs on first paint. */
:root { --header-h: 88px; }
[id] { scroll-margin-top: var(--header-h); }

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

/* --- Typography roles ---------------------------------------------------- */

.h1, .h2, .h3 {
  font-family: var(--ff-display);
  line-height: var(--lh-heading);
  text-wrap: balance;
}

.h1 { font-size: var(--fs-h1); font-weight: var(--fw-extrabold); }
.h2 { font-size: var(--fs-h2); font-weight: var(--fw-extrabold); }
.h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); }

.body { font-size: var(--fs-body); line-height: var(--lh-body); }

.eyebrow {
  font-family: var(--ff-body);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
}

/* Rich body copy. Figma uses empty paragraphs as spacers; reproduced as
   margin rather than blank nodes. */
.rich p + p,
.rich ul + p,
.rich p + ul { margin-block-start: calc(var(--fs-body) * var(--lh-body)); }

.rich ul { margin-block: 0; padding-inline-start: 36px; list-style: disc; }
.rich li { line-height: var(--lh-body); }
.rich strong { font-weight: var(--fw-bold); }

/* Underline accents, unified to 3px from Figma's mixed 2px / 3px / from-font. */
.u-coral, .u-mint, .u-yellow, .u-ink {
  text-decoration-line: underline;
  text-decoration-thickness: var(--underline-w);
  text-underline-position: from-font;
  text-decoration-skip-ink: none;
}
.u-coral  { text-decoration-color: var(--c-coral); }
.u-mint   { text-decoration-color: var(--c-mint); }
.u-yellow { text-decoration-color: var(--c-yellow); }
.u-ink    { text-decoration-color: currentColor; }

/* Inline emphasis inside body copy keeps the hairline weight - a 3px rule
   under running text reads as a redaction bar. */
.u-inline {
  text-decoration-line: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

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

/* --- Layout primitives ---------------------------------------------------
   .container owns the horizontal axis, .section owns the vertical one, so
   the two never fight over the same property.                             */

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

.section {
  padding-block-start: var(--section-pt, var(--sp-80));
  padding-block-end: var(--section-pb, var(--sp-80));
}

.page {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  padding-block: 28px;
}

/* Full-bleed colour bands: background spans the viewport, content stays in
   the 1200px column. */
.band { width: 100%; }
.band--coral  { background: var(--c-coral-25); }
.band--yellow { background: var(--c-yellow-25); }
.band--mint   { background: var(--c-mint-25); }
