/* ============================================================
   Horizont — stambeni projekat, Bijeljina
   ============================================================ */

:root {
  --paper: #f2efe7;
  --paper-deep: #e8e3d8;
  --white: #fffdf8;
  --ink: #17231f;
  --ink-soft: #34443e;
  --sage: #91a08b;
  --lime: #d9ef9f;
  --line: #17231f29;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Arial, Helvetica, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

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

/* Small caps label used for every eyebrow and field label on the page. */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0;
}
.eyebrow--dark { color: var(--ink-soft); }

h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -0.015em; }

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  padding: 18px var(--gutter);
}
.brand-logo { width: 168px; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.investor-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 22px;
  border-right: 1px solid var(--line);
}
.investor-lockup span {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}
.investor-lockup img { width: 92px; }
.header-cta {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
}
.site-header nav {
  display: flex;
  gap: 34px;
  font-family: var(--sans);
  font-size: 0.81rem;
}
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(60px, 11vw, 130px) 0 clamp(40px, 6vw, 70px);
}
/* faint drafting grid + oversized H, echoing an architect's sheet */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.hero::before {
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: linear-gradient(to left, #000 0%, transparent 58%);
  mask-image: linear-gradient(to left, #000 0%, transparent 58%);
  opacity: 0.5;
}
.hero::after {
  content: "H";
  right: -2%;
  bottom: -24%;
  font-family: var(--serif);
  font-size: clamp(340px, 46vw, 620px);
  line-height: 1;
  color: var(--ink);
  opacity: 0.035;
}
.hero__inner { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2.9rem, 8.2vw, 5.6rem);
  line-height: 1.02;
  margin: 22px 0 0;
  max-width: 14ch;
}
.hero__lead {
  margin: 30px 0 0;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 52ch;
}
.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 42px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-width: 240px;
  padding: 20px 26px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.button--dark { background: var(--ink); color: var(--white); }
.button--dark:hover { background: #263b34; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.text-link:hover { border-bottom-color: var(--ink); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(34px, 7vw, 90px);
  margin: clamp(56px, 8vw, 96px) 0 0;
  padding: 0;
}
.hero-stats div { margin: 0; }
.hero-stats dt {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  line-height: 1;
}
.hero-stats dd {
  margin: 12px 0 0;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}

/* ---------------- apartments ---------------- */

.apartments {
  border-top: 1px solid var(--line);
  padding: clamp(56px, 8vw, 104px) 0 clamp(60px, 9vw, 120px);
}
.section-intro h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  line-height: 1.08;
  margin: 20px 0 0;
  max-width: 18ch;
}
.section-intro p {
  margin: 24px 0 0;
  color: var(--ink-soft);
  max-width: 54ch;
}

.filters {
  margin: clamp(40px, 6vw, 68px) 0 0;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
}
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-row > .eyebrow { flex: 0 0 104px; }
.pill {
  font-family: var(--sans);
  font-size: 0.78rem;
  padding: 11px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.pill:hover:not(:disabled):not(.is-active) { border-color: var(--ink); }
.pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pill:disabled {
  color: var(--sage);
  background: transparent;
  cursor: not-allowed;
  text-decoration: line-through;
}

.result-count { margin: 34px 0 22px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px #17231f14; }
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.card__name {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.card__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6d9a5b;
}
.card__status b { font-weight: 700; color: var(--ink); }

.card__plan {
  position: relative;
  margin: 22px;
  aspect-ratio: 4 / 3;
  /* stops the preview ballooning when the grid drops to one column */
  max-height: 300px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card__plan img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.card__badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 9px 14px;
}
.card__soon {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}

.card__body { padding: 0 22px 22px; margin-top: auto; }
.card__figures {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.card__m2 { font-size: clamp(2rem, 3.4vw, 2.6rem); line-height: 1; }
.card__m2 small { font-size: 0.9rem; margin-left: 4px; }
.card__count {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
}
.card__floors {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
}
.card__cta span:last-child { color: var(--sage); }
.card:hover .card__cta span:last-child { color: var(--ink); }

.empty-state {
  grid-column: 1 / -1;
  padding: 70px 0;
  text-align: center;
  color: var(--ink-soft);
}

@media (max-width: 1040px) {
  .site-header nav { display: none; }
}
@media (max-width: 720px) {
  .investor-lockup { display: none; }
  .filter-row > .eyebrow { flex: 0 0 100%; }

  /* Two flats per row on phones. The grid's 320px track minimum would drop
     to a single column here, so the count is pinned and the card's padding
     and type step down to suit the narrower track. */
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  /* Grid items default to min-width:auto, so the nowrap availability line
     ("Dostupno · 2 stana") would hold the track open wider than half a
     360px screen and push the row off-canvas. */
  .card { min-width: 0; }
  /* Sized to stay on one line in a half-width card: wrapping it strands the
     "·" separator at the end of the first line. */
  .card__status { font-size: 0.53rem; letter-spacing: 0.06em; gap: 5px; }
  .card__status::before { width: 5px; height: 5px; }
  .card__name { font-size: 0.6rem; letter-spacing: 0.08em; }
  .card__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 13px;
  }
  .card__plan { margin: 13px; }
  .card__plan img { padding: 6px; }
  .card__badge { font-size: 0.5rem; letter-spacing: 0.08em; padding: 6px 8px; }
  .card__body { padding: 0 13px 14px; }
  .card__figures { flex-wrap: wrap; gap: 2px; }
  .card__m2 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .card__count { font-size: 0.58rem; }
  .card__floors { margin-top: 8px; font-size: 0.82rem; }
  .card__cta { margin-top: 12px; padding-top: 12px; font-size: 0.7rem; }
}


/* ============================================================
   Modal s detaljima stana
   ============================================================ */

.card { border: 1px solid var(--line); font: inherit; text-align: left; cursor: pointer; padding: 0; }

/* `display: flex` below outranks the browser's [hidden] rule, so closing the
   dialog by setting .hidden would otherwise leave it on screen. */
.modal-backdrop[hidden] { display: none; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #17231fb8;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(12px, 3vw, 44px);
  overflow-y: auto;
}
.modal {
  position: relative;
  width: min(1120px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  max-height: calc(100vh - clamp(24px, 6vw, 88px));
  overflow-y: auto;
}
.modal__close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  margin: 10px 10px 0 0;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  line-height: 1;
  background: var(--white);
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink);
}
.modal__close:hover { background: var(--ink); color: var(--white); }
.modal__body { padding: clamp(18px, 3vw, 34px); }

.detail__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
@media (max-width: 900px) { .detail__cols { grid-template-columns: 1fr; } }

/* ---- plan ---- */

.planbox { background: var(--white); border: 1px solid var(--line); }
.planbox__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
}
.planbox__head h3 { font-size: 1.5rem; }
.planbox__head .eyebrow { margin-top: 6px; }
.planbox__zoom {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}
.planbox__zoom:hover { border-bottom-color: var(--ink); }

.planbox__stage { position: relative; background: var(--white); line-height: 0; }
.planbox__img { width: 100%; }
.planbox__overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.planbox__room {
  fill: transparent;
  cursor: pointer;
  transition: fill 130ms ease;
}
.planbox__room:focus { outline: none; }
.planbox__room:hover,
.planbox__room.is-active { fill: #6d8a4f4d; }

.plan-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 12px;
  background: var(--ink);
  color: var(--white);
  line-height: 1.2;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 130ms ease, background 130ms ease, color 130ms ease, transform 130ms ease;
}
.plan-marker b {
  font-family: var(--sans);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.plan-marker i { font-style: normal; font-size: 0.82rem; }
.plan-marker.is-active {
  background: var(--lime);
  color: var(--ink);
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.04);
}

.planbox__readout {
  margin: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- specs ---- */

.infobox { background: var(--white); border: 1px solid var(--line); padding: 24px; }
.infobox__title {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.infobox__area { margin: 10px 0 24px; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; }
.infobox__area small { font-size: 0.9rem; margin-left: 4px; }

.infobox__meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 0 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.infobox__meta dt { margin-bottom: 3px; }
.infobox__meta dd { margin: 0; font-size: 1rem; }

.schedule { width: 100%; border-collapse: collapse; }
.schedule thead th {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 400;
  text-align: left;
  padding-bottom: 10px;
}
.schedule thead th:last-child { text-align: right; }
.schedule tbody tr { cursor: pointer; transition: background 120ms ease; }
.schedule tbody tr.is-active { background: color-mix(in srgb, var(--lime) 52%, transparent); }
.schedule th, .schedule td {
  padding: 10px 6px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
  font-size: 0.94rem;
}
.schedule td { text-align: right; font-variant-numeric: tabular-nums; }
.schedule tbody th { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.schedule tfoot th, .schedule tfoot td { font-weight: 700; border-top: 1px solid var(--ink); }
.schedule tfoot th { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }

.infobox__cta { margin-top: 24px; width: 100%; }

/* ---- renders ---- */

.renders { margin-top: clamp(26px, 4vw, 44px); padding-top: 30px; border-top: 1px solid var(--line); }
.renders__title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 12px 0 0; }
.renders__note { margin: 14px 0 0; color: var(--ink-soft); font-size: 0.92rem; max-width: 62ch; }
.renders__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 26px;
}
.render { margin: 0; background: var(--white); border: 1px solid var(--line); }
.render img { width: 100%; }
.render figcaption { padding: 16px 18px; display: grid; gap: 5px; }
.render figcaption b { font-weight: 400; font-size: 1.02rem; }

/* ============================================================
   Poziv na akciju + podnožje (tamna zona)
   ============================================================ */

:root { --night: #121b24; --night-line: #ffffff1f; --night-muted: #818e88; }

.contact-section {
  background: var(--night);
  color: var(--white);
  display: grid;
  grid-template-columns: 1.66fr 1fr;
  gap: clamp(34px, 6vw, 80px);
  padding: clamp(56px, 9vw, 120px) var(--gutter);
}
@media (max-width: 860px) { .contact-section { grid-template-columns: 1fr; } }

.eyebrow--light { color: var(--lime); }

.contact-section h2 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.96;
  margin-top: 22px;
}

.contact-panel { padding-top: 24px; }
.contact-panel > p { margin: 0; font-size: 0.94rem; color: #b1bab5; }

.contact-details { margin-top: 28px; }
.contact-detail {
  display: grid;
  gap: 6px;
  padding: 17px 0;
  border-top: 1px solid var(--night-line);
  text-decoration: none;
  color: inherit;
}
.contact-detail span {
  font-family: var(--sans);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--night-muted);
}
.contact-detail strong {
  font-weight: 400;
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--lime);
}
a.contact-detail:hover strong { text-decoration: underline; text-underline-offset: 4px; }

.contact-email-list { display: grid; gap: 2px; }
.contact-email-list a {
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--lime);
  text-decoration: none;
}
.contact-email-list a:hover { text-decoration: underline; text-underline-offset: 4px; }

.contact-note {
  margin: 18px 0 0;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--night-muted);
}

footer {
  background: var(--night);
  color: #8e9994;
  border-top: 1px solid var(--night-line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 25px var(--gutter);
}
footer p {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.62rem;
  text-align: center;
}
/* the wordmark ships as black paths, so it needs inverting on the dark bar */
.brand--footer .brand-logo { width: 150px; filter: invert(1); }
.footer-right {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-self: end;
}
.footer-investor { display: flex; align-items: center; gap: 9px; }
.footer-investor span {
  font-family: var(--sans);
  font-size: 0.44rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8e9994;
}
.footer-investor img {
  /* the mark's greys vanish on the dark bar, so it sits on a light chip —
     the same treatment the project uses, rather than recolouring the logo */
  width: 96px;
  background: var(--white);
  padding: 7px 9px;
}
.footer-right > a {
  font-family: var(--sans);
  font-size: 0.62rem;
  color: var(--white);
  text-decoration: none;
}
.footer-right > a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 760px) {
  footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-right { justify-self: center; }
}
