/* Farmingdale Garden Apartments – responsive layout */

:root {
  --green: #5c722b;
  --green-dark: #3d4c1c;
  --green-deep: #2a3513;
  --green-bar: #38461b; /* header & footer: a little lighter than green-deep */
  --cream: #f7f5ee;
  --sand: #ece7d8;
  --brick: #9a4b33;
  --brick-dark: #7d3b27;
  --ink: #2b2b26;
  --muted: #5f5e55;
  --white: #fff;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 10px;
  --shadow: 0 6px 24px rgba(30, 35, 15, .12);
  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --sans: "Alegreya Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(17px, 1.05vw + 11px, 19px);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
  font-variant-numeric: lining-nums; /* even-height digits, so phone numbers read cleanly */
}

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

a { color: var(--green-dark); }
a:hover { color: var(--brick); }
.phone { white-space: nowrap; } /* keep phone numbers on one line */

h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.005em; line-height: 1.15; color: var(--green-deep); margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 960px; } /* inner pages: comfortable reading width, title and text aligned */

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--white); padding: .6em 1em; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green-bar);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.site-header .container { max-width: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }

.brand { color: var(--white); text-decoration: none; font-family: var(--serif); font-size: clamp(1.05rem, 1.2vw + .7rem, 1.35rem); line-height: 1.15; }
.brand:hover { color: var(--white); }
.brand-block { padding-block: .45rem; }
.brand-address { margin: .1rem 0 0; font-size: .8rem; line-height: 1.3; color: rgba(255, 255, 255, .8); }
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 8px;
  color: var(--white);
  font: inherit;
  font-size: .95rem;
  padding: .45em .8em;
  cursor: pointer;
  align-items: center;
  gap: .5em;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: .15rem; }
.site-nav a {
  display: block;
  color: rgba(255, 255, 255, .9);
  text-decoration: none;
  font-size: .92rem;
  padding: .55em .75em;
  border-radius: 6px;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a:focus-visible { background: rgba(255, 255, 255, .12); color: var(--white); }
.site-nav a[aria-current="page"] { background: var(--green); color: var(--white); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  min-height: clamp(280px, 46vh, 480px);
  display: flex;
  align-items: center; /* title block sits mid-banner rather than at the bottom */
  overflow: hidden;
  background: var(--green-deep);
}
.hero > img {
  position: absolute; top: 0; left: 0;
  width: 100%;
  height: 147%; /* taller than the hero, so the bottom ~32% of the photo (old baked-in caption) is always cropped off */
  object-fit: cover;
  object-position: left top; /* keeps the sign in view */
}
.hero::after, .page-hero::after { /* darkens the photo so the white title stays readable */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 26, 8, .3) 0%, rgba(20, 26, 8, .5) 50%, rgba(20, 26, 8, .6) 100%);
}
.hero-badge {
  /* fixed: stays in the upper right, just below the sticky header while scrolling. --header-h is the header's
     actual height (set by site.js; it grows on phones when the name/address wrap), 68px if JS is off.
     z-index below the header's so the mobile menu opens over it. */
  position: fixed; top: calc(var(--header-h, 68px) + clamp(.75rem, 2vw, 1.25rem)); right: var(--gutter); z-index: 40;
  background: rgba(255, 255, 255, .92); color: var(--green-deep); text-decoration: none;
  font-weight: 700; font-size: 1.05rem; padding: .55em 1.2em; border-radius: 999px; box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.hero-badge:hover { background: var(--white); color: var(--brick); }
.hero .container { position: relative; z-index: 1; padding-block: clamp(1.5rem, 4vw, 3rem); }
.hero h1 { color: var(--white); font-size: clamp(2rem, 4.5vw + 1rem, 4rem); margin-bottom: .25em; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.hero .tagline { font-size: clamp(1.05rem, 1.3vw + .55rem, 1.45rem); margin-bottom: 0; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
@media (min-width: 761px) { .hero .tagline { white-space: nowrap; } } /* one line on tablets and up; wraps on phones */

.btn {
  display: inline-block;
  padding: .8em 1.4em;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  background: var(--brick);
  color: var(--white);
  transition: background .15s;
}
.btn:hover { background: var(--brick-dark); color: var(--white); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2rem, 4.5vw, 3.5rem); }
.section-alt { background: var(--white); }

.eyebrow { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.6rem; line-height: 1.2; color: var(--brick); margin-bottom: .2em; }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 3.5vw, 3rem); align-items: center; }
.split-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: left center; border-radius: var(--radius); box-shadow: var(--shadow); }
.lead { font-size: 1.1em; }
.link-row { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; }
.split p { margin-bottom: .8em; }
.split .link-row { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(.75rem, 2vw, 1.5rem); }
.card { background: var(--cream); border-radius: var(--radius); padding: 1.2rem 1.4rem .3rem; line-height: 1.55; border-top: 4px solid var(--green); }
.card h3 { display: flex; align-items: center; gap: .5rem; margin-bottom: .4em; }
.card svg { flex: none; width: 26px; height: 26px; color: var(--green); }

/* ---------- Footer (empty bar) ---------- */
.site-footer { background: var(--green-bar); height: 48px; }
body { display: flex; flex-direction: column; min-height: 100vh; } /* footer stays at the bottom on short pages */
main { flex: 1 0 auto; }

/* ---------- Inner pages ---------- */
.page-hero {
  position: relative;
  min-height: clamp(150px, 19vw, 240px);
  display: flex;
  align-items: center; /* title sits mid-banner, like the homepage */
  overflow: hidden;
  background: var(--green-deep);
  color: var(--white);
}
.page-hero > img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 147%; /* crops the old caption baked into the bottom of these photos */
  object-fit: cover; object-position: center 30%;
}
.page-hero .container { position: relative; z-index: 1; padding-block: clamp(1.1rem, 3vw, 2rem); }
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 3.5vw + 1rem, 3.2rem); margin: 0; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }

/* Long-form content */
.page-layout { padding-block: clamp(1.75rem, 4vw, 3rem); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.4rem, 1.2vw + 1rem, 1.75rem); margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose li::marker { color: var(--green); }
.prose li > ul { margin: .3em 0 0; } /* sub-bullets sit tight under their parent item */
.prose img { border-radius: var(--radius); }
.note { color: var(--muted); font-style: italic; font-size: .85em; }

.check-list { list-style: none; padding-left: 0 !important; }
.check-list li { position: relative; padding-left: 2em; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: .15em;
  display: grid; place-items: center; width: 1.35em; height: 1.35em; border-radius: 50%;
  background: var(--green); color: var(--white); font-size: .8em; font-weight: 700;
}
.two-col-list { columns: 2 260px; column-gap: 2rem; }
.two-col-list li { break-inside: avoid; }
.plain-list { list-style: none; padding-left: 0 !important; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 2.5rem; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.feature { background: var(--white); border-radius: var(--radius); padding: 1.15rem 1.3rem .3rem; border-top: 4px solid var(--green); box-shadow: 0 2px 10px rgba(30, 35, 15, .06); }
.feature h2, .feature h3 { margin-top: 0; }
.feature p + h3 { margin-top: 1em; } /* second heading inside the same card */
.feature h2 { font-size: 1.35rem; }

.example-list { list-style: none; padding: 0 !important; display: grid; gap: .5rem; }
.example-list li { background: var(--sand); border-radius: 8px; padding: .6em 1em; margin: 0; }

.callout { background: var(--white); border-left: 5px solid var(--brick); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.3rem .1rem; margin: 1.5rem 0; box-shadow: 0 2px 10px rgba(30, 35, 15, .06); font-weight: 500; }
.callout h3 { margin-top: 0; }
.callout-warn { border-left-color: #c58b1c; background: #fdf6e3; }
.callout-doc { border-left-color: var(--green); }

.fine-print { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--sand); padding-top: .8rem; margin-top: 1.75rem; }
.fine-print p { margin-bottom: .5em; }

.wide-img { width: 100%; margin: 1rem 0; }

.plan { margin: 1.25rem 0; background: var(--white); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.plan figcaption { font-family: var(--serif); font-size: 1.3rem; color: var(--green-deep); margin: 0 .3rem .6rem; }
.plan img { width: 100%; border-radius: 6px; }
.plan a { display: block; cursor: zoom-in; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-top: 1.25rem; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; cursor: zoom-in; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0 !important; transition: transform .25s; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.05); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(10, 12, 5, .9); }
.lightbox img { max-width: min(92vw, 1100px); max-height: 82vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); color: var(--white); border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .8); margin: 0; font-size: .9rem; }

/* Inquiry (email) box */
.inquiry-box { background: var(--white); border-radius: var(--radius); padding: clamp(1.1rem, 2.5vw, 1.6rem); box-shadow: var(--shadow); border-top: 4px solid var(--green); margin-top: 1.25rem; }
.inquiry-box h2 { margin-top: 0; }
.inquiry-box .btn { font-size: 1.1em; }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .5rem; }
.inquiry-fallback { margin: .9rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.inquiry-form li { margin-bottom: .75em; }
.inquiry-form li[data-required]::before { content: "➜"; background: #c0392b; }
.inquiry-form li[data-complete="true"]::before { content: "✓"; background: var(--green); }
.send-hint { color: var(--muted); font-size: .9em; margin: 0; flex: 1 1 14rem; }
.btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn[aria-disabled="true"]:hover { background: var(--brick); }
.field { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .75rem; }
.field .note, .field .field-error { flex-basis: 100%; }
.field > label { min-width: 8.5em; } /* same label width so the Name box and dropdowns line up */
.inquiry-form select { min-width: 9em; } /* dropdowns share a width (they start blank) */
.field input[type="text"] { flex: 1 1 15rem; max-width: 26rem; min-width: 0; }
.inquiry-form input, .inquiry-form select, .inquiry-form textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  padding: .35em .6em; border: 1px solid #c9c4b3; border-radius: 6px;
}
.inquiry-form input:focus, .inquiry-form select:focus, .inquiry-form textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.inquiry-form textarea { display: block; width: 100%; margin-top: .4rem; resize: vertical; }
.char-count { font-size: .8em; color: var(--muted); font-variant-numeric: tabular-nums; }
.char-count-block { display: block; text-align: right; margin-top: .2rem; }
.char-count.at-max { color: #c0392b; font-weight: 700; }
.field-error { color: #c0392b; font-size: .85em; margin: .1rem 0 0; }
.inquiry-form [aria-invalid="true"] { border-color: #c0392b; }

/* ---------- Responsive ---------- */
@media (max-width: 1440px) {
  .site-nav a { font-size: .85rem; padding: .5em; }
}

@media (max-width: 1280px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--green-bar);
    border-top: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; gap: 0; }
  .site-nav a { font-size: 1rem; padding: .8em .6em; border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 0; }
  .no-js .site-nav { position: static; display: block; }
}

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .split-media { order: -1; }
}

@media (max-width: 560px) {
  .hero { min-height: min(56vh, 420px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
