:root {
  --ink: #f4efe6;
  --ink-soft: rgba(244, 239, 230, 0.72);
  --muted: rgba(244, 239, 230, 0.55);
  --bg: #0c1014;
  --bg-elevated: #141a20;
  --bg-soft: #1a222b;
  --line: rgba(212, 175, 95, 0.18);
  --gold: #d4af5f;
  --gold-bright: #e8c878;
  --gold-deep: #a8843a;
  --copper: #b85c38;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --shell: min(1120px, calc(100% - clamp(1.5rem, 4vw, 3.5rem) * 2));
  --header-h: 4.25rem;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(212, 175, 95, 0.12), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

::selection {
  background: rgba(212, 175, 95, 0.35);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  background: var(--gold);
  color: #111;
  border-radius: 999px;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(12, 16, 20, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(12, 16, 20, 0.94);
  border-bottom-color: rgba(212, 175, 95, 0.16);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.nav {
  display: none;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
}

.nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--gold-bright);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.header-actions .btn-ghost {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.55rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #14110c;
  box-shadow: 0 10px 28px rgba(168, 132, 58, 0.28);
}

.btn-gold:hover {
  filter: brightness(1.05);
}

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

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

.btn-line {
  background: transparent;
  border-color: rgba(244, 239, 230, 0.28);
  color: var(--ink);
}

.btn-line:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-lg {
  min-height: 3rem;
  padding-inline: 1.45rem;
  font-size: 1rem;
}

.nav-toggle {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: var(--ink);
}

.mobile-nav {
  display: grid;
  gap: 0.15rem;
  padding: 0.4rem clamp(1.5rem, 4vw, 3.5rem) 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(12, 16, 20, 0.96);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 0.75rem 0.2rem;
  color: var(--ink-soft);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav a:last-child {
  border-bottom: 0;
}

/* Hero — one composition */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(88dvh, 760px);
  display: grid;
  align-items: center;
  overflow: clip;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.03);
  animation: hero-drift 22s ease-in-out infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(8, 10, 12, 0.22) 0%,
      rgba(8, 10, 12, 0.55) 42%,
      rgba(8, 10, 12, 0.88) 100%
    ),
    linear-gradient(180deg, rgba(8, 10, 12, 0.45) 0%, rgba(8, 10, 12, 0.2) 35%, rgba(8, 10, 12, 0.78) 100%);
}

.hero-shell {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(4.5rem, 10vh, 6.5rem) clamp(3rem, 8vh, 5rem);
}

.hero-content {
  max-width: min(34rem, 100%);
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-brand {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--gold-bright);
  font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-size: clamp(2.15rem, 1.5rem + 2.6vw, 3.4rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero-lead {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem);
  max-width: 32ch;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.65rem;
}

/* Sections */
.search-section,
.listings,
.services,
.contact {
  padding-block: clamp(3.25rem, 6vw, 5rem);
}

.section-head {
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
  max-width: 38rem;
}

.section-head-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
}

.section-head h2 {
  font-size: clamp(1.55rem, 1.25rem + 1.1vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
}

.section-head p {
  margin-top: 0.45rem;
  color: var(--muted);
}

.text-link {
  color: var(--gold-bright);
  font-weight: 700;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Search */
.search-form {
  padding: clamp(1rem, 2.2vw, 1.35rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--bg-elevated);
  box-shadow: var(--shadow);
}

.intent {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0.35rem;
  padding: 0.28rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.intent-option {
  cursor: pointer;
}

.intent-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.intent-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  min-height: 2.2rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.intent-option input:checked + span {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #14110c;
}

.search-grid {
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field > span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 95, 0.55);
  background: rgba(0, 0, 0, 0.4);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(244, 239, 230, 0.35);
}

.search-submit {
  width: 100%;
  min-height: 2.85rem;
  margin-top: 0.2rem;
}

/* Listings */
.listing-grid {
  display: grid;
  gap: 1.15rem;
}

.listing {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--bg-elevated);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.listing:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 95, 0.28);
}

.listing-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

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

.listing:hover .listing-media img {
  transform: scale(1.05);
}

.badge {
  position: absolute;
  inset-block-start: 0.85rem;
  inset-inline-start: 0.85rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(12, 16, 20, 0.82);
  border: 1px solid rgba(212, 175, 95, 0.45);
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-rent {
  border-color: rgba(31, 111, 106, 0.55);
  color: #8fd4cf;
}

.listing-body {
  padding: 1rem 1.05rem 1.15rem;
}

.listing-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.listing-body h3 button {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: inherit;
  cursor: pointer;
}

.listing-body h3 button:hover {
  color: var(--gold-bright);
}

.meta {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.price {
  margin-top: 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-bright);
}

.price span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Services */
.services {
  background:
    linear-gradient(180deg, transparent, rgba(212, 175, 95, 0.04) 40%, transparent),
    var(--bg);
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.service-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding-block: 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.service-index {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.04em;
  padding-top: 0.2rem;
}

.service-list h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.service-list p {
  color: var(--ink-soft);
  max-width: 46ch;
}

/* Contact */
.contact-panel {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(212, 175, 95, 0.14), transparent 55%),
    var(--bg-soft);
}

.contact-copy h2 {
  font-size: clamp(1.55rem, 1.25rem + 1.1vw, 2.1rem);
  font-weight: 800;
}

.contact-copy p {
  margin-top: 0.55rem;
  color: var(--ink-soft);
  max-width: 36ch;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.field-full {
  grid-column: 1 / -1;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-block: 1.5rem 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-footer img {
  width: 2.4rem;
  height: 2.4rem;
}

.footer-note {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Motion */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.2%, -0.8%, 0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-media img,
  .hero-content,
  .reveal,
  .listing,
  .listing-media img,
  .btn {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* Breakpoints */
@media (min-width: 640px) {
  .header-actions .btn-ghost {
    display: inline-flex;
  }

  .search-grid {
    grid-template-columns: 1fr 1fr;
  }

  .search-submit {
    grid-column: 1 / -1;
  }

  .contact-form {
    grid-template-columns: 1fr 1fr;
  }

  .contact-form .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }

  .hero {
    min-height: min(86dvh, 780px);
  }

  .search-grid {
    grid-template-columns: 1fr 1.2fr 1fr auto;
    align-items: end;
  }

  .search-submit {
    grid-column: auto;
    width: auto;
    padding-inline: 1.4rem;
  }

  .listing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-list li {
    grid-template-columns: 3.5rem 1fr;
    gap: 1.5rem;
    padding-block: 1.55rem;
  }

  .contact-panel {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }
}

@media (min-width: 1280px) {
  :root {
    --shell: min(1180px, calc(100% - 5rem));
  }
}

/* Property modal */
body.modal-open {
  overflow: hidden;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 8, 0.72);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(92dvh, 900px);
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 95, 0.22);
  background: #12181f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  outline: none;
}

.modal-close {
  position: absolute;
  inset-block-start: 0.7rem;
  inset-inline-end: 0.7rem;
  z-index: 3;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(8, 10, 12, 0.7);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.modal-gallery {
  position: relative;
  background: #0a0d10;
}

.modal-main-photo {
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.modal-main-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-thumbs {
  display: flex;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem 0.85rem;
  overflow-x: auto;
}

.modal-thumbs button {
  flex: 0 0 auto;
  width: 4.4rem;
  height: 3.1rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
  opacity: 0.72;
}

.modal-thumbs button[aria-current="true"] {
  border-color: var(--gold);
  opacity: 1;
}

.modal-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-gallery-nav {
  position: absolute;
  inset-inline: 0.65rem;
  top: calc(50% - 2.2rem);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.modal-gallery-nav button {
  pointer-events: auto;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 10, 12, 0.7);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.modal-gallery-nav button:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.modal-body {
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.modal-badge {
  display: inline-flex;
  margin-bottom: 0.55rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 95, 0.45);
  color: var(--gold-bright);
  font-size: 0.8rem;
  font-weight: 700;
}

.modal-badge.is-rent {
  border-color: rgba(31, 111, 106, 0.55);
  color: #8fd4cf;
}

.modal-body h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.65rem);
  font-weight: 800;
  line-height: 1.3;
}

.modal-price {
  margin-top: 0.55rem;
  color: var(--gold-bright);
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-facts {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.modal-facts li {
  display: grid;
  gap: 0.1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-facts span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.modal-facts strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.modal-desc {
  margin-top: 1rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

.modal-actions {
  margin-top: 1.25rem;
}

@media (min-width: 860px) {
  .modal-dialog {
    grid-template-columns: 1.15fr 0.95fr;
    max-height: min(88dvh, 720px);
    overflow: hidden;
  }

  .modal-gallery {
    min-height: 100%;
  }

  .modal-main-photo {
    aspect-ratio: auto;
    height: calc(100% - 4.4rem);
  }

  .modal-body {
    overflow: auto;
  }

  .modal-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
