/* ============================================
   SHARED COMPONENTS: Top Bar, Header, Nav, Mega Menus, Footer
   Single source of truth for all universal elements
   ============================================ */

/* ============ TOP BAR ============ */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--primary);
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  height: 44px;
  overflow: hidden;
}
.top-bar__container {
  max-width: none;
  margin: 0;
  padding: 0 60px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.top-bar__left { display: flex; gap: 28px; align-items: center; }
.top-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.9);
  transition: color 0.2s;
}
.top-bar__item:hover { color: var(--white); }
.top-bar__item svg { color: rgba(255,255,255,0.7); }
.top-bar__hours {
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.2);
}
.top-bar__right { display: flex; gap: 20px; align-items: center; }
.top-bar__land-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.top-bar__land-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
}
.top-bar__land-btn svg:last-child {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.top-bar__land-btn:hover svg:last-child {
  transform: translateX(4px);
}
.top-bar__social {
  display: flex;
  gap: 14px;
  padding-left: 24px;
  border-left: 1px solid rgba(255,255,255,0.2);
}
.top-bar__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
}
.top-bar__social a:hover { color: var(--gold); }

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 44px;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s;
}
.header .container {
  max-width: none;
  margin: 0;
  padding: 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 120px;
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header__logo img {
  height: 100px;
  width: auto;
  display: block;
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.header__logo--mdlands img { height: 64px; }
.header__logomark{width:auto;height:44px;flex-shrink:0;transition:height .35s cubic-bezier(.16,1,.3,1)}
.header--solid .header__logomark{height:32px}
.footer__logomark{width:auto;height:32px;flex-shrink:0}
.header__wordmark {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
  letter-spacing: -0.5px;
  transition: font-size 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.header__wordmark em {
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
}

/* Shrunk state — triggered by .header--solid class on scroll */
.header--solid .container { height: 80px; }
.header--solid .header__logo img { height: 60px; }
.header--solid .header__logo--mdlands img { height: 44px; }
.header--solid .header__wordmark { font-size: 22px; }

.header__nav { display: flex; gap: 36px; align-items: stretch; align-self: stretch; }
.header__nav > a,
.header__nav > .nav-item > a {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  transition: color 0.3s;
  position: relative;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 100%;
}
.header__nav > a:hover,
.header__nav > .nav-item > a:hover { color: var(--primary); }
.header__nav > a::after,
.header__nav > .nav-item > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 5px;
  background: var(--gold);
  transition: width 0.3s;
}
.header__nav > a:hover::after,
.header__nav > .nav-item:hover > a::after,
.header__nav > .nav-item.open > a::after,
.header__nav > a.active::after,
.header__nav > .nav-item.active > a::after { width: 100%; }

.header__cta { display: flex; align-items: center; gap: 14px; }
.header__search-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}
.header__search-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
  transform: scale(1.05);
}
.header__search-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

/* Search Panel */
.search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
}
.search-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.search-panel__inner {
  max-width: none;
  margin: 0;
  padding: 40px 60px 48px;
}
.search-panel__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.search-panel__icon {
  color: var(--primary);
  margin-right: 16px;
  flex-shrink: 0;
}
.search-panel__input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  font-style: italic;
  color: var(--dark);
  outline: none;
  padding: 8px 0;
}
.search-panel__input-wrap input::placeholder { color: #aaa; }
.search-panel__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--off-white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.search-panel__close:hover {
  background: var(--primary);
  color: var(--white);
}
.search-panel__empty {
  padding: 40px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
  font-style: italic;
}
.search-panel__group { margin-bottom: 32px; }
.search-panel__group:last-child { margin-bottom: 0; }
.search-panel__group-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 14px;
  padding-left: 32px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-panel__group-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  background: var(--gold);
}
.search-panel__group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  color: var(--white);
  background: var(--primary);
  border-radius: 10px;
  letter-spacing: 0;
}
.search-panel__item-title mark,
.search-panel__item-subtitle mark {
  background: rgba(249, 160, 34, 0.25);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}
.search-panel__loading {
  font-family: var(--font-display);
  font-size: 12px;
  font-style: italic;
  color: var(--primary);
  text-align: center;
  padding: 16px 0 8px;
  opacity: 0.85;
}
.search-panel__loading span::after {
  content: '';
  display: inline-block;
  width: 1ch;
  animation: md-search-dots 1.4s steps(4, end) infinite;
  overflow: hidden;
  vertical-align: bottom;
}
@keyframes md-search-dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}
.search-panel__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 8px;
}
.search-panel__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.search-panel__item:hover {
  background: var(--off-white);
  transform: translateX(4px);
}
.search-panel__item-img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--off-white);
}
.search-panel__item-img img { width: 100%; height: 100%; object-fit: cover; }
.search-panel__item-img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.search-panel__item-info { min-width: 0; flex: 1; }
.search-panel__item-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-panel__item-subtitle {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  padding: 16px 36px;
  border-radius: 4px;
  background: var(--primary);
  color: var(--white);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}
.header__cta .btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ============ NAV ITEMS + MEGA MENUS ============ */
.nav-item { position: static; display: flex; align-items: stretch; }
.nav-item > a {
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.nav-item__chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.nav-item.open .nav-item__chevron { transform: rotate(180deg); }

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
  visibility: hidden;
  pointer-events: none;
  z-index: 999;
  clip-path: inset(100% 0 0 0);
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.1)) drop-shadow(0 4px 12px rgba(0,0,0,0.04));
  transition: clip-path 0.65s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0.85s;
}
/* Reveal wrapper spans full width of mega menu */
.mega-menu__reveal {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
/* Layer 1: light blue panel sweeps up through */
.mega-menu__reveal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #7ba838;
  clip-path: inset(100% 0 0 0);
}
/* Layer 2: primary blue panel sweeps up right behind */
.mega-menu__reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  clip-path: inset(100% 0 0 0);
}
.nav-item.open .mega-menu__reveal::before {
  animation: mega-sweep-up 1s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
.nav-item.open .mega-menu__reveal::after {
  animation: mega-sweep-up 1s cubic-bezier(0.76, 0, 0.24, 1) 0.12s forwards;
}
@keyframes mega-sweep-up {
  0%   { clip-path: inset(100% 0 0 0); }
  45%  { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 100% 0); }
}
/* Layer 3 (front): white content panel reveals up last */
.mega-menu__inner {
  position: relative;
  z-index: 3;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 40px;
  background: #fff;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.65s cubic-bezier(0.76, 0, 0.24, 1) 0.2s;
}
.nav-item.open .mega-menu {
  visibility: visible;
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.65s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0s;
}
.nav-item.open .mega-menu__inner {
  clip-path: inset(0 0 0 0);
}
/* Top CTA bar that links to the parent page */
.mega-menu__top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary);
  color: var(--white);
  padding: 18px 32px;
  border-radius: 6px;
  margin-bottom: 2px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  grid-column: 1 / -1;
}
.mega-menu__top-bar:hover {
  background: var(--primary-dark);
  transform: translateX(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.mega-menu__top-bar svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.mega-menu__top-bar:hover svg { transform: translateX(6px); }

.mega-menu--small .mega-menu__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
}
.mega-menu__main .mega-menu__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--primary);
  margin-bottom: 12px;
  padding-left: 32px;
  position: relative;
}
.mega-menu__main .mega-menu__label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  background: var(--primary);
}
.mega-menu__heading {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--dark);
  margin-bottom: 16px;
}
.mega-menu__heading em { font-style: italic; font-weight: 400; }
.mega-menu__text {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 340px;
}
.mega-menu__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: gap 0.3s;
  text-decoration: none;
}
.mega-menu__cta:hover { gap: 12px; color: var(--accent); }

.mega-menu__side {
  display: grid;
  gap: 16px;
  align-self: center;
}
.mega-menu__stat {
  padding: 20px 24px;
  background: var(--off-white);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.mega-menu__stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.mega-menu__stat-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.mega-menu__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: center;
}
.mega-menu__links--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-self: center;
  border: 2px solid var(--primary);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}
.mega-menu__links--grid .mega-menu__link-item {
  position: relative;
  overflow: hidden;
  padding: 32px 28px;
  border-radius: 0;
  border-right: 1px solid var(--primary);
  border-bottom: 1px solid var(--primary);
  min-height: 140px;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  isolation: isolate;
  background: transparent;
}
.mega-menu__links--grid .mega-menu__link-item:nth-child(2n) { border-right: none; }
.mega-menu__links--grid .mega-menu__link-item:nth-last-child(-n+2) { border-bottom: none; }
.mega-menu__links--grid .mega-menu__link-item > * {
  position: relative;
  z-index: 2;
}
.mega-menu__links--grid .mega-menu__link-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  font-style: italic;
}

.mega-menu__links--grid .mega-menu__link-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hover-bg);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}
.mega-menu__links--grid .mega-menu__link-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,31,18,0.9), rgba(46,104,55,0.85));
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}
.mega-menu__links--grid .mega-menu__link-item:hover {
  background: transparent;
  transform: none;
}
.mega-menu__links--grid .mega-menu__link-item:hover::before {
  opacity: 1;
  transform: scale(1);
}
.mega-menu__links--grid .mega-menu__link-item:hover::after {
  opacity: 1;
}
.mega-menu__links--grid .mega-menu__link-item:hover svg {
  color: var(--gold);
}
.mega-menu__links--grid .mega-menu__link-item:hover .mega-menu__link-title {
  color: var(--white);
}
.mega-menu__links--grid .mega-menu__link-item:hover .mega-menu__link-desc {
  color: rgba(255,255,255,0.8);
}
.mega-menu__links--grid .mega-menu__link-title,
.mega-menu__links--grid .mega-menu__link-desc {
  transition: color 0.4s;
}
.mega-menu__link-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 8px;
  transition: all 0.3s;
  color: var(--text);
  text-decoration: none;
}
.mega-menu__link-item svg { color: var(--accent); flex-shrink: 0; }
.mega-menu__link-item:hover {
  background: var(--off-white);
  transform: translateX(4px);
}
.mega-menu__link-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
}
.mega-menu__link-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.mega-menu__featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-self: center;
}
.mega-menu__featured-item {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.mega-menu__featured-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: transparent;
}
.mega-menu__featured-item img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.mega-menu__featured-item:hover img { transform: scale(1.06); }
.mega-menu__featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--dark);
  color: var(--white);
  z-index: 2;
}
.mega-menu__featured-info {
  padding: 18px 20px 20px;
}
.mega-menu__featured-price {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}
.mega-menu__featured-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  color: var(--dark);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mega-menu__featured-meta {
  display: flex;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-light);
}
.mega-menu__featured-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mega-menu--large .mega-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 25px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.mega-menu__communities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.mega-menu__community {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  text-decoration: none;
}
.mega-menu__community img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.mega-menu__community:hover img { transform: scale(1.08); }
.mega-menu__community::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.3) 100%);
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.mega-menu__community:hover::after {
  background: linear-gradient(0deg, rgba(46,104,55,0.95) 0%, rgba(46,104,55,0.55) 40%, rgba(46,104,55,0.35) 100%);
}
.mega-menu__community-name {
  position: absolute;
  bottom: 16px;
  left: 18px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  z-index: 2;
}

/* ============ MOBILE MENU ============ */
.mobile-toggle {
  display: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  cursor: pointer;
  z-index: 1001;
  transition: background 0.3s;
}
.mobile-toggle:hover { background: var(--primary-dark); }
.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  position: relative;
  transition: all 0.3s;
}
.mobile-toggle span::before,
.mobile-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}
.mobile-toggle span::before { top: -6px; }
.mobile-toggle span::after { top: 6px; }
.mobile-toggle.active { background: transparent; }
.mobile-toggle.active span { background: transparent; }
.mobile-toggle.active span::before,
.mobile-toggle.active span::after { background: var(--white); }
.mobile-toggle.active span::before { top: 0; transform: rotate(45deg); }
.mobile-toggle.active span::after { top: 0; transform: rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--primary);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.mobile-nav.open { display: flex; }
body.mobile-nav-open .header { background: transparent!important; backdrop-filter: none!important; -webkit-backdrop-filter: none!important; box-shadow: none!important; }
body.mobile-nav-open .top-bar { display: none; }
body.mobile-nav-open .header { top: 0; }
body.mobile-nav-open .header__nav, body.mobile-nav-open .header__cta .btn, body.mobile-nav-open .profile-menu, body.mobile-nav-open .header__search-btn { display: none; }
body.mobile-nav-open .header__wordmark { color: var(--white); }
body.mobile-nav-open .header__wordmark em { color: var(--gold); }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  font-style: italic;
  color: var(--white);
  padding: 10px 32px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.mobile-nav a:hover,
.mobile-nav a:active {
  background: var(--primary-dark);
  color: var(--gold);
}

/* ============ NEWSLETTER CTA ============ */
.newsletter-cta {
  background: var(--primary);
  color: var(--white);
  padding: 56px 60px;
  position: relative;
  overflow: hidden;
}
.newsletter-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #7ba838, var(--primary-dark), #7ba838, transparent);
}
.newsletter-cta__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.newsletter-cta__text { flex: 1; min-width: 0; }
.newsletter-cta__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  margin-bottom: 10px;
}
.newsletter-cta__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
  margin: 0;
}
.newsletter-cta__title em {
  font-style: italic;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
}
.newsletter-cta__form {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  min-width: 420px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  padding: 6px;
  transition: border-color 0.3s;
}
.newsletter-cta__form:focus-within {
  border-color: var(--gold);
}
.newsletter-cta__form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 18px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  min-width: 0;
}
.newsletter-cta__form input::placeholder {
  color: rgba(255,255,255,0.55);
}
.newsletter-cta__form button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
}
.newsletter-cta__form button:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.newsletter-cta__form button svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.newsletter-cta__form button:hover svg {
  transform: translateX(4px);
}
@media (max-width: 900px) {
  .newsletter-cta { padding: 40px 24px; }
  .newsletter-cta__container { flex-direction: column; align-items: stretch; gap: 28px; }
  .newsletter-cta__form { min-width: 0; width: 100%; }
}

/* ============ FOOTER ============ */
.footer {
  background: #0f1f12;
  color: rgba(255,255,255,0.7);
  padding: 80px 0 0;
}
.footer .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
}
.footer__brand { max-width: 320px; }
.footer__brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.footer__logo {
  height: 56px;
  width: auto;
  display: block;
  filter: brightness(1.3);
}
.footer__wordmark {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.5px;
}
.footer__wordmark em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.footer__desc { font-size: 14px; line-height: 1.7; margin-bottom: 24px; }
.footer__heading {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
}
.footer__links { list-style: none; padding: 0; margin: 0; }
.footer__links li { margin-bottom: 10px; }
.footer__links a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
  text-decoration: none;
}
.footer__links a:hover { color: var(--gold); }
.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}
.footer__contact-item svg { flex-shrink: 0; color: var(--accent); }
.footer__contact-item a { color: rgba(255,255,255,0.7); transition: color 0.2s; text-decoration: none; }
.footer__contact-item a:hover { color: var(--gold); }
.footer__social { display: flex; gap: 12px; margin-top: 24px; }
.footer__social a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.footer__social a:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  background: rgba(249,160,34,0.15);
}
.footer__bottom {
  margin-top: 60px;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  display: flex;
  justify-content: space-between;
}
.footer__bottom a { color: rgba(255,255,255,0.4); transition: color 0.2s; text-decoration: none; }
.footer__bottom a:hover { color: var(--gold); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .header__nav { display: none; }
  .mobile-toggle { display: flex; }
  .nav-item .mega-menu { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .header .container { padding: 0 32px; }
  .top-bar__container { padding: 0 32px; }
  /* Hide bulkier top bar items on tablet */
  .top-bar__hours,
  .top-bar__land-btn { display: none; }
}
@media (max-width: 900px) {
  /* Top bar stays visible but slimmer */
  .top-bar { font-size: 12px; height: 38px; }
  .top-bar__container { padding: 0 20px; gap: 16px; }
  .top-bar__left { gap: 18px; }
  .top-bar__left .top-bar__item:first-child { display: none; } /* hide address on mobile */
  .top-bar__right { gap: 14px; }
  .top-bar__social { padding-left: 16px; }
  /* Header shifts down to sit below the shorter top bar */
  .header { top: 38px; }
  .header .container {
    height: 72px;
    padding: 0 20px;
    justify-content: flex-start;
    gap: 10px;
  }
  .header__logo { margin-right: auto; }
  .header--solid .container { height: 62px; }
  .header__logo img { height: 56px; }
  .header--solid .header__logo img { height: 46px; }
  /* Icon-only circular Contact button on mobile */
  .header__cta .btn {
    padding: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    gap: 0;
    font-size: 0;
    line-height: 0;
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
  }
  .header__cta .btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: none;
  }
  .header__cta .btn svg {
    width: 18px;
    height: 18px;
  }
  .header__cta { gap: 10px; }
  /* Smaller search button to match */
  .header__search-btn { width: 42px; height: 42px; }
  .mobile-toggle {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
  }
  /* Larger mobile nav typography */
  .mobile-nav a { font-size: 32px; }
  /* Adjust sticky offsets for shorter top bar */
  .mega-menu { top: 100%; }
  .breadcrumb { margin-top: 110px; }
  .hero { padding-top: 110px; }
  .page-hero { padding-top: 110px; min-height: calc(400px + 110px); }
  .community-hero { padding-top: 110px; min-height: calc(500px + 110px); }
}
@media (max-width: 640px) {
  /* Very small screens — further compress top bar */
  .top-bar__left .top-bar__hours { display: none; }
  .top-bar__left .top-bar__item:nth-child(3) { display: none; } /* hide email */
  .top-bar__social { display: none; }
  .top-bar__right { gap: 0; }
  .header .container { padding: 0 16px; }
  .header__logo img { height: 50px; }
  .header--solid .header__logo img { height: 42px; }
  /* Tighten icon spacing */
  .header__cta { gap: 6px; }
  .header__search-btn,
  .header__cta .btn,
  .mobile-toggle {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }
}
@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer .container { padding: 0 24px; }
  .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ============ LISTING CARD (shared across all pages) ============ */
.listing-card{position:relative;display:flex;flex-direction:column;background:var(--white);border:1px solid var(--border);border-radius:14px;overflow:hidden;transition:transform .5s cubic-bezier(.16,1,.3,1),box-shadow .5s;isolation:isolate}
.listing-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,var(--primary),var(--gold));transform:scaleX(0);transform-origin:left center;transition:transform .6s cubic-bezier(.16,1,.3,1);z-index:5}
.listing-card:hover{transform:translateY(-8px);box-shadow:0 20px 50px rgba(15,31,18,.12)}
.listing-card:hover::before{transform:scaleX(1)}
.listing-card__media{position:relative;aspect-ratio:16/10;overflow:hidden;background:var(--primary-dark)}
.listing-card__media img{width:100%;height:100%;object-fit:cover;transition:transform 1.2s cubic-bezier(.16,1,.3,1)}
.listing-card:hover .listing-card__media img{transform:scale(1.06)}
.listing-card__media::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(15,31,18,.2) 0%,transparent 35%,rgba(15,31,18,.55) 100%);pointer-events:none}
.listing-card__types{position:absolute;top:14px;left:14px;display:flex;flex-wrap:wrap;gap:6px;z-index:3}
.listing-card__type{font-family:var(--font-display);font-size:10px;font-weight:800;font-style:italic;text-transform:uppercase;letter-spacing:1.5px;color:var(--white);padding:6px 12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(15,31,18,.6)}
.listing-card__type--lots{background:rgba(46,104,55,.85)}
.listing-card__type--farms{background:rgba(139,90,43,.85)}
.listing-card__type--waterfront{background:rgba(41,98,144,.85)}
.listing-card__type--horse{background:rgba(120,70,50,.85)}
.listing-card__type--golf{background:rgba(90,127,40,.85)}
.listing-card__price{position:absolute;bottom:14px;left:14px;right:14px;font-family:var(--font-display);font-size:24px;font-weight:800;font-style:italic;line-height:1;color:var(--white);text-shadow:0 2px 10px rgba(0,0,0,.4);z-index:3}
.listing-card__body{padding:22px 22px 20px;display:flex;flex-direction:column;flex:1}
.listing-card__title{font-family:var(--font-display);font-size:16px;font-weight:800;font-style:italic;line-height:1.2;color:var(--dark);margin-bottom:6px;position:relative;padding-bottom:10px}
.listing-card__title::after{content:'';position:absolute;left:0;bottom:0;width:32px;height:2px;background:var(--gold);transition:width .5s cubic-bezier(.16,1,.3,1)}
.listing-card:hover .listing-card__title::after{width:72px}
.listing-card__location{display:flex;align-items:center;gap:6px;font-family:var(--font-display);font-size:10px;font-weight:700;font-style:italic;text-transform:uppercase;letter-spacing:1px;color:var(--primary);margin-bottom:14px}
.listing-card__meta{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:14px;border-top:1px solid var(--border)}
.listing-card__meta-item{display:inline-flex;align-items:center;gap:6px;font-family:var(--font-display);font-size:10px;font-weight:700;font-style:italic;text-transform:uppercase;letter-spacing:1px;color:var(--primary-dark)}
.listing-card__meta-item--number{color:var(--text-light);font-weight:400}

/* ============ PROFILE MENU ============ */
.profile-menu{position:relative}
.profile-menu__trigger{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;border:1.5px solid var(--border);background:transparent;color:var(--text);cursor:pointer;transition:all .3s cubic-bezier(.16,1,.3,1);padding:0}
.profile-menu__trigger:hover{border-color:var(--primary);color:var(--primary)}
.profile-menu__trigger.has-user{border-color:var(--primary);background:var(--primary);color:var(--white)}
.profile-menu__dropdown{position:absolute;top:calc(100% + 10px);right:0;width:260px;background:var(--white);border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.12);padding:8px 0;z-index:1000}
.profile-menu__dropdown::before{content:'';position:absolute;top:-6px;right:14px;width:12px;height:12px;background:var(--white);border:1px solid var(--border);border-bottom:none;border-right:none;transform:rotate(45deg)}
.profile-menu__user{padding:16px 18px;border-bottom:1px solid var(--border);margin-bottom:4px}
.profile-menu__user-name{font-family:var(--font-display);font-size:15px;font-weight:700;color:var(--dark)}
.profile-menu__user-email{font-size:12px;color:var(--text-light);margin-top:2px}
.profile-menu__user:empty{display:none}
.profile-menu__item{display:flex;align-items:center;gap:10px;padding:10px 18px;font-family:var(--font-body);font-size:13px;font-weight:500;color:var(--text);cursor:pointer;transition:background .15s;text-decoration:none;border:none;background:none;width:100%;text-align:left}
.profile-menu__item:hover{background:rgba(46,104,55,.05);color:var(--primary)}
.profile-menu__item svg{color:var(--text-light);flex-shrink:0}
.profile-menu__item:hover svg{color:var(--primary)}
.profile-menu__badge{margin-left:auto;background:var(--primary);color:var(--white);font-size:10px;font-weight:700;padding:2px 7px;border-radius:10px;min-width:18px;text-align:center}
.profile-menu__badge:empty{display:none}
.profile-menu__divider{height:1px;background:var(--border);margin:4px 0}

/* Profile setup modal */
.profile-modal{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.5);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);opacity:0;pointer-events:none;transition:opacity .3s}
.profile-modal.is-open{opacity:1;pointer-events:auto}
.profile-modal__card{background:var(--white);border-radius:16px;padding:40px;max-width:420px;width:90%;box-shadow:0 20px 60px rgba(0,0,0,.2);transform:translateY(20px);transition:transform .3s}
.profile-modal.is-open .profile-modal__card{transform:translateY(0)}
.profile-modal__title{font-family:var(--font-display);font-size:24px;font-weight:700;color:var(--dark);margin-bottom:6px}
.profile-modal__subtitle{font-size:14px;color:var(--text-light);margin-bottom:24px}
.profile-modal__field{margin-bottom:16px}
.profile-modal__label{display:block;font-family:var(--font-display);font-size:11px;font-weight:700;font-style:italic;text-transform:uppercase;letter-spacing:1px;color:var(--text-light);margin-bottom:6px}
.profile-modal__input{width:100%;padding:12px 16px;font-family:var(--font-body);font-size:14px;border:1.5px solid var(--border);border-radius:10px;background:var(--white);color:var(--text);transition:border-color .2s}
.profile-modal__input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(46,104,55,.1)}
.profile-modal__actions{display:flex;gap:12px;margin-top:24px}
.profile-modal__actions .btn{flex:1;justify-content:center}
.profile-modal__switch{text-align:center;font-size:13px;color:var(--text-light);margin-top:16px}
.profile-modal__switch button{background:none;border:none;color:var(--primary);font-weight:600;cursor:pointer;font-size:13px;font-family:var(--font-body);text-decoration:underline}
.profile-modal__switch button:hover{color:var(--primary-dark)}

/* Google OAuth button (brand-compliant) */
.btn--google { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:12px 18px; background:#fff; color:#1f1f1f; border:1.5px solid var(--border); border-radius:10px; font-family:var(--font-body); font-size:14px; font-weight:600; cursor:pointer; transition:all .2s; margin-bottom:14px; text-transform:none; letter-spacing:0; font-style:normal; }
.btn--google:hover { border-color:#1f1f1f; box-shadow:0 2px 8px rgba(0,0,0,.08); }
.btn--google:active { transform:translateY(1px); }
.btn--google:disabled { opacity:.6; cursor:not-allowed; }
.btn--google svg { flex-shrink:0; }
.profile-modal__or { display:flex; align-items:center; gap:12px; margin:8px 0 16px; color:var(--text-light); font-size:12px; font-weight:500; text-transform:uppercase; letter-spacing:1.5px; }
.profile-modal__or::before, .profile-modal__or::after { content:''; flex:1; height:1px; background:var(--border); }

/* Save/heart button on listing cards */
.listing-card__save{position:absolute;top:14px;right:14px;width:36px;height:36px;border-radius:50%;background:rgba(0,0,0,.35);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:none;color:var(--white);cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:4;transition:all .2s;padding:0}
.listing-card__save:hover{background:rgba(0,0,0,.5);transform:scale(1.1)}
.listing-card__save.is-saved{background:var(--primary);color:var(--white)}
.listing-card__save.is-saved svg{fill:currentColor}

/* ============ CTA BANNER (with blue duotone image bg) ============ */
.cta-banner {
  position: relative;
  padding: 100px 0;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  background: #0f1f12;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/cta-bg.jpg');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.1) brightness(0.5);
  z-index: -2;
}
.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(46,104,55,0.75), rgba(15,31,18,0.95));
  mix-blend-mode: multiply;
  z-index: -1;
}
.cta-banner .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}
.cta-banner__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.cta-banner__title em {
  font-style: italic;
  font-weight: 400;
}
.cta-banner__text {
  font-size: 18px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* ============ SCROLL ANIMATIONS (re-triggering) ============ */
/* All reveal classes use IntersectionObserver in components.js that toggles
   the .is-visible class on/off so animations replay when scrolling back up. */

/* Base reveal — fade + rise */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Fade only */
.reveal-fade {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity;
}
.reveal-fade.is-visible { opacity: 1; }

/* Slide from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-left.is-visible { opacity: 1; transform: translateX(0); }

/* Slide from right */
.reveal-right {
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-right.is-visible { opacity: 1; transform: translateX(0); }

/* Scale up */
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-scale.is-visible { opacity: 1; transform: scale(1); }

/* Blur to clear */
.reveal-blur {
  opacity: 0;
  filter: blur(20px);
  transform: translateY(30px);
  transition: opacity 3s cubic-bezier(0.2, 0.8, 0.2, 1), filter 3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 3s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, filter, transform;
}
.reveal-blur.is-visible { opacity: 1; filter: blur(0); transform: translateY(0); }

/* Clip-path mask reveal — from bottom */
.reveal-mask {
  clip-path: inset(0 0 100% 0);
  transform: translateY(40px);
  transition: clip-path 1.2s cubic-bezier(0.77, 0, 0.175, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: clip-path, transform;
}
.reveal-mask.is-visible { clip-path: inset(0 0 0 0); transform: translateY(0); }

/* Clip-path mask — from left (image/container slides in) */
.reveal-mask-left {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.4s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: clip-path;
}
.reveal-mask-left.is-visible { clip-path: inset(0 0 0 0); }

/* Clip-path mask — from right */
.reveal-mask-right {
  clip-path: inset(0 0 0 100%);
  transition: clip-path 1.4s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: clip-path;
}
.reveal-mask-right.is-visible { clip-path: inset(0 0 0 0); }

/* Zoom reveal — starts large and scales down */
.reveal-zoom {
  opacity: 0;
  transform: scale(1.15);
  transition: opacity 1.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-zoom.is-visible { opacity: 1; transform: scale(1); }

/* Stagger — each child animates in with delay based on index */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.56s; }

/* Image mask — overlay wipes away from the image */
.reveal-image {
  position: relative;
  overflow: hidden;
}
.reveal-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  transform: translateX(0);
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 2;
  pointer-events: none;
}
.reveal-image.is-visible::after { transform: translateX(101%); }

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-fade, .reveal-left, .reveal-right, .reveal-scale,
  .reveal-blur, .reveal-mask, .reveal-mask-left, .reveal-mask-right,
  .reveal-zoom, .reveal-stagger > *, .reveal-image::after {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* ============ STATS BAR (counters) — mobile-safe fixes ============ */
.stats-bar { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.stats-bar__item { min-width: 0; }
.stats-bar__number { line-height: 1.1; }
.stats-bar__label { line-height: 1.3; word-break: keep-all; hyphens: none; }
@media (max-width: 1024px) {
  .stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 768px) {
  .stats-bar__item { padding: 22px 12px !important; }
  .stats-bar__number { font-size: clamp(22px, 6.2vw, 32px) !important; }
  .stats-bar__label { font-size: 10px !important; letter-spacing: 0.4px !important; }
}
@media (max-width: 380px) {
  .stats-bar { grid-template-columns: minmax(0, 1fr) !important; }
  .stats-bar__item { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,.1); }
  .stats-bar__item:last-child { border-bottom: none; }
}

/* ============ ABOUT__STATS (counters) — mobile-safe fixes ============ */
.about__stats { min-width: 0; }
.about__stat { min-width: 0; }
.about__stat-number { line-height: 1.1; word-break: keep-all; }
.about__stat-label { line-height: 1.3; word-break: keep-all; }
@media (max-width: 768px) {
  .about__stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px !important; }
  .about__stat-number { font-size: clamp(28px, 7vw, 42px) !important; }
}
@media (max-width: 380px) {
  .about__stats { grid-template-columns: minmax(0, 1fr) !important; }
}

/* ============ HERO__STATS — keep numbers tight on mobile ============ */
.hero__stat { min-width: 0; }
.hero__stat-value { line-height: 1.1; word-break: keep-all; }
.hero__stat-label { line-height: 1.3; }
@media (max-width: 768px) {
  .hero__stat-value { font-size: clamp(20px, 6vw, 28px) !important; }
}

/* ============ SIDEBAR-CARD__STAT — listing details ============ */
.sidebar-card__stat { min-width: 0; }
.sidebar-card__stat-value { line-height: 1.1; word-break: keep-all; }
