/* ============================================================
   15020 Applewood Court — Luxury Property Website
   Color: Warm neutrals, cream, charcoal, gold/bronze
   Fonts: Playfair Display + Raleway
   ============================================================ */

:root {
  --cream: #FAF7F2;
  --cream-dark: #F0EBE3;
  --charcoal: #2C2C2C;
  --charcoal-light: #5A5A5A;
  --gold: #B8944F;
  --gold-light: #D4B876;
  --gold-dark: #96783E;
  --white: #FFFFFF;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-lg: rgba(0, 0, 0, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Raleway', sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
h1, h2, h3, h4, h5 { font-family: 'Playfair Display', serif; font-weight: 700; line-height: 1.2; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.section-padding { padding: 80px 0; }

/* ---- Utility ---- */
.section-label {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 20px;
  color: var(--charcoal);
}

.section-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 40px;
  border: none;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.site-nav.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 20px var(--shadow);
  padding: 10px 0;
  backdrop-filter: blur(10px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.site-nav.scrolled .nav-brand { color: var(--charcoal); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover::after { width: 100%; }
.site-nav.scrolled .nav-links a { color: var(--charcoal-light); }
.site-nav.scrolled .nav-links a:hover { color: var(--gold); }

.nav-cta {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white) !important;
  background: var(--gold);
  padding: 10px 22px;
  border-radius: 2px;
  transition: background var(--transition) !important;
}

.nav-cta:hover { background: var(--gold-dark); }
.nav-cta::after { display: none !important; }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}

.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white);
  transition: background var(--transition), transform var(--transition);
}

.site-nav.scrolled .nav-toggle span { background: var(--charcoal); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 1100px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  transform: scale(1.02);
  transition: transform 8s ease-out;
}

.hero.loaded .hero-image { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.7) 0%,
    rgba(0,0,0,0.3) 40%,
    rgba(0,0,0,0.15) 70%,
    rgba(0,0,0,0.25) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px 80px;
  animation: heroFadeIn 1.2s ease-out 0.3s both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-label {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.hero-address {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

.hero-city {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.15em;
  margin-bottom: 24px;
}

.hero-price {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 32px;
}

.hero-cta {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
  padding: 14px 36px;
  transition: all var(--transition);
}

.hero-cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.hero-scroll {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: scrollBounce 2s infinite;
}

.hero-scroll svg { width: 24px; height: 24px; stroke: rgba(255,255,255,0.5); }

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--white);
  box-shadow: 0 4px 30px var(--shadow);
  margin-top: -48px;
  position: relative;
  z-index: 10;
  border-radius: 4px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.stat-item {
  text-align: center;
  padding: 28px 12px;
  border-right: 1px solid var(--cream-dark);
}

.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--charcoal);
  display: block;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
  display: block;
}

/* ============================================================
   DESCRIPTION
   ============================================================ */
.description-section { background: var(--cream); }

.description-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 20px;
}

.description-grid.reverse { direction: rtl; }
.description-grid.reverse > * { direction: ltr; }

.description-text {
  font-size: 1.05rem;
  color: var(--charcoal-light);
  line-height: 1.9;
}

.description-text p + p { margin-top: 20px; }

.description-image {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 60px var(--shadow-lg);
}

.description-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 3/4;
}

/* ============================================================
   BACKYARD FEATURE
   ============================================================ */
.backyard-feature { background: var(--white); }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-section { background: var(--cream); }

.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.gallery-filter {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  border: 1.5px solid var(--cream-dark);
  color: var(--charcoal-light);
  padding: 10px 20px;
  cursor: pointer;
  transition: all var(--transition);
  border-radius: 2px;
}

.gallery-filter:hover,
.gallery-filter.active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  border-radius: 2px;
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background var(--transition);
  pointer-events: none;
}

.gallery-item:hover::after { background: rgba(0,0,0,0.1); }

.gallery-item.hidden { display: none; }

.gallery-item.featured {
  grid-column: span 2;
  grid-row: span 2;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none; border: none;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition);
  z-index: 10;
  line-height: 1;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 50%;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.lightbox-nav:hover { background: rgba(255,255,255,0.25); }

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features-section { background: var(--charcoal); color: var(--white); }

.features-section .section-label { color: var(--gold-light); }
.features-section .section-heading { color: var(--white); }
.features-section .section-divider { background: var(--gold-light); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 32px 28px;
  transition: all var(--transition);
}

.feature-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-4px);
}

.feature-icon {
  width: 36px; height: 36px;
  margin-bottom: 16px;
  color: var(--gold-light);
}

.feature-icon svg { width: 100%; height: 100%; }

.feature-card h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--white);
}

.feature-card p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}

/* ============================================================
   FLOOR PLANS
   ============================================================ */
.floorplans-section { background: var(--cream); }

.floorplans-intro {
  font-size: 1.05rem;
  color: var(--charcoal-light);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.floorplans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.floorplan-item {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.floorplan-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow-lg);
}

.floorplan-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* Center the last (odd) item if there's an odd count */
.floorplans-grid .floorplan-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .floorplans-grid { grid-template-columns: 1fr; }
  .floorplans-grid .floorplan-item:last-child:nth-child(odd) { max-width: 100%; }
}

/* ============================================================
   NEIGHBORHOOD / SCHOOLS
   ============================================================ */
.neighborhood-section { background: var(--white); }

.neighborhood-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.neighborhood-text {
  font-size: 1.05rem;
  color: var(--charcoal-light);
  line-height: 1.9;
}

.neighborhood-text p + p { margin-top: 16px; }

.school-list { list-style: none; margin-top: 16px; }

.school-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--cream-dark);
}

.school-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--charcoal);
}

.school-type {
  font-size: 0.8rem;
  color: var(--charcoal-light);
  margin-top: 2px;
}

.school-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rating-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.rating-high { background: #E8F5E9; color: #2E7D32; }
.rating-mid  { background: #FFF8E1; color: #F57F17; }

.rating-label {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--charcoal-light);
  font-weight: 600;
}

/* ============================================================
   MAP
   ============================================================ */
.map-section { background: var(--cream); }

.map-wrapper {
  margin-top: 20px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 40px var(--shadow);
  height: 450px;
}

.map-wrapper iframe {
  width: 100%; height: 100%;
  border: 0;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section {
  background: var(--charcoal);
  color: var(--white);
  text-align: center;
}

.contact-section .section-label { color: var(--gold-light); }
.contact-section .section-heading { color: var(--white); }
.contact-section .section-divider { background: var(--gold-light); }

.contact-tagline {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.contact-phone {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 12px;
  display: block;
}

.contact-phone a { color: var(--gold-light); }
.contact-phone a:hover { color: var(--white); }

.contact-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 36px;
}

.contact-btn {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--charcoal);
  background: var(--gold-light);
  padding: 16px 44px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.contact-btn:hover {
  background: var(--gold);
  color: var(--charcoal);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 148, 79, 0.3);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #1a1a1a;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 40px 24px;
  font-size: 0.78rem;
  line-height: 1.8;
}

.footer-disclaimer { max-width: 800px; margin: 0 auto; }

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    padding: 24px;
    gap: 16px;
    box-shadow: 0 10px 30px var(--shadow);
  }

  .nav-links.open a { color: var(--charcoal) !important; }

  .hero { min-height: 500px; }
  .hero-content { padding-bottom: 60px; }

  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-item:nth-child(3) { border-right: none; }
  .stat-item:nth-child(n+4) { border-top: 1px solid var(--cream-dark); }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.featured { grid-column: span 2; grid-row: span 1; }

  .description-grid,
  .description-grid.reverse,
  .neighborhood-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    direction: ltr;
  }

  .features-grid { grid-template-columns: 1fr; }

  .map-wrapper { height: 300px; }

  .section-padding { padding: 60px 0; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-right: none !important; }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--cream-dark) !important; }
  .stat-item:nth-child(n+3) { border-top: 1px solid var(--cream-dark); }

  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 4px; }
  .gallery-item.featured { grid-column: span 2; }

  .gallery-filters { gap: 6px; }
  .gallery-filter { padding: 8px 14px; font-size: 0.68rem; }

  .lightbox-nav { width: 40px; height: 40px; font-size: 1rem; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }

  .hero-address { font-size: clamp(1.8rem, 8vw, 2.6rem); }
}
