/* ==========================================================================
   PRINCIP GRADNJA — Cinematic real-estate site
   Brand colors extracted from logo.png (pixel-sampled):
     primary gold  #C39D5E
     light gold    #CCAD7D
     dark gold     #BA9751
   ========================================================================== */

:root {
  /* Brand */
  --gold: #c39d5e;
  --gold-light: #ccad7d;
  --gold-dark: #ba9751;

  /* Base */
  --black: #0a0a0a;
  --black-soft: #121212;
  --black-card: #161513;
  --bone: #f4efe4;
  --bone-dim: #b7b0a1;
  --line: rgba(244, 239, 228, 0.1);

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.65, 0, 0.35, 1);

  --container: 1360px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
html, body { height: 100%; }
body {
  background: var(--black);
  color: var(--bone);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
ul { list-style: none; }
svg { display: block; }

::selection { background: var(--gold); color: var(--black); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 4vw, 4rem);
}

/* ---------- Scrollbar (webkit, subtle) ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--black-card); border: 2px solid var(--black); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s var(--ease), visibility 0.9s var(--ease);
}
.preloader-logo {
  width: 140px;
  opacity: 0;
  filter: brightness(0) invert(1);
  animation: preloaderFade 1.4s var(--ease) forwards;
}
@keyframes preloaderFade {
  0% { opacity: 0; transform: scale(0.92); }
  60% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}
.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Grain overlay ---------- */
.grain-overlay {
  position: fixed;
  inset: -100px;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9500;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--gold);
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid rgba(195, 157, 94, 0.55);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.cursor-ring.is-active {
  width: 64px; height: 64px;
  background: rgba(195, 157, 94, 0.08);
  border-color: var(--gold);
}
body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button { cursor: none; }

@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.05rem 2.2rem;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s ease, color 0.4s ease;
}
.btn span { position: relative; z-index: 2; }
.btn svg { position: relative; z-index: 2; width: 18px; height: 18px; }

.btn-primary {
  background: var(--gold);
  color: var(--black);
  border: 1px solid var(--gold);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bone);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease-soft);
  z-index: 1;
}
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover { color: var(--black); }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--bone);
  padding: 0.75rem 1.5rem;
  font-size: 0.78rem;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-outline {
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
}
.btn-outline:hover { background: var(--gold); color: var(--black); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 800;
  padding-block: 1.4rem;
  transition: padding 0.5s var(--ease), background 0.5s var(--ease);
  /* Always-on scrim so nav reads over bright hero footage, even before scroll */
  background: linear-gradient(180deg, rgba(10,10,10,0.75) 0%, rgba(10,10,10,0.35) 60%, rgba(10,10,10,0) 100%);
}
.site-header.is-scrolled {
  padding-block: 0.9rem;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo-link { flex-shrink: 0; }
.logo-img {
  height: 76px;
  width: auto;
  filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
  transition: filter 0.4s ease, opacity 0.4s ease, height 0.5s var(--ease);
}
.site-header.is-scrolled .logo-img { height: 58px; }
.logo-link:hover .logo-img { opacity: 0.75; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  margin-inline: auto;
}
.main-nav a {
  position: relative;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--bone);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  transition: color 0.35s ease;
  padding-block: 0.2rem;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease);
}
.main-nav a:hover { color: var(--gold-light); }
.main-nav a:hover::after { width: 100%; }

.header-cta {
  flex-shrink: 0;
  background: rgba(10, 10, 10, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  z-index: 900;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.6));
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--bone);
  transition: transform 0.4s var(--ease), opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease), transform 0.5s var(--ease);
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-nav nav { display: flex; flex-direction: column; gap: 2rem; text-align: center; }
.mobile-nav a { font-size: 2rem; font-weight: 300; letter-spacing: -0.01em; color: var(--bone); }
.mobile-nav a:hover { color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: -6% 0 0 0;
  height: 112%;
  z-index: -2;
  will-change: transform;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.6) 0%, rgba(10,10,10,0.2) 30%, rgba(10,10,10,0.35) 68%, rgba(10,10,10,0.55) 100%),
    linear-gradient(90deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0) 40%, rgba(10,10,10,0) 60%, rgba(10,10,10,0.55) 100%);
  z-index: -1;
}

.hero-content {
  position: relative;
  padding-bottom: clamp(4rem, 9vh, 7.5rem);
  padding-top: 9rem;
}
.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.4rem;
}
.hero-title {
  font-size: clamp(2.75rem, 8.4vw, 7.6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 20ch;
  margin-bottom: 1.8rem;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .accent { color: var(--gold); }
.hero-subtitle {
  font-size: clamp(1.02rem, 1.6vw, 1.25rem);
  font-weight: 300;
  color: var(--bone-dim);
  max-width: 42ch;
  line-height: 1.6;
  margin-bottom: 2.6rem;
}

.hero-scroll {
  position: absolute;
  right: clamp(1.5rem, 4vw, 4rem);
  bottom: 2.4rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--bone-dim);
  z-index: 2;
}
.hero-scroll-text {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero-scroll-line {
  width: 1px;
  height: 52px;
  background: rgba(244,239,228,0.25);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: '';
  position: absolute;
  left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--gold);
  animation: scrollDrip 2.2s ease-in-out infinite;
}
@keyframes scrollDrip {
  0% { top: -100%; }
  50% { top: 0; }
  100% { top: 100%; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding-block: 1.3rem;
  background: var(--black);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 1.4rem;
  animation: marqueeScroll 34s linear infinite;
}
.marquee-track span {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--bone-dim);
  white-space: nowrap;
}
.marquee-track span:nth-child(2n) { color: var(--gold); }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections generic ---------- */
section { position: relative; }
.standard, .projects { padding-block: clamp(5rem, 12vh, 9rem); }

.section-header {
  margin-bottom: clamp(3rem, 7vh, 5.5rem);
  max-width: 46ch;
}
.section-header h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-top: 0.9rem;
}

/* ---------- The Standard grid ---------- */
.standard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.standard-item {
  background: var(--black);
  padding: clamp(2.2rem, 4vw, 3.6rem);
  transition: background 0.5s ease;
}
.standard-item:hover { background: var(--black-card); }
.standard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(2rem, 5vh, 3.4rem);
}
.standard-index {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--bone-dim);
}
.standard-icon {
  width: 46px;
  height: 46px;
  color: var(--gold);
  transition: transform 0.6s var(--ease);
}
.standard-item:hover .standard-icon { transform: rotate(-8deg) scale(1.08); }
.standard-item h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
}
.standard-item p {
  color: var(--bone-dim);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 42ch;
}

/* ---------- Projects ---------- */
.projects { background: var(--black-soft); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.project-card { display: flex; flex-direction: column; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
/* Grid-safe hide: fully removed from flow, no leftover gaps (same pattern as .plan-card) */
.project-card.is-hiding { opacity: 0 !important; transform: scale(0.95) translateY(8px); pointer-events: none; }
.project-card.is-hidden { display: none; }
.project-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  background: var(--black-card);
}
.project-media-link { display: block; width: 100%; height: 100%; }
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: grayscale(0.15) brightness(0.92);
  transition: transform 1.1s var(--ease), filter 0.6s ease;
}
.project-card:hover .project-media img {
  transform: scale(1.12);
  filter: grayscale(0) brightness(1);
}
.project-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 55%, rgba(10,10,10,0.85) 100%);
}
.project-badge {
  position: absolute;
  top: 1.3rem;
  left: 1.3rem;
  z-index: 2;
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(10, 10, 10, 0.65);
  border: 1px solid rgba(244,239,228,0.25);
  backdrop-filter: blur(6px);
  color: var(--bone);
  border-radius: 2px;
}
.project-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  margin-top: 1.4rem;
}
.project-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.project-title-link { display: block; transition: color 0.3s ease; }
.project-title-link:hover { color: var(--gold); }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gold);
  white-space: nowrap;
  transition: gap 0.35s var(--ease), color 0.35s ease;
}
.project-link svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.project-link:hover { gap: 0.75rem; }
.project-link:hover svg { transform: translateX(3px); }
.project-link.is-disabled {
  color: var(--bone-dim);
  cursor: default;
  opacity: 0.6;
}

/* ---------- Statement ---------- */
.statement { padding-block: clamp(6rem, 14vh, 10rem); text-align: center; }
.statement-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.6rem;
}
.statement h2 {
  font-size: clamp(2rem, 5.4vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.statement h2 span { color: var(--gold); font-style: italic; }
.statement-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}
.statement-phones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 2rem;
}
.statement-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}
.statement-phone svg { width: 18px; height: 18px; flex-shrink: 0; }
.statement-phone:hover { color: var(--gold-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black-soft); border-top: 1px solid var(--line); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-block: clamp(3.5rem, 8vh, 5.5rem);
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2rem; }
.footer-logo { height: 46px; width: auto; align-self: flex-start; flex-shrink: 0; filter: brightness(0) invert(1); opacity: 0.9; }
.footer-brand p { color: var(--bone-dim); font-size: 0.92rem; }

.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 1.3rem;
  font-weight: 600;
}
.footer-col { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-col a { font-size: 0.98rem; color: var(--bone); transition: color 0.3s ease; width: fit-content; }
.footer-col a:hover { color: var(--gold); }

.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.6rem;
  font-size: 0.82rem;
  color: var(--bone-dim);
  flex-wrap: wrap;
  gap: 0.8rem;
}
.footer-tagline { color: var(--gold-light); letter-spacing: 0.03em; }

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

.hero-title .line {
  opacity: 0;
  transform: translateY(100%);
}
.hero-title.is-visible .line {
  animation: lineUp 1.1s var(--ease) forwards;
}
.hero-title.is-visible .line:nth-child(2) { animation-delay: 0.12s; }
@keyframes lineUp {
  to { opacity: 1; transform: translateY(0); }
}

/* stagger children inside standard/projects grids */
.standard-item[data-reveal]:nth-child(1) { transition-delay: 0.05s; }
.standard-item[data-reveal]:nth-child(2) { transition-delay: 0.12s; }
.standard-item[data-reveal]:nth-child(3) { transition-delay: 0.19s; }
.standard-item[data-reveal]:nth-child(4) { transition-delay: 0.26s; }
.project-card[data-reveal]:nth-child(1) { transition-delay: 0.05s; }
.project-card[data-reveal]:nth-child(2) { transition-delay: 0.15s; }
.project-card[data-reveal]:nth-child(3) { transition-delay: 0.25s; }
.plan-card[data-reveal]:nth-child(1) { transition-delay: 0.04s; }
.plan-card[data-reveal]:nth-child(2) { transition-delay: 0.09s; }
.plan-card[data-reveal]:nth-child(3) { transition-delay: 0.14s; }
.plan-card[data-reveal]:nth-child(4) { transition-delay: 0.19s; }
.plan-card[data-reveal]:nth-child(5) { transition-delay: 0.24s; }
.plan-card[data-reveal]:nth-child(6) { transition-delay: 0.29s; }
.plan-card[data-reveal]:nth-child(7) { transition-delay: 0.34s; }
.plan-card[data-reveal]:nth-child(8) { transition-delay: 0.39s; }

/* ==========================================================================
   PROJECT SUB-PAGE (izvorska.html) — hero, agent strip, plan viewer, lightbox
   ========================================================================== */

/* ---------- Project hero ---------- */
.project-hero {
  position: relative;
  height: 88vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.project-hero-media { position: absolute; inset: 0; z-index: -2; }
.project-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  /* Clean sunset render — keep its natural light, just tame it slightly so it
     reads as a backdrop rather than competing with the overlay type */
  filter: brightness(0.86) contrast(1.04) saturate(1.05);
  transform: scale(1.02);
}
.project-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(10,10,10,0.15) 0%, rgba(10,10,10,0.4) 62%, rgba(10,10,10,0.58) 100%),
    linear-gradient(180deg, rgba(10,10,10,0.5) 0%, rgba(10,10,10,0.05) 30%, rgba(10,10,10,0.3) 62%, rgba(10,10,10,0.5) 100%);
}
.project-hero-content {
  position: relative;
  padding-top: 9rem;
  padding-bottom: clamp(3.5rem, 8vh, 6rem);
}
.project-hero-content h1 {
  font-size: clamp(2.5rem, 6.6vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.1rem;
}
.project-hero-subtitle {
  font-size: clamp(0.92rem, 1.3vw, 1.08rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--gold-light);
  max-width: 46ch;
}

/* ---------- Agent contact strip ---------- */
.agent-strip {
  background: var(--black);
  border-top: 1px solid var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
}
.agent-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1.6rem, 5vw, 4rem);
  padding-block: 1.5rem;
}
.agent-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  transition: opacity 0.35s ease;
}
.agent-contact:hover { opacity: 0.8; }
.agent-icon {
  width: 20px;
  height: 20px;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.4s var(--ease);
}
.agent-contact:hover .agent-icon { transform: rotate(-8deg) scale(1.1); }
.agent-text { display: flex; flex-direction: column; gap: 0.15rem; line-height: 1.2; }
.agent-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.agent-name { font-size: 0.94rem; font-weight: 600; color: var(--bone); }
.agent-phone {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.agent-divider { width: 1px; height: 36px; background: var(--line); }

/* ---------- Plan viewer ---------- */
.plans { padding-block: clamp(5rem, 12vh, 9rem); background: var(--black); }

.plan-filters {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.2rem, 4vw, 2.6rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}
.plan-filter {
  position: relative;
  padding-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
  transition: color 0.35s ease;
}
.plan-filter::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.plan-filter:hover { color: var(--bone); }
.plan-filter.is-active { color: var(--gold); }
.plan-filter.is-active::after { transform: scaleX(1); }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.plan-card { display: flex; flex-direction: column; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.plan-card.is-hiding { opacity: 0 !important; transform: scale(0.95) translateY(8px); pointer-events: none; }
.plan-card.is-hidden { display: none; }

.plan-card-trigger {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.414 / 1;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bone);
  border: 1px solid transparent;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.plan-card-trigger img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.7s var(--ease);
}
.plan-card-trigger:hover {
  border-color: var(--gold-dark);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}
.plan-card-trigger:hover img { transform: scale(1.035); }

.plan-zoom-hint {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(244, 239, 228, 0.18);
  color: var(--gold);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.plan-zoom-hint svg { width: 18px; height: 18px; }
.plan-card-trigger:hover .plan-zoom-hint,
.plan-card-trigger:focus-visible .plan-zoom-hint { opacity: 1; transform: translateY(0); }

.plan-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 1.1rem;
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.plan-floor {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.plan-type { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; color: var(--bone); }

.plan-empty {
  text-align: center;
  color: var(--bone-dim);
  padding-block: 3rem;
  font-size: 0.95rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(8, 8, 7, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  max-width: 100%;
  max-height: 100%;
  transform: scale(0.96);
  transition: transform 0.5s var(--ease);
}
.lightbox.is-open .lightbox-figure { transform: scale(1); }
.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--bone);
  border-radius: 2px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
}
.lightbox-figure figcaption {
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: var(--bone-dim);
  text-align: center;
}

.lightbox-close, .lightbox-nav {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.55);
  color: var(--bone);
  transition: border-color 0.35s ease, color 0.35s ease, transform 0.35s var(--ease);
}
.lightbox-close {
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  width: 48px;
  height: 48px;
  z-index: 2;
}
.lightbox-close svg { width: 20px; height: 20px; }
.lightbox-close:hover { border-color: var(--gold); color: var(--gold); transform: rotate(90deg); }

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  cursor: pointer;
}
.lightbox-nav:hover { border-color: var(--gold); color: var(--gold); }
.lightbox-nav svg { width: 22px; height: 22px; }
.lightbox-prev { left: clamp(0.8rem, 3vw, 2.5rem); }
.lightbox-next { right: clamp(0.8rem, 3vw, 2.5rem); }

/* ---------- Location / map (izvorska.html, niska-residence.html) ---------- */
.location { padding-block: clamp(5rem, 12vh, 9rem); background: var(--black-soft); }
.location-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.location-info { display: flex; flex-direction: column; align-items: flex-start; gap: 2rem; }
.location-address {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--bone);
}
.location-map {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--line);
}
.location-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.5) contrast(1.05) brightness(0.92);
  transition: filter 0.6s ease;
}
.location-map:hover iframe,
.location-map:focus-within iframe { filter: grayscale(0) contrast(1) brightness(1); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .standard-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .plan-grid { grid-template-columns: 1fr 1fr; }
  .location-grid { grid-template-columns: 1fr; }
  .location-map { aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-content { padding-top: 7rem; }
  .hero-scroll { display: none; }
  .project-media { aspect-ratio: 4/3; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }

  .project-hero-content { padding-top: 7rem; }
  .agent-strip-inner { flex-direction: column; gap: 1.3rem; padding-block: 1.8rem; }
  .agent-divider { width: 100%; height: 1px; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-filters { gap: 1.1rem 1.6rem; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-nav svg { width: 18px; height: 18px; }
  .lightbox-prev { left: 0.6rem; }
  .lightbox-next { right: 0.6rem; }
  .lightbox-close { width: 40px; height: 40px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero-title .line { opacity: 1; transform: none; }
}
