/* =========================================================
   Gurman Ćaka - Base (reset, tipografija, elementi)
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.menu-open,
body.lightbox-open,
body.modal-open {
  overflow: hidden;
}

main {
  flex: 1 0 auto;
}

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

img {
  font-style: italic;
  color: var(--muted);
}

a {
  color: var(--accent-deep);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--accent);
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-heading);
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--h1);
  font-weight: 600;
}

h2 {
  font-size: var(--h2);
}

h3 {
  font-size: var(--h3);
}

h4 {
  font-size: var(--h4);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0;
}

strong {
  font-weight: 650;
}

em {
  font-style: italic;
}

small {
  font-size: var(--text-xs);
}

ul,
ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.35rem;
}

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

/* Focus state - vidljiv svuda */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  background: var(--ink);
  color: var(--ivory);
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--t-fast);
}

.skip-link:focus {
  top: 1rem;
  color: var(--ivory);
}

/* Selekcija */
::selection {
  background: var(--accent);
  color: var(--white);
}

/* Scrollbar (desktop) */
@media (min-width: 1025px) {
  ::-webkit-scrollbar {
    width: 12px;
  }
  ::-webkit-scrollbar-track {
    background: var(--ivory-deep);
  }
  ::-webkit-scrollbar-thumb {
    background: #c9bfab;
    border-radius: 6px;
    border: 3px solid var(--ivory-deep);
  }
}

/* Srpska latinica - pravilne forme */
.lang-sr {
  font-feature-settings: normal;
}
