/* ═════════════════════════════════════════════════════════════
   BASE — reset, tipografija, gumbi, pomoćne klase
   ═════════════════════════════════════════════════════════════ */

/* ── 1. Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
/* zaključaj pomicanje stranice dok je otvoren dijalog ili provjera dobi */
html:has(dialog[open]),
html:not(.age-ok) { overflow: hidden; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--fs-base);
  line-height: 1.7;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
ul, ol { list-style: none; }
figure { margin: 0; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }

/* ── 2. Tipografija ── */
h1, h2, h3, h4 { font-weight: 400; line-height: 1.12; color: var(--ink); }

.h2 {
  font-family: var(--f-display);
  font-size: var(--fs-xl);
  letter-spacing: -0.005em;
  margin-bottom: 0.6em;
  max-width: 18em;
  text-wrap: balance;
}

p { max-width: var(--measure); }
p + p { margin-top: 1em; }

.muted { color: var(--ink-soft); }
.fine  { font-family: var(--f-ui); font-size: var(--fs-xs); color: var(--ink-soft); text-align: center; margin-top: 12px; max-width: none; }

/* ── 3. Gumbi ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 24px;
  font-family: var(--f-ui);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn--ink   { background: var(--ink); color: var(--paper-light); }
.btn--ink:hover:not(:disabled) { background: var(--ink-deep); }

.btn--ghost { border-color: var(--rule-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(30,45,107,.05); }

.btn--gold  { background: var(--gold-light); color: var(--ink-deep); }
.btn--gold:hover { background: #E6CC8A; }

.btn--lg    { min-height: 54px; padding: 0 30px; font-size: var(--fs-base); }
.btn--block { width: 100%; }

.btn.is-added { background: var(--ok); color: #fff; border-color: var(--ok); }

.link-btn {
  font-family: var(--f-ui);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
}
.link-btn:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ── 4. Fokus i pristupačnost ── */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.gift :focus-visible, .site-footer :focus-visible { outline-color: var(--gold-light); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 3000;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  font-family: var(--f-ui); text-decoration: none;
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
