/* ==========================================================================
   Grano Line, Reset, tipografija, pomoćne klase
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-5));
}

body {
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--c-body);
  background-color: var(--c-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img { height: auto; }

/* Kontejneri sa fiksnim odnosom stranica, <picture> mora popuniti visinu */
.hero__media picture,
.feature-card__media picture,
.product__media picture,
.about-figure picture,
.ce-figure picture,
.contact-figure picture,
.home-gallery__stage picture {
  width: 100%;
  height: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  color: var(--c-ink);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

h1 { font-size: var(--fs-page); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-medium); }

p { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

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

address { font-style: normal; }

:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

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

/* --- Layout primitivi ---------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--section-y); }

/* Hairline razdelnik između sekcija, kao u maketi */
.section--ruled { border-top: 1px solid var(--c-line); }

.section__head { max-width: 62ch; }

.section__title { margin-bottom: var(--sp-4); }

.section__lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: var(--c-body);
}

/* Naslov levo + kontrole slajdera desno */
.section__bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.stack > * + * { margin-top: var(--sp-4); }

/* --- Pomoćne klase -------------------------------------------------------- */

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

.skip-link {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: calc(var(--z-header) + 10);
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-ink);
  color: var(--c-on-dark);
  border-radius: var(--r-sm);
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus-visible { transform: translateY(0); }

.text-muted { color: var(--c-muted); }
.measure    { max-width: var(--measure); }
.no-scroll  { overflow: hidden; }

@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;
    scroll-behavior: auto !important;
  }
}
