/* ==========================================================================
   HARENA PLUS SD — reset, osnovni elementi, pomoćne klase
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

/* `hidden` mora da pobedi svaki display iz komponenti (dugmad, kartice galerije…) */
[hidden] { display: none !important; }

img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; border-style: none; }

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}
a:not([class]) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--gold);
}
a:not([class]):hover { color: var(--bronze); }
.is-dark a:not([class]):hover { color: var(--gold-hi); }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button { background: none; border: 0; cursor: pointer; }

svg { fill: none; }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

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

/* --- Fokus: uvek vidljiv, nikad uklonjen --- */
:focus-visible {
  outline: 3px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
.is-dark :focus-visible { outline-color: var(--gold-hi); }

/* --- Skip link --- */
.skip-link {
  position: fixed;
  top: -200px;
  left: 16px;
  z-index: var(--z-preloader);
  padding: 14px 20px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tr-mono);
  text-transform: uppercase;
  border-radius: var(--r-sm);
  transition: top var(--dur-2) var(--ease-out);
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ==========================================================================
   Tipografske klase
   ========================================================================== */

.display,
.h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tr-head);
  line-height: var(--lh-head);
  text-wrap: balance;
}
.display {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  text-transform: uppercase;
}
.h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--tr-tight); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.h4 { font-size: var(--fs-h4); letter-spacing: -0.012em; }
.upper { text-transform: uppercase; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.48;
  color: var(--text-mute);
  text-wrap: pretty;
}
.is-dark .lead { color: var(--text-light-mute); }

.body-text { color: var(--text-mute); text-wrap: pretty; }
.is-dark .body-text { color: var(--text-light-mute); }
.body-text p + p { margin-top: 1em; }
.measure { max-width: 64ch; }
.measure-tight { max-width: 52ch; }

/* --- Mono oznake: specifikacije, indeksi, koordinate --- */
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tr-mono);
  text-transform: uppercase;
  font-weight: 500;
}
.mono-accent { color: var(--gold); }
.is-light .mono-accent { color: var(--bronze); }

/* Indeks sekcije: „02 / USLUGE" */
.sec-index {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tr-mono);
  text-transform: uppercase;
  color: var(--text-mute);
}
.is-dark .sec-index { color: var(--text-light-mute); }
.sec-index b { font-weight: 700; color: var(--bronze); }
.is-dark .sec-index b { color: var(--gold); }
.sec-index::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  flex: none;
}

/* ==========================================================================
   Raspored / pomoćne klase
   ========================================================================== */

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

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

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

.sec-head { max-width: 900px; }
.sec-head .h2 { margin-top: var(--sp-4); }
.sec-head .lead { margin-top: var(--sp-4); }

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

.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ==========================================================================
   Blueprint sloj: mreža, zrno, merne crtice, uglovne zagrade
   ========================================================================== */

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: .32;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}
.is-light.grain::after { opacity: .2; }

.blueprint::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%);
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}

/* Merne crtice uz gornju ivicu sekcije */
.ticks {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 10px;
  background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 32px);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  pointer-events: none;
}

/* Uglovne zagrade na karticama */
.brackets { position: relative; }
.brackets::before,
.brackets::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--gold);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out);
  pointer-events: none;
}
.brackets::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.brackets::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.brackets:hover::before,
.brackets:hover::after,
.brackets:focus-within::before,
.brackets:focus-within::after { opacity: 1; }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* ==========================================================================
   Sadržaj iznad dekorativnih slojeva
   ========================================================================== */
.section > .container,
.section > .inner { position: relative; z-index: 2; }

/* ==========================================================================
   Smanjeno kretanje — globalno gašenje
   ========================================================================== */
@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;
  }
}

/* Štampa */
@media print {
  .site-header, .site-footer, .float-controls, .preloader, .to-top, .assistant { display: none !important; }
  body { background: #fff; color: #000; }
}
