/* Osnova: reset, tipografija, fokus, smanjeno kretanje. Tokeni: tokens.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--hz-paper);
  color: var(--hz-ink);
  font-family: var(--hz-font);
  font-size: var(--hz-fs-base);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--hz-font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h1 { font-size: var(--hz-fs-display); }
h2 { font-size: var(--hz-fs-h2s); letter-spacing: -0.01em; }
h3 { font-size: var(--hz-fs-h3); }

p { margin: 0; }

a {
  color: var(--hz-sea);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--hz-sea-dark);
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

/* Fokus vidljiv tastaturom (docs/12-dizajn.md) */
:focus-visible {
  outline: 2px solid var(--hz-sea);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px var(--hz-sea-ring);
}

/* Brojevi i cene: tabularne cifre */
.hz-num {
  font-variant-numeric: tabular-nums;
}

.hz-muted { color: var(--hz-ink-2); }
.hz-small { font-size: var(--hz-fs-xs); color: var(--hz-ink-3); }

/* Samo za čitače ekrana */
/* Atribut hidden važi i za elemente kojima komponenta zadaje display (npr. .hz-empty). */
[hidden] { display: none !important; }

.hz-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hz-skip-link {
  position: absolute;
  left: var(--hz-s4);
  top: -100px;
  z-index: 100;
  padding: var(--hz-s3) var(--hz-s4);
  background: var(--hz-surface);
  border-radius: var(--hz-r-md);
}

.hz-skip-link:focus {
  top: var(--hz-s4);
}

@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;
  }
}
