:root {
  --navy: #061d2a;
  --navy-2: #0b3043;
  --ink: #122236;
  --orange: #f5a623;
  --orange-2: #d98300;
  --cream: #fbf8f2;
  --line: #d9e0e4;
  --muted: #617080;
  --white: #fff;
  --shadow: 0 18px 50px rgba(2, 17, 28, .18);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  height: 78px;
  padding: 0 clamp(20px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.brand { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.35rem; white-space: nowrap; }
.brand img { width: 43px; height: 43px; border-radius: 10px; object-fit: contain; }
nav { display: flex; align-items: center; gap: clamp(14px, 2.3vw, 34px); }
nav a { color: #d8e0e6; text-decoration: none; font-weight: 650; font-size: .95rem; }
nav a:hover, nav a.active { color: var(--orange); }
.preview-pill { padding: 9px 13px; border: 1px solid #5b7481; border-radius: 999px; color: #e8eef1; font-size: .88rem; font-weight: 700; white-space: nowrap; }

.hero { position: relative; min-height: 520px; padding: 58px clamp(20px, 6vw, 90px) 68px; color: #fff; background: url("assets/home-background.jpg") center 56% / cover no-repeat; isolation: isolate; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3,22,34,.96) 0%, rgba(3,22,34,.82) 46%, rgba(3,22,34,.35) 100%), linear-gradient(0deg, rgba(3,22,34,.4), transparent 50%); }
.hero-content { max-width: 1180px; margin: 0 auto; }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .14em; color: #ffd17f; font-weight: 800; font-size: .78rem; }
.eyebrow.dark { color: var(--orange-2); }
h1 { margin: 0; max-width: 750px; font-size: clamp(3rem, 6vw, 6rem); line-height: .96; letter-spacing: -.055em; }
h1 span { color: var(--orange); }
.hero-copy { max-width: 650px; margin: 24px 0 28px; color: #e8eef1; font-size: 1.08rem; line-height: 1.65; }
.mode-switch { display: flex; gap: 8px; margin-bottom: 12px; }
.mode { min-height: 44px; padding: 0 20px; border: 1px solid rgba(255,255,255,.3); border-radius: 12px 12px 0 0; color: #fff; background: rgba(6,29,42,.72); font-weight: 800; cursor: pointer; }
.mode.active { color: var(--navy); background: var(--orange); border-color: var(--orange); }

.search-panel { display: grid; grid-template-columns: minmax(230px, 1fr) auto; align-items: stretch; background: #fff; border-radius: 18px; padding: 8px; box-shadow: var(--shadow); color: var(--ink); max-width: 900px; }
.field { min-width: 0; padding: 12px 15px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.field > span:first-child { font-size: .78rem; font-weight: 800; color: #536171; }
.field input, .field select { width: 100%; min-height: 30px; border: 0; outline: 0; background: transparent; color: var(--ink); font-weight: 700; }
.input-row { display: flex; align-items: center; gap: 8px; }
.input-row svg { width: 20px; height: 20px; fill: var(--orange-2); flex: none; }
.search-button { border: 0; min-width: 140px; border-radius: 13px; background: var(--orange); color: var(--navy); font-weight: 850; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.search-button:hover { background: #ffb942; }
.search-button:disabled { opacity: .65; cursor: wait; }
.search-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.form-message { grid-column: 1 / -1; margin: 0; padding: 0 10px; max-height: 0; overflow: hidden; color: #b3261e; font-size: .88rem; }
.form-message.visible { padding-top: 8px; max-height: 48px; }

.results-section { max-width: 1220px; margin: 0 auto; padding: 62px 20px 90px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.045em; }
.section-heading > p { margin: 0 0 6px; color: var(--muted); }
.results-note { margin: -8px 0 25px; color: #4c5d6a; line-height: 1.5; }
.property-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.property-card { overflow: hidden; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(4, 31, 44, .08); }
.property-image { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #173e51, #071d29); position: relative; overflow: hidden; }
.property-image img { width: 100%; height: 100%; object-fit: cover; }
.property-type { position: absolute; left: 14px; top: 14px; padding: 7px 10px; border-radius: 999px; background: rgba(5,27,39,.88); color: #fff; font-size: .75rem; font-weight: 800; }
.property-body { padding: 18px; }
.property-body h3 { margin: 0 0 6px; font-size: 1.25rem; }
.property-location { margin: 0; color: var(--muted); min-height: 24px; }
.property-meta { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.property-meta span { color: var(--muted); font-size: .9rem; }
.property-meta button { min-height: 42px; padding: 0 15px; border: 1px solid var(--navy); border-radius: 11px; color: #fff; background: var(--navy); font-weight: 800; cursor: pointer; }
.empty-state { text-align: center; padding: 55px 20px; border: 1px dashed #aebbc3; border-radius: 18px; background: #fff; }
.empty-state span { font-size: 2.8rem; color: var(--orange-2); }
.empty-state h3 { margin: 8px 0; font-size: 1.35rem; }
.empty-state p { color: var(--muted); margin: 0; }

footer { background: var(--navy); color: #b8c6ce; padding: 36px clamp(20px, 6vw, 90px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { color: #fff; }
footer p { margin: 0; }
footer > div { display: flex; gap: 24px; }
footer a { color: inherit; text-decoration: none; }

dialog { max-width: 600px; max-height: min(90vh, 850px); width: calc(100% - 36px); border: 0; border-radius: 18px; padding: 28px; color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(2,18,28,.7); }
dialog h2 { font-size: 1.7rem; margin-bottom: 6px; }
dialog p { color: #425361; line-height: 1.6; }
.dialog-image { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; margin-bottom: 20px; }
.dialog-image[hidden] { display: none; }
.dialog-kicker { margin: 0; color: var(--orange-2); font-size: .88rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.dialog-location { margin-top: 0; }
.dialog-notice { padding: 14px 16px; background: #f3f6f7; border-left: 3px solid var(--orange-2); border-radius: 6px; font-weight: 650; }
.close-dialog { position: absolute; right: 16px; top: 12px; border: 0; background: transparent; font-size: 1.8rem; cursor: pointer; }
.dialog-action { min-height: 46px; width: 100%; border: 0; border-radius: 12px; background: var(--orange); color: var(--navy); font-weight: 850; cursor: pointer; }
:is(a, button, input):focus-visible { outline: 3px solid #1186bd; outline-offset: 3px; }

@media (max-width: 1050px) {
  .hero { background-position: 62% center; }
}

@media (max-width: 760px) {
  .site-header { height: 68px; padding: 0 16px; }
  .brand { font-size: 1.15rem; }
  .brand img { width: 38px; height: 38px; }
  nav a { display: none; }
  .preview-pill { font-size: .78rem; padding: 8px 10px; }
  .hero { min-height: auto; padding: 46px 16px 58px; }
  .hero-shade { background: linear-gradient(180deg, rgba(3,22,34,.88), rgba(3,22,34,.67) 52%, rgba(3,22,34,.9)); }
  h1 { font-size: clamp(2.75rem, 14vw, 4.3rem); }
  .hero-copy { font-size: 1rem; line-height: 1.5; }
  .mode-switch { overflow-x: auto; }
  .mode { flex: 1; min-width: 135px; }
  .search-panel { grid-template-columns: 1fr; padding: 8px; border-radius: 16px; }
  .field { border-right: 0; border-bottom: 1px solid var(--line); min-height: 76px; }
  .search-button { min-height: 54px; margin-top: 4px; }
  .results-section { padding-top: 48px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 10px; }
  .property-grid { grid-template-columns: 1fr; }
  footer { display: block; }
  footer p { margin: 18px 0; }
}

@media (max-width: 390px) {
  .brand { font-size: 1rem; gap: 7px; }
  .brand img { width: 33px; height: 33px; }
  .hero { padding-left: 12px; padding-right: 12px; }
  .property-meta { align-items: flex-start; flex-direction: column; }
  .property-meta button { width: 100%; }
}

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