/* ==========================================================================
   Uniplast Serbia — BASE: reset, tipografija, forme, pristupačnost
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Header je fiksan — sidra ne smeju da završe ispod njega */
  scroll-padding-top: 96px;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  margin: 0 0 var(--s-4);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.01em;
}

h1 { font-size: var(--fs-h1); line-height: 1.02; text-transform: uppercase; }
h2 { font-size: var(--fs-h2); line-height: 1.05; text-transform: uppercase; }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

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

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25em; }
li { margin-bottom: var(--s-2); }

strong, b { font-weight: 600; }
small { font-size: var(--fs-small); }

hr { border: 0; border-top: 1px solid rgba(62,64,149,.14); margin: var(--s-8) 0; }

table { border-collapse: collapse; width: 100%; }

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

input, select, textarea {
  font: inherit;
  color: inherit;
  border-radius: var(--r-input);
}

/* iOS ne sme da zumira pri fokusu polja */
@media (max-width: 767px) {
  input, select, textarea { font-size: 16px; }
}

textarea { resize: vertical; min-height: 120px; }

::selection { background: var(--brand-500); color: #fff; }

/* --------------------------------------------------------- Fokus prstenovi */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand-300);
  outline-offset: 2px;
  border-radius: 6px;
}
.on-light :focus-visible,
.sec-light :focus-visible { outline-color: var(--brand-500); }

/* ------------------------------------------------------------- Skip link */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 200;
  background: var(--brand-500);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-weight: 600;
  transition: top var(--d-1) var(--ease-out);
}
.skip-link:focus { top: var(--s-4); }

/* ------------------------------------------------------- Pomoćne klase */
.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;
}

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

.container-wide { max-width: 1600px; }

/* Vertikalni ritam sekcija */
.section { padding-block: clamp(56px, 8vw, 128px); position: relative; }
.section-sm { padding-block: clamp(40px, 5vw, 72px); }

/* Tamna sekcija: brand-900 + meki radijalni sjaj + šum 3% */
.sec-dark {
  background: var(--bg-dark);
  color: #fff;
  position: relative;
  isolation: isolate;
}
.sec-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 55% at 12% 8%,  rgba(62,64,149,.25), transparent 70%),
    radial-gradient(50% 50% at 88% 82%, rgba(62,64,149,.25), transparent 70%);
  pointer-events: none;
}
.sec-dark::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--noise);
  opacity: .03;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.sec-dark h1, .sec-dark h2, .sec-dark h3 { color: #fff; }

.sec-light { background: var(--bg-light); color: var(--ink); }

/* ------------------------------------------------------------- Tipografija */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  margin-bottom: var(--s-4);
  font-family: var(--font-body);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-500);
  flex: none;
}
.sec-dark .eyebrow { color: #fff; }
.sec-dark .eyebrow::before { background: var(--brand-300); }

.lead { font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.55; }

.muted { color: var(--ink-2); }
.sec-dark .muted { color: rgba(255,255,255,.72); }

/* Potpisni detalj: poslednji red velikog naslova + mali pasus U ISTOM REDU */
.title-inline {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0 var(--s-5);
}
.title-inline .note {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.3;
  max-width: 240px;
  color: rgba(255,255,255,.9);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  padding-bottom: .45em;
}
.sec-light .title-inline .note,
.on-light .title-inline .note { color: var(--ink-2); }

/* ------------------------------------------------------------ noscript */
.noscript-nav {
  background: var(--brand-900);
  color: #fff;
  padding: var(--s-4) var(--gutter);
  font-size: var(--fs-small);
}
.noscript-nav a { color: var(--brand-300); margin-right: var(--s-4); text-decoration: underline; }

/* ---------------------------------------------- Bezbednost reveal animacija
   Sadržaj NIKAD ne sme ostati nevidljiv: elementi se kriju samo kada je JS živ. */
.js-ready [data-reveal] { opacity: 0; will-change: transform, opacity; }
.js-ready [data-reveal].is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
}
