/* CONNEXO property gallery. Design tokens taken from connexoglobal.com */

:root {
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #e6e6e3;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --dark: #22201c;
  --gold: #d3b36a;
  --gold-deep: #b5924c;
  --wa: #25d366;
  --wa-dark: #1da851;

  --max: 1440px;
  --pad: 24px;
  --header-h: 64px;
  --nav-h: 52px;

  --sans: "Assistant", -apple-system, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (min-width: 768px) {
  :root { --pad: 40px; --header-h: 80px; }
}
@media (min-width: 1200px) {
  :root { --pad: 64px; }
}

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

/* Anchors have to clear both the fixed header and the sticky section nav. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--nav-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-weight: 300;
  letter-spacing: 0.025em;
  line-height: 1.15;
  margin: 0;
}

.gold { color: var(--gold); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow.light { color: rgba(255, 255, 255, 0.75); }

.rule {
  width: 56px;
  height: 2px;
  background: var(--gold);
  margin-block: 18px 0;
}

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

.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(34, 32, 28, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo img { height: 40px; width: auto; }
@media (min-width: 768px) { .logo img { height: 52px; } }

.lang-toggle {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  border: 1px solid var(--gold-deep);
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-toggle:hover { background: var(--gold); color: var(--dark); }

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

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(17, 17, 17, 0.55), rgba(17, 17, 17, 0.72));
}

.hero-content {
  position: relative;
  color: #fff;
  padding-block: calc(var(--header-h) + 48px) 64px;
  max-width: 900px;
}

.hero-logo {
  height: 72px;
  width: auto;
  margin-bottom: 28px;
}
@media (min-width: 768px) { .hero-logo { height: 96px; } }

.hero-content h1 {
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1.08;
  margin-block: 20px 18px;
}

.hero-content p {
  font-size: clamp(15px, 1.6vw, 18px);
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-gold, .btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--gold-deep);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 28px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-gold:hover { background: var(--gold); color: var(--dark); }

.btn-wa {
  background: var(--wa);
  border-color: var(--wa);
  color: #fff;
}
.btn-wa:hover { background: var(--wa-dark); border-color: var(--wa-dark); }
.btn-wa svg { width: 18px; height: 18px; flex: none; }

/* Follows the reader down the page, the same pattern as connexoglobal.com. */
.wa-float {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-end: 22px;
  z-index: 70;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wa);
  color: #fff;
  box-shadow: 0 6px 20px rgba(17, 17, 17, 0.28);
  transition: background 0.2s, transform 0.2s;
}
.wa-float:hover { background: var(--wa-dark); transform: translateY(-2px); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- sections ---------- */

.section { padding-block: clamp(40px, 6vw, 72px); }

/* ---------- section nav ---------- */

/* Sits directly under the page title and sticks below the header while you scroll. */
.section-nav {
  position: sticky;
  inset-block-start: var(--header-h);
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.section-nav-inner {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: var(--nav-h);
  overflow-x: auto;
  scrollbar-width: none;
}
.section-nav-inner::-webkit-scrollbar { display: none; }

.section-nav a {
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding-inline: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-block-end: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.section-nav a:hover { color: var(--ink); }
.section-nav a.is-active { color: var(--ink); border-block-end-color: var(--gold); }

/* ---------- property head ---------- */

.prop-head h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 300;
  margin-block: 0;
}

.prop-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 18px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 300;
  letter-spacing: 0.02em;
}
.prop-price .per {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.chip.gold { border-color: var(--gold-deep); color: var(--gold-deep); background: #fff; }
.chip.dark { background: var(--dark); border-color: var(--dark); color: #fff; }

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

/* Borders live on the cells (and the container drops its own top/start edge) so the
   dividers stay correct however many columns the grid wraps to. */
.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--line);
  border-block-start: 0;
  border-inline-start: 0;
  background: var(--surface);
  margin-top: 36px;
}

.spec {
  padding: 20px 22px;
  border-block-start: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}

.spec .label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.spec .value {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-top: 6px;
}
.spec .value small { font-size: 13px; color: var(--muted); }
.spec.wide { grid-column: 1 / -1; }
.spec.wide .value { font-size: 17px; }

/* ---------- editorial blocks ---------- */

.block { margin-top: 56px; }

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 28px;
}
.block-head h3 { font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; }
.block-head .count { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.lede {
  font-size: clamp(16px, 1.7vw, 19px);
  font-weight: 300;
  color: #333;
  max-width: 68ch;
  margin: 0;
}

/* Cell borders rather than a gap, so a part-filled last row leaves clean white space
   instead of a stripe of the gap colour. */
.list-grid {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-block-start: 0;
  border-inline-start: 0;
}
.list-grid li {
  border-block-start: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
  padding: 14px 18px;
  font-size: 14.5px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.list-grid li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  background: var(--gold);
}

.source-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 14px;
}

/* ---------- gallery grid ---------- */

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

.cell {
  position: relative;
  padding: 0;
  border: 0;
  background: #eceae6;
  cursor: zoom-in;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s;
}
.cell:hover img { transform: scale(1.04); }

.cell .zoom {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-end: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: rgba(34, 32, 28, 0.8);
  color: var(--gold);
  font-size: 17px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s;
}
.cell:hover .zoom, .cell:focus-visible .zoom { opacity: 1; }

.cell .cap {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(17, 17, 17, 0.8), transparent);
  color: #fff;
  font-size: 12.5px;
  text-align: start;
  opacity: 0;
  transition: opacity 0.2s;
}
.cell:hover .cap, .cell:focus-visible .cap { opacity: 1; }

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

.plan-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
@media (min-width: 900px) {
  .plan-layout { grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); }
}

.plan-figure {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
  cursor: zoom-in;
}
.plan-figure img { margin-inline: auto; }
.plan-figure figcaption {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.plan-table { border: 1px solid var(--line); background: var(--surface); margin-bottom: 20px; }
.plan-table h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.plan-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.plan-table th {
  text-align: start;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}
.plan-table td { padding: 11px 18px; border-bottom: 1px solid var(--line); }
.plan-table tr:last-child td { border-bottom: 0; }
.plan-table td:last-child { text-align: end; white-space: nowrap; direction: ltr; }
html[dir="rtl"] .plan-table td:last-child { text-align: start; }

/* ---------- location ---------- */

.map-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 900px) {
  .map-layout { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); }
}

.map-frame {
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 16 / 10;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.map-side { border: 1px solid var(--line); background: var(--surface); padding: 24px; }
.map-side .label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.map-side .addr { font-size: 18px; font-weight: 300; margin: 8px 0 20px; }
.map-side .coords { font-size: 12.5px; color: var(--muted); direction: ltr; text-align: start; }
.map-link {
  display: inline-block;
  margin-top: 18px;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* ---------- footer ---------- */

.site-footer { background: var(--dark); color: rgba(255, 255, 255, 0.7); margin-top: 40px; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  padding-block: 64px 48px;
}

.footer-logo { height: 64px; width: auto; margin-bottom: 20px; }
.footer-about { font-size: 14px; max-width: 44ch; margin: 0; }

.footer-head {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 16px;
}
.footer-contact { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.footer-contact li { margin-bottom: 10px; }
.footer-contact a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: 20px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 11, 10, 0.985);
  display: grid;
  place-items: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }

.lb-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(1400px, 100%);
  max-height: 100%;
}
.lb-stage { display: grid; place-items: center; min-height: 0; }
.lb-stage img { max-height: 82vh; width: auto; object-fit: contain; background: #fff; }

.lb-meta { text-align: center; color: rgba(255, 255, 255, 0.75); }
.lb-caption { margin: 0; font-size: 14px; }
.lb-counter {
  margin: 4px 0 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
  direction: ltr;
}

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 1;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { inset-block-start: 18px; inset-inline-end: 22px; font-size: 38px; }
.lb-prev, .lb-next { inset-block-start: 50%; transform: translateY(-50%); font-size: 54px; padding: 0 16px; }
.lb-prev { inset-inline-start: 8px; }
.lb-next { inset-inline-end: 8px; }
/* The arrows are directional glyphs: keep "previous" pointing back in both scripts. */
html[dir="rtl"] .lb-prev { transform: translateY(-50%) scaleX(-1); }
html[dir="rtl"] .lb-next { transform: translateY(-50%) scaleX(-1); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
