/* ===========================================================
   Glen Rose Real Estate — Design Tokens
   Inspired by Paluxy River limestone strata + Hill Country edge
   =========================================================== */

:root {
  --cream:      #EDE7DA;
  --off-white:  #FAF8F4;
  --slate:      #3B4A52;
  --clay:       #B5602F;
  --clay-dark:  #93491F;
  --pine:       #1F3328;
  --ink:        #21201C;
  --line:       #D9D2C2;

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --maxw: 1180px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--off-white);
  line-height: 1.55;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.8rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Strata divider — the signature element: horizontal banding
   echoing limestone layers exposed along the Paluxy riverbed */
.strata {
  height: 14px;
  background: repeating-linear-gradient(
    to right,
    var(--clay) 0 18%,
    var(--pine) 18% 46%,
    var(--slate) 46% 72%,
    var(--clay) 72% 100%
  );
  opacity: 0.85;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--off-white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--pine);
  white-space: nowrap;
}
.site-logo span { display: block; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--clay); font-family: var(--font-body); font-weight: 600; }

.site-nav { display: flex; gap: 22px; flex-wrap: nowrap; align-items: center; }
.site-nav a,
.nav-dropdown-toggle {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate);
  white-space: nowrap;
}
.site-nav a:hover,
.nav-dropdown-toggle:hover { color: var(--clay); }
.nav-dropdown { position: relative; line-height: 1; }
.nav-dropdown-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-body);
  line-height: 1;
  padding: 8px 2px;
}
.nav-dropdown-toggle:focus-visible {
  outline: 2px solid rgba(181,96,47,0.45);
  outline-offset: 5px;
}
.nav-dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  margin-left: 0.42rem;
  transform: translateY(-0.18rem) rotate(45deg);
}
.nav-dropdown-menu {
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 18px 36px -22px rgba(31,51,40,0.45);
  display: none;
  left: 50%;
  min-width: 230px;
  padding: 10px;
  position: absolute;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  z-index: 100;
}
.nav-dropdown-menu::before {
  content: "";
  height: 12px;
  left: 0;
  position: absolute;
  right: 0;
  top: -12px;
}
.nav-dropdown-menu a {
  border-radius: 4px;
  display: block;
  padding: 10px 12px;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: var(--cream);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.header-cta {
  text-decoration: none;
  background: var(--pine);
  color: var(--off-white);
  padding: 10px 16px;
  border-radius: 4px;
  text-align: right;
  flex-shrink: 0;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}
.cta-label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.cta-number { display: block; font-weight: 600; font-size: 0.98rem; }
.mobile-menu-toggle,
.mobile-nav-cta {
  display: none;
}
.mobile-menu-toggle {
  align-items: center;
  background: var(--pine);
  border: 0;
  border-radius: 4px;
  color: var(--off-white);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  gap: 9px;
  padding: 10px 13px;
}
.mobile-menu-icon {
  display: inline-block;
  height: 12px;
  position: relative;
  width: 18px;
}
.mobile-menu-icon::before,
.mobile-menu-icon::after,
.mobile-menu-icon {
  border-top: 2px solid currentColor;
}
.mobile-menu-icon::before,
.mobile-menu-icon::after {
  content: "";
  left: 0;
  position: absolute;
  width: 18px;
}
.mobile-menu-icon::before { top: 4px; }
.mobile-menu-icon::after { top: 10px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--cream);
  padding: 72px 0 64px;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay-dark);
  margin-bottom: 14px;
}
.hero h1 { color: var(--pine); }
.hero-sub { font-size: 1.15rem; color: var(--slate); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-image {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 40px -16px rgba(31,51,40,0.35);
  background: var(--off-white);
}
.hero-image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
}
.hero-image-credit {
  padding: 10px 14px;
  color: var(--slate);
  font-size: 0.78rem;
  background: var(--off-white);
  border: 1px solid var(--line);
  border-top: 0;
}
.hero-image-credit a,
.gallery-credit a {
  color: inherit;
  font-weight: 700;
  text-decoration-thickness: 1.4px;
  text-underline-offset: 3px;
}
.hero-image-credit a:hover,
.gallery-credit a:hover { color: var(--clay-dark); }

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary {
  display: inline-block;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.96rem;
}
.btn-primary { background: var(--clay); color: var(--off-white); }
.btn-primary:hover { background: var(--clay-dark); }
.btn-secondary { background: transparent; color: var(--pine); border: 1.5px solid var(--pine); }
.btn-secondary:hover { background: var(--pine); color: var(--off-white); }

/* ---------- Sections ---------- */
section.block { padding: 64px 0; }
.block-cream { background: var(--cream); }
.block-pine { background: var(--pine); color: var(--off-white); }
.block-pine h2 { color: var(--off-white); }

.section-eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay-dark);
  margin-bottom: 10px;
}
.block-pine .section-eyebrow { color: #E8B98A; }
.block-pine p,
.block-pine .faq-item p { color: #C9D2C8; }

/* ---------- Feature grid ---------- */
.main-attractions-grid {
  display: grid;
  grid-template-columns: minmax(0, 62ch) minmax(300px, 1fr);
  column-gap: clamp(36px, 6vw, 96px);
  row-gap: 28px;
  align-items: start;
}
.main-attraction-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 8px 0 26px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}
.feature-card {
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px;
  overflow: hidden;
}
.attraction-card-image {
  width: calc(100% + 52px);
  max-width: none;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin: -26px -26px 20px;
}
.feature-card h3 { color: var(--pine); margin-bottom: 8px; }
.feature-card p { color: var(--slate); font-size: 0.95rem; margin: 0; }
.attraction-spotlight {
  width: 100%;
  max-width: 560px;
  justify-self: end;
  margin-top: 74px;
  padding: 34px;
  background: var(--cream);
}
.attraction-spotlight .attraction-card-image {
  width: calc(100% + 68px);
  margin: -34px -34px 22px;
}
.attraction-spotlight .section-eyebrow { margin-bottom: 12px; }
.attraction-spotlight h3 { font-size: clamp(1.45rem, 2.3vw, 2rem); }
.text-link,
.card-link {
  color: var(--clay-dark);
  font-weight: 700;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.text-link:hover,
.card-link:hover { color: var(--pine); }

.social-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.social-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--pine);
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 700;
  gap: 7px;
  line-height: 1;
  padding: 8px 10px;
  text-decoration: none;
}
.social-link:hover {
  background: var(--cream);
  color: var(--clay-dark);
}
.social-link .bi {
  font-size: 1.05rem;
}
.card-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.92rem;
}

.builder-feature {
  align-items: center;
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  padding: clamp(24px, 4vw, 42px);
}
.builder-feature-logo {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  min-height: 220px;
  padding: 24px;
}
.builder-feature-logo img {
  height: auto;
  max-height: 190px;
  object-fit: contain;
  width: min(100%, 190px);
}

/* ---------- House gallery (builder showcase, not listings) ---------- */
.house-gallery { margin-top: 36px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item { border-radius: 6px; overflow: hidden; background: var(--off-white); border: 1px solid var(--line); }
.gallery-item img { aspect-ratio: 4/3; object-fit: cover; }
.gallery-caption { padding: 12px 16px; font-size: 0.85rem; color: var(--slate); }
.gallery-credit { font-size: 0.78rem; color: var(--clay-dark); margin-top: 36px; text-align: center; }

/* ---------- Neighborhood guide ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 34px;
}
.stat-card {
  border-left: 4px solid var(--clay);
  background: var(--cream);
  padding: 22px 24px;
}
.stat-card strong {
  display: block;
  color: var(--pine);
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-card span { color: var(--slate); font-size: 0.92rem; }
.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}
.recommendation-card {
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}
.recommendation-card h3 {
  color: var(--pine);
  font-size: 1.08rem;
  margin-bottom: 10px;
}
.recommendation-card p {
  color: var(--slate);
  font-size: 0.9rem;
  margin: 0;
}
.neighborhood-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 36px;
}
.neighborhood-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--off-white);
  padding: 26px;
}
.neighborhood-meta {
  color: var(--clay-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.neighborhood-card h3 { color: var(--pine); }
.neighborhood-card p { color: var(--slate); font-size: 0.95rem; }
.neighborhood-card dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 14px;
  margin: 18px 0 0;
  font-size: 0.88rem;
}
.neighborhood-card dt { color: var(--clay-dark); font-weight: 700; }
.neighborhood-card dd { color: var(--slate); margin: 0; }
.compact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}
.compact-list div {
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}
.compact-list strong {
  display: block;
  color: var(--pine);
  margin-bottom: 6px;
}
.compact-list span { color: var(--slate); font-size: 0.92rem; }
.responsive-table {
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.neighborhood-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  background: var(--off-white);
}
.neighborhood-table th,
.neighborhood-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.neighborhood-table th {
  background: var(--cream);
  color: var(--pine);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.neighborhood-table td {
  color: var(--slate);
  font-size: 0.9rem;
}
.neighborhood-table td:first-child {
  color: var(--ink);
  font-weight: 700;
}
.source-note {
  max-width: 82ch;
  margin-top: 18px;
  color: var(--slate);
  font-size: 0.9rem;
}

/* ---------- FAQ (AEO target) ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-item h3 { margin-bottom: 8px; font-size: 1.1rem; color: var(--pine); }
.faq-item p { color: var(--slate); margin: 0; }
.block-pine .faq-item { border-bottom-color: rgba(255,255,255,0.18); }
.block-pine .faq-item h3 { color: var(--off-white); }

/* ---------- Footer CTA ---------- */
.footer-cta { background: var(--clay); color: var(--off-white); padding: 56px 0; text-align: center; }
.footer-cta h2 { color: var(--off-white); }
.footer-cta p { max-width: 50ch; margin: 0 auto 28px; opacity: 0.95; }
.footer-cta .btn-primary { background: var(--pine); }
.footer-cta .btn-primary:hover { background: #142219; }

/* ---------- Site footer ---------- */
.site-footer { background: var(--pine); color: #C9D2C8; padding: 48px 0 0; }
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer-col h3 { color: var(--off-white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-body); margin-bottom: 14px; }
.footer-col a { display: block; text-decoration: none; color: #C9D2C8; margin-bottom: 10px; font-size: 0.92rem; }
.footer-col a:hover { color: var(--off-white); }
.site-footer .site-logo { color: var(--off-white); }
.site-footer .site-logo span { color: #E8B98A; }
.footer-tagline { font-size: 0.88rem; color: #A9B7A6; margin-top: 14px; max-width: 32ch; }
.footer-bottom { margin-top: 40px; padding: 20px 24px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.8rem; color: #8FA08C; }
.footer-bottom a { color: #C9D2C8; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .header-inner {
    align-items: center;
    flex-wrap: wrap;
  }
  .mobile-menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .header-cta {
    display: none;
  }
  .site-nav {
    background: var(--off-white);
    border-top: 1px solid var(--line);
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding: 12px 0 4px;
    width: 100%;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav > a,
  .nav-dropdown-toggle {
    border-radius: 4px;
    display: block;
    font-size: 1rem;
    padding: 12px 4px;
    text-align: left;
    width: 100%;
  }
  .nav-dropdown {
    width: 100%;
  }
  .nav-dropdown-toggle {
    cursor: default;
    pointer-events: none;
  }
  .nav-dropdown-toggle::after {
    display: none;
  }
  .nav-dropdown-menu {
    background: transparent;
    border: 0;
    box-shadow: none;
    display: block;
    left: auto;
    min-width: 0;
    padding: 0 0 8px 14px;
    position: static;
    top: auto;
    transform: none;
  }
  .nav-dropdown-menu::before {
    display: none;
  }
  .nav-dropdown-menu a {
    padding: 9px 10px;
  }
  .mobile-nav-cta {
    background: var(--clay);
    color: var(--off-white) !important;
    display: block;
    font-weight: 700;
    margin-top: 8px;
    padding: 12px 14px !important;
    text-align: center !important;
  }
  .mobile-nav-cta:hover {
    background: var(--clay-dark) !important;
    color: var(--off-white) !important;
  }
  .main-attractions-grid { grid-template-columns: 1fr; }
  .attraction-spotlight { max-width: none; justify-self: stretch; margin-top: 12px; }
  .feature-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .recommendation-grid { grid-template-columns: 1fr; }
  .neighborhood-grid { grid-template-columns: 1fr; }
  .builder-feature { grid-template-columns: 1fr; }
  .builder-feature-logo { min-height: 180px; }
  .compact-list { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
