:root {
  --navy: #0F232E;
  --navy-deep: #0C1D26;
  --orange: #FF5532;
  --grey: #46555E;
  --grey-light: #F4F4F4;
  --line: #E1E1E1;
  --muted: #9AAAB3;
  --nav-h: 72px;
  --wrap: 1320px;
  --pad: clamp(20px, 4vw, 56px);
  --sect-y: clamp(56px, 8vw, 120px);
  --display: 'Space Grotesk', sans-serif;
}

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

html { scroll-behavior: smooth; background: var(--navy); }

body {
  margin: 0;
  background: var(--navy);
  color: #FFFFFF;
  font-family: 'Hanken Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

section[id] { scroll-margin-top: 84px; }

h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.025em; margin: 0; }

a { color: #E1E1E1; text-decoration: none; transition: color .2s ease, background .2s ease, border-color .2s ease; }
a:hover { color: var(--orange); }

img, svg { display: block; }

::selection { background: var(--orange); color: #FFFFFF; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.accent { color: var(--orange); }

.eyebrow {
  margin: 0 0 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border-radius: 999px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}
.btn-accent { background: var(--orange); color: #FFF; padding: 13px 26px; }
.btn-accent:hover { background: #FFF; color: var(--navy); }
.btn-light { background: #FFF; color: var(--navy); padding: 17px 28px; font-size: 16px; }
.btn-light:hover { background: var(--orange); color: #FFF; }
.btn-ghost { border: 2px solid rgba(255,255,255,.35); color: #FFF; padding: 15px 26px; font-size: 16px; }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-dark { background: var(--navy); color: #FFF; padding: 19px 36px; font-size: 17px; }
.btn-dark:hover { background: #FFF; color: var(--navy); }
.btn-outline-light { border: 2px solid rgba(255,255,255,.6); color: #FFF; padding: 17px 34px; font-size: 17px; }
.btn-outline-light:hover { background: #FFF; border-color: #FFF; color: var(--orange); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; background: var(--navy); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: flex; align-items: center; padding: 8px 0; }
.nav-logo img { height: 22px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 34px; font-size: 15px; font-weight: 600; }
.nav-links a { color: #C3D0D7; }
.nav-links a.btn-accent { color: #FFF; }
.nav-spacer { height: var(--nav-h); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  border: 0; background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #FFF; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 2px;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 24px 40px rgba(0,0,0,.35);
  padding: 10px clamp(20px, 5vw, 32px) 24px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { color: #E1E1E1; font-size: 17px; font-weight: 600; padding: 16px 2px; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-mobile a:last-child { border: 0; margin-top: 12px; padding: 16px 24px; }

/* ---------- Hero ---------- */
#hero { background: var(--navy); }
.hero-top {
  position: relative;
  overflow: hidden;
  background: var(--navy) url('assets/pattern.svg') center top / 100% auto no-repeat;
}
.hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 180px; z-index: 0;
  background: linear-gradient(rgba(15,35,46,0), rgba(15,35,46,.85) 45%, var(--navy));
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; padding-top: clamp(32px, 8vw, 112px); padding-bottom: clamp(28px, 6vw, 72px); }

.eyebrow-pill {
  display: inline-block;
  margin: 0 0 26px;
  padding: 9px 18px;
  background: rgba(255,85,50,.14);
  border: 1px solid rgba(255,85,50,.35);
  border-radius: 999px;
  color: #FF7A5E;
  font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}

.hero-grid { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: clamp(24px, 4vw, 64px); }
.hero-grid h1 { flex: 1 1 420px; font-size: clamp(52px, 12vw, 100px); line-height: 1.02; letter-spacing: -.035em; max-width: 15ch; }
.hero-lead { flex: 0 1 560px; display: flex; justify-content: flex-end; padding-bottom: clamp(8px, 1.2vw, 20px); }
.hero-lead p { margin: 0; max-width: 560px; font-size: clamp(17px, 2.4vw, 26px); line-height: 1.45; color: var(--muted); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; max-width: 460px; margin-top: clamp(32px, 4vw, 56px); }
.hero-actions .btn { flex: 1 1 140px; }

.hero-image {
  position: relative; z-index: 1;
  height: clamp(240px, 46vw, 620px);
  background: var(--grey);
  display: flex; align-items: flex-end;
  padding: clamp(16px, 3vw, 28px);
}
.hero-image span { color: rgba(255,255,255,.6); font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Traka ---------- */
.traka {
  background: var(--orange); color: #FFF; overflow: hidden;
  padding: clamp(22px, 3.4vw, 38px) var(--pad);
  display: flex; align-items: center; justify-content: center;
}
.traka-inner {
  max-width: var(--wrap);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(14px, 4vw, 56px);
  font-family: var(--display); font-weight: 700; font-size: clamp(18px, 2.8vw, 38px); letter-spacing: .02em;
}
.traka-arrow { display: flex; align-items: center; opacity: .6; }
.traka-arrow svg { width: .85em; height: auto; }

/* ---------- O nama ---------- */
#o-nama { background: var(--navy); }
.about { padding-top: var(--sect-y); padding-bottom: var(--sect-y); display: flex; flex-wrap: wrap; gap: 28px 64px; }
.about-head { flex: 1 1 260px; min-width: 0; }
.about-head h2 { font-size: clamp(27px, 3.4vw, 46px); line-height: 1.1; }
.about-body { flex: 1.4 1 320px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.about-body p { margin: 0; font-size: clamp(16px, 1.8vw, 19px); line-height: 1.65; color: var(--muted); }

/* ---------- Usluge ---------- */
#usluge { background: var(--grey-light); color: var(--navy); }
#usluge .wrap { padding-top: var(--sect-y); padding-bottom: var(--sect-y); }
.section-head { margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2 { font-size: clamp(27px, 3.4vw, 46px); line-height: 1.1; }

.usluge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.usluga {
  background: #FFF; border: 1px solid var(--line); border-radius: 20px; padding: 18px;
  display: flex; flex-direction: column; gap: 16px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.usluga:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(15,35,46,.1); border-color: rgba(255,85,50,.5); }
.usluga-ico { background: var(--navy); border-radius: 14px; aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; }
.usluga-ico svg { width: 82px; height: 82px; }
.usluga-txt { display: flex; flex-direction: column; gap: 8px; padding: 0 6px 8px; }
.usluga-txt h3 { font-size: 20px; line-height: 1.2; letter-spacing: -.01em; }
.usluga-txt p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--grey); }

/* ---------- Radovi ---------- */
#radovi { background: var(--navy); }
#radovi .wrap { padding-top: var(--sect-y); padding-bottom: var(--sect-y); }
.radovi-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 4vw, 52px); }
.radovi-head h2 { font-size: clamp(27px, 3.4vw, 46px); line-height: 1.1; }

.pager { display: flex; align-items: center; gap: 14px; }
.pager button {
  width: 48px; height: 48px; padding: 0; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); background: transparent; color: #FFF;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.pager button:hover { background: var(--orange); border-color: var(--orange); }
.pager button svg { width: 20px; height: 14px; }
.pager span { font-family: var(--display); font-size: 16px; font-weight: 600; min-width: 44px; text-align: center; }

.radovi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: clamp(12px, 1.4vw, 18px);
  transition: opacity .55s cubic-bezier(.33,1,.68,1), transform .55s cubic-bezier(.33,1,.68,1);
}
.radovi-grid.fade { opacity: 0; transform: translateY(12px); }

.rad {
  position: relative; aspect-ratio: 4/5; border-radius: 16px; overflow: hidden;
  background-color: var(--grey); background-size: cover; background-position: center;
  display: flex; align-items: flex-end; cursor: pointer;
  transition: transform .25s ease;
  border: 0; padding: 0; width: 100%; text-align: left; font: inherit; color: inherit;
}
.rad:hover { transform: translateY(-4px); }
.rad-meta { position: relative; width: 100%; padding: 16px 14px; background: linear-gradient(rgba(15,35,46,0), rgba(15,35,46,.85)); pointer-events: none; }
.rad-meta strong { display: block; font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: #FFF; }
.rad-meta span { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.7); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(12,29,38,.92);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  animation: lbIn .25s ease;
}
.lightbox[hidden] { display: none; }
.lightbox-card {
  position: relative; margin: 0;
  width: min(560px, 92vw); max-height: 86vh; aspect-ratio: 4/5;
  background-color: var(--grey); background-size: cover; background-position: center;
  border-radius: 20px; overflow: hidden;
  display: flex; align-items: flex-end;
  animation: lbZoom .3s cubic-bezier(.22,1,.36,1);
}
.lightbox-card figcaption { position: relative; width: 100%; padding: 24px 20px; background: linear-gradient(rgba(15,35,46,0), rgba(15,35,46,.9)); }
.lightbox-card figcaption strong { display: block; font-family: var(--display); font-size: 20px; font-weight: 700; color: #FFF; }
.lightbox-card figcaption span { display: block; margin-top: 3px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.75); }
.lightbox-close {
  position: absolute; top: 14px; right: 14px;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(12,29,38,.7); color: #FFF; font-size: 20px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.lightbox-close:hover { background: var(--orange); }

@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbZoom { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; color: #FFF;
  background: var(--orange) url('assets/pattern-cta.svg') center top / 100% auto no-repeat;
}
.cta-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 180px; z-index: 0; pointer-events: none;
  background: linear-gradient(rgba(255,85,50,0), rgba(255,85,50,.85) 45%, var(--orange));
}
.cta-inner {
  position: relative; z-index: 1;
  padding-top: clamp(64px, 9vw, 140px); padding-bottom: clamp(64px, 9vw, 140px);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(28px, 4vw, 44px);
}
.cta-eyebrow { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.cta h2 { font-size: clamp(19px, 4.5vw, 66px); line-height: 1.05; letter-spacing: -.03em; white-space: nowrap; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; max-width: 520px; }
.cta-actions .btn { flex: 1 1 150px; }

/* ---------- Kontakt ---------- */
#kontakt {
  position: relative; overflow: hidden;
  background: var(--navy) url('assets/pattern.svg') center top / cover no-repeat;
}
.kontakt-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 180px; z-index: 0; pointer-events: none;
  background: linear-gradient(rgba(15,35,46,0), rgba(15,35,46,.85) 45%, var(--navy));
}
.kontakt-inner { position: relative; z-index: 1; padding-top: var(--sect-y); padding-bottom: var(--sect-y); }
.kontakt-inner h2 { margin-bottom: clamp(36px, 4.5vw, 56px); font-size: clamp(27px, 3.4vw, 46px); line-height: 1.1; }
.kontakt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: clamp(28px, 4vw, 40px); }
.kontakt-grid h4 { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.kontakt-grid p { margin: 0; font-size: 17px; line-height: 1.7; color: #E1E1E1; }

/* ---------- Footer ---------- */
footer { background: var(--navy-deep); border-top: 1px solid rgba(255,255,255,.08); }
.footer-inner {
  padding-top: clamp(28px, 3vw, 40px); padding-bottom: clamp(28px, 3vw, 40px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.footer-inner img { height: 20px; width: auto; opacity: .85; }
.footer-inner p { margin: 0; font-size: 14px; color: rgba(255,255,255,.45); }

/* ---------- Reveal ---------- */
[data-reveal] { transition: opacity 1.6s cubic-bezier(.16,1,.3,1), transform 1.6s cubic-bezier(.16,1,.3,1), filter 1.6s cubic-bezier(.16,1,.3,1); }
[data-reveal].pre { opacity: 0; transform: translateY(32px) scale(.985); filter: blur(6px); }

[data-wipe] { position: relative; }
[data-wipe].pre::after,
[data-wipe].on::after {
  content: ''; position: absolute; inset: 0; background: var(--navy);
  transform-origin: right center; pointer-events: none;
}
[data-wipe].pre::after { transform: scaleX(1); }
[data-wipe].pre > [data-wipe-inner] { opacity: 0; }
[data-wipe].on::after { animation: wipeCover 1.1s cubic-bezier(.65,0,.35,1) both; }
[data-wipe].on > [data-wipe-inner] { animation: wipeInner 1.1s cubic-bezier(.22,1,.36,1) both; }
@keyframes wipeCover { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes wipeInner { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  /* hero + traka zajedno popunjavaju točno jedan ekran */
  #hero { display: flex; flex-direction: column; height: calc(100dvh - var(--nav-h) - var(--traka-h, 68px)); overflow: hidden; }
  .hero-top { flex: 0 1 auto; min-height: 0; }
  .hero-image { flex: 1 1 0; min-height: 84px; }
  .hero-grid h1 { font-size: clamp(34px, 11vw, 92px); }
  .hero-lead p { font-size: clamp(17px, 4.4vw, 24px); line-height: 1.5; }
  .eyebrow-pill { font-size: 12px; padding: 8px 14px; letter-spacing: .1em; margin-bottom: 18px; }
}

@media (max-width: 900px) and (max-height: 720px) {
  .hero-grid h1 { font-size: clamp(30px, 9vw, 60px); }
  .hero-content { padding-top: 20px; padding-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal].pre { opacity: 1; transform: none; filter: none; transition: none; }
  [data-wipe].pre::after, [data-wipe].on::after { display: none; }
  [data-wipe].pre > [data-wipe-inner], [data-wipe].on > [data-wipe-inner] { opacity: 1; animation: none; }
}
