:root {
  --ink: #122126;
  --muted: #4a5f66;
  --paper: #f9f5ef;
  --card: rgba(255, 255, 255, 0.82);
  --line: rgba(18, 33, 38, 0.14);
  --line-strong: rgba(18, 33, 38, 0.24);
  --shadow-lg: 0 30px 90px rgba(8, 21, 24, 0.16);
  --shadow-md: 0 16px 42px rgba(8, 21, 24, 0.1);
  --shadow-sm: 0 10px 24px rgba(8, 21, 24, 0.08);
  --shadow-xl: 0 42px 120px rgba(7, 20, 26, 0.22);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: min(1200px, 92vw);
  --space: clamp(70px, 9vw, 120px);
  --accent: #0d8f88;
  --accent-strong: #086661;
  --accent-soft: rgba(13, 143, 136, 0.14);
  --highlight: #f0a56f;
  --accent-ring: rgba(14, 147, 136, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  --scroll-progress: 0;
}

html::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 220;
  pointer-events: none;
  background: linear-gradient(90deg, var(--accent) 0%, var(--highlight) 54%, var(--accent-strong) 100%);
  transform-origin: left center;
  transform: scaleX(var(--scroll-progress));
}

body {
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 8% 0%, rgba(188, 228, 217, 0.86) 0%, transparent 34%),
    radial-gradient(circle at 96% 0%, rgba(255, 205, 173, 0.72) 0%, transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(212, 228, 236, 0.52) 0%, transparent 36%),
    linear-gradient(175deg, #fcfaf6 0%, #f4ece3 100%);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.38;
}

body::after {
  content: "";
  position: fixed;
  inset: -22% -16% auto;
  z-index: -1;
  pointer-events: none;
  height: 62vh;
  background: radial-gradient(circle at 15% 45%, rgba(13, 149, 136, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 82% 22%, rgba(235, 153, 103, 0.18) 0%, transparent 44%),
    radial-gradient(circle at 55% 70%, rgba(24, 86, 107, 0.08) 0%, transparent 42%);
  filter: blur(6px);
  animation: ambienceDrift 18s ease-in-out infinite alternate;
}

body.theme-residential {
  --accent: #0d9588;
  --accent-strong: #0a6c64;
  --accent-soft: rgba(13, 149, 136, 0.13);
  --highlight: #f0a56f;
}

body.theme-commercial {
  --accent: #dc6f42;
  --accent-strong: #b24f2a;
  --accent-soft: rgba(220, 111, 66, 0.15);
  --highlight: #18a088;
  --accent-ring: rgba(220, 111, 66, 0.38);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Fraunces", serif;
  letter-spacing: -0.02em;
  line-height: 1.13;
}

p {
  margin: 0;
  color: var(--muted);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style-position: inside;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 140;
  width: var(--container);
  margin: 14px auto 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.85) 0%, rgba(251, 249, 245, 0.72) 100%);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(8, 21, 24, 0.14);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
}

.brand {
  position: relative;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f2026;
  padding-left: 18px;
}

.brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #fff 18%, var(--accent) 19%, var(--accent-strong) 100%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6);
}

.nav-toggle {
  border: 1px solid rgba(16, 34, 40, 0.2);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  color: #183740;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 12px;
  display: none;
}

.site-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.site-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  color: #25464f;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-link {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(18, 37, 43, 0.24);
  background: rgba(255, 255, 255, 0.85);
  color: #285560;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.role-link:hover {
  border-color: rgba(16, 40, 46, 0.42);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.nav-role-switch {
  display: none;
}

.page {
  width: var(--container);
  margin-inline: auto;
}

.hero {
  position: relative;
  margin-top: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(132deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 248, 246, 0.76) 58%, rgba(255, 247, 238, 0.7) 100%);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, var(--accent-soft) 0%, transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(255, 169, 104, 0.15) 0%, transparent 34%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 26px;
  align-items: stretch;
  padding: clamp(32px, 5vw, 52px);
}

.kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.62);
}

.hero__copy {
  display: grid;
  gap: 20px;
  align-content: center;
}

.hero__copy h1 {
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  line-height: 1.05;
  color: #102229;
}

.hero__copy p {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  max-width: 60ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 14px 26px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -55%;
  width: 44%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.34) 100%);
  transition: left 0.38s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:hover::after {
  left: 130%;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(125deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 18px 40px rgba(13, 29, 34, 0.24);
}

.btn--secondary {
  color: #173742;
  border: 1px solid rgba(17, 38, 44, 0.28);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.hero__media {
  min-height: 420px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  perspective: 1200px;
}

.hero__media img {
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 18px 44px rgba(10, 29, 34, 0.22);
  transition: transform 0.45s ease, box-shadow 0.45s ease, filter 0.45s ease;
  filter: saturate(1.04) contrast(1.02);
}

.hero__media img:first-child {
  grid-column: span 2;
  height: 250px;
}

.hero:hover .hero__media img:nth-child(1) {
  transform: translateY(-4px) scale(1.01);
}

.hero:hover .hero__media img:nth-child(2) {
  transform: translateY(3px) rotate(-1deg);
}

.hero:hover .hero__media img:nth-child(3) {
  transform: translateY(-2px) rotate(1deg);
}

.trust-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-row span {
  border: 1px solid rgba(14, 35, 40, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #284951;
  padding: 7px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.trust-row span:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.commercial-hero .hero__copy h1 {
  max-width: 13ch;
}

.residential-hero .hero__copy h1 {
  max-width: 15ch;
}

.residential-momentum {
  margin-top: 22px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.residential-momentum article {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.92) 0%, rgba(232, 246, 243, 0.82) 100%);
  box-shadow: var(--shadow-md);
  padding: 20px;
  display: grid;
  gap: 8px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.residential-momentum article::after {
  content: "";
  position: absolute;
  inset: auto -24px -24px auto;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(13, 149, 136, 0.14) 0%, rgba(13, 149, 136, 0) 72%);
}

.residential-momentum h3 {
  font-size: 1.14rem;
  color: #13242b;
}

.residential-momentum article:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(10, 29, 34, 0.16);
}

.residential-compare {
  margin-top: 6px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.residential-compare__card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 22px;
  display: grid;
  gap: 10px;
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.residential-compare__card ul {
  margin: 0;
  padding-left: 0;
  list-style-position: outside;
  display: grid;
  gap: 9px;
  color: #284952;
}

.residential-compare__card li {
  margin-left: 18px;
}

.residential-compare__card h3 {
  font-size: clamp(1.35rem, 2.3vw, 1.7rem);
}

.residential-compare__card--old {
  background: rgba(255, 255, 255, 0.84);
}

.residential-compare__card--new {
  background: linear-gradient(165deg, rgba(236, 250, 247, 0.94) 0%, rgba(255, 255, 255, 0.84) 100%);
  border-color: rgba(13, 149, 136, 0.28);
}

.residential-compare__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 54px rgba(10, 29, 34, 0.14);
}

.residential-flywheel {
  margin-top: 24px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.residential-flywheel article {
  border-radius: var(--radius-md);
  border: 1px solid rgba(17, 40, 45, 0.13);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-md);
  padding: 18px;
  display: grid;
  gap: 8px;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.residential-flywheel span {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.residential-flywheel h3 {
  font-size: 1.06rem;
}

.residential-flywheel article:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(10, 28, 35, 0.14);
}

.residential-cta {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(12, 138, 126, 0.3);
  background: linear-gradient(145deg, rgba(236, 250, 247, 0.95) 0%, rgba(255, 255, 255, 0.86) 100%);
  box-shadow: var(--shadow-lg);
  padding: clamp(22px, 4vw, 36px);
  display: grid;
  gap: 14px;
}

.residential-cta h2 {
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  max-width: 24ch;
}

.commercial-momentum {
  margin-top: 22px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.commercial-momentum article {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 237, 232, 0.82) 100%);
  box-shadow: var(--shadow-md);
  padding: 20px;
  display: grid;
  gap: 8px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.commercial-momentum article::after {
  content: "";
  position: absolute;
  inset: auto -24px -24px auto;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(219, 107, 65, 0.14) 0%, rgba(219, 107, 65, 0) 72%);
}

.commercial-momentum h3 {
  font-size: 1.14rem;
  color: #13242b;
}

.commercial-momentum article:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(10, 29, 34, 0.16);
}

.commercial-compare {
  margin-top: 6px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.commercial-compare__card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 22px;
  display: grid;
  gap: 10px;
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.commercial-compare__card ul {
  margin: 0;
  padding-left: 0;
  list-style-position: outside;
  display: grid;
  gap: 9px;
  color: #284952;
}

.commercial-compare__card li {
  margin-left: 18px;
}

.commercial-compare__card h3 {
  font-size: clamp(1.35rem, 2.3vw, 1.7rem);
}

.commercial-compare__card--plain {
  background: rgba(255, 255, 255, 0.84);
}

.commercial-compare__card--pro {
  background: linear-gradient(165deg, rgba(255, 247, 241, 0.94) 0%, rgba(255, 255, 255, 0.84) 100%);
  border-color: rgba(219, 106, 64, 0.28);
}

.commercial-compare__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 54px rgba(10, 29, 34, 0.14);
}

.commercial-flywheel {
  margin-top: 24px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.commercial-flywheel article {
  border-radius: var(--radius-md);
  border: 1px solid rgba(17, 40, 45, 0.13);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-md);
  padding: 18px;
  display: grid;
  gap: 8px;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.commercial-flywheel span {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.commercial-flywheel h3 {
  font-size: 1.06rem;
}

.commercial-flywheel article:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(10, 28, 35, 0.14);
}

.commercial-cta {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(216, 105, 65, 0.3);
  background: linear-gradient(145deg, rgba(255, 245, 238, 0.95) 0%, rgba(255, 255, 255, 0.86) 100%);
  box-shadow: var(--shadow-lg);
  padding: clamp(22px, 4vw, 36px);
  display: grid;
  gap: 14px;
}

.commercial-cta h2 {
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  max-width: 24ch;
}

.section {
  margin-top: var(--space);
  scroll-margin-top: 120px;
}

.section-head {
  max-width: 760px;
  display: grid;
  gap: 12px;
}

.section-head h2 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  letter-spacing: -0.03em;
  color: #0f2025;
}

.card-grid {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.card-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--highlight) 100%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 52px rgba(10, 29, 34, 0.14);
  border-color: var(--line-strong);
}

.card:hover::before {
  opacity: 1;
}

.card h3,
.card h4 {
  font-size: 1.2rem;
  color: #102229;
}

.card p,
.card li {
  font-size: 0.94rem;
}

.media-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-md);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.media-card img {
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.media-card__body {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.media-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 52px rgba(10, 29, 34, 0.14);
}

.media-card:hover img {
  transform: scale(1.04);
}

.metric-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
  display: grid;
  gap: 6px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.metric span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3a5f68;
  font-weight: 700;
}

.metric strong {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  color: #102227;
}

.metric:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(10, 29, 34, 0.14);
}

.split {
  margin-top: 24px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.15fr 0.85fr;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  padding: 22px;
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.panel h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.panel ul,
.panel ol {
  display: grid;
  gap: 9px;
  color: #2a4b55;
  padding-left: 2px;
}

.panel:hover {
  transform: translateY(-8px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 50px rgba(10, 29, 34, 0.13);
}

.stack-image {
  height: 100%;
  min-height: 280px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
  filter: saturate(1.04);
}

.stack-image:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 24px 54px rgba(10, 29, 34, 0.16);
}

.gallery {
  margin-top: 22px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.gallery figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  min-height: 160px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

.gallery figure:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 25px 56px rgba(10, 29, 34, 0.16);
}

.gallery figure:hover img {
  transform: scale(1.045);
}

.gallery figure:nth-child(1) {
  grid-column: span 7;
}

.gallery figure:nth-child(2) {
  grid-column: span 5;
}

.gallery figure:nth-child(3) {
  grid-column: span 4;
}

.gallery figure:nth-child(4) {
  grid-column: span 4;
}

.gallery figure:nth-child(5) {
  grid-column: span 4;
}

.table-like {
  margin-top: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.table-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  border-bottom: 1px solid rgba(13, 34, 40, 0.1);
  background: rgba(255, 255, 255, 0.86);
  transition: background-color 0.18s ease;
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row div {
  padding: 14px 16px;
  font-size: 0.92rem;
}

.table-row div:first-child {
  background: rgba(243, 247, 246, 0.88);
  font-weight: 700;
  color: #17353d;
}

.table-row:hover {
  background: rgba(255, 255, 255, 0.94);
}

.zone-pills {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zone-pills span,
.zone-pills a {
  border-radius: 999px;
  padding: 7px 12px;
  border: 1px solid rgba(14, 35, 40, 0.2);
  background: rgba(255, 255, 255, 0.86);
  color: #244852;
  font-size: 0.78rem;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.zone-pills span:hover,
.zone-pills a:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.homes-toolbar {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  padding: 22px 24px;
  display: grid;
  gap: 14px;
}

.homes-filter {
  display: grid;
  gap: 12px;
}

.homes-filter__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.homes-filter label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #274952;
}

.homes-filter select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(11, 33, 38, 0.2);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.88rem;
  color: #183840;
  background: rgba(255, 255, 255, 0.95);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.homes-filter select:hover {
  border-color: var(--line-strong);
}

.homes-filter select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border-radius: 999px;
  border: 1px solid rgba(15, 36, 40, 0.2);
  background: rgba(255, 255, 255, 0.84);
  color: #244851;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.filter-chip:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.filter-chip.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(125deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 0.86rem;
  color: #2a4b54;
}

.result-meta strong {
  color: #12242b;
  font-size: 0.95rem;
}

.listing-grid {
  margin-top: 20px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.listing-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.listing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 60px rgba(10, 29, 34, 0.18);
}

.listing-card img {
  height: 240px;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.listing-card:hover img {
  transform: scale(1.06);
}

.listing-card__body {
  padding: 20px 22px;
  display: grid;
  gap: 12px;
}

.listing-card h3 {
  font-size: 1.22rem;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.listing-meta span {
  border-radius: 999px;
  border: 1px solid rgba(15, 36, 40, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: #274b54;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-pill {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.listing-actions .btn {
  padding: 11px 18px;
  font-size: 0.82rem;
}

.listing-empty {
  margin-top: 14px;
  border: 1px dashed rgba(17, 40, 45, 0.3);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
  text-align: center;
}

.helper-note {
  font-size: 0.84rem;
  color: #2b4f57;
}

.floating-cta {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 180;
  border-radius: 999px;
  background: linear-gradient(125deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(8, 24, 31, 0.3);
  display: none;
}

.faq-grid {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

details.faq-item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  padding: 12px 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

details.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #183941;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item p {
  margin-top: 8px;
}

details.faq-item[open] {
  border-color: var(--accent-ring);
  box-shadow: var(--shadow-sm);
}

details.faq-item:hover {
  transform: translateY(-2px);
}

.form-wrap {
  margin-top: 24px;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

.contact-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 14px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 54px rgba(10, 29, 34, 0.14);
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact-list a,
.contact-list span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  border: 1px solid rgba(15, 38, 44, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #244951;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  white-space: normal;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-list a:hover,
.contact-list span:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.commercial-contact-points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #2a4e56;
}

.residential-contact-points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #2a4e56;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 0.83rem;
  font-weight: 700;
  color: #2b4b53;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(11, 33, 38, 0.2);
  padding: 13px 16px;
  font: inherit;
  font-size: 0.92rem;
  color: #183840;
  background: rgba(255, 255, 255, 0.95);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(14, 147, 136, 0.26);
  border-color: rgba(14, 147, 136, 0.4);
  box-shadow: 0 0 0 6px rgba(14, 147, 136, 0.11);
}

.form-status {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2a4e56;
}

.form-status.is-success {
  color: var(--accent-strong);
}

.site-footer {
  margin: var(--space) auto 30px;
  width: var(--container);
  padding: 40px 36px 28px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 18px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.86) 0%, rgba(248, 244, 237, 0.78) 100%);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 0;
}

.site-footer p {
  max-width: 72ch;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* -- Multi-column footer layout -- */
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 28px;
}

.footer-brand {
  max-width: 340px;
  display: grid;
  gap: 10px;
}

.footer-brand .brand {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #102127;
  letter-spacing: -0.02em;
}

.footer-brand p:not(.brand) {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #4a6a72;
}

.footer-nav {
  display: flex;
  gap: 48px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a3a42;
  margin: 0 0 4px;
}

.footer-col a {
  font-size: 0.84rem;
  font-weight: 500;
  color: #4a6a72;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-col a:hover {
  color: var(--accent-strong);
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid rgba(15, 36, 40, 0.1);
  padding-top: 20px;
  text-align: center;
}

.footer-bottom small {
  font-size: 0.78rem;
  color: #6a8a92;
}

/* Legacy pill-button footer links (fallback) */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.footer-links a {
  border-radius: 999px;
  border: 1px solid rgba(15, 36, 40, 0.2);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.8rem;
  font-weight: 700;
  color: #244851;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.footer-links a:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes ambienceDrift {
  0% {
    transform: translate3d(-1.5%, 0, 0);
  }

  100% {
    transform: translate3d(1.5%, 1.5%, 0);
  }
}

/* Entry page */
.entry {
  width: min(1180px, 94vw);
  margin: clamp(24px, 4vw, 40px) auto;
}

.entry-hero {
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
  margin-bottom: 22px;
}

.entry-hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  color: #102127;
  text-wrap: balance;
}

.entry-hero p {
  max-width: 74ch;
}

.role-chooser {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.role-panel {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  background: #0c1a1d;
  min-height: 560px;
  box-shadow: var(--shadow-lg);
  display: grid;
  transition: transform 0.34s ease, box-shadow 0.34s ease;
}

.role-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.role-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    175deg,
    rgba(9, 19, 24, 0.08) 0%,
    rgba(9, 19, 24, 0.35) 35%,
    rgba(9, 19, 24, 0.7) 58%,
    rgba(9, 19, 24, 0.92) 82%
  );
}

.role-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.role-panel__body {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 32px 28px;
  display: grid;
  gap: 14px;
}

.role-panel__body h2 {
  color: #f7fcff;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.role-panel__body p {
  color: rgba(241, 247, 249, 0.92);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.role-panel .kicker {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.role-panel button {
  width: fit-content;
}

.role-panel:hover {
  transform: translateY(-8px);
  box-shadow: 0 34px 78px rgba(7, 20, 26, 0.28);
}

.role-panel:hover img {
  transform: scale(1.05);
}

.entry-grid {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.entry-feature {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.entry-feature h3 {
  font-size: 1.08rem;
  margin-bottom: 6px;
}

.entry-feature:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 42px rgba(10, 29, 34, 0.14);
}

/* Responsive */
@media (max-width: 1120px) {
  .hero__layout,
  .split,
  .form-wrap {
    grid-template-columns: 1fr;
  }

  .hero__media {
    min-height: 280px;
  }

  .hero__media img:first-child {
    height: 200px;
  }

  .card-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .commercial-momentum,
  .commercial-flywheel,
  .residential-momentum,
  .residential-flywheel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery figure:nth-child(1),
  .gallery figure:nth-child(2),
  .gallery figure:nth-child(3),
  .gallery figure:nth-child(4),
  .gallery figure:nth-child(5) {
    grid-column: span 6;
  }
}

@media (max-width: 900px) {
  .site-header {
    top: 8px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid rgba(17, 35, 40, 0.12);
    padding-top: 10px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    text-align: center;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .header-actions {
    display: none;
  }

  .nav-role-switch {
    display: inline-flex;
    justify-content: center;
    margin-top: 8px;
  }

  .card-grid--3,
  .card-grid--2,
  .role-chooser,
  .entry-grid,
  .commercial-momentum,
  .commercial-flywheel,
  .commercial-compare,
  .residential-momentum,
  .residential-flywheel,
  .residential-compare {
    grid-template-columns: 1fr;
  }

  .gallery figure {
    grid-column: span 12;
  }

  .metric-grid,
  .table-row {
    grid-template-columns: 1fr;
  }

  .homes-filter__grid {
    grid-template-columns: 1fr;
  }

  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-cta {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .hero__actions,
  .footer-links {
    flex-direction: column;
    width: 100%;
  }

  .btn,
  .role-panel button,
  .footer-links a {
    width: 100%;
  }

  .card-grid--4 {
    grid-template-columns: 1fr;
  }

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

  .site-footer {
    padding: 24px 20px 18px;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }

  .footer-brand {
    max-width: 100%;
  }

  .footer-nav {
    gap: 32px;
  }

  .panel,
  .card,
  .contact-card {
    padding: 16px;
  }
}

/* ======================================================
   WORLD-CLASS UI ENHANCEMENTS
   ====================================================== */

/* --- Noise texture overlay for depth --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.5;
}

/* --- Stagger reveal for card grids --- */
.reveal .card-grid > *,
.reveal .residential-momentum > *,
.reveal .commercial-momentum > *,
.reveal .residential-flywheel > *,
.reveal .commercial-flywheel > *,
.reveal .entry-grid > *,
.reveal .metric-grid > *,
.reveal .listing-grid > *,
.reveal .gallery > *,
.reveal.stats-row > *,
.reveal .category-grid > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible .card-grid > *,
.reveal.is-visible .residential-momentum > *,
.reveal.is-visible .commercial-momentum > *,
.reveal.is-visible .residential-flywheel > *,
.reveal.is-visible .commercial-flywheel > *,
.reveal.is-visible .entry-grid > *,
.reveal.is-visible .metric-grid > *,
.reveal.is-visible .listing-grid > *,
.reveal.is-visible .gallery > *,
.reveal.is-visible.stats-row > *,
.reveal.is-visible .category-grid > * {
  opacity: 1;
  transform: none;
}

.reveal.is-visible .card-grid > *:nth-child(1),
.reveal.is-visible .residential-momentum > *:nth-child(1),
.reveal.is-visible .commercial-momentum > *:nth-child(1),
.reveal.is-visible .residential-flywheel > *:nth-child(1),
.reveal.is-visible .commercial-flywheel > *:nth-child(1),
.reveal.is-visible .entry-grid > *:nth-child(1),
.reveal.is-visible .metric-grid > *:nth-child(1),
.reveal.is-visible .listing-grid > *:nth-child(1),
.reveal.is-visible .gallery > *:nth-child(1),
.reveal.is-visible.stats-row > *:nth-child(1),
.reveal.is-visible .category-grid > *:nth-child(1) { transition-delay: 0ms; }

.reveal.is-visible .card-grid > *:nth-child(2),
.reveal.is-visible .residential-momentum > *:nth-child(2),
.reveal.is-visible .commercial-momentum > *:nth-child(2),
.reveal.is-visible .residential-flywheel > *:nth-child(2),
.reveal.is-visible .commercial-flywheel > *:nth-child(2),
.reveal.is-visible .entry-grid > *:nth-child(2),
.reveal.is-visible .metric-grid > *:nth-child(2),
.reveal.is-visible .listing-grid > *:nth-child(2),
.reveal.is-visible .gallery > *:nth-child(2),
.reveal.is-visible.stats-row > *:nth-child(2),
.reveal.is-visible .category-grid > *:nth-child(2) { transition-delay: 80ms; }

.reveal.is-visible .card-grid > *:nth-child(3),
.reveal.is-visible .residential-momentum > *:nth-child(3),
.reveal.is-visible .commercial-momentum > *:nth-child(3),
.reveal.is-visible .residential-flywheel > *:nth-child(3),
.reveal.is-visible .commercial-flywheel > *:nth-child(3),
.reveal.is-visible .entry-grid > *:nth-child(3),
.reveal.is-visible .metric-grid > *:nth-child(3),
.reveal.is-visible .listing-grid > *:nth-child(3),
.reveal.is-visible .gallery > *:nth-child(3),
.reveal.is-visible.stats-row > *:nth-child(3),
.reveal.is-visible .category-grid > *:nth-child(3) { transition-delay: 160ms; }

.reveal.is-visible .card-grid > *:nth-child(4),
.reveal.is-visible .residential-momentum > *:nth-child(4),
.reveal.is-visible .commercial-momentum > *:nth-child(4),
.reveal.is-visible .residential-flywheel > *:nth-child(4),
.reveal.is-visible .commercial-flywheel > *:nth-child(4),
.reveal.is-visible .entry-grid > *:nth-child(4),
.reveal.is-visible .metric-grid > *:nth-child(4),
.reveal.is-visible .listing-grid > *:nth-child(4),
.reveal.is-visible .gallery > *:nth-child(4),
.reveal.is-visible.stats-row > *:nth-child(4),
.reveal.is-visible .category-grid > *:nth-child(4) { transition-delay: 240ms; }

.reveal.is-visible .card-grid > *:nth-child(5),
.reveal.is-visible .listing-grid > *:nth-child(5),
.reveal.is-visible .gallery > *:nth-child(5),
.reveal.is-visible .category-grid > *:nth-child(5) { transition-delay: 320ms; }

.reveal.is-visible .card-grid > *:nth-child(6),
.reveal.is-visible .listing-grid > *:nth-child(6),
.reveal.is-visible .category-grid > *:nth-child(6) { transition-delay: 400ms; }

.reveal.is-visible .listing-grid > *:nth-child(7),
.reveal.is-visible .category-grid > *:nth-child(7) { transition-delay: 480ms; }
.reveal.is-visible .listing-grid > *:nth-child(8) { transition-delay: 540ms; }
.reveal.is-visible .listing-grid > *:nth-child(9) { transition-delay: 600ms; }

/* --- Gradient text for hero headings --- */
.hero__copy h1 {
  background: linear-gradient(135deg, #0a1f26 0%, var(--accent-strong) 45%, #0a1f26 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.theme-commercial .hero__copy h1 {
  background: linear-gradient(135deg, #0a1f26 0%, var(--accent-strong) 50%, #0a1f26 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Floating animation for hero images --- */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes heroFloatAlt {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(0.5deg); }
}

.hero__media img:nth-child(1) {
  animation: heroFloat 6s ease-in-out infinite;
}

.hero__media img:nth-child(2) {
  animation: heroFloatAlt 7s ease-in-out infinite;
  animation-delay: -1.5s;
}

.hero__media img:nth-child(3) {
  animation: heroFloat 8s ease-in-out infinite;
  animation-delay: -3s;
}

/* --- Card glow on hover --- */
.card:hover,
.media-card:hover,
.listing-card:hover {
  box-shadow: 0 24px 52px rgba(10, 29, 34, 0.14),
    0 0 0 1px rgba(13, 149, 136, 0.12);
}

.theme-commercial .card:hover,
.theme-commercial .media-card:hover {
  box-shadow: 0 24px 52px rgba(10, 29, 34, 0.14),
    0 0 0 1px rgba(220, 111, 66, 0.12);
}

/* --- Better button shimmer --- */
.btn--primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.btn--primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 44px rgba(13, 29, 34, 0.3);
  filter: brightness(1.08);
}

.btn--primary:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.08s;
}

.btn--secondary:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 16px 38px rgba(8, 21, 24, 0.14);
}

.btn--secondary:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.08s;
}

/* --- FAQ chevron animation --- */
details.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

details.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform 0.3s ease;
}

details.faq-item[open] summary::after {
  transform: rotate(180deg);
}

details.faq-item p {
  animation: faqSlideIn 0.3s ease forwards;
}

@keyframes faqSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* --- Listing card image overlay gradient --- */
.listing-card img {
  position: relative;
}

.listing-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 240px;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.15) 100%);
  z-index: 1;
  pointer-events: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* --- Animated CTA sections border glow --- */
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 30px 90px rgba(8, 21, 24, 0.16), 0 0 0 0 rgba(13, 149, 136, 0); }
  50% { box-shadow: 0 30px 90px rgba(8, 21, 24, 0.16), 0 0 40px -8px rgba(13, 149, 136, 0.15); }
}

.residential-cta {
  animation: ctaGlow 4s ease-in-out infinite;
}

@keyframes ctaGlowCommercial {
  0%, 100% { box-shadow: 0 30px 90px rgba(8, 21, 24, 0.16), 0 0 0 0 rgba(220, 111, 66, 0); }
  50% { box-shadow: 0 30px 90px rgba(8, 21, 24, 0.16), 0 0 40px -8px rgba(220, 111, 66, 0.15); }
}

.commercial-cta {
  animation: ctaGlowCommercial 4s ease-in-out infinite;
}

/* --- Improved flywheel step numbers --- */
.residential-flywheel span,
.commercial-flywheel span {
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.residential-flywheel span::after,
.commercial-flywheel span::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 2px solid var(--accent-soft);
  animation: stepPulse 3s ease-in-out infinite;
}

@keyframes stepPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.15); }
}

/* --- Role panel parallax hover --- */
.role-panel {
  cursor: pointer;
}

.role-panel:hover::before {
  background: linear-gradient(
    175deg,
    rgba(9, 19, 24, 0.05) 0%,
    rgba(9, 19, 24, 0.32) 35%,
    rgba(9, 19, 24, 0.65) 58%,
    rgba(9, 19, 24, 0.88) 82%
  );
}

.role-panel:hover .role-panel__body {
  transform: translateY(-4px);
  transition: transform 0.4s ease;
}

/* --- Better mobile nav animation --- */
@media (max-width: 900px) {
  .site-nav {
    transform: translateY(-8px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease, display 0s 0.25s;
  }

  .site-nav.is-open {
    display: flex;
    transform: none;
    opacity: 1;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
}

/* --- Metric number accent color --- */
.metric strong {
  color: var(--accent-strong);
}

/* --- Better scroll progress gradient --- */
html::before {
  height: 3px;
  background: linear-gradient(90deg,
    var(--accent) 0%,
    var(--highlight) 40%,
    var(--accent-strong) 70%,
    var(--accent) 100%);
  border-radius: 0 2px 2px 0;
}

/* --- Smooth image hover for gallery --- */
.gallery figure {
  overflow: hidden;
}

.gallery figure img {
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s ease;
}

.gallery figure:hover img {
  transform: scale(1.06);
  filter: saturate(1.1) brightness(1.02);
}

/* --- Table row hover improvement --- */
.table-row:hover {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 4px 0 0 var(--accent);
}

.table-row:hover div:first-child {
  color: var(--accent-strong);
}

/* --- Better form input focus glow --- */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 2px 8px rgba(0, 0, 0, 0.06);
  background: #fff;
}

/* --- Floating CTA improvements --- */
.floating-cta {
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.floating-cta:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 22px 48px rgba(8, 24, 31, 0.38);
}

/* --- Better header on scroll --- */
.site-header {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* --- Status pill improvement --- */
.status-pill {
  position: relative;
  overflow: hidden;
}

.status-pill::before {
  content: "";
  position: static;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0;
  opacity: 1;
}

/* --- Compare cards visual indicator --- */
.residential-compare__card--old,
.commercial-compare__card--plain {
  border-left: 3px solid rgba(200, 80, 80, 0.3);
}

.residential-compare__card--new,
.commercial-compare__card--pro {
  border-left: 3px solid var(--accent);
}

/* --- Social proof section --- */
.stats-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  text-align: center;
  padding: 26px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 52px rgba(10, 29, 34, 0.14);
}

.stat-card strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: clamp(2.2rem, 3.4vw, 3.2rem);
  color: var(--accent-strong);
  line-height: 1.1;
}

.stat-card span {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

/* --- Trust badge row improvement --- */
.trust-row span {
  position: relative;
  padding-left: 22px;
}

.trust-row span::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Role chooser on entry page: hover contrast --- */
.role-chooser:has(.role-panel:hover) .role-panel:not(:hover) {
  opacity: 0.7;
  transform: scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* --- Pricing indicator for listing cards --- */
.listing-price {
  font-size: 1.5rem;
  font-family: "Fraunces", serif;
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: -0.01em;
}

.listing-price span {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
}

@media (max-width: 900px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 16px 12px;
  }
}

/* --- Category Overview Grid --- */
.category-grid {
  margin-top: 22px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  box-shadow: var(--shadow-md);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.65) 100%);
  z-index: 1;
  transition: background 0.35s ease;
}

.category-card:hover::before {
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.72) 100%);
}

.category-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-card:hover .category-card__img {
  transform: scale(1.08);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 64px rgba(8, 21, 24, 0.22);
}

.category-card__content {
  position: relative;
  z-index: 2;
  padding: 28px 24px;
}

.category-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.category-card__range {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.category-card__icon {
  display: none;
}

@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-card { min-height: 180px; }
}

@media (max-width: 640px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  .category-card { min-height: 160px; }
}

/* --- Extended filter grid (4-col for browse pages) --- */
.homes-filter__grid--extended {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .homes-filter__grid--extended {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .homes-filter__grid--extended {
    grid-template-columns: 1fr;
  }
}

/* --- Commercial listing meta sqft badge --- */
.listing-card--commercial .meta-sqft {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

/* --- Image skeleton loading shimmer --- */
@keyframes shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

.listing-card img,
.category-card__img,
.hero__media img,
.role-panel img,
.gallery img,
.media-card img {
  background: linear-gradient(90deg, #f0ebe4 25%, #e8e2d8 37%, #f0ebe4 63%);
  background-size: 936px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* --- Page entrance --- */
@keyframes pageEntrance {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

main.page,
main.entry {
  animation: pageEntrance 0.6s ease-out;
}

/* ====================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .reveal .card-grid > *,
  .reveal .residential-momentum > *,
  .reveal .commercial-momentum > *,
  .reveal .residential-flywheel > *,
  .reveal .commercial-flywheel > *,
  .reveal .entry-grid > *,
  .reveal .metric-grid > *,
  .reveal .listing-grid > *,
  .reveal .gallery > *,
  .reveal.stats-row > *,
  .reveal .category-grid > * {
    opacity: 1;
    transform: none;
  }

  body::after {
    animation: none;
  }

  html::before {
    display: none;
  }
}
