:root {
  --bg: #fbf7ee;
  --paper: #ffffff;
  --sand: #f3ecdc;
  --sand-deep: #e9dfc7;
  --feature: #eaf2ee;
  --ink: #3c4a63;
  --heading: #29344a;
  --navy: #445170;
  --navy-strong: #333f57;
  --teal: #7fb0a2;
  --teal-deep: #3f7b6b;
  --clay: #c56b3d;
  --clay-soft: #e2925f;
  --line: rgba(41, 52, 74, 0.13);
  --shadow: rgba(41, 52, 74, 0.10);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161b26;
    --paper: #1e2532;
    --sand: #1b212d;
    --sand-deep: #262d3b;
    --feature: #1f2c2a;
    --ink: #d9dde6;
    --heading: #f1f3f7;
    --navy: #9db3d6;
    --navy-strong: #b9cae6;
    --teal: #8fbdb2;
    --teal-deep: #a7d2c7;
    --clay: #e2996d;
    --clay-soft: #eab08a;
    --line: rgba(217, 221, 230, 0.14);
    --shadow: rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg: #161b26;
  --paper: #1e2532;
  --sand: #1b212d;
  --sand-deep: #262d3b;
  --feature: #1f2c2a;
  --ink: #d9dde6;
  --heading: #f1f3f7;
  --navy: #9db3d6;
  --navy-strong: #b9cae6;
  --teal: #8fbdb2;
  --teal-deep: #a7d2c7;
  --clay: #e2996d;
  --clay-soft: #eab08a;
  --line: rgba(217, 221, 230, 0.14);
  --shadow: rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  color: var(--heading);
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 24px;
}

.eyebrow {
  font-family: "Work Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

/* ---------- Nav ---------- */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.brand { display: flex; align-items: center; }
.brand img, .footer-brand img { height: clamp(60px, 9vw, 84px); width: auto; }
.footer-brand img { height: 46px; }

/* Theme-aware logo swap: the logo art is a fixed color, so swap the
   asset itself rather than relying on a background token to carry contrast. */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

nav.links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 500;
  font-size: 0.95rem;
}

nav.links a {
  text-decoration: none;
  color: var(--ink);
  opacity: 0.85;
  padding-block: 4px;
  border-bottom: 2px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
nav.links a:hover { opacity: 1; border-color: var(--teal); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { box-shadow: 0 10px 22px var(--shadow); }

.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy-strong);
}
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- Wave divider ---------- */
.wave-divider { display: block; width: 100%; height: auto; }
.wave-paper path { fill: var(--paper); }
.wave-sand path { fill: var(--sand); }
.wave-bg path { fill: var(--bg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--bg);
  overflow: hidden;
  padding-block: 60px 40px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.8rem);
  line-height: 1.08;
}

.hero .lede {
  margin-top: 22px;
  font-size: 1.16rem;
  max-width: 56ch;
  color: var(--ink);
  opacity: 0.9;
}

.hero .cta-row {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
section { padding-block: 76px; }
.section-head {
  max-width: 62ch;
  margin-bottom: 44px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-top: 10px;
}
.section-head p { margin-top: 14px; font-size: 1.04rem; opacity: 0.88; }

.section-paper { background: var(--paper); }
.section-sand { background: var(--sand); }

/* ---------- Listing bits shared between home teaser + detail page ---------- */
.sample-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  background: var(--clay);
  padding: 5px 13px;
  border-radius: 999px;
}
.listing-loc {
  font-size: 0.98rem;
  font-weight: 500;
  opacity: 0.8;
}
.listing-avail {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--teal-deep);
  margin-top: 4px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-deep); flex-shrink: 0; }
.listing-note {
  font-size: 0.86rem;
  opacity: 0.65;
  font-style: italic;
  margin-top: 2px;
}

/* ---------- Listing teaser card (homepage) ---------- */
.listing-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.listing-teaser:hover { transform: translateY(-3px); box-shadow: 0 16px 30px var(--shadow); }
.listing-teaser-media { position: relative; min-height: 280px; background: var(--sand-deep); }
.listing-teaser-media img { width: 100%; height: 100%; object-fit: cover; }
.listing-teaser-media .sample-badge { position: absolute; top: 16px; left: 16px; }
.listing-teaser-body { padding: 34px 36px; display: flex; flex-direction: column; gap: 12px; }
.listing-teaser-body h3 { font-size: 1.5rem; }
.listing-teaser-body .desc { font-size: 0.98rem; opacity: 0.85; max-width: 42ch; }
.listing-cta {
  margin-top: auto;
  font-weight: 600;
  color: var(--navy-strong);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notify-card {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--feature);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 32px;
}
.notify-card h3 { font-size: 1.2rem; }
.notify-card p { opacity: 0.82; margin-top: 6px; max-width: 48ch; }

/* ---------- Interest panel + shared form styles ---------- */
.interest-panel {
  background: var(--feature);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 32px;
}
.interest-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.interest-row h3 { font-size: 1.2rem; }
.interest-row > div:first-child { max-width: 34ch; }
.interest-row > div:first-child p { margin-top: 6px; opacity: 0.82; }
.interest-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.interest-alt { font-size: 0.87rem; opacity: 0.78; max-width: 32ch; }
.interest-alt a { color: var(--navy-strong); text-decoration: underline; }
.interest-form-wrap {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.site-form { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row-wide { grid-column: 1 / -1; }
.form-row label { font-size: 0.86rem; font-weight: 600; color: var(--heading); }
.form-row .optional { font-weight: 400; opacity: 0.6; }
.form-row input, .form-row textarea {
  font: inherit;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 0.94rem; margin-top: 6px; color: var(--teal-deep); font-weight: 600; }

/* ---------- Residents ---------- */
.resident-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: stretch;
}

.portal-card {
  background: var(--feature);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 22px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.portal-card::before {
  content: "";
  position: absolute;
  inset: -30% -15% auto auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal) 0%, transparent 70%);
  opacity: 0.25;
}
.portal-card h3 { font-size: 1.5rem; position: relative; }
.portal-card p { color: var(--ink); opacity: 0.85; position: relative; max-width: 40ch; }
.portal-card .badge {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--clay);
  padding: 5px 12px;
  border-radius: 999px;
}
.portal-card .btn-primary { position: relative; align-self: flex-start; }

.info-stack { display: flex; flex-direction: column; gap: 20px; }
.info-item {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-item h4 { font-family: "Fraunces", serif; font-size: 1.08rem; font-weight: 600; }
.info-item p { font-size: 0.95rem; opacity: 0.82; }

/* ---------- Amenities ---------- */
.amenity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.amenity-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.amenity {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.amenity .icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--sand);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.amenity .icon svg { width: 22px; height: 22px; stroke: var(--teal-deep); }
.amenity h4 { font-size: 1.02rem; font-family: "Fraunces", serif; font-weight: 600; }
.amenity p { font-size: 0.92rem; opacity: 0.8; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2px 22px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-family: "Fraunces", serif;
  font-size: 1.03rem;
  font-weight: 600;
  color: var(--heading);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: "Work Sans", sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--teal-deep);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 18px; margin-top: -6px; opacity: 0.85; font-size: 0.96rem; max-width: 62ch; }

/* ---------- Property detail page ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy-strong);
  text-decoration: none;
  margin-bottom: 22px;
}
.back-link:hover { text-decoration: underline; }

.detail-hero {
  background: var(--bg);
  padding-block: 44px 40px;
}
.detail-hero h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  margin-top: 14px;
}
.detail-hero .listing-loc { margin-top: 10px; font-size: 1.05rem; }
.detail-hero .listing-avail { font-size: 0.98rem; }

.detail-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: start;
}

.detail-main { display: flex; flex-direction: column; gap: 48px; }

.gallery-main {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sand-deep);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 12px; margin-top: 12px; }
.gallery-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  width: 96px;
  height: 68px;
  cursor: pointer;
  background: var(--sand-deep);
  flex-shrink: 0;
  transition: border-color 0.15s ease;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--teal); }
.gallery-thumb:hover { border-color: var(--teal-deep); }
.detail-gallery .listing-note { margin-top: 14px; }

.detail-block h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.detail-block p { margin-top: 14px; font-size: 1.02rem; opacity: 0.88; max-width: 68ch; }
.detail-block .amenity-grid { margin-top: 26px; }

.detail-sidebar {
  position: sticky;
  top: 118px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.quick-facts {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
}
.quick-facts dl { display: flex; flex-direction: column; gap: 10px; }
.quick-facts dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; }
.quick-facts dt { opacity: 0.65; }
.quick-facts dd { margin: 0; font-weight: 600; text-align: right; }

.detail-sidebar .interest-row { flex-direction: column; align-items: stretch; }
.detail-sidebar .interest-actions { align-items: stretch; }
.detail-sidebar .interest-actions .btn { width: 100%; justify-content: center; }
.detail-sidebar .interest-alt { max-width: none; }
.detail-sidebar .site-form { max-width: none; }

.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--sand-deep);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-caption { margin-top: 10px; font-size: 0.85rem; opacity: 0.65; }

/* ---------- Footer ---------- */
footer {
  background: var(--sand);
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.footer-inner {
  padding-block: 52px 32px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
}
.footer-brand img { margin-bottom: 14px; }
.footer-brand p { max-width: 34ch; font-size: 0.94rem; opacity: 0.78; }
.footer-col h5 {
  font-family: "Work Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.94rem; }
.footer-col a { text-decoration: none; opacity: 0.88; color: var(--navy-strong); }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 20px;
  font-size: 0.84rem;
  opacity: 0.65;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 860px) {
  nav.links { display: none; }
  .listing-teaser { grid-template-columns: 1fr; }
  .resident-grid { grid-template-columns: 1fr; }
  .amenity-grid { grid-template-columns: repeat(2, 1fr); }
  .amenity-grid.two-col { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .notify-card { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .interest-row { flex-direction: column; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}
