/* ============== HEADER ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.site-header.is-scrolled {
  border-bottom-color: var(--color-divider);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-primary);
}
.brand-mark {
  flex-shrink: 0;
}
.brand-logo-img {
  height: 42px;
  width: auto;
  border-radius: 6px;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.brand-tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.primary-nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  position: relative;
  padding-block: var(--space-2);
}
.primary-nav a:hover {
  color: var(--color-text);
}
.primary-nav a.nav-cta {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
}
.primary-nav a.nav-cta:hover {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
}
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface);
}
@media (max-width: 880px) {
  .primary-nav {
    display: none;
  }
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  border-color: var(--color-border);
  color: var(--color-text);
  background: transparent;
}
.btn-ghost:hover {
  background: var(--color-surface);
  border-color: var(--color-text-muted);
}
.btn-large {
  padding: 1.1rem 2.2rem;
  font-size: var(--text-base);
}

/* ============== SECTION FRAME ============== */
.section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
  position: relative;
}
.section-head {
  max-width: 720px;
  margin: 0 auto var(--space-16);
  text-align: center;
}
.section-head--left {
  margin-inline: 0;
  text-align: left;
}
.section-head--center {
  text-align: center;
}
.eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-warm);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
[data-theme='dark'] .eyebrow {
  color: var(--color-accent-warm);
}
.section-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-5);
  color: var(--color-text);
}
.section-title em {
  font-style: italic;
  color: var(--color-primary);
}
.section-lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-inline: auto;
  line-height: 1.55;
}
.section-head--left .section-lede {
  margin-inline: 0;
}

/* ============== COBBLESTONE PATH DIVIDER ============== */
/* A winding garden footpath that ribbons between every section. The
   ::before / ::after fades match the surrounding section background so
   the path appears to grow out of the page itself. We use CSS variables
   set per-adjacency so we don't need to wire individual classes. */
.path-divider {
  --fade-top: var(--color-bg);
  --fade-bottom: var(--color-bg);
  height: clamp(160px, 20vw, 240px);
  width: 100%;
  background-image: url('../images/path-divider.png');
  background-size: cover;
  background-position: center;
  position: relative;
  margin: 0;
  pointer-events: none;
}
.path-divider::before,
.path-divider::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 70px;
  pointer-events: none;
}
.path-divider::before {
  top: 0;
  background: linear-gradient(to bottom, var(--fade-top), transparent);
}
.path-divider::after {
  bottom: 0;
  background: linear-gradient(to top, var(--fade-bottom), transparent);
}

/* Adjacency-aware fade colors: when the section above or below a
   path-divider uses --color-surface, fade to that color instead. */
.invisible + .path-divider,
.community + .path-divider,
.systems + .path-divider,
.audiences + .path-divider {
  --fade-top: var(--color-surface);
}
.path-divider:has(+ .invisible),
.path-divider:has(+ .community),
.path-divider:has(+ .systems),
.path-divider:has(+ .audiences) {
  --fade-bottom: var(--color-surface);
}
.path-divider:has(+ .contact) {
  --fade-bottom: var(--color-primary);
}

[data-theme='dark'] .path-divider {
  filter: brightness(0.5) saturate(0.7) hue-rotate(-5deg);
}

/* ============== HERO ============== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}
.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(14, 22, 32, 0.35) 0%,
      rgba(14, 22, 32, 0.15) 35%,
      rgba(14, 22, 32, 0.85) 100%
    ),
    linear-gradient(90deg, rgba(14, 22, 32, 0.55) 0%, rgba(14, 22, 32, 0) 60%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}
.hero-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-warm);
  margin-bottom: var(--space-5);
  font-weight: 600;
}
.hero-title {
  font-size: var(--text-hero);
  line-height: 1.18;
  font-weight: 400;
  margin-bottom: var(--space-6);
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5), 0 3px 24px rgba(0,0,0,0.35);
}
.hero-title em {
  font-style: italic;
  color: var(--color-accent-warm);
  text-shadow:
    0 1px 6px rgba(0,0,0,0.7),
    0 2px 20px rgba(0,0,0,0.5);
}
.hero-lede {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.85);
  max-width: 56ch;
  margin-bottom: var(--space-8);
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}
.hero-actions .btn-ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.hero-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stats strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-accent-warm);
}
.hero-stats span {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em;
}
@media (max-width: 720px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============== PROMISE PILLARS ============== */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.pillar {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.pillar-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-radius: var(--radius-lg);
}
.pillar-icon svg {
  width: 32px;
  height: 32px;
}
.pillar h3 {
  font-size: var(--text-xl);
  color: var(--color-text);
}
.pillar p {
  color: var(--color-text-muted);
  line-height: 1.65;
}
@media (max-width: 880px) {
  .pillars {
    grid-template-columns: 1fr;
  }
}

/* ============== INVISIBLE CARE ============== */
.invisible {
  background: var(--color-surface);
}
.invisible-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}
.invisible-copy h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-5);
}
.invisible-copy > p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
  line-height: 1.6;
  max-width: 50ch;
}
.invisible-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 56ch;
}
.invisible-list li {
  position: relative;
  padding-left: var(--space-6);
  color: var(--color-text);
  line-height: 1.6;
}
.invisible-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 10px;
  height: 10px;
  background: var(--color-accent-warm);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-accent-warm) 25%, transparent);
}
.invisible-list strong {
  color: var(--color-primary);
}
[data-theme='dark'] .invisible-list strong {
  color: var(--color-primary);
}

.invisible-visual {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
}
.sensor-mesh {
  width: 100%;
  height: auto;
}
.sensor-mesh .sensor {
  fill: var(--color-accent-warm);
  filter: drop-shadow(0 0 4px var(--color-accent-warm));
  animation: sensorPulse 3s ease-in-out infinite;
}
.sensor-mesh .s2 { animation-delay: 0.3s; }
.sensor-mesh .s3 { animation-delay: 0.6s; }
.sensor-mesh .s4 { animation-delay: 0.9s; }
.sensor-mesh .s5 { animation-delay: 1.2s; }
.sensor-mesh .s6 { animation-delay: 1.5s; }
.sensor-mesh .s7 { animation-delay: 1.8s; }
.sensor-mesh .s8 { animation-delay: 2.1s; }
.sensor-mesh .s9 { animation-delay: 2.4s; }
.sensor-mesh .s10 { animation-delay: 2.7s; }
.sensor-mesh .hub-pulse {
  animation: hubPulse 3s ease-out infinite;
  transform-origin: 260px 240px;
}
@keyframes sensorPulse {
  0%, 100% { opacity: 0.5; r: 4; }
  50% { opacity: 1; r: 6; }
}
@keyframes hubPulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(4); opacity: 0; }
}
.visual-caption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  font-style: italic;
}

/* Elderbot photo in the visual column */
.elderbot-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.elderbot-photo {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: var(--radius-lg);
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
@media (max-width: 880px) {
  .invisible-grid {
    grid-template-columns: 1fr;
  }
}

/* ============== BLUE ZONE ============== */
.bluezone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-16);
}
.bz-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-interactive),
    box-shadow var(--transition-interactive),
    border-color var(--transition-interactive);
}
.bz-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent-warm);
}
.bz-num {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-accent-warm);
  font-weight: 500;
  letter-spacing: 0.05em;
}
.bz-card h3 {
  font-size: var(--text-lg);
  color: var(--color-text);
}
.bz-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}
@media (max-width: 880px) {
  .bluezone-grid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 600px) and (max-width: 880px) {
  .bluezone-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.bluezone-figure {
  margin-top: var(--space-12);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.bluezone-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.bluezone-figure figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: linear-gradient(to top, rgba(14, 22, 32, 0.85), transparent);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  max-width: 60ch;
  line-height: 1.4;
}

/* ============== COMMUNITY ============== */
.community {
  background: var(--color-surface);
}
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
  margin-bottom: var(--space-16);
}
.community-copy h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-5);
}
.community-copy > p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
  line-height: 1.6;
  max-width: 50ch;
}
.community-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 56ch;
}
.community-list li {
  position: relative;
  padding-left: var(--space-6);
  line-height: 1.6;
}
.community-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 8px;
  background: var(--color-sage);
  border-radius: 50%;
}
.community-list strong {
  color: var(--color-primary);
}

.community-visual {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
}
.village-mesh {
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  height: auto;
}
.village-mesh .cottage-node circle {
  fill: var(--color-primary);
  animation: cottagePulse 4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  transform-origin: center;
}
.village-mesh .pavilion circle {
  animation: pavilionPulse 3s ease-out infinite;
  transform-origin: 240px 240px;
  transform-box: fill-box;
}
.mesh-label {
  font-family: var(--font-display);
  font-size: 14px;
  fill: var(--color-text-muted);
  font-style: italic;
  letter-spacing: 0.04em;
}
@keyframes cottagePulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; filter: drop-shadow(0 0 8px var(--color-primary)); }
}
@keyframes pavilionPulse {
  0% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 12px var(--color-accent-warm)); }
  100% { filter: drop-shadow(0 0 0 transparent); }
}
@media (max-width: 880px) {
  .community-grid {
    grid-template-columns: 1fr;
  }
}

.community-figure {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.community-figure img {
  width: 100%;
  display: block;
}

/* ---- Friendship image: symbolic intercultural Blue Zone moment ---- */
.community-friendship {
  position: relative;
  margin: clamp(48px, 7vw, 96px) auto 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-primary);
  isolation: isolate;
}
.community-friendship img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.001); /* avoid hairline edge */
}
.community-friendship figcaption {
  position: absolute;
  left: clamp(20px, 4vw, 56px);
  bottom: clamp(20px, 4vw, 48px);
  max-width: min(440px, 70%);
  padding: clamp(20px, 2.4vw, 32px) clamp(22px, 2.8vw, 36px);
  background: rgba(245, 240, 230, 0.94);
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 58, 92, 0.08);
  box-shadow: 0 18px 40px -18px rgba(26, 58, 92, 0.35);
  color: var(--color-primary);
}
.community-friendship .friendship-eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.6em;
}
.community-friendship figcaption p {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.35vw, 1.35rem);
  line-height: 1.45;
  font-weight: 400;
  color: var(--color-primary);
  margin: 0;
}
.community-friendship figcaption em {
  font-style: italic;
  color: var(--color-accent);
}
@media (max-width: 720px) {
  .community-friendship figcaption {
    position: static;
    max-width: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: var(--color-surface);
  }
}

/* ============== COTTAGE — FLOOR PLAN ============== */
.floorplan-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-8);
  background: #faf6ee;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-5), 3vw, var(--space-10));
  margin-bottom: var(--space-12);
}
.floorplan {
  background: #f5f0e6;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid rgba(0,0,0,0.08);
}
.floorplan-svg {
  width: 100%;
  height: auto;
}
.room-label {
  font-family: var(--font-display);
  font-size: 16px;
  fill: #1a2030;
}
.room-label.small {
  font-size: 13px;
}
.room-sub {
  font-size: 11px;
  fill: #4a5060;
  letter-spacing: 0.05em;
}
.hotspot {
  fill: var(--color-accent-warm);
  stroke: var(--color-bg);
  stroke-width: 3;
  cursor: pointer;
  filter: drop-shadow(0 0 4px var(--color-accent-warm));
  animation: hotspotPulse 2.5s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
  transition: transform 200ms ease;
}
.hotspot:hover,
.hotspot.is-active {
  fill: var(--color-primary);
  transform: scale(1.3);
  animation: none;
}
@keyframes hotspotPulse {
  0%, 100% { r: 8; opacity: 0.85; }
  50% { r: 12; opacity: 1; }
}

.feature-panel {
  padding: var(--space-6);
  background: #faf6ee;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 240px;
  align-self: stretch;
}
.feature-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-warm);
  font-weight: 600;
}
.feature-title {
  font-size: var(--text-lg);
  color: #1a2030;
}
.feature-body {
  color: #4a5060;
  font-size: var(--text-sm);
  line-height: 1.65;
}

@media (max-width: 880px) {
  .floorplan-wrapper {
    grid-template-columns: 1fr;
  }
}

.cottage-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.cottage-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
}
.cottage-figure img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.cottage-figure figcaption {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
}
@media (max-width: 880px) {
  .cottage-images {
    grid-template-columns: 1fr;
  }
}

/* ============== SYSTEMS ============== */
.systems {
  background: var(--color-surface);
}
.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.system-card {
  padding: var(--space-8);
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  transition: transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.system-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.system-card--accent {
  background: var(--color-bg);
  border-color: var(--color-divider);
  border-left: 3px solid var(--color-accent-warm);
}
.system-card--accent .system-tag {
  color: var(--color-accent-warm);
}
.system-card--accent h3,
.system-card--accent p {
  color: var(--color-text);
}
.system-tag {
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent-warm);
  font-weight: 600;
}
.system-card h3 {
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.system-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}
@media (max-width: 880px) {
  .systems-grid {
    grid-template-columns: 1fr;
  }
}

/* ============== ENERGY ============== */
.energy-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}
.energy-grid h2 {
  margin-bottom: var(--space-5);
}
.energy-grid p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
  max-width: 52ch;
  line-height: 1.6;
}
.energy-stats {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
}
.energy-stats li {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.energy-stats li:nth-last-child(-n+2) {
  border-bottom: none;
}
.energy-stats strong {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}
.energy-stats span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
@media (max-width: 880px) {
  .energy-grid {
    grid-template-columns: 1fr;
  }
}

/* ============== AUDIENCES ============== */
.audiences {
  background: var(--color-surface);
}
.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}
.audience-card {
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.audience-card h3 {
  font-size: var(--text-xl);
  color: var(--color-text);
}
.audience-lede {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  font-style: italic;
  line-height: 1.6;
  border-left: 3px solid var(--color-accent-warm);
  padding-left: var(--space-4);
}
.audience-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block: var(--space-3);
}
.audience-card li {
  padding-left: var(--space-5);
  position: relative;
  color: var(--color-text);
  font-size: var(--text-sm);
}
.audience-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-sage);
  font-weight: 600;
}
.audience-card .btn {
  align-self: flex-start;
  margin-top: var(--space-2);
}
@media (max-width: 880px) {
  .audience-grid {
    grid-template-columns: 1fr;
  }
}

/* ============== FAQ ============== */
.faq-inner {
  max-width: 800px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.faq-list details {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  transition: border-color var(--transition-interactive),
    background var(--transition-interactive);
}
.faq-list details[open] {
  border-color: var(--color-primary);
  background: var(--color-surface-2);
}
.faq-list summary {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  color: var(--color-text);
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: '+';
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-accent-warm);
  transition: transform 200ms ease;
}
.faq-list details[open] summary::after {
  transform: rotate(45deg);
}
.faq-list p {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  line-height: 1.65;
}
.faq-list em {
  font-style: italic;
  color: var(--color-text);
}

/* ============== CONTACT ============== */
.contact {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  position: relative;
}
.contact .section-title,
.contact .section-lede {
  color: var(--color-text-inverse);
}
.contact .section-lede {
  color: rgba(255, 255, 255, 0.85);
}
.contact .eyebrow {
  color: var(--color-accent-warm);
}
.contact-inner {
  max-width: 720px;
  margin: 0 auto;
}
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-12);
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.field--full {
  grid-column: 1 / -1;
}
.field label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--color-text-inverse);
  font-size: var(--text-base);
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent-warm);
  background: rgba(255, 255, 255, 0.12);
}
.field select option {
  color: var(--color-text);
  background: var(--color-bg);
}
.contact-form .btn {
  grid-column: 1 / -1;
  justify-self: start;
  background: var(--color-accent-warm);
  color: var(--color-primary);
}
.contact-form .btn:hover {
  background: var(--color-accent-warm-hover);
  color: var(--color-primary);
}
.contact-sent {
  text-align: center;
  padding: var(--space-12);
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  margin-top: var(--space-12);
}
.contact-sent h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}
.contact-sent a {
  color: var(--color-accent-warm);
  text-decoration: underline;
}
.contact-direct {
  text-align: center;
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
}
.contact-direct a {
  color: var(--color-accent-warm);
}
@media (max-width: 600px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
}

/* ============== FOOTER ============== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-12);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-8);
  align-items: start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-primary);
}
.footer-brand div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.footer-brand strong {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-text);
  font-size: var(--text-lg);
}
.footer-brand span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  justify-content: flex-end;
  align-items: center;
}
.footer-nav a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.footer-nav a:hover {
  color: var(--color-text);
}
.footer-fine {
  grid-column: 1 / -1;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-5);
  margin-top: var(--space-2);
}
@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-nav {
    justify-content: flex-start;
  }
}

/* ============== SCROLL REVEAL ============== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============== LANGUAGE SWITCHER ============== */
.lang-switcher {
  position: relative;
  display: inline-block;
  margin-right: 8px;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid color-mix(in oklab, var(--color-border) 80%, transparent);
  border-radius: 999px;
  background: var(--color-surface-elev, var(--color-surface));
  color: var(--color-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}
.lang-toggle:hover {
  background: color-mix(in oklab, var(--color-primary) 8%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-primary) 25%, var(--color-border));
}
.lang-toggle:focus-visible {
  outline: 2px solid var(--color-accent, var(--color-primary));
  outline-offset: 2px;
}
.lang-toggle svg {
  color: currentColor;
  flex-shrink: 0;
}
.lang-toggle-label {
  font-variant-numeric: tabular-nums;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 12px 36px -8px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.06);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1px;
  animation: langMenuIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.lang-menu[hidden] {
  display: none;
}
@keyframes langMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease;
}
.lang-option:hover,
.lang-option:focus-visible {
  background: color-mix(in oklab, var(--color-primary) 8%, transparent);
  outline: none;
}
.lang-option[aria-selected="true"] {
  background: color-mix(in oklab, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
}
.lang-option .lang-native {
  font-weight: 500;
}
.lang-option .lang-code {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-muted, color-mix(in oklab, var(--color-text) 55%, transparent));
}

/* Move language menu to the left in RTL */
[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

/* ============== RTL ADJUSTMENTS (Arabic) ============== */
[dir="rtl"] {
  /* Honor RTL flow */
  direction: rtl;
}
[dir="rtl"] .header-inner,
[dir="rtl"] .primary-nav {
  /* Flex children re-flow naturally; nothing to override */
}
[dir="rtl"] .brand {
  /* Logo + text — keep mark on the start (now the right side) */
}
[dir="rtl"] .invisible-grid,
[dir="rtl"] .community-grid,
[dir="rtl"] .floorplan-wrapper,
[dir="rtl"] .energy-grid,
[dir="rtl"] .audiences-grid {
  /* Grid columns flip via direction: rtl automatically — but we want
     the visual element (image/diagram) to remain on the right of the
     text in LTR, which becomes the left in RTL. Left as-is. */
}
[dir="rtl"] .invisible-list li,
[dir="rtl"] .community-list li {
  /* The leading checkmark/dot should stay on the start (now right) */
}
[dir="rtl"] .audience-card .audience-quote {
  /* Quote left-border flips to right-border */
  border-left: 0;
  border-right: 3px solid var(--color-accent);
  padding-left: 0;
  padding-right: 1rem;
}
[dir="rtl"] .community-friendship figcaption {
  left: auto;
  right: clamp(20px, 4vw, 56px);
}
[dir="rtl"] .footer-inner {
  /* keeps natural RTL flex order */
}
[dir="rtl"] .lang-switcher {
  margin-right: 0;
  margin-left: 8px;
}

/* For Arabic, nudge font choices: Fraunces lacks Arabic glyphs.
   We rely on system Arabic font stacks. */
[lang="ar"] {
  font-family: "Noto Naskh Arabic", "Amiri", "Geeza Pro", "Tahoma", system-ui, sans-serif;
}
[lang="ar"] .hero-title,
[lang="ar"] .section-title,
[lang="ar"] .brand-name,
[lang="ar"] .community-friendship figcaption p {
  font-family: "Noto Naskh Arabic", "Amiri", "Geeza Pro", system-ui, serif;
  font-weight: 600;
  letter-spacing: 0;
}
[lang="ar"] .hero-title em,
[lang="ar"] .community-friendship em {
  font-style: normal; /* italics don't exist in Arabic; use color emphasis */
  font-weight: 700;
}

/* For CJK, Devanagari — system fonts handle these well; just tune weights */
[lang="zh"] .hero-title,
[lang="zh"] .section-title,
[lang="ja"] .hero-title,
[lang="ja"] .section-title {
  letter-spacing: 0;
  font-weight: 600;
}
[lang="hi"] {
  /* Hindi can be a touch larger for legibility */
}
[lang="hi"] .hero-title em,
[lang="zh"] .hero-title em,
[lang="ja"] .hero-title em {
  font-style: normal;
  font-weight: 700;
}

/* Mobile: tighten lang menu */
@media (max-width: 640px) {
  .lang-toggle-label { display: none; }
  .lang-menu { min-width: 160px; }
}

/* ============== I18N TYPOGRAPHIC TUNING ============== */
/* CJK languages: characters render visually larger; reduce hero/section title sizes */
[lang="zh"] .hero-title,
[lang="ja"] .hero-title {
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  line-height: 1.4;
  letter-spacing: 0.01em;
}
[lang="zh"] .section-title,
[lang="ja"] .section-title {
  font-size: clamp(1.5rem, 2.6vw, 2.6rem);
  line-height: 1.5;
}
[lang="zh"] .hero-eyebrow,
[lang="ja"] .hero-eyebrow,
[lang="zh"] .eyebrow,
[lang="ja"] .eyebrow {
  letter-spacing: 0.08em;
}
/* Hide the English-tuned <br/> in hero title for CJK, where the prose flows naturally */
[lang="zh"] .hero-title br,
[lang="ja"] .hero-title br,
[lang="zh"] .section-title br,
[lang="ja"] .section-title br {
  display: none;
}

/* Hindi (Devanagari) — slightly larger leading, smaller hero size to handle ascenders */
[lang="hi"] .hero-title {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.45;
}
[lang="hi"] .section-title {
  line-height: 1.4;
}

/* Arabic — Noto Naskh runs slightly taller; tighten hero, increase line height */
[lang="ar"] .hero-title {
  font-size: clamp(2.6rem, 5.4vw, 4.8rem);
  line-height: 1.5;
}
[lang="ar"] .section-title {
  line-height: 1.55;
}
[lang="ar"] .hero-title br,
[lang="ar"] .section-title br {
  display: none;
}

/* Header navigation: prevent label wrapping; allow horizontal scroll on mobile if needed */
.primary-nav {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.primary-nav a {
  white-space: nowrap;
}

/* For verbose languages (de, fr, es), reduce nav gap so labels fit */
[lang="de"] .primary-nav,
[lang="fr"] .primary-nav,
[lang="es"] .primary-nav,
[lang="it"] .primary-nav {
  gap: clamp(12px, 1.6vw, 24px);
}
[lang="de"] .primary-nav a,
[lang="fr"] .primary-nav a {
  font-size: 0.92rem;
}

/* Header overall: when very tight, allow nav to scroll horizontally */
@media (max-width: 1100px) {
  .primary-nav {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
}

/* Prevent brand from wrapping in tight headers (esp. with longer-language nav) */
.brand-name { white-space: nowrap; }
.brand-tag { white-space: nowrap; }

/* ============== BRAND NAME — ENLARGED & SCRIPT-AWARE ============== */
/* Default: enlarge brand name across all languages; let display font shine */
.brand-name {
  font-size: clamp(1.25rem, 1.6vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Romance / Latin scripts — Fraunces display font already applied; gentle weight bump */
[lang="es"] .brand-name,
[lang="fr"] .brand-name,
[lang="it"] .brand-name {
  font-weight: 500;
  letter-spacing: 0;
}

/* German tends to be longer — keep readable but slightly tighter */
[lang="de"] .brand-name {
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
  letter-spacing: -0.01em;
}

/* Chinese — Song/Ming-style serif for elegance, larger because each glyph carries weight */
[lang="zh"] .brand-name {
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  font-size: clamp(1.45rem, 1.9vw, 1.85rem);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Japanese — Mincho serif for premium feel; katakana sized comfortably */
[lang="ja"] .brand-name {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif CJK JP", "Source Han Serif JP", serif;
  font-size: clamp(1.3rem, 1.7vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Hindi (Devanagari) — Noto Serif Devanagari for warmth; bump size for ascenders/descenders */
[lang="hi"] .brand-name {
  font-family: "Noto Serif Devanagari", "Tiro Devanagari Hindi", "Mangal", "Kohinoir Devanagari", serif;
  font-size: clamp(1.35rem, 1.75vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
}

/* Arabic — Noto Naskh; slightly larger to balance Latin elsewhere on the page */
[lang="ar"] .brand-name {
  font-family: "Noto Naskh Arabic", "Amiri", "Geeza Pro", "Tahoma", serif;
  font-size: clamp(1.45rem, 1.9vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

/* Mobile: keep brand readable without dominating */
@media (max-width: 640px) {
  .brand-name { font-size: 1.1rem; }
  [lang="zh"] .brand-name,
  [lang="ar"] .brand-name { font-size: 1.25rem; }
  [lang="ja"] .brand-name,
  [lang="hi"] .brand-name { font-size: 1.15rem; }
}

/* Brand tag (smaller subtitle line) — keep restrained, but allow per-script tuning */
[lang="zh"] .brand-tag,
[lang="ja"] .brand-tag,
[lang="ar"] .brand-tag,
[lang="hi"] .brand-tag {
  text-transform: none;       /* uppercase doesn't apply to non-Latin scripts */
  letter-spacing: 0.04em;
  font-size: 11.5px;
}
