/* Reset + base typography */

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

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--charcoal);
  text-decoration: none;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); font-weight: 600; line-height: 1.15; }
h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.2;  }
h3 { font-size: var(--fs-h3); font-weight: 500; line-height: 1.2;  }
h4 { font-size: var(--fs-h4); font-weight: 500; line-height: 1.25; }
h5 { font-size: var(--fs-h5); font-weight: 500; line-height: 1.3;  }
h6 { font-size: var(--fs-h6); font-weight: 600; line-height: 1.4;  letter-spacing: 0.04em; text-transform: uppercase; color: var(--slate); }

p {
  margin: 0 0 var(--sp-4);
  color: var(--slate);
}

p.lead {
  font-size: var(--fs-lead);
  color: var(--charcoal);
  line-height: 1.55;
  font-weight: 400;
}

::selection {
  background: rgba(0, 70, 135, 0.18);
  color: var(--navy-deep);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.container--wide {
  max-width: var(--container-wide);
}

/* Section */
.section {
  padding: var(--sp-21) 0;
  position: relative;
}

.section--alt {
  background: var(--pale-gray);
}

.section--dark {
  background: var(--navy-deep);
  color: var(--white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5 {
  color: var(--white);
}

.section--dark p {
  color: rgba(255, 255, 255, 0.78);
}

.section__head {
  max-width: 720px;
  margin-bottom: var(--sp-12);
}

.section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--sp-4);
}

.section__eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--green);
}

.section__title {
  margin-bottom: var(--sp-4);
}

.section__sub {
  font-size: var(--fs-lead);
  color: var(--slate);
  line-height: 1.55;
}

/* Reveal animations (driven by JS IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-slow) var(--ease-out-expo),
              transform var(--t-slow) var(--ease-out-expo);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-slow) var(--ease-out-expo),
              transform var(--t-slow) var(--ease-out-expo);
}

.reveal-stagger.is-in > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-in > *:nth-child(1) { transition-delay: 60ms; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: 140ms; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: 220ms; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: 380ms; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: 460ms; }
.reveal-stagger.is-in > *:nth-child(7) { transition-delay: 540ms; }
.reveal-stagger.is-in > *:nth-child(8) { transition-delay: 620ms; }

/* Lazy-load slika sa blur-up */
.lazy-img {
  filter: blur(18px);
  opacity: 0;
  transform: scale(1.02);
  transition: filter 700ms var(--ease-out-expo),
              opacity 600ms var(--ease-out-expo),
              transform 800ms var(--ease-out-expo);
  background: var(--smoke);
}

.lazy-img.is-loaded {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }
}

/* Responsive type */
@media (max-width: 992px) {
  :root {
    --fs-h1: 40px;
    --fs-h2: 30px;
    --fs-h3: 24px;
  }
  .section { padding: var(--sp-12) 0; }
}

@media (max-width: 576px) {
  :root {
    --fs-h1: 30px;
    --fs-h2: 24px;
    --fs-h3: 20px;
    --fs-lead: 16px;
  }
  .container { padding: 0 var(--sp-4); }
  .section { padding: var(--sp-8) 0; }
}
