/* ============================================================
   DXB Property Rental - stylesheet
   Palette, type and spacing tokens live here at the top.
   ============================================================ */

:root {
  --ink: #14171c;
  --slate: #56606e;
  --paper: #ffffff;
  --mist: #f4f6f8;
  --line: #e3e8ed;
  --accent: #1b3a5c;
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;

  --max: 1120px;
  --gap: 24px;
  --radius: 4px;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 14px;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  z-index: 40;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--serif);
  font-size: 24px;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.header-link {
  font-size: 15px;
  color: var(--slate);
  text-decoration: none;
}

.header-link:hover {
  color: var(--ink);
}

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

.hero {
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 16ch;
}

.hero p {
  margin: 0;
  max-width: 52ch;
  color: var(--slate);
  font-size: 19px;
}

/* ---------- property cards (home) ---------- */

.listings {
  padding: 64px 0 88px;
}

.listing {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.listing:last-child {
  border-bottom: 0;
}

.listing-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--mist);
}

.listing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.listing:hover .listing-photo img {
  transform: scale(1.03);
}

.listing-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.12;
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}

.listing-location {
  color: var(--slate);
  margin: 0 0 20px;
  font-size: 16px;
}

.listing-body p.blurb {
  margin: 0 0 24px;
  color: var(--slate);
}

/* ---------- facts row ---------- */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts li {
  flex: 1 1 auto;
  min-width: 88px;
  padding: 14px 18px 14px 0;
}

.facts .fact-num {
  display: block;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.facts .fact-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 2px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.btn-dark {
  background: var(--accent);
  color: #fff;
}

.btn-dark:hover {
  background: #12293f;
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #05341a;
  width: 100%;
}

.btn-whatsapp:hover {
  background: var(--whatsapp-dark);
  color: #fff;
}

.btn svg {
  width: 19px;
  height: 19px;
  flex: none;
}

/* ---------- property page ---------- */

.crumb {
  padding: 28px 0 0;
  font-size: 15px;
}

.crumb a {
  color: var(--slate);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--ink);
}

.property-head {
  padding: 24px 0 32px;
}

.property-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.property-head .property-location {
  color: var(--slate);
  margin: 0;
}

/* gallery */

.gallery {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 10px;
  margin-bottom: 64px;
}

.gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--mist);
  position: relative;
}

.gallery figure:first-child {
  grid-row: span 2;
}

/* only the first five tiles are laid out; the rest feed the lightbox */
.gallery figure:nth-of-type(n + 6) {
  display: none;
}

.view-all {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(20, 23, 28, 0.12);
}

.view-all:hover {
  background: #fff;
  border-color: var(--ink);
}

.gallery button.shot {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--mist);
  cursor: pointer;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.gallery button.shot:hover img {
  opacity: 0.9;
}

/* placeholder shown when a photo file is missing */
.needs-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 120px;
  background: var(--mist);
  color: var(--slate);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* two-column body */

.property-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 72px;
  padding-bottom: 96px;
  align-items: start;
}

.section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.property-main > .section:first-child {
  border-top: 0;
  padding-top: 0;
}

.section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
}

.section p {
  margin: 0 0 16px;
  color: var(--slate);
}

.section p:last-child {
  margin-bottom: 0;
}

.bedrooms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bedrooms li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.bedrooms strong {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
}

.bedrooms span {
  color: var(--slate);
  font-size: 15px;
}

.amenities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.amenities li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--slate);
}

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rules li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.rules li span:last-child {
  color: var(--slate);
  text-align: right;
}

/* booking rail */

.rail {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.rail .price {
  font-family: var(--serif);
  font-size: 34px;
  letter-spacing: -0.02em;
}

.rail .price small {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--slate);
  letter-spacing: 0;
}

.rail .min-stay {
  color: var(--slate);
  font-size: 15px;
  margin: 6px 0 22px;
}

.rail-facts {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  border-top: 1px solid var(--line);
}

.rail-facts li {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.rail-facts li span:last-child {
  color: var(--slate);
}

.rail-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--slate);
  text-align: center;
}

/* mobile sticky booking bar */

.mobile-book {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  align-items: center;
  gap: 14px;
  z-index: 50;
}

.mobile-book .price {
  font-family: var(--serif);
  font-size: 22px;
  white-space: nowrap;
}

.mobile-book .btn {
  flex: 1;
  padding: 12px 16px;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--mist);
  padding: 56px 0;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 8px;
}

.site-footer p {
  margin: 0;
  color: var(--slate);
  max-width: 40ch;
  font-size: 15px;
}

.site-footer .btn {
  width: auto;
}

.colophon {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--slate);
}

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

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 18, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-count {
  position: absolute;
  bottom: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* ---------- focus + motion ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.lightbox button:focus-visible {
  outline-color: #fff;
}

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

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .property-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .rail {
    display: none;
  }

  .mobile-book {
    display: flex;
  }

  body.has-mobile-bar {
    padding-bottom: 84px;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 140px;
  }

  .gallery figure:first-child {
    grid-column: span 2;
  }

  .gallery figure:nth-of-type(n + 4) {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .listing {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 0;
  }

  .hero {
    padding: 56px 0 44px;
  }

  .listings {
    padding: 32px 0 56px;
  }

  .property-grid {
    padding-bottom: 48px;
  }

  .section {
    padding: 32px 0;
  }

  .section h2 {
    font-size: 26px;
  }

  .rules li {
    flex-direction: column;
    gap: 2px;
  }

  .rules li span:last-child {
    text-align: left;
  }
}
