/* ==========================================================
   Greeley Court — leasing site styles
   Edit the tokens below to re-theme the whole site.
   ========================================================== */
:root {
  --bg: #faf8f5;
  --bg-alt: #f1ede6;
  --ink: #1f2421;
  --ink-soft: #5a615c;
  --line: #e2ddd4;
  --accent: #3f5e4d;        /* deep sage */
  --accent-ink: #ffffff;
  --accent-soft: #c9d6cc;
  --warm: #b8734e;          /* terracotta highlight */
  --dark: #1d2a23;
  --dark-ink: #eef1ee;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 10vw, 120px);
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { top: 12px; }

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

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.95em 1.6em;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 0.95rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--dark); border-color: var(--dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: currentColor; color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--ink); }
.btn-small { padding: 0.7em 1.2em; font-size: 0.88rem; }
.btn-block { width: 100%; }

.text-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent-soft);
}
.text-link:hover { border-color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 50;
  color: #fff;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.site-header.is-solid,
.site-header.nav-open {
  background: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font: 600 0.8rem/1 var(--font-body);
  letter-spacing: 0.06em;
}
.brand-name { font-family: var(--font-display); font-size: 1.35rem; }

.site-nav { display: flex; align-items: center; gap: 1.8rem; }
.site-nav a:not(.btn) {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.9;
}
.site-nav a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.site-header:not(.is-solid):not(.nav-open) .site-nav .btn { background: #fff; color: var(--ink); border-color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  margin-right: -10px;
  color: inherit;
  cursor: pointer;
}
.nav-toggle .bar {
  display: block;
  width: 24px; height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-open .nav-toggle .bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle .bar:nth-child(3) { opacity: 0; }
.nav-open .nav-toggle .bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav .btn { margin-top: 18px; }
  .nav-open .site-nav { opacity: 1; transform: none; visibility: visible; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 860px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  background-color: var(--dark);
  background-image:
    linear-gradient(90deg, rgba(20, 28, 24, 0.6) 0%, rgba(20, 28, 24, 0.25) 55%, rgba(20, 28, 24, 0) 100%),
    linear-gradient(180deg, rgba(20, 28, 24, 0.4) 0%, rgba(20, 28, 24, 0.2) 40%, rgba(20, 28, 24, 0.8) 100%),
    var(--img, linear-gradient(135deg, #4d6b5a 0%, #2b3d33 55%, #1d2a23 100%));
  background-size: cover;
  background-position: center;
}
.hero-content {
  position: relative;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: clamp(56px, 9vw, 110px);
}
.hero .eyebrow { color: rgba(255, 255, 255, 0.85); }
.hero .lede {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Facts strip ---------- */
.facts { background: var(--accent); color: var(--accent-ink); }
.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.fact {
  padding: 26px 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.fact:first-child { border-left: 0; padding-left: 0; }
.fact-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 4px;
}
.fact-value { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.3; }
@media (max-width: 800px) {
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .fact { padding: 20px 0 20px 16px; }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.18); }
}

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: var(--dark-ink); }
.section-dark .eyebrow { color: var(--accent-soft); }
.section-head { max-width: 44rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section-sub { color: inherit; opacity: 0.85; font-size: 1.05rem; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}
.split-reverse .split-text { order: 2; }
.split-text p { color: var(--ink-soft); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-text { order: 0; }
}

/* ---------- Photos (placeholder until an image loads) ---------- */
.photo {
  position: relative;
  display: block;
  width: 100%;
  min-height: 240px;
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--accent-soft);
  background-image: var(--img, linear-gradient(135deg, #d6dfd8 0%, #b4c4b8 100%));
  background-size: cover;
  background-position: center;
  font: inherit;
  color: inherit;
}
.photo-tall { aspect-ratio: 4 / 5; }
.photo span {
  position: absolute;
  left: 14px; bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
}
.photo.has-img { cursor: zoom-in; }
.photo.has-img:hover { filter: brightness(1.04); }
button.photo:not(.has-img) { cursor: default; }

/* ---------- Amenities ---------- */
.amenities-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 860px) { .amenities-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .amenities-grid { grid-template-columns: 1fr; } }
.amenity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 500;
  transition: border-color 0.2s, transform 0.2s;
}
.amenity:hover { border-color: var(--accent-soft); transform: translateY(-2px); }
.amenity svg {
  flex: none;
  width: 40px; height: 40px;
  padding: 8px;
  border-radius: 50%;
  background: var(--accent-soft);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.community {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.community figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 2;
}
.community img { width: 100%; height: 100%; object-fit: cover; }
.community figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 48px 22px 20px;
  background: linear-gradient(180deg, transparent, rgba(20, 28, 24, 0.8));
  color: #fff;
  font-size: 0.92rem;
}
.community figcaption strong {
  display: block;
  font: 400 1.35rem/1.2 var(--font-display);
  margin-bottom: 2px;
}
@media (max-width: 640px) { .community { grid-template-columns: 1fr; } }

/* ---------- Pets ---------- */
.pets-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
  padding: clamp(32px, 5vw, 56px);
  background: var(--accent-soft);
  border-radius: calc(var(--radius) * 1.5);
}
.pets { padding: calc(var(--section-y) * 0.6) 0; }
.pets-inner p { color: var(--ink-soft); margin: 0; max-width: 34rem; }
.pet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pet-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.3rem;
}
.check {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  font: 600 0.9rem/1 var(--font-body);
}
@media (max-width: 760px) { .pets-inner { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 14px;
}
.g-item {
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--accent-soft);
  cursor: zoom-in;
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.g-item:hover img { transform: scale(1.04); }
.g-feature { grid-column: span 2; grid-row: span 2; }
.g-right { grid-column: 3 / span 2; }
@media (max-width: 860px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .g-right { grid-column: span 2; }
}
@media (max-width: 520px) {
  .gallery { grid-auto-rows: 140px; gap: 10px; }
  .g-feature { grid-row: span 2; }
}

/* ---------- Neighborhood ---------- */
.hood-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.hood-list li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}
.hood-list strong { display: block; color: var(--ink); font-weight: 600; }
.map {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 860px) { .map { aspect-ratio: 4 / 3; } }

/* ---------- Eligibility ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, 0.15); }
.income-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.income-table caption {
  text-align: left;
  padding: 16px 20px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.income-table th,
.income-table td { padding: 16px 20px; text-align: left; }
.income-table thead th { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; font-weight: 600; }
.income-table tbody th { font-weight: 500; }
.income-table td { font-family: var(--font-display); font-size: 1.15rem; }
.income-table tbody tr { border-top: 1px solid rgba(255, 255, 255, 0.15); }
.fine-print { font-size: 0.88rem; opacity: 0.7; margin-top: 20px; }

.elig-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Contact ---------- */

.contact-list { margin: 2rem 0 0; display: grid; gap: 18px; }
.contact-list div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.contact-list dt { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); padding-top: 3px; }
.contact-list dd { margin: 0; }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-ink); padding: 64px 0 28px; font-size: 0.92rem; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.site-footer p { opacity: 0.75; margin-top: 16px; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; align-content: start; }
.footer-nav a { text-decoration: none; opacity: 0.85; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.eho { display: flex; gap: 14px; align-items: flex-start; }
.eho svg { flex: none; width: 44px; height: 44px; }
.eho p { margin: 0; }
.footer-bottom { padding-top: 24px; }
.footer-bottom p { margin: 0; opacity: 0.6; font-size: 0.85rem; }
.site-footer p a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 20, 17, 0.92);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-height: 82vh; margin: 0 auto; border-radius: var(--radius-sm); }
.lightbox figcaption { color: rgba(255, 255, 255, 0.8); font-size: 0.92rem; margin-top: 12px; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav:hover, .lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
@media (max-width: 600px) {
  .lightbox-nav { top: auto; bottom: 20px; transform: none; }
}
.lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
