/**
 * Dunav Union - Base Typography, Reset & Semantic Bindings
 * Version: 1.1.0
 */

/* ==========================================================================
   1. Local Font Declarations (Montserrat woff2, latin-ext)
   ========================================================================== */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-v31-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/montserrat-v31-latin_latin-ext-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/montserrat-v31-latin_latin-ext-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-v31-latin_latin-ext-700.woff2') format('woff2');
}

/* ==========================================================================
   2. Modern Reset & HTML Essentials
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--du-font-sans);
  background-color: var(--du-canvas);
  color: var(--du-text-secondary);
  line-height: var(--du-leading-normal);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-gutter: stable;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

main#content {
  flex: 1 0 auto;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--du-dur-base) var(--du-ease-out);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* ==========================================================================
   3. Lenis Smooth Scroll Configuration
   ========================================================================== */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* ==========================================================================
   4. Semantic Headings & Class-Pairings (Decoupled Visual/SEO Architecture)
   ========================================================================== */
h1, h2, .h1, .h2 {
  text-wrap: balance;
}

h1, .h1 {
  font-size: var(--du-text-h1);
  line-height: var(--du-leading-tight);
  letter-spacing: var(--du-tracking-h1);
  font-weight: 700;
  color: var(--du-text-primary);
  text-wrap: balance;
}

h2, .h2 {
  font-size: var(--du-text-h2);
  line-height: var(--du-leading-snug);
  letter-spacing: var(--du-tracking-h2);
  font-weight: 700;
  color: var(--du-text-primary);
  text-wrap: balance;
}

h3, .h3 {
  font-size: var(--du-text-h3);
  line-height: var(--du-leading-title);
  letter-spacing: var(--du-tracking-h3);
  font-weight: 600;
  color: var(--du-text-primary);
}

h4, .h4 {
  font-size: var(--du-text-h4);
  line-height: 1.32;
  letter-spacing: var(--du-tracking-normal);
  font-weight: 600;
  color: var(--du-text-primary);
}

h5, .h5 {
  font-size: var(--du-text-h5);
  line-height: 1.38;
  letter-spacing: var(--du-tracking-normal);
  font-weight: 600;
  color: var(--du-text-primary);
}

h6, .h6 {
  font-size: var(--du-text-h6);
  line-height: 1.45;
  letter-spacing: var(--du-tracking-wide);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--du-text-muted);
}

/* Monumental Display Class (Za hero i ključne vizuele) */
.du-display {
  font-size: var(--du-text-display);
  line-height: var(--du-leading-display);
  letter-spacing: var(--du-tracking-display);
  font-weight: 700;
  color: var(--du-text-primary);
}

/* ==========================================================================
   5. Fluid Paragraphs & Text Body Classes
   ========================================================================== */
p, .du-body {
  font-size: var(--du-text-body);
  line-height: var(--du-leading-normal);
  color: var(--du-text-secondary);
}

.du-lead {
  font-size: var(--du-text-lead);
  line-height: 1.62;
  color: var(--du-text-secondary);
  font-weight: 400;
}

.du-sm {
  font-size: var(--du-text-sm);
  line-height: 1.5;
}

.du-xs {
  font-size: var(--du-text-xs);
  line-height: 1.4;
}

/* Tabular Numbers za cene, kurseve, uplatnice i procente */
.du-num, .du-tabular {
  font-variant-numeric: tabular-nums lining-nums;
}

/* ==========================================================================
   6. Accessibility & Utility Fundamentals
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--du-action-primary);
  outline-offset: 3px;
  border-radius: var(--du-radius-xs);
}

::selection {
  background-color: var(--du-action-primary-bg);
  color: var(--du-action-primary-active);
}

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