/* ──────────────────────────────────────────
   SERVICE DETAIL PAGES
────────────────────────────────────────── */

.svc-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted-dark);
  transition: color var(--t-fast), gap var(--t-base);
}
.svc-back:hover { color: #fff; gap: 0.8rem; }

/* ── Light layers: sticky photo, the room lights up one layer per step ── */
@property --z1 { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --z2 { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --z3 { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --z4 { syntax: '<number>'; inherits: true; initial-value: 0; }

.layers {
  background: var(--c-bg-dark);
  padding: 2rem 0 var(--sec-v);
  border-top: 1px solid var(--c-border-dark);
}

.layers__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 5rem;
  align-items: start;
}

.layers__intro { padding: 6rem 0 4rem; }
.layers__intro p {
  margin-top: 1.5rem;
  max-width: 400px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-muted-dark);
}

.layer-step {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
  opacity: 0.28;
  transition: opacity 0.7s ease;
}
.layer-step:last-child { min-height: 70vh; }
.layer-step.is-active { opacity: 1; }

.layer-step__num {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(255, 220, 170, 0.8);
  margin-bottom: 1rem;
}
.layer-step__title {
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1rem;
}
.layer-step__body {
  max-width: 380px;
  font-size: 0.9875rem;
  line-height: 1.8;
  color: var(--c-muted-dark);
}

.layers__stage {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  height: calc(100vh - var(--nav-h) - 4rem);
  display: flex;
  align-items: center;
}

.layers__frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 1024 / 559);
  max-height: 100%;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #000;
}

/* both copies are cropped identically (also trims the corner watermark) */
.layers__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transform-origin: 30% 20%;
  user-select: none;
  -webkit-user-drag: none;
}

/* Each layer only lights what actually emits light: a high-contrast copy keeps
   just the brightest pixels and is screened over the dark room inside that
   layer's zone. The city lights outside are always on (it's night).
   1 under-cabinet kitchen strip, 2 window strips + art, 3 ceiling cove; then all. */
.layers__img--glow {
  filter: brightness(0.6) contrast(5) saturate(0.6);
  mix-blend-mode: screen;
  --mask:
    radial-gradient(ellipse 13% 26% at 89% 66%, #000 60%, transparent 100%),
    radial-gradient(ellipse 13% 7% at 32.5% 45%, rgba(0,0,0,var(--z1)) 70%, transparent 100%),
    radial-gradient(ellipse 16% 9% at 90% 22%, rgba(0,0,0,var(--z3)) 60%, transparent 100%),
    radial-gradient(ellipse 50% 22% at 38% 13%, rgba(0,0,0,var(--z3)) 70%, transparent 100%),
    radial-gradient(ellipse 22% 14% at 80% 8%, rgba(0,0,0,var(--z3)) 60%, transparent 100%);
  -webkit-mask-image: var(--mask);
  mask-image: var(--mask);
  transition: --z1 1.4s var(--ease-io), --z2 1.4s var(--ease-io), --z3 1.4s var(--ease-io);
}
.layers__img--on {
  --mask:
    radial-gradient(ellipse 18% 16% at 34% 50%, rgba(0,0,0,calc(var(--z1) * 0.9)) 20%, transparent 100%),
    linear-gradient(to bottom, rgba(0,0,0,calc(var(--z3) * 0.8)) 0, rgba(0,0,0,calc(var(--z3) * 0.5)) 30%, transparent 55%),
    linear-gradient(rgba(0,0,0,var(--z4)), rgba(0,0,0,var(--z4)));
  -webkit-mask-image: var(--mask);
  mask-image: var(--mask);
  transition: --z1 1.4s var(--ease-io), --z2 1.4s var(--ease-io), --z3 1.4s var(--ease-io), --z4 1.8s var(--ease-io) 0.5s;
}
.layers__img--off { filter: brightness(0.28) saturate(0.6); }
.layers[data-active="1"] .layers__img--glow, .layers[data-active="1"] .layers__img--on { --z1: 1; }
.layers[data-active="2"] .layers__img--glow, .layers[data-active="2"] .layers__img--on { --z1: 1; --z2: 1; }
.layers[data-active="3"] .layers__img--glow { --z1: 1; --z2: 1; --z3: 1; }
.layers[data-active="3"] .layers__img--on { --z1: 1; --z2: 1; --z3: 1; --z4: 1; }

html:not(.motion) .layers__img--glow { display: none; }

/* Accent: a picture light on the painting — the canvas itself lights up
   (clipped to its exact outline) with a soft wash on the wall just above. */
.ilu__art,
.ilu__art-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease-io);
}
.ilu__art {
  background: url('../img/ilu-room.jpg') 0 0 / 100% 100% no-repeat;
  clip-path: polygon(50.5% 35.4%, 56.15% 35%, 56.15% 48.1%, 50.5% 47.4%);
  filter: brightness(1.12);
}
.ilu__art-wash {
  background: radial-gradient(ellipse 4.5% 6% at 53.3% 35.5%, rgba(255, 228, 190, 0.45), transparent 100%);
  mix-blend-mode: screen;
}
.layers[data-active="2"] .ilu__art,
.layers[data-active="2"] .ilu__art-wash,
.layers[data-active="3"] .ilu__art-wash { opacity: 1; }


/* Without the motion layer (no JS / reduced motion) the room is simply lit */
html:not(.motion) .layers__img--on { -webkit-mask-image: none; mask-image: none; }

.layers__legend {
  position: absolute;
  left: 1.5rem;
  bottom: 1.25rem;
  z-index: 2;
  display: flex;
  gap: 1.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.layers__legend span {
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.6s ease, text-shadow 0.6s ease;
}
.layers__legend span.is-on {
  color: #FFF4E2;
  text-shadow: 0 0 12px rgba(255, 200, 140, 0.7);
}

/* ── What's included ── */
.svc-includes {
  background: var(--c-bg);
  padding: var(--sec-v) 0;
}
.svc-includes__header { margin-bottom: 3.5rem; }

.svc-includes__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--c-border);
}
.svc-includes__item {
  padding: 2.5rem 3rem 2.5rem 0;
  border-bottom: 1px solid var(--c-border);
}
.svc-includes__item:nth-child(odd) {
  border-right: 1px solid var(--c-border);
}
.svc-includes__item:nth-child(even) { padding-left: 3rem; }

.svc-includes__title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: 0.75rem;
}
.svc-includes__body {
  max-width: 420px;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--c-text-muted);
}

/* ── FAQ ── */
.svc-faq {
  background: var(--c-bg);
  padding: 0 0 var(--sec-v);
}
.svc-faq__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 5rem;
}
.svc-faq__item { border-bottom: 1px solid var(--c-border); }
.svc-faq__item:first-child { border-top: 1px solid var(--c-border); }

.svc-faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 1.6rem 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--c-text);
  cursor: pointer;
  list-style: none;
}
.svc-faq__q::-webkit-details-marker { display: none; }
.svc-faq__q::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--c-text-muted);
  transition: transform 0.4s var(--ease-out);
}
.svc-faq__item[open] .svc-faq__q::after { transform: rotate(45deg); }

.svc-faq__a {
  padding: 0 3rem 1.75rem 0;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--c-text-muted);
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .layers__grid { grid-template-columns: 1fr; gap: 0; }
  /* photo pins under the navbar, the steps scroll beneath it */
  .layers__stage {
    order: -1;
    top: var(--nav-h);
    z-index: 2;
    height: auto;
    padding: 1rem 0;
    background: var(--c-bg-dark);
  }
  .layers__frame {
    width: auto;
    height: min(34vh, calc((100vw - 24px) / (var(--ar, 1024 / 559))));
    max-width: 100%;
    margin: 0 auto;
  }
  .layers__intro { padding: 3rem 0 1rem; }
  .layer-step { min-height: 55vh; }
  .layer-step:last-child { min-height: 60vh; }
  .layers__legend { left: 1rem; bottom: 0.9rem; gap: 0.9rem; font-size: 0.625rem; }

  .svc-includes__grid { grid-template-columns: 1fr; }
  .svc-includes__item,
  .svc-includes__item:nth-child(even) { padding: 2rem 0; border-right: none; }
  .svc-includes__item:nth-child(odd) { border-right: none; }

  .svc-faq__grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .layers__img--on { transition: none; }
  .layer-step { opacity: 1; transition: none; }
}

/* ── Photo hero for service pages ──
   Full-bleed photo; a soft shade on the left keeps the text readable,
   and the lamp "switches on" as the page loads. */
.page-hero--photo {
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-h) + 4rem) 0 5rem;
  background: #2a2016;
}
.page-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  z-index: 0;
}
.page-hero--photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(13, 15, 20, 0.55) 0, transparent 22%),
    linear-gradient(100deg, rgba(20, 14, 8, 0.78) 0%, rgba(20, 14, 8, 0.45) 38%, transparent 62%),
    linear-gradient(to top, rgba(13, 15, 20, 0.6) 0, transparent 30%);
}
.page-hero--photo .container { position: relative; z-index: 2; }
.page-hero--photo .page-hero__title em { color: #F3D9B1; }
.page-hero--photo .eyebrow { color: rgba(255, 236, 210, 0.75); }
.page-hero--photo .svc-back { color: rgba(255, 255, 255, 0.7); }

/* lamp off → the lit copy fades in on top: the lamp switches on */
.motion .page-hero__photo {
  filter: brightness(0.55) saturate(0.8);
  transform: scale(1.08);
  transition: filter 1.6s var(--ease-io) 0.2s, transform 2.8s var(--ease-out);
}
.motion.is-loaded .page-hero__photo { filter: none; transform: scale(1); }
.page-hero__photo--on { z-index: 0; }
.motion .page-hero__photo--on {
  opacity: 0;
  filter: none;
  transition: opacity 0.9s ease 1s, transform 2.8s var(--ease-out);
}
.motion.is-loaded .page-hero__photo--on { opacity: 1; filter: none; }

@media (max-width: 991px) {
  .page-hero--photo { min-height: 78vh; padding-bottom: 3.5rem; }
  .page-hero__photo { object-position: 62% 40%; }
}
@media (prefers-reduced-motion: reduce) {
  .motion .page-hero__photo { filter: none; transform: none; transition: none; }
  .motion .page-hero__photo--on { opacity: 1; }
}

/* ── Motorized shade (automation page) ──
   --open goes 0 (closed) → 1 (fully up); the room brightens with it. */
@property --open { syntax: '<number>'; inherits: true; initial-value: 0; }

.layers--shades .layers__frame { --open: 0; transition: --open 1.9s var(--ease-io); }
.layers--shades[data-active="1"] .layers__frame { --open: 0.33; }
.layers--shades[data-active="2"] .layers__frame { --open: 1; }
.layers--shades[data-active="3"] .layers__frame { --open: 0.5; }
html:not(.motion) .layers--shades .layers__frame { --open: 1; }

.layers__img--plain { transform: none; }
.shades__room {
  filter: brightness(calc(0.4 + var(--open) * 0.68)) saturate(calc(0.55 + var(--open) * 0.5)) contrast(calc(1 + var(--open) * 0.04));
}

/* The view outside: a real garden seen through glass — brighter than the
   room (it is daylight), a little hazy, slightly soft, never as crisp as inside. */
.shades__view {
  position: absolute;
  left: 6.4%;
  top: 17.1%;
  width: 42.3%;
  height: 43.1%;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.16) 0%, rgba(255, 252, 245, 0.04) 45%, transparent 100%),
    linear-gradient(118deg, transparent 30%, rgba(255, 255, 255, 0.07) 42%, transparent 56%),
    url('../img/auto-view.jpg') 50% 50% / auto 115% no-repeat;
  filter: blur(0.4px) saturate(1.05) contrast(0.95) brightness(calc(0.75 + var(--open) * 0.55));
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.22);
}

.shade {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  overflow: hidden;
  pointer-events: none;
}
/* Linen roller shade: a real linen photo as the cloth, lit from behind
   by the daylight (brighter in the middle, a bit darker at the edges). */
.shade__fabric {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc((1 - var(--open)) * 100%);
  background:
    linear-gradient(0deg, rgba(60, 48, 34, 0.25) 0, transparent 10px),
    radial-gradient(ellipse 85% 75% at 55% 40%, rgba(255, 246, 228, 0.35) 0%, rgba(255, 246, 228, 0) 70%),
    url('../img/linen.jpg') 0 0 / 520px auto repeat;
  background-color: #e4dccd;
  box-shadow:
    inset 12px 0 16px -12px rgba(50, 40, 28, 0.4),
    inset -12px 0 16px -12px rgba(50, 40, 28, 0.4);
  filter: brightness(calc(0.5 + var(--open) * 0.62)) saturate(calc(0.7 + var(--open) * 0.2));
}
.shade__fabric::after {
  content: '';
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: 0;
  height: 3px;
  border-radius: 1px;
  background: linear-gradient(180deg, #3a3d42, #1c1f23);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.shade::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  z-index: 1;
  background: linear-gradient(180deg, #34373c 0%, #1f2226 70%, #15171a 100%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .layers--shades .layers__frame { transition: none; }
}

/* ── Night at home (security page) ──
   One real photo: a dark copy underneath, the lit copy revealed zone by zone
   (garden → ground floor → whole house), the same way the lights come on. */
.guard__off { filter: brightness(0.2) saturate(0.35) hue-rotate(8deg); }
.guard__on {
  --mask:
    radial-gradient(ellipse 26% 20% at 22% 74%, rgba(0,0,0,var(--z1)) 30%, transparent 100%),
    radial-gradient(ellipse 16% 34% at 93% 66%, rgba(0,0,0,var(--z1)) 30%, transparent 100%),
    radial-gradient(ellipse 22% 16% at 80% 80%, rgba(0,0,0,var(--z1)) 20%, transparent 100%),
    radial-gradient(ellipse 14% 14% at 3% 66%, rgba(0,0,0,var(--z1)) 20%, transparent 100%),
    linear-gradient(to top, rgba(0,0,0,calc(var(--z1) * 0.85)) 0, rgba(0,0,0,calc(var(--z1) * 0.5)) 18%, transparent 34%),
    radial-gradient(ellipse 40% 22% at 46% 56%, rgba(0,0,0,var(--z2)) 55%, transparent 100%),
    radial-gradient(ellipse 22% 16% at 62% 35%, rgba(0,0,0,var(--z3)) 60%, transparent 100%),
    radial-gradient(ellipse 34% 20% at 55% 58%, rgba(0,0,0,var(--z3)) 60%, transparent 100%),
    radial-gradient(ellipse 50% 20% at 45% 88%, rgba(0,0,0,calc(var(--z3) * 0.8)) 30%, transparent 100%);
  -webkit-mask-image: var(--mask);
  mask-image: var(--mask);
  transition: --z1 1.3s var(--ease-io), --z2 1.6s var(--ease-io), --z3 1.8s var(--ease-io);
}
.layers--guard[data-active="1"] .guard__on { --z1: 1; filter: brightness(1.25) saturate(1.1); }
.guard__on { transition: --z1 1.3s var(--ease-io), --z2 1.6s var(--ease-io), --z3 1.8s var(--ease-io), filter 1.4s var(--ease-io); }
.layers--guard[data-active="2"] .guard__on { --z1: 1; --z2: 1; }
.layers--guard[data-active="3"] .guard__on { --z1: 1; --z2: 1; --z3: 1; }
html:not(.motion) .guard__on { -webkit-mask-image: none; mask-image: none; }

/* Phone-style notification: interface, not part of the scene */
.notif {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: min(300px, 70%);
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  background: rgba(22, 24, 30, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color: #fff;
  opacity: 0;
  transform: translateY(-12px) scale(0.97);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
  pointer-events: none;
}
.notif strong { display: block; font-size: 0.8125rem; font-weight: 600; letter-spacing: -0.01em; }
.notif span:not(.notif__icon) { display: block; margin-top: 2px; font-size: 0.72rem; color: rgba(255, 255, 255, 0.6); }
.notif__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 196, 120, 0.16);
  color: #FFD9A6;
}
.notif__icon svg { width: 16px; height: 16px; }
.notif--ok .notif__icon { background: rgba(140, 220, 170, 0.16); color: #A8E6BF; }
.layers--guard[data-active="1"] .notif[data-notif="1"],
.layers--guard[data-active="2"] .notif[data-notif="2"],
.layers--guard[data-active="3"] .notif[data-notif="3"] {
  opacity: 1;
  transform: none;
  transition-delay: 0.5s;
}

@media (max-width: 991px) {
  .notif { top: 0.6rem; right: 0.6rem; padding: 0.5rem 0.7rem; gap: 0.55rem; }
  .notif strong { font-size: 0.72rem; }
  .notif span:not(.notif__icon) { font-size: 0.64rem; }
  .notif__icon { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .guard__on, .notif { transition: none; }
}



/* ──────────────────────────────────────────
   App-style cards over a real photo (energy, voice, climate).
   They are interface, not part of the scene.
────────────────────────────────────────── */
.ui-card {
  position: absolute;
  z-index: 3;
  color: #fff;
  background: rgba(18, 20, 26, 0.74);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.ui-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
}
.ui-card__tag {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.64rem;
}

/* ── Energy ── */
.energy__room { filter: brightness(0.82) saturate(0.9); }
.energy-card {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.6s ease, transform 0.7s var(--ease-out);
  right: 1.2rem;
  top: 1.2rem;
  width: min(300px, 62%);
  padding: 1rem 1.1rem 0.9rem;
}
.energy-card__num {
  margin-top: 0.6rem;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.energy-card__num small { margin-left: 0.3rem; font-size: 0.85rem; font-weight: 500; color: rgba(255, 255, 255, 0.55); letter-spacing: 0; }
.energy-card__delta {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: #9FE3B6;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.layers--energy[data-active="2"] .energy-card__delta,
.layers--energy[data-active="3"] .energy-card__delta { opacity: 1; }
.energy-card__chart { display: block; width: 100%; height: 70px; margin-top: 0.8rem; overflow: visible; }
.energy-card__ref { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.energy-card__line {
  fill: none;
  stroke: #FFD9A6;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.6s var(--ease-io);
}
.layers--energy[data-active="1"] .energy-card__line { stroke-dashoffset: 66; }
.layers--energy[data-active="2"] .energy-card__line { stroke-dashoffset: 33; }
.layers--energy[data-active="3"] .energy-card__line { stroke-dashoffset: 0; }
.layers--energy:not([data-active="0"]) .energy-card { opacity: 1; transform: none; }
.energy-card__weeks { display: flex; justify-content: space-around; margin-top: 0.35rem; font-size: 0.62rem; color: rgba(255, 255, 255, 0.4); }

/* ── Voice: one real photo, the house answers in app-style bubbles ── */
.voice__room { filter: none; }
.voice-bubbles { position: absolute; left: 1.2rem; right: 1.2rem; top: 1.2rem; z-index: 3; }
.voice-bubble {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 100%;
  padding: 0.75rem 1rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
}
.voice-bubble strong { display: block; font-size: 0.95rem; font-weight: 500; min-height: 1.2em; }
.voice-bubble span:not(.voice-bubble__mic) { display: block; margin-top: 3px; font-size: 0.72rem; color: rgba(255, 255, 255, 0.55); opacity: 0; transition: opacity 0.5s ease 1.4s; }
.voice-bubble__mic {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 217, 166, 0.16);
  color: #FFD9A6;
}
.voice-bubble__mic svg { width: 16px; height: 16px; }
.layers--voice[data-active="1"] [data-voice="1"],
.layers--voice[data-active="2"] [data-voice="2"],
.layers--voice[data-active="3"] [data-voice="3"] { opacity: 1; transform: none; }
.layers--voice[data-active="1"] [data-voice="1"] span:not(.voice-bubble__mic),
.layers--voice[data-active="2"] [data-voice="2"] span:not(.voice-bubble__mic),
.layers--voice[data-active="3"] [data-voice="3"] span:not(.voice-bubble__mic) { opacity: 1; }

/* ── Climate ── */
.clima__room { filter: none; }
.clima-card {
  right: 1.2rem;
  bottom: 1.2rem;
  width: 210px;
  padding: 0.9rem 1rem 1rem;
  text-align: center;
}
.clima-card__dot { width: 8px; height: 8px; border-radius: 50%; background: #9FE3B6; box-shadow: 0 0 8px #9FE3B6; }
.clima-card__dial { position: relative; width: 130px; height: 130px; margin: 0.6rem auto 0.5rem; }
.clima-card__dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.clima-card__track, .clima-card__fill { fill: none; stroke-width: 6; }
.clima-card__track { stroke: rgba(255, 255, 255, 0.1); }
.clima-card__fill {
  stroke: #FFB27A;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 30;
  transition: stroke-dashoffset 1.4s var(--ease-io), stroke 1.4s var(--ease-io);
}
.layers--clima[data-active="2"] .clima-card__fill { stroke: #8FC8FF; stroke-dashoffset: 55; }
.layers--clima[data-active="3"] .clima-card__fill { stroke: #A9B8FF; stroke-dashoffset: 65; }
.clima-card__temp { position: absolute; inset: 0; display: grid; place-content: center; font-size: 2.3rem; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.clima-card__temp small { font-size: 0.8rem; font-weight: 500; color: rgba(255, 255, 255, 0.55); letter-spacing: 0; }
.clima-card__temp { grid-auto-flow: column; align-items: start; }
.clima-card__status { position: relative; height: 1.2em; font-size: 0.74rem; color: rgba(255, 255, 255, 0.7); }
.clima-card__status span { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; white-space: nowrap; }
.layers--clima[data-active="0"] [data-show="0"],
.layers--clima[data-active="1"] [data-show="1"],
.layers--clima[data-active="2"] [data-show="2"],
.layers--clima[data-active="3"] [data-show="3"] { opacity: 1; }

@media (max-width: 991px) {
  .ui-card { border-radius: 12px; }
  .energy-card { right: 0.6rem; top: 0.6rem; padding: 0.6rem 0.7rem; width: 58%; }
  .energy-card__num { font-size: 1.5rem; margin-top: 0.3rem; }
  .energy-card__chart { height: 36px; margin-top: 0.4rem; }
  .energy-card__weeks { display: none; }
  .clima-card { right: 0.6rem; bottom: 0.6rem; width: 140px; padding: 0.5rem; }
  .clima-card__dial { width: 78px; height: 78px; margin: 0.3rem auto; }
  .clima-card__temp { font-size: 1.4rem; }
  .clima-card__status { font-size: 0.6rem; }
  .voice-bubbles { left: 0.6rem; right: 0.6rem; top: 0.6rem; }
  .voice-bubble { padding: 0.5rem 0.7rem; }
  .voice-bubble strong { font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .energy-card__line, .clima-card__fill, .voice__on, .voice-bubble { transition: none; }
}

/* Legend stays readable over bright photos */
.layers__legend {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(13, 15, 20, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.layers__legend span { color: rgba(255, 255, 255, 0.45); }

@media (max-width: 991px) {
  .layers__legend { left: 0.6rem; bottom: 0.6rem; padding: 0.3rem 0.6rem; gap: 0.7rem; font-size: 0.56rem; }
  .clima-card { width: 104px; padding: 0.4rem 0.45rem; right: 0.5rem; bottom: auto; top: 0.5rem; }
  .clima-card .ui-card__top { font-size: 0.56rem; }
  .clima-card__dial { width: 58px; height: 58px; margin: 0.2rem auto; }
  .clima-card__temp { font-size: 1.05rem; }
  .clima-card__status { font-size: 0.5rem; height: 2.4em; white-space: normal; }
  .clima-card__status span { white-space: normal; line-height: 1.2; }
  .energy-card { width: 52%; }
  .voice-bubble span:not(.voice-bubble__mic) { font-size: 0.64rem; }
}
