/* ==========================================================================
   Onlivin — Phase 2 design layer
   Loaded AFTER assets/css/style.css. Override layer only: no HTML changes
   required for header, nav, buttons, or footer restyles.
   Brand: #ffffff bg · #1f1c18 text · #6e655d muted · #E84C88 accent ·
   #c83a73 accent-dark · rgba(31,28,24,.12) hairline · 20px radius ·
   1140px max width. Typeface: "Plus Jakarta Sans" (no new fonts).
   Mobile-first: base styles target small screens; enhancements at
   min-width 768px and 1024px.
   ========================================================================== */

:root {
  /* ---- spacing tokens (4px base, mobile-first) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* ---- typography scale (clamp keeps it fluid mobile -> desktop) ---- */
  --fs-xs: 0.75rem;    /* 12px — badges, captions */
  --fs-sm: 0.875rem;   /* 14px — nav, card meta, buttons (small) */
  --fs-base: 1rem;     /* 16px — body (mobile-first) */
  --fs-lg: 1.125rem;   /* 18px — lead */
  --fs-xl: 1.375rem;   /* 22px — card titles */
  --fs-2xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);   /* section titles */
  --fs-3xl: clamp(2.25rem, 1.8rem + 2.2vw, 3rem);      /* page titles */
  --fs-display: clamp(2.5rem, 1.9rem + 4.5vw, 4.25rem); /* hero display */

  /* ---- shadows ---- */
  --shadow-sm: 0 2px 8px rgba(31, 28, 24, 0.06);
  --shadow-md: 0 12px 32px rgba(31, 28, 24, 0.1);
  --shadow-lg: 0 24px 56px rgba(31, 28, 24, 0.14);

  /* ---- motion ---- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.18s;
  --dur-med: 0.35s;
}

/* --------------------------------------------------------------------------
   (a) Refined typography + spacing
   -------------------------------------------------------------------------- */

body {
  font-size: var(--fs-base);
  line-height: 1.65;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 600;
  text-wrap: balance;
  margin-bottom: var(--space-3);
}

h1 { font-size: var(--fs-display); line-height: 1.05; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }

.lead {
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--muted);
  max-width: 56ch;
}

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: var(--space-3);
}

p { margin-bottom: var(--space-4); }

.section {
  padding: var(--space-16) var(--space-5);
}

.section--tight {
  padding: var(--space-10) var(--space-5);
}

.section__header {
  max-width: var(--max);
  margin: 0 auto var(--space-8);
}

.section__header p {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   (b) Header / nav — existing classes (.site-header, .nav, .nav-menu,
       .nav-toggle, .btn, .btn--primary, .btn--ghost)
   -------------------------------------------------------------------------- */

.site-header {
  min-height: 76px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(31, 28, 24, 0.06);
}

.nav {
  padding: 12px var(--space-5);
  gap: var(--space-4);
}

.site-logo img {
  height: 52px;
  width: auto;
}

.nav-menu {
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.nav-menu a:not(.btn) {
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  color: var(--text);
}

.nav-menu a:not(.btn):hover {
  transform: none;
  box-shadow: none;
  background: rgba(31, 28, 24, 0.06);
}

.site-header .nav-menu a.active:not(.btn) {
  color: var(--accent-dark);
  background: rgba(232, 76, 136, 0.1);
  border: 1px solid rgba(232, 76, 136, 0.35);
}

/* nav CTAs: compact pill buttons */
.nav-menu .btn {
  font-size: var(--fs-sm);
  padding: 10px var(--space-4);
}

.nav-toggle {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.nav-toggle__bar {
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(4) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
  .site-header {
    min-height: 72px;
  }

  .nav {
    padding: 10px var(--space-4);
  }

  .site-logo img {
    height: 44px;
  }

  /* mobile menu: full-width sheet under the header (keeps .open contract) */
  .nav-menu {
    display: none;
    position: absolute;
    left: var(--space-4);
    right: var(--space-4);
    top: calc(100% + 8px);
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    min-width: 0;
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a:not(.btn),
  .site-header .nav-menu a.active:not(.btn) {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-size: var(--fs-base);
  }

  .nav-menu .btn {
    width: 100%;
    justify-content: center;
    margin-top: var(--space-2);
  }

  .nav-toggle {
    display: inline-flex;
  }
}

/* --------------------------------------------------------------------------
   (e) Buttons — refined on the existing .btn system
   -------------------------------------------------------------------------- */

.btn {
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: 0.012em;
  padding: 14px 28px;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn--primary {
  box-shadow: 0 8px 20px rgba(232, 76, 136, 0.28);
}

.btn--primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 12px 28px rgba(232, 76, 136, 0.36);
}

.btn--ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--text);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.btn--small {
  padding: 10px 18px;
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   (c) Footer — existing classes (.site-footer, .footer-container, .footer-col)
   -------------------------------------------------------------------------- */

.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: var(--space-16) var(--space-5) var(--space-6);
}

.footer-container {
  grid-template-columns: 1fr;
  gap: var(--space-8);
  max-width: var(--max);
}

.footer-col h4 {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.footer-col a {
  font-size: var(--fs-sm);
  color: var(--text);
  margin-bottom: var(--space-3);
  width: fit-content;
  border-radius: 4px;
}

.footer-col a:hover {
  opacity: 1;
  color: var(--accent-dark);
}

footer .footer-container .footer-col p {
  font-size: var(--fs-sm);
  color: var(--muted);
  opacity: 1;
  max-width: 28ch;
}

.social-icons {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  transition:
    transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast),
    border-color var(--dur-fast),
    color var(--dur-fast);
}

.social-icons a:hover {
  transform: translateY(-2px);
  background: rgba(232, 76, 136, 0.08);
  border-color: rgba(232, 76, 136, 0.4);
  color: var(--accent-dark);
}

.footer-bottom {
  max-width: var(--max);
  margin: var(--space-10) auto 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: left;
  opacity: 1;
}

@media (min-width: 640px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .footer-container {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-10);
  }
}

/* --------------------------------------------------------------------------
   (d) Badge system
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge--available {
  background: #e9f7ef;
  color: #1d7a3f;
  border-color: #bfe6cf;
}

.badge--scarce {
  background: #fdf3e3;
  color: #a05c0a;
  border-color: #f3dcae;
}

.badge--soldout {
  background: #f1efec;
  color: var(--muted);
  border-color: var(--line);
}

.badge--unknown {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border-color: var(--line);
}

/* badges that float on card imagery */
.badge--overlay {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 3;
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   (e) Cards & sections — micro-interactions
   -------------------------------------------------------------------------- */

.card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  transition:
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(31, 28, 24, 0.2);
}

/* homepage property cards */
.home-property-card {
  transition:
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.home-property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.home-property-card__body {
  padding: var(--space-5);
}

.home-property-card__body h3 {
  margin-bottom: var(--space-1);
}

.home-property-card__body > p {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.home-property-card .btn {
  width: 100%;
}

.home-property-card .btn:hover {
  transform: translateY(-2px);
}

/* homepage card images get an aspect box (prevents layout shift) */
.listing-image-rotator {
  aspect-ratio: 4 / 3;
  height: auto;
}

.home-property-card img {
  height: 100%;
}

/* pricing cards */
.pricing-card {
  border-radius: var(--radius);
  transition:
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pricing-card .btn {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Editorial homepage layout helpers (used by index.html Phase 2 structure)
   -------------------------------------------------------------------------- */

.hero__content {
  gap: var(--space-5);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.trust-row span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  flex: none;
}

/* property grid: 1 / 2 / 3 columns */
.p2-property-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  max-width: var(--max);
  margin: 0 auto;
}

@media (min-width: 640px) {
  .p2-property-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .p2-property-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

/* trust section */
.p2-trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  max-width: var(--max);
  margin: 0 auto;
}

.p2-trust-card {
  padding: var(--space-8) var(--space-6);
}

.p2-trust-card h3 {
  margin-bottom: var(--space-3);
}

.p2-trust-card p,
.p2-trust-card li {
  color: var(--muted);
  font-size: var(--fs-base);
}

.p2-trust-card ol,
.p2-trust-card ul {
  padding-left: var(--space-5);
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

.p2-trust-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(232, 76, 136, 0.1);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: var(--fs-lg);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .p2-trust-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

/* final CTA band */
.p2-cta {
  max-width: var(--max);
  margin: 0 auto;
}

.p2-cta__band {
  background: #1f1c18;
  color: #fff;
  border-radius: var(--radius);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.p2-cta__band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 280px at 50% -10%, rgba(232, 76, 136, 0.35), transparent 70%);
  pointer-events: none;
}

.p2-cta__band h2 {
  color: #fff;
  margin-bottom: var(--space-3);
  position: relative;
}

.p2-cta__band .lead {
  color: rgba(255, 255, 255, 0.72);
  margin: 0 auto var(--space-6);
  position: relative;
}

.p2-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  position: relative;
}

.p2-cta__band .btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.p2-cta__band .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

@media (min-width: 768px) {
  .p2-cta__band {
    padding: var(--space-16) var(--space-10);
  }
}

/* book-a-tour page: reveal-ready copy blocks */
.book-tour-hero .book-tour-expect {
  margin-top: var(--space-4);
}

/* --------------------------------------------------------------------------
   (f) Scroll-reveal contract — added by assets/js/phase2-motion.js
   (adds `js` on <html> + `is-visible` via IntersectionObserver).
   Content is never hidden when JS is absent.
   -------------------------------------------------------------------------- */

html.js .reveal{opacity:0;transform:translateY(18px);transition:opacity .6s ease,transform .6s ease}
html.js .reveal.is-visible{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){html.js .reveal{opacity:1;transform:none;transition:none} *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* --------------------------------------------------------------------------
   (g) Visible focus styles
   -------------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.nav-menu a:focus-visible {
  border-radius: 999px;
}

.skip-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   (h) Responsive refinements (mobile-first; enhancements above)
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
  body {
    font-size: 1.0625rem;
  }

  .site-logo img {
    height: 58px;
  }

  .nav {
    padding: 14px 28px;
  }
}

@media (min-width: 1024px) {
  body {
    font-size: 1.125rem;
  }

  .section {
    padding: var(--space-20) var(--space-6);
  }

  .section--tight {
    padding: var(--space-12) var(--space-6);
  }

  .hero {
    padding: 96px var(--space-6) 48px;
  }
}

/* --------------------------------------------------------------------------
   (i) Aspect-ratio utilities — prevents layout shift for imagery
   -------------------------------------------------------------------------- */

.ar {
  display: block;
  overflow: hidden;
  position: relative;
  background: #f3f0ec;
}

.ar > img,
.ar > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ar-16x9 { aspect-ratio: 16 / 9; }
.ar-4x3  { aspect-ratio: 4 / 3; }
.ar-3x2  { aspect-ratio: 3 / 2; }
.ar-1x1  { aspect-ratio: 1 / 1; }

/* --------------------------------------------------------------------------
   Breadcrumb (review fix): inline trail with separators
   -------------------------------------------------------------------------- */
.p2-breadcrumb { margin: 0 0 var(--space-5); font-size: var(--fs-sm); }
.p2-breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-2); list-style: none; margin: 0; padding: 0;
}
.p2-breadcrumb li { display: flex; align-items: center; gap: var(--space-2); color: #6e655d; }
.p2-breadcrumb li + li::before { content: "\203A"; color: #E84C88; font-weight: 700; }
.p2-breadcrumb a { color: #6e655d; text-decoration: none; }
.p2-breadcrumb a:hover { color: #c83a73; text-decoration: underline; }
.p2-breadcrumb [aria-current="page"] { color: #1f1c18; font-weight: 600; }

/* --------------------------------------------------------------------------
   (e) Phase 4 — AppFolio availability
   -------------------------------------------------------------------------- */
.availability-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.availability-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid rgba(31, 28, 24, 0.12);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.availability-unit {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.availability-date {
  font-size: var(--fs-xs);
  color: var(--muted);
  white-space: nowrap;
}
.availability-note {
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--muted);
}
