/* ========== Boje i osnovna podešavanja ========== */
:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-2: #efeae2;
  --text: #1c1917;
  --muted: #6b635b;
  --line: #e4ddd3;
  --accent: #b4532a;
  --accent-hover: #9a4321;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgb(28 25 23 / .06), 0 8px 24px rgb(28 25 23 / .06);
  --radius: 16px;
  --header-h: 60px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --surface: #1d1a17;
    --surface-2: #1a1714;
    --text: #f3efe9;
    --muted: #a8a096;
    --line: #2f2a25;
    --accent: #e28b5e;
    --accent-hover: #f0a07a;
    --on-accent: #1a0e07;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h2 { font: 600 clamp(1.9rem, 6vw, 2.75rem)/1.1 var(--font-display); letter-spacing: -.01em; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0; }
button { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 28px; } }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ========== Dugmad ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: currentColor; background: transparent; }
.btn-ghost:hover { background: rgb(127 127 127 / .12); }
.btn-lg { min-height: 56px; padding-inline: 26px; font-size: 1.0625rem; }

.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow);
}
.icon-btn svg, .lb-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn-dark { background: rgb(255 255 255 / .12); color: #fff; box-shadow: none; }
.icon-btn-dark:hover { background: rgb(255 255 255 / .22); }

/* ========== Zaglavlje ========== */
.site-header {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { font: 700 1.25rem/1 var(--font-display); text-decoration: none; margin-right: auto; letter-spacing: -.01em; }
.brand span, .hero-title span { color: var(--accent); }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 10px 12px; border-radius: 999px;
  text-decoration: none; font-weight: 500; color: var(--muted);
}
.nav a:hover { color: var(--text); background: rgb(127 127 127 / .1); }

.lang-toggle {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); cursor: pointer;
  font-size: .8125rem; font-weight: 700; letter-spacing: .04em;
}
.lang-toggle span { padding: 6px 10px; border-radius: 999px; color: var(--muted); transition: background-color .2s, color .2s; }
.lang-toggle span.is-active { background: var(--text); color: var(--bg); }

.menu-btn {
  display: none; width: 44px; height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer; position: relative;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  position: absolute; left: 12px; width: 20px; height: 2px; border-radius: 2px;
  background: currentColor; content: ""; transition: transform .25s, opacity .2s;
}
.menu-btn span { top: 21px; }
.menu-btn span::before { left: 0; top: -6px; }
.menu-btn span::after { left: 0; top: 6px; }
.site-header.nav-open .menu-btn span { background: transparent; }
.site-header.nav-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.site-header.nav-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 759px) {
  .menu-btn { display: block; margin-right: -8px; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px rgb(0 0 0 / .08);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .site-header.nav-open .nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
  .nav a { padding: 14px 8px; border-radius: 10px; font-size: 1.125rem; color: var(--text); }
}

/* ========== Početak (hero) ========== */
.hero {
  position: relative; isolation: isolate;
  min-height: min(calc(100svh - var(--header-h)), 820px);
  display: flex; align-items: flex-end;
  color: #fff; background: #2a1d15;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(0 0 0 / .72) 0%, rgb(0 0 0 / .25) 55%, rgb(0 0 0 / .1) 100%);
}
.hero-content { padding-top: 96px; padding-bottom: clamp(40px, 9vw, 88px); }
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.hero-title { font: 700 clamp(3rem, 14vw, 6.5rem)/.95 var(--font-display); letter-spacing: -.02em; margin: 12px 0 16px; }
.hero-title span { color: #f0a07a; }
.hero-lead { max-width: 34ch; font-size: clamp(1.125rem, 3.6vw, 1.375rem); line-height: 1.45; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn-primary { background: #fff; color: #1c1917; }
.hero .btn-primary:hover { background: #f3efe9; }
.hero .btn-ghost { color: #fff; }

/* ========== Sekcije ========== */
.section { padding-block: clamp(56px, 10vw, 104px); }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 1.0625rem; }

/* ========== Filter i galerija ========== */
.filters {
  display: flex; gap: 8px; margin: 0 -16px 24px; padding: 2px 16px 6px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .filters { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; } }
.chip {
  flex: none; min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.gallery { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

.card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; box-shadow: var(--shadow);
  animation: fade-in .35s ease both;
}
.card-media { position: relative; aspect-ratio: 4 / 5; background: var(--line); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.035); }
.card-badge {
  position: absolute; right: 12px; bottom: 12px;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  background: rgb(0 0 0 / .55); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card-badge svg { width: 16px; height: 16px; fill: currentColor; margin-left: 2px; }
.card-body { padding: 18px 20px 22px; display: grid; gap: 4px; }
.tags { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.card-body h3 { font: 600 1.375rem/1.2 var(--font-display); margin-top: 4px; }
.card-type { color: var(--muted); font-size: .9375rem; }
.card-text { margin-top: 8px; font-size: .9375rem; }

.empty { color: var(--muted); padding: 32px 0; grid-column: 1 / -1; }

@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } }

/* ========== Kako radim ========== */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.step {
  counter-increment: step;
  background: var(--surface); border-radius: var(--radius); padding: 22px 20px 24px;
  box-shadow: var(--shadow);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: 14px;
  font: 700 1.75rem/1 var(--font-display); color: var(--accent);
}
.step p { margin-top: 8px; color: var(--muted); font-size: .9375rem; }

/* ========== Usluge ========== */
.services { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.service { padding: 26px 24px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.service-icon { width: 36px; height: 36px; margin-bottom: 18px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font: 600 1.3125rem/1.25 var(--font-display); }
.service p { margin-top: 10px; color: var(--muted); }

/* ========== Kontakt ========== */
.contact { text-align: center; }
.contact p { margin: 14px auto 0; max-width: 46ch; color: var(--muted); font-size: 1.0625rem; }
.contact-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; align-items: stretch; }
.contact-actions .btn span { overflow-wrap: anywhere; }
@media (min-width: 600px) { .contact-actions { flex-direction: row; justify-content: center; } }

.site-footer { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); }

/* ========== Detalji projekta (dialog) ========== */
dialog { padding: 0; border: 0; }
.project {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0;
  background: var(--bg); color: var(--text);
  overflow-y: auto; overscroll-behavior: contain;
}
.project[open] { animation: slide-up .3s ease; }
.project::backdrop { background: rgb(0 0 0 / .6); }
@media (min-width: 760px) {
  .project {
    width: min(1040px, calc(100% - 48px)); height: calc(100% - 48px);
    margin: auto; border-radius: 20px;
  }
}
.project-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: flex-end;
  padding: max(12px, env(safe-area-inset-top)) 12px 0;
  pointer-events: none; height: 0; overflow: visible;
}
.project-bar .icon-btn { pointer-events: auto; }
.project-body { padding: 24px 16px calc(48px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) { .project-body { padding: 40px 48px 56px; } }

.p-head { padding-right: 56px; }
.p-head h2 { margin-top: 8px; }
.p-meta { margin-top: 10px; color: var(--muted); }
.p-text { display: grid; gap: 14px; max-width: 68ch; margin-top: 24px; font-size: 1.0625rem; }
.p-text h3 { margin-top: 10px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .45em;
  width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.p-videos { display: grid; gap: 20px; margin-top: 32px; }
.video { margin: 0; }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  border-radius: var(--radius); overflow: hidden; background: #000;
}
.video.is-vertical .video-frame { aspect-ratio: 9 / 16; max-width: 360px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0;
  border: 0; cursor: pointer; background: linear-gradient(135deg, #2a1d15, #6b4a33);
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.play-icon {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 999px;
  background: rgb(0 0 0 / .6); color: #fff; transition: background-color .2s, scale .2s;
}
.play-icon svg { width: 28px; height: 28px; fill: currentColor; margin-left: 4px; }
.video-facade:hover .play-icon { background: var(--accent); scale: 1.06; }
.video figcaption { margin-top: 10px; color: var(--muted); font-size: .9375rem; }

.shots { display: grid; gap: 8px; margin-top: 32px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .shots { gap: 12px; grid-template-columns: repeat(3, 1fr); } }
.shot { display: block; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--line); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.shot:hover img { transform: scale(1.04); }

@keyframes slide-up { from { opacity: 0; transform: translateY(24px); } }

/* ========== Lightbox ========== */
.lightbox {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0;
  background: #0b0a09; color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: #0b0a09; }
.lightbox[open] { animation: fade .2s ease; }
.lb-stage {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 64px 0 calc(24px + env(safe-area-inset-bottom));
  touch-action: pan-y pinch-zoom;
}
@media (min-width: 760px) { .lb-stage { padding: 72px 88px 40px; } }
.lb-img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
  transition: transform .2s ease, opacity .2s ease;
}
.lb-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px 20px;
}
.lb-count { font-size: .9375rem; font-variant-numeric: tabular-nums; opacity: .8; }
.lb-nav {
  position: absolute; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 999px; cursor: pointer;
  background: rgb(255 255 255 / .12); color: #fff;
}
.lb-nav:hover { background: rgb(255 255 255 / .24); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
/* Na telefonu se lista prevlačenjem prstom, strelice samo smetaju slici */
@media (hover: none) and (max-width: 759px) { .lb-nav { display: none; } }
.lightbox.is-single .lb-nav { display: none; }

@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
