:root,
[data-theme="chameleon"] {
  --brand-bg: #344d68;
  --brand-bg-2: #263d55;
  --brand-panel: #eef5f5;
  --brand-line: rgba(38, 61, 85, 0.16);
  --brand-text: #f8fbf7;
  --brand-muted: #d8e3e2;
  --brand-accent: #31c878;
  --brand-accent-2: #25b76f;
  --brand-warm: #f4f7f2;
  --brand-ink: #263d55;
  --paper: #f7faf7;
  --cinematic-intensity: 0;
  --cinematic-accent-shift: 0;
  --brand-return-progress: 0;
}

[data-theme="uphome"] {
  --brand-bg: #201207;
  --brand-bg-2: #3a1b08;
  --brand-panel: #fff4eb;
  --brand-line: rgba(255, 122, 26, 0.25);
  --brand-text: #fffaf4;
  --brand-muted: #ffd5b5;
  --brand-accent: #ff6b00;
  --brand-accent-2: #ffb357;
  --brand-warm: #17324a;
  --brand-ink: #201207;
  --paper: #fffaf4;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: #ffffff;
  color: #172b3f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#cinematic-layer {
  mix-blend-mode: screen;
  transition: opacity 420ms ease;
}

.cinematic-fallback #cinematic-layer {
  display: none !important;
}

.cinematic-stage::before {
  opacity: calc(0.14 + (var(--cinematic-intensity) * 0.24));
  transition: opacity 200ms linear;
}

.hero-cinematic-copy {
  position: relative;
  z-index: 10;
}

.cinematic-logo-cluster {
  position: relative;
  z-index: 10;
}

.cinematic-logo-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(4, 17, 28, 0.45);
  padding: 0.42rem 0.78rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 36px rgba(2, 10, 18, 0.28);
  backdrop-filter: blur(8px);
}

.cinematic-logo-chip img {
  border-radius: 0.3rem;
  object-fit: contain;
}

.cinematic-logo-chip.is-transform {
  border-color: rgba(255, 107, 0, 0.56);
  background: rgba(255, 107, 0, 0.2);
}

.cinematic-logo-chip.is-partner {
  border-color: rgba(100, 230, 186, 0.34);
}

.hero-uphome-bridge {
  background: linear-gradient(165deg, #04111d, #0b2437);
  color: #fff;
  isolation: isolate;
}

.hero-uphome-bridge-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 20%, rgba(100, 230, 186, 0.16), transparent 26rem),
    radial-gradient(circle at 78% 78%, rgba(255, 107, 0, 0.2), transparent 30rem);
  opacity: calc(0.25 + var(--cinematic-intensity) * 0.65);
}

.hero-uphome-bridge-grid {
  position: absolute;
  inset: 0;
  background:
    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;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  opacity: 0.24;
}

.bridge-logo-stage {
  position: relative;
  min-height: 24rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 90px rgba(1, 10, 18, 0.46);
  backdrop-filter: blur(10px);
}

.bridge-logo-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(4, 17, 29, 0.92);
  padding: 0.7rem 1rem;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.bridge-logo-orbit {
  position: absolute;
  inset: 0;
}

.bridge-logo-node {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  width: 9.2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.92);
  color: #102131;
  padding: 0.7rem;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 50px rgba(4, 13, 21, 0.3);
}

.bridge-logo-node img {
  max-width: 100%;
  height: 1.9rem;
  object-fit: contain;
}

.bridge-logo-node p {
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
}

.bridge-progress {
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 1.2rem;
  height: 0.34rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.bridge-progress span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #64e6ba, #ff6b00);
}

/* Chameleon brand refresh: calmer, photo-led, closer to chameleon-smarthome.com. */
[data-theme="chameleon"] header {
  border-bottom: 1px solid rgba(23, 43, 63, 0.1) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 14px 36px rgba(23, 43, 63, 0.08);
  backdrop-filter: blur(14px);
}

[data-theme="chameleon"] header img[alt="Chameleon"] {
  filter: none !important;
}

[data-theme="chameleon"] header [class*="text-white"] {
  color: #263d55 !important;
}

[data-theme="chameleon"] header [class*="text-white/60"] {
  color: rgba(38, 61, 85, 0.62) !important;
}

[data-theme="chameleon"] header .nav-link {
  color: #263d55;
}

[data-theme="chameleon"] header .nav-link:hover,
[data-theme="chameleon"] header .nav-link[aria-current="page"] {
  color: #25a968;
}

[data-theme="chameleon"] header select,
[data-theme="chameleon"] header button[aria-label="Toggle navigation"] {
  border-color: rgba(38, 61, 85, 0.14) !important;
  background: #f4f8f6 !important;
  color: #263d55 !important;
}

[data-theme="chameleon"] #mobile-menu {
  border-top-color: rgba(38, 61, 85, 0.1) !important;
  background: #ffffff !important;
}

[data-theme="chameleon"] .theme-shell {
  background: linear-gradient(145deg, #344d68, #263d55);
}

[data-theme="chameleon"] .btn-primary {
  background: #31c878;
  color: #17314a;
  box-shadow: 0 14px 34px rgba(49, 200, 120, 0.2);
}

[data-theme="chameleon"] .btn-secondary {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.88);
  color: #263d55;
}

section {
  scroll-margin-top: 5rem;
}

@media (min-width: 1536px) {
  .max-w-7xl {
    max-width: min(106rem, calc(100vw - 6rem));
  }

  .max-w-6xl {
    max-width: min(92rem, calc(100vw - 6rem));
  }
}

::selection {
  background: color-mix(in srgb, var(--brand-accent) 28%, transparent);
  color: var(--brand-ink);
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

[x-cloak] {
  display: none !important;
}

.theme-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(120deg, color-mix(in srgb, var(--brand-accent) 8%, transparent), transparent 38%),
    linear-gradient(165deg, var(--brand-bg), var(--brand-bg-2));
  color: var(--brand-text);
}

.corporate-hero {
  background:
    linear-gradient(135deg, rgba(48, 212, 125, 0.12), transparent 36%),
    linear-gradient(180deg, #f8fbf7, #ffffff);
}

.corporate-hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, rgba(6, 24, 39, 0.04), transparent 48%);
}

.intelligence-hero {
  background:
    radial-gradient(circle at 62% 28%, rgba(48, 212, 125, 0.18), transparent 28rem),
    radial-gradient(circle at 18% 76%, rgba(14, 165, 233, 0.12), transparent 32rem),
    linear-gradient(145deg, #02070c 0%, #061827 48%, #0a2638 100%);
  isolation: isolate;
}

.intelligence-hero::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 7, 12, 0.1), rgba(2, 7, 12, 0.42));
  content: "";
}

.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background:
    linear-gradient(rgba(100, 230, 186, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 230, 186, 0.08) 1px, transparent 1px),
    linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.08) 38% 38.16%, transparent 38.16% 100%);
  background-size: 76px 76px, 76px 76px, 100% 100%;
  mask-image: radial-gradient(circle at 68% 44%, black, transparent 76%);
}

.hero-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background: linear-gradient(180deg, transparent, rgba(100, 230, 186, 0.12), transparent);
  animation: scanline 8s ease-in-out infinite;
  transform: translateY(-100%);
}

.hero-command-stage {
  perspective: 1200px;
}

.hero-command-panel {
  transform: rotateX(4deg) rotateY(-7deg) rotateZ(0.6deg);
  transform-origin: center;
  animation: heroPanelDrift 12s ease-in-out infinite;
}

.building-grid {
  background:
    linear-gradient(rgba(100, 230, 186, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 230, 186, 0.14) 1px, transparent 1px);
  background-size: 34px 34px;
  box-shadow: inset 0 0 50px rgba(48, 212, 125, 0.12);
}

.signal-line {
  position: absolute;
  z-index: 4;
  height: 1px;
  overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(100, 230, 186, 0.36), transparent);
}

.signal-line::after {
  position: absolute;
  inset-block: -1px;
  left: -30%;
  width: 28%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #64e6ba, transparent);
  box-shadow: 0 0 24px rgba(100, 230, 186, 0.8);
  content: "";
  animation: signalTravel 4.8s ease-in-out infinite;
}

@keyframes heroPanelDrift {
  0%, 100% {
    transform: rotateX(4deg) rotateY(-7deg) rotateZ(0.6deg) translateY(0);
  }
  50% {
    transform: rotateX(3deg) rotateY(-5deg) rotateZ(0.2deg) translateY(-10px);
  }
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  55%, 100% {
    transform: translateY(100%);
  }
}

@keyframes signalTravel {
  0%, 18% {
    transform: translateX(0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    transform: translateX(520%);
    opacity: 0;
  }
}

.text-white\/56 { color: rgba(255, 255, 255, 0.56); }
.text-white\/58 { color: rgba(255, 255, 255, 0.58); }
.text-white\/62 { color: rgba(255, 255, 255, 0.62); }
.text-white\/64 { color: rgba(255, 255, 255, 0.64); }
.text-white\/68 { color: rgba(255, 255, 255, 0.68); }
.text-white\/72 { color: rgba(255, 255, 255, 0.72); }
.text-white\/74 { color: rgba(255, 255, 255, 0.74); }
.text-white\/78 { color: rgba(255, 255, 255, 0.78); }
.text-white\/82 { color: rgba(255, 255, 255, 0.82); }
.text-white\/85 { color: rgba(255, 255, 255, 0.85); }
.text-white\/88 { color: rgba(255, 255, 255, 0.88); }
.bg-white\/6 { background-color: rgba(255, 255, 255, 0.06); }

.cinematic-hero {
  isolation: isolate;
}

.cinematic-hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 7, 12, 0.02), rgba(2, 7, 12, 0.42));
  content: "";
}

.cinematic-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background:
    linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(125deg, transparent 0 42%, rgba(255, 255, 255, 0.08) 42% 42.12%, transparent 42.12% 100%);
  background-size: 72px 72px, 72px 72px, 100% 100%;
  mask-image: radial-gradient(circle at 64% 44%, black, transparent 74%);
}

.vertical-hero {
  background:
    radial-gradient(circle at 76% 28%, rgba(255, 107, 0, 0.26), transparent 30rem),
    radial-gradient(circle at 22% 82%, rgba(255, 179, 87, 0.13), transparent 28rem),
    linear-gradient(145deg, #130702 0%, #201207 52%, #351604 100%);
}

.uphome-page-hero {
  background:
    linear-gradient(180deg, #fffaf4 0%, #ffffff 58%, #fff7ec 100%);
  color: #201207;
}

.uphome-page-hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 107, 0, 0.12), transparent 32rem),
    radial-gradient(circle at 20% 80%, rgba(255, 152, 56, 0.06), transparent 28rem);
  content: "";
}

.commission-hero {
  background:
    radial-gradient(circle at 70% 24%, rgba(48, 212, 125, 0.2), transparent 28rem),
    radial-gradient(circle at 22% 82%, rgba(14, 165, 233, 0.13), transparent 30rem),
    linear-gradient(145deg, #02080d 0%, #061827 52%, #0a2638 100%);
}

.residential-hero {
  background: #061827;
}

.residential-hero::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(6, 24, 39, 0.96) 0%, rgba(6, 24, 39, 0.78) 42%, rgba(6, 24, 39, 0.34) 100%),
    linear-gradient(180deg, rgba(6, 24, 39, 0.12), rgba(6, 24, 39, 0.82));
  content: "";
}

.atlas-hero {
  background:
    radial-gradient(circle at 72% 24%, rgba(48, 212, 125, 0.18), transparent 28rem),
    radial-gradient(circle at 24% 78%, rgba(14, 165, 233, 0.13), transparent 32rem),
    linear-gradient(145deg, #02070c 0%, #061827 48%, #0b2331 100%);
}

.tower-stack,
.commission-board,
.home-command-panel,
.atlas-board,
.uphome-product-stage {
  transform: translateZ(0);
  animation: floatSlow 9s ease-in-out infinite;
}

.tower-stack {
  border: 1px solid rgba(255, 179, 87, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045)),
    rgba(32, 18, 7, 0.68);
  box-shadow: 0 42px 130px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(22px);
}

.tower-floor {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 179, 87, 0.18);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 107, 0, 0.16), rgba(255, 255, 255, 0.075));
}

.tower-floor::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 179, 87, 0.34), transparent);
  content: "";
  opacity: 0.4;
  transform: translateX(-100%);
  animation: signalTravel 5.6s ease-in-out infinite;
}

.hero-data-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  transition: transform 320ms ease-in-out, border-color 320ms ease-in-out, box-shadow 320ms ease-in-out;
}

.hero-data-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.26);
}

.commission-board {
  border: 1px solid rgba(100, 230, 186, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(rgba(100, 230, 186, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 230, 186, 0.09) 1px, transparent 1px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
  background-size: 32px 32px, 32px 32px, 100% 100%;
  box-shadow: 0 42px 140px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(20px);
}

.trace-line {
  position: absolute;
  height: 1px;
  overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(100, 230, 186, 0.42), transparent);
}

.trace-line::after {
  position: absolute;
  inset-block: -1px;
  left: -24%;
  width: 20%;
  border-radius: 999px;
  background: #64e6ba;
  box-shadow: 0 0 24px rgba(100, 230, 186, 0.8);
  content: "";
  animation: signalTravel 4.8s ease-in-out infinite;
}

.home-atmosphere {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(24px);
}

.scene-slider {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.scene-slider span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #30d47d, #64e6ba);
}

.atlas-board {
  border: 1px solid rgba(100, 230, 186, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 36%, rgba(100, 230, 186, 0.2), transparent 10rem),
    radial-gradient(circle at 72% 58%, rgba(14, 165, 233, 0.18), transparent 11rem),
    linear-gradient(rgba(100, 230, 186, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 230, 186, 0.08) 1px, transparent 1px),
    rgba(255, 255, 255, 0.06);
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
  box-shadow: 0 42px 140px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
}

.map-pin {
  position: absolute;
  display: grid;
  width: 0.95rem;
  height: 0.95rem;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-accent);
  box-shadow: 0 0 0 8px rgba(48, 212, 125, 0.12), 0 0 32px rgba(48, 212, 125, 0.62);
}

.map-pin::after {
  position: absolute;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(100, 230, 186, 0.3);
  border-radius: 999px;
  content: "";
  animation: pulseRing 2.8s ease-out infinite;
}

@keyframes pulseRing {
  from {
    transform: scale(0.56);
    opacity: 0.86;
  }
  to {
    transform: scale(1.45);
    opacity: 0;
  }
}

.project-map-stage {
  isolation: isolate;
}

#portfolio-leaflet-map {
  z-index: 1;
}

.leaflet-control-zoom {
  border: none !important;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.10) !important;
}

.leaflet-control-zoom a {
  background: #fff !important;
  color: #334155 !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  font-weight: 900;
  font-size: 15px;
  line-height: 26px !important;
  width: 28px !important;
  height: 28px !important;
}

.leaflet-control-zoom a:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.leaflet-bottom.leaflet-right {
  display: none !important;
}

.lf-pin-wrapper {
  overflow: visible !important;
  background: none !important;
  border: none !important;
}

.lf-pin {
  --pin-color: #31c878;
  --pin-ink: #061827;
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.lf-pin.is-uphome,
.reference-brand-pill.is-uphome {
  --pin-color: #ff6b00;
  --pin-ink: #fff8ef;
}

.lf-pin.is-chameleon,
.reference-brand-pill.is-chameleon {
  --pin-color: #446589;
  --pin-ink: #ffffff;
}

.lf-pin.is-ngbs,
.reference-brand-pill.is-ngbs {
  --pin-color: #00a099;
  --pin-ink: #ffffff;
}

.lf-pin.is-inheat,
.reference-brand-pill.is-inheat {
  --pin-color: #d6402b;
  --pin-ink: #fff8f4;
}

.lf-pin.is-metrodom,
.reference-brand-pill.is-metrodom {
  --pin-color: #d9854b;
  --pin-ink: #ffffff;
}

.lf-pin:hover {
  transform: translateY(-4px) scale(1.1);
  filter: drop-shadow(0 10px 16px rgba(15, 23, 42, 0.22));
  z-index: 999;
}

.lf-pin-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid color-mix(in srgb, var(--pin-color) 70%, transparent);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  animation: referencePinPulse 2.6s ease-out infinite;
}

.lf-pin-marker {
  position: relative;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px 999px 999px 0;
  background: var(--pin-color);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18), 0 0 0 5px color-mix(in srgb, var(--pin-color) 18%, transparent);
  transform: rotate(-45deg);
}

.lf-pin-marker span {
  color: var(--pin-ink);
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  transform: rotate(45deg);
}

.lf-pin-label {
  position: absolute;
  bottom: calc(100% + 0.45rem);
  left: 50%;
  min-width: 9.5rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
  color: #061827;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.4rem);
  transition: opacity 170ms ease, transform 170ms ease;
  white-space: nowrap;
  z-index: 9999;
}

.lf-pin-label strong,
.lf-pin-label small {
  display: block;
}

.lf-pin-label strong {
  font-size: 0.78rem;
  font-weight: 950;
}

.lf-pin-label small {
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
}

.lf-pin:hover .lf-pin-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reference-brand-pill {
  --pin-color: #31c878;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--pin-color) 24%, #e5e7eb);
  border-radius: 999px;
  background: #ffffff;
  padding: 0.45rem 0.65rem;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 950;
}

.reference-brand-pill span {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: var(--pin-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pin-color) 14%, transparent);
}

.project-modal {
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-modal.is-visible {
  opacity: 1;
}

.project-modal.is-closing {
  opacity: 0;
}

.project-modal-panel {
  opacity: 0;
  transform: translateY(1.8rem) scale(0.965);
  transition: opacity 260ms ease, transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.project-modal.is-visible .project-modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-modal.is-closing .project-modal-panel {
  opacity: 0;
  transform: translateY(1.1rem) scale(0.985);
}

.project-modal-media img {
  transform: scale(1.055);
  transition: transform 680ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.project-modal.is-visible .project-modal-media img {
  transform: scale(1);
}

.project-modal-copy > * {
  opacity: 0;
  transform: translateY(0.85rem);
}

.project-modal.is-visible .project-modal-copy > * {
  animation: modalContentReveal 420ms ease forwards;
}

.project-modal.is-visible .project-modal-copy > *:nth-child(2) { animation-delay: 40ms; }
.project-modal.is-visible .project-modal-copy > *:nth-child(3) { animation-delay: 80ms; }
.project-modal.is-visible .project-modal-copy > *:nth-child(4) { animation-delay: 120ms; }
.project-modal.is-visible .project-modal-copy > *:nth-child(5) { animation-delay: 160ms; }
.project-modal.is-visible .project-modal-copy > *:nth-child(6) { animation-delay: 200ms; }

@keyframes referencePinPulse {
  0% {
    opacity: 0.62;
    transform: translate(-50%, -50%) scale(0.58);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.45);
  }
}

@keyframes modalContentReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lf-pin,
  .lf-pin-label,
  .project-modal,
  .project-modal-panel,
  .project-modal-media img {
    transition: none;
  }

  .lf-pin-pulse,
  .project-modal.is-visible .project-modal-copy > * {
    animation: none;
  }

  .project-modal-copy > *,
  .project-modal-panel,
  .project-modal-media img {
    opacity: 1;
    transform: none;
  }
}

.section-padding {
  padding-block: clamp(3.5rem, 6.5vw, 6.75rem);
}

.section-padding h2 {
  font-size: clamp(1.85rem, 2.55vw, 2.75rem);
  letter-spacing: 0;
}

.section-padding h3[class*="text-4xl"] {
  font-size: clamp(1.65rem, 2.05vw, 2.25rem);
  letter-spacing: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  color: var(--brand-accent-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 8px;
  padding: 0.78rem 1rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 240ms ease, border-color 240ms ease, background-color 240ms ease, color 240ms ease, box-shadow 240ms ease;
}

.btn-primary {
  background: var(--brand-accent);
  color: var(--brand-ink);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid var(--brand-line);
  background: rgba(255, 255, 255, 0.1);
  color: var(--brand-text);
}

.btn-ghost {
  border: 1px solid rgba(16, 33, 49, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color: #102131;
}

.surface-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 33, 49, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 50px rgba(12, 31, 45, 0.08);
  transition: transform 320ms ease-in-out, border-color 320ms ease-in-out, background-color 320ms ease-in-out, box-shadow 320ms ease-in-out;
}

.dark-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
  transition: transform 320ms ease-in-out, border-color 320ms ease-in-out, background-color 320ms ease-in-out, box-shadow 320ms ease-in-out;
}

.surface-card::after,
.dark-card::after,
.hero-data-card::after,
.program-lane::after,
.feature-row::after,
.uphome-layer-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 38%, color-mix(in srgb, var(--brand-accent) 12%, transparent));
  content: "";
  opacity: 0;
  transition: opacity 340ms ease-in-out;
}

.surface-card:hover::after,
.dark-card:hover::after,
.hero-data-card:hover::after,
.program-lane:hover::after,
.feature-row:hover::after,
.uphome-layer-card:hover::after {
  opacity: 1;
}

article.surface-card:hover,
.business-panel:hover,
.metric-tile:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand-accent) 42%, rgba(16, 33, 49, 0.14));
  box-shadow: 0 30px 78px rgba(12, 31, 45, 0.14);
}

.grid-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255, 255, 255, 0.08) 18% 18.2%, transparent 18.2% 100%),
    linear-gradient(90deg, transparent 0 58%, rgba(255, 255, 255, 0.06) 58% 58.2%, transparent 58.2% 100%);
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.outcome-list {
  display: grid;
  gap: 0.75rem;
}

.outcome-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #405160;
  line-height: 1.55;
}

.outcome-list li::before {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.5rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--brand-accent);
  content: "";
}

.theme-shell .text-white\/60,
.theme-shell .text-white\/62,
.theme-shell .text-white\/64,
.theme-shell .text-white\/66,
.theme-shell .text-white\/68,
.theme-shell .text-white\/72,
.theme-shell .text-white\/74 {
  color: rgba(255, 255, 255, 0.82);
}

.uphome-business-section {
  background:
    linear-gradient(135deg, rgba(255, 107, 0, 0.12), transparent 36%),
    linear-gradient(180deg, #fff8ef, #ffffff 54%, #f7fbf8);
}

.brand-rail {
  position: relative;
  isolation: isolate;
  padding-top: clamp(3rem, 8vw, 5rem);
  background:
    radial-gradient(circle at 18% 30%, rgba(48, 212, 125, 0.15), transparent 24rem),
    radial-gradient(circle at 82% 72%, rgba(255, 107, 0, 0.12), transparent 26rem),
    linear-gradient(165deg, #061827 0%, #0b2232 100%);
}

.brand-rail::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: calc(var(--brand-return-progress) * 0.92);
  background:
    radial-gradient(circle at 22% 24%, rgba(49, 200, 120, 0.12), transparent 38%),
    linear-gradient(165deg, #344d68 0%, #263d55 100%);
  content: "";
}

.brand-rail::before {
  display: none;
}

.brand-rail > * {
  position: relative;
  z-index: 1;
}

[data-cinematic-return-target] {
  position: relative;
}

[data-cinematic-return-target]::before {
  position: absolute;
  inset: 0 0 auto;
  height: 8rem;
  pointer-events: none;
  opacity: calc(0.24 + (var(--brand-return-progress) * 0.6));
  background: linear-gradient(180deg, rgba(38, 61, 85, 0.16), rgba(38, 61, 85, 0));
  content: "";
}

.brand-rail .surface-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.92);
}

.program-matrix {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at 12% 20%, rgba(48, 212, 125, 0.13), transparent 24rem),
    radial-gradient(circle at 86% 64%, rgba(255, 107, 0, 0.13), transparent 25rem),
    #f6faf8;
}

.program-lane {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 33, 49, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 22px 70px rgba(12, 31, 45, 0.09);
  transition: transform 320ms ease-in-out, border-color 320ms ease-in-out, box-shadow 320ms ease-in-out;
}

.program-lane::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.28rem;
  background: var(--brand-accent);
  content: "";
}

.program-lane:hover {
  transform: translateY(-3px);
  border-color: rgba(48, 212, 125, 0.32);
  box-shadow: 0 30px 90px rgba(12, 31, 45, 0.13);
}

.business-panel {
  border: 1px solid rgba(16, 33, 49, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 80px rgba(12, 31, 45, 0.1);
  transition: transform 320ms ease-in-out, border-color 320ms ease-in-out, box-shadow 320ms ease-in-out;
}

.metric-tile {
  border: 1px solid rgba(16, 33, 49, 0.1);
  border-radius: 8px;
  background: #ffffff;
  padding: 1rem;
  transition: transform 320ms ease-in-out, border-color 320ms ease-in-out, box-shadow 320ms ease-in-out;
}

.uphome-visual-card {
  border: 1px solid rgba(255, 107, 0, 0.24);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #fff3e6);
  box-shadow: 0 28px 90px rgba(164, 77, 11, 0.16);
}

.persona-section {
  border-top: 1px solid rgba(16, 33, 49, 0.08);
  background: #ffffff;
}

.persona-section:nth-of-type(even) {
  background: #f6faf8;
}

.persona-index {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-accent);
  color: var(--brand-ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.persona-image {
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(12, 31, 45, 0.14);
}

.soft-stat {
  border-left: 3px solid var(--brand-accent);
  padding-left: 1rem;
}

.business-outcome-row {
  border-top: 1px solid rgba(16, 33, 49, 0.1);
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.business-outcome-row:first-child {
  border-top: 0;
}

.business-outcome-image {
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(12, 31, 45, 0.12);
}

.business-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.business-kpi strong {
  color: #061827;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 0.95;
}

.business-kpi span {
  color: #536371;
  font-size: 0.9rem;
  font-weight: 700;
}

.image-treatment {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  transform: translateZ(0);
}

.feature-row {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 33, 49, 0.08);
  transition: transform 320ms ease-in-out, border-color 320ms ease-in-out, box-shadow 320ms ease-in-out;
}

.feature-row:hover {
  transform: translateY(-2px);
  border-color: rgba(48, 212, 125, 0.3);
  box-shadow: 0 18px 42px rgba(12, 31, 45, 0.1);
}

.phone-frame {
  border: 10px solid #0d1720;
  border-radius: 2rem;
  background: linear-gradient(180deg, var(--brand-accent), var(--brand-accent-2));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.marquee {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.float-slow {
  animation: floatSlow 8s ease-in-out infinite;
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.86rem;
  font-weight: 750;
  transition: color 180ms ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -0.55rem;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--brand-accent-2);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.uphome-nav-powered-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  border: 1px solid rgba(255, 194, 0, 0.46);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 121, 0, 0.12), rgba(255, 194, 0, 0.08));
  padding: 0.45rem 0.88rem;
  max-width: min(72vw, 400px);
  box-shadow: 0 10px 28px rgba(7, 4, 2, 0.24);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.uphome-nav-powered-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 194, 0, 0.72);
  background: linear-gradient(135deg, rgba(255, 121, 0, 0.18), rgba(255, 194, 0, 0.12));
}

.uphome-nav-powered-logo {
  display: block;
  width: auto;
  height: 1.45rem;
  flex-shrink: 0;
}

.uphome-nav-powered-sep {
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.84rem;
  line-height: 1;
  flex-shrink: 0;
}

.uphome-nav-powered-copy {
  display: inline-flex;
  align-items: center;
  line-height: 1.05;
}

.uphome-nav-powered-line {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.uphome-nav-powered-ch-logo {
  display: block;
  width: auto;
  height: 0.95rem;
  flex-shrink: 0;
  opacity: 0.9;
}

@media (max-width: 640px) {
  .uphome-nav-powered-pill {
    padding: 0.42rem 0.66rem;
    gap: 0.46rem;
  }

  .uphome-nav-powered-logo {
    height: 1.22rem;
  }

  .uphome-nav-powered-line {
    font-size: 0.74rem;
  }

  .uphome-nav-powered-sep,
  .uphome-nav-powered-ch-logo {
    display: none;
  }
}

.language-menu {
  position: relative;
  z-index: 70;
}

.language-menu-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.75rem;
  padding: 0.68rem 0.82rem;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.language-menu-button:hover,
.language-menu.is-open .language-menu-button {
  transform: translateY(-1px);
}

.language-menu-list {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  display: grid;
  min-width: 11rem;
  gap: 0.28rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.9rem;
  padding: 0.35rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(18px);
}

.language-menu-list[hidden] {
  display: none;
}

.language-menu-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  transition: background-color 160ms ease, color 160ms ease;
}

.language-menu-code {
  font-size: 0.86rem;
  font-weight: 950;
}

.language-menu-name {
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.58;
}

[data-theme="chameleon"] header .language-menu-button {
  border-color: rgba(49, 200, 120, 0.62);
  background: rgba(6, 24, 39, 0.94);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(6, 24, 39, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

[data-theme="chameleon"] header .language-menu-button:hover,
[data-theme="chameleon"] header .language-menu.is-open .language-menu-button {
  border-color: rgba(100, 230, 186, 0.62);
  background: rgba(49, 200, 120, 0.96);
  color: #061827;
}

[data-theme="chameleon"] header .language-menu-list {
  border-color: rgba(49, 200, 120, 0.28);
  background: rgba(6, 24, 39, 0.96);
}

[data-theme="chameleon"] header .language-menu-option:hover,
[data-theme="chameleon"] header .language-menu-option.is-active {
  background: rgba(49, 200, 120, 0.16);
  color: #64e6ba;
}

[data-theme="uphome"] header .language-menu-button {
  border-color: rgba(255, 107, 0, 0.45);
  background: rgba(32, 18, 7, 0.94);
  color: #fff5ee;
  box-shadow: 0 12px 30px rgba(32, 18, 7, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

[data-theme="uphome"] header .language-menu-button:hover,
[data-theme="uphome"] header .language-menu.is-open .language-menu-button {
  border-color: rgba(255, 160, 77, 0.78);
  background: rgba(255, 107, 0, 0.96);
  color: #201207;
}

[data-theme="uphome"] header .language-menu-list {
  border-color: rgba(255, 107, 0, 0.38);
  background: rgba(32, 18, 7, 0.96);
}

[data-theme="uphome"] header .language-menu-option:hover,
[data-theme="uphome"] header .language-menu-option.is-active {
  background: rgba(255, 107, 0, 0.18);
  color: #ffa04d;
}

.footer-link {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  line-height: 1.9;
  transition: color 180ms ease;
}

.footer-link:hover {
  color: var(--brand-accent-2);
}

.focus-ring:focus-visible {
  outline: 3px solid var(--brand-accent-2);
  outline-offset: 3px;
}

.project-card {
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(12, 31, 45, 0.16);
}

/* Clickable small project cards — top accent bar */
article.project-card[role="button"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-accent);
  border-radius: 8px 8px 0 0;
  opacity: 0.5;
  z-index: 2;
}

.card-view-cta {
  display: block;
  margin-top: 1rem;
  font-size: 0.6875rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

.section-label {
  color: var(--brand-accent);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Keep interior headings closer to the calmer hierarchy used on polished product sites. */
@media (min-width: 1024px) {
  main > section:first-of-type :is(h1, h2)[class~="font-black"],
  .cin-title,
  .cin-flip-headline,
  .cin-finale-headline {
    line-height: 1.04 !important;
    text-wrap: balance;
  }

  main section:not(:first-of-type):not(.uphome-flagship) :is(h2, h3)[class~="font-black"][class*="text-4xl"][class*="sm:text-5xl"] {
    font-size: clamp(2rem, 2.9vw, 2.7rem) !important;
    line-height: 1.08 !important;
    text-wrap: balance;
  }

  main section:not(:first-of-type):not(.uphome-flagship) :is(h2, h3)[class~="font-black"][class*="text-3xl"][class*="sm:text-4xl"] {
    font-size: clamp(1.8rem, 2.55vw, 2.35rem) !important;
    line-height: 1.1 !important;
    text-wrap: balance;
  }

  main :is(h2, h3)[class~="font-black"][class*="text-3xl"],
  main :is(h2, h3)[class~="font-black"][class*="text-4xl"],
  main :is(h2, h3)[class~="font-black"][class*="text-5xl"] {
    line-height: 1.08 !important;
    text-wrap: balance;
  }

  main .section-label + :is(h1, h2, h3) {
    text-wrap: balance;
  }
}

/* ── shadow-soft helper (used in persona overlays) ── */
.shadow-soft {
  box-shadow: 0 8px 32px rgba(12, 31, 45, 0.18), 0 2px 8px rgba(12, 31, 45, 0.10);
}

/* ── persona cinematic caption (replaces white box overlay) ── */
.persona-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3.5rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(4, 14, 24, 0.90) 0%, rgba(4, 14, 24, 0.55) 55%, transparent 100%);
  border-radius: 0 0 8px 8px;
}
.persona-caption-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-accent);
}
.persona-caption-text {
  margin-top: 0.45rem;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.45;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ── seamless 3-track marquee ── */
.marquee-container {
  display: flex;
  width: max-content;
  animation: marquee-scroll 42s linear infinite;
}
.marquee-container:hover {
  animation-play-state: paused;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 1rem;
}

/* ── UpHome flagship (premium dark section) ── */
.uphome-flagship {
  scroll-margin-top: 0;
  background:
    linear-gradient(180deg, #f6faf8 0%, #fffaf4 12%, #ffffff 48%, #fffaf4 100%);
  color: #201207;
}

.uphome-flagship::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: calc(var(--cinematic-accent-shift) * 0.3);
  background:
    radial-gradient(circle at 68% 28%, rgba(255, 107, 0, 0.16), transparent 42%),
    radial-gradient(circle at 22% 78%, rgba(100, 230, 186, 0.12), transparent 45%);
  content: "";
  transition: opacity 180ms linear;
}

.uphome-flagship .eyebrow {
  border-color: rgba(255, 107, 0, 0.28);
  background: rgba(255, 107, 0, 0.08);
  color: #e85f00;
}

.uphome-showcase {
  position: relative;
  min-height: clamp(24rem, 38vw, 36rem);
  overflow: hidden;
  border: 1px solid rgba(255, 107, 0, 0.16);
  border-radius: 1rem;
  background: #201207;
  box-shadow: 0 32px 100px rgba(164, 77, 11, 0.18);
}

.uphome-showcase::before {
  position: absolute;
  inset: -8% -6% -8% 24%;
  z-index: 3;
  border-left: 9px solid #ff6b00;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, rgba(255, 107, 0, 0.18), transparent 30%);
  pointer-events: none;
  content: "";
}

/* ── Multi Story hero — cream left panel, explicit img for precise logo position ── */
.uphome-ms-hero {
  background-color: #1a0f06;
  color: #ffffff;
}

/* Full-bleed background image — visible at all viewport widths */
.uphome-ms-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  pointer-events: none;
  opacity: 0.52;
}

@media (max-width: 1023px) {
  .uphome-ms-bg-img {
    opacity: 0.42;
    object-position: center center;
  }
}

/* Dark cinematic overlay: strong at bottom-left where text sits, fades toward the building */
.uphome-ms-bg-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to top,
      rgba(26, 15, 6, 0.97) 0%,
      rgba(26, 15, 6, 0.80) 28%,
      rgba(26, 15, 6, 0.42) 58%,
      rgba(26, 15, 6, 0.08) 100%
    ),
    linear-gradient(
      to right,
      rgba(26, 15, 6, 0.92) 0%,
      rgba(26, 15, 6, 0.68) 32%,
      rgba(26, 15, 6, 0.20) 60%,
      rgba(26, 15, 6, 0.00) 82%
    );
  pointer-events: none;
}

/* Eyebrow pill — orange-tinted for dark hero backgrounds */
.uphome-ms-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 107, 0, 0.38);
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.13);
  padding: 0.42rem 0.85rem;
  color: #ffa04d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

/* Feature widget card — frosted glass tile in desktop widget grid */
.uphome-ms-widget {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  padding: 1rem;
  transition: background 250ms ease, transform 250ms ease, border-color 250ms ease;
}

.uphome-ms-widget:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 107, 0, 0.28);
  transform: translateY(-2px);
}

/* Feature chips — pill badges for mobile/tablet */
.uphome-ms-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid rgba(255, 107, 0, 0.40);
  border-radius: 999px;
  background: rgba(26, 15, 6, 0.72);
  padding: 0.38rem 0.9rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.90);
}

/* Ghost button override for the dark hero */
.btn-ms-ghost {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 8px;
  padding: 0.78rem 1rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 240ms ease, border-color 240ms ease, background-color 240ms ease, color 240ms ease;
  border: 1px solid rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
}

.btn-ms-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

/* keep old showcase cloud helpers so homepage is unaffected */
.uphome-showcase--cloud {
  border-color: rgba(32, 18, 7, 0.1);
  background: linear-gradient(135deg, #fffaf4 0%, #f4ede3 100%);
}

.uphome-showcase--cloud::before {
  display: none;
}

.uphome-showcase-cloud-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 1rem;
  background: linear-gradient(160deg, rgba(255, 250, 244, 0.32), rgba(32, 18, 7, 0.18));
  pointer-events: none;
}

.uphome-showcase-veil {
  z-index: 1;
}

.uphome-pillar-badge {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #ff6b00, #ff8c1a);
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 14px 40px rgba(255, 107, 0, 0.32);
}

.uphome-pillar-badge i {
  color: #ffffff;
}

.uphome-showcase-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
}

.uphome-phone-display {
  position: relative;
  z-index: 4;
  overflow: hidden;
  border: 7px solid #101820;
  border-radius: 2rem;
  background: #ff6b00;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45), 0 24px 70px rgba(255, 107, 0, 0.22);
}

.uphome-control-tile,
.uphome-usp-card,
.uphome-foundation-card,
.control-method-card,
.daily-intelligence-card,
.coverage-pill {
  position: relative;
  overflow: hidden;
  transition: transform 320ms ease-in-out, border-color 320ms ease-in-out, background-color 320ms ease-in-out, box-shadow 320ms ease-in-out;
}

.uphome-control-tile:hover,
.uphome-usp-card:hover,
.uphome-foundation-card:hover,
.control-method-card:hover,
.daily-intelligence-card:hover,
.coverage-pill:hover {
  transform: translateY(-4px);
}

.uphome-control-tile {
  border-right: 1px solid rgba(255, 107, 0, 0.18);
}

/* Allow long translated words (HU compound words) to break inside tiles */
.uphome-control-tile p {
  overflow-wrap: anywhere !important;
  word-wrap: break-word !important;
  word-break: normal !important;
  hyphens: auto !important;
  font-size: 0.78rem !important; /* ~12.5px on mobile/large screens */
  line-height: 1.3 !important;
}

@media (min-width: 1280px) and (max-width: 1440px) {
  .uphome-control-tile p {
    font-size: 0.70rem !important; /* tight scale down to fit xl 8-column layout perfectly */
    letter-spacing: -0.015em !important;
  }
}

.uphome-control-tile:last-child {
  border-right: 0;
}

.uphome-usp-card,
.uphome-foundation-card {
  border: 1px solid rgba(255, 107, 0, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 56px rgba(164, 77, 11, 0.09);
}

.uphome-benefit-band {
  border-radius: 8px;
  background: linear-gradient(135deg, #ff6b00, #ff8c1a);
  color: #ffffff;
  box-shadow: 0 26px 80px rgba(255, 107, 0, 0.24);
}

.control-method-card {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.2);
}

/* Prevent long translated words from being clipped in the 5-column layout */
.control-method-card .p-4 p:first-child {
  font-size: clamp(0.78rem, 1.15vw, 0.9375rem);
  overflow-wrap: break-word;
}

.control-method-card img {
  height: clamp(4.75rem, 7vw, 6.5rem);
  width: 100%;
  padding: 0.9rem 1rem 0.1rem;
  object-fit: contain;
  object-position: center;
  filter: saturate(0.96) contrast(1.04);
}

.smart-room-console {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(6, 24, 39, 0.42);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.smart-room-stage {
  --light: 74;
  --shade: 18;
  --temp: 22.5;
  position: relative;
  min-height: clamp(23rem, 38vw, 31rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #102235;
  isolation: isolate;
}

.smart-room-photo,
.smart-room-daylight,
.smart-room-warmth,
.smart-room-nightfall,
.smart-light-pool {
  position: absolute;
  inset: 0;
}

.smart-room-photo {
  z-index: -4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.03);
  /* Dims linearly with --light: 0.74 at light=74, 0.58 at light=12 */
  opacity: calc(0.549 + var(--light) * 0.00258);
  transform: scale(1.02);
  transition: filter 520ms ease, opacity 520ms ease;
}

.smart-room-daylight {
  z-index: -3;
  background: linear-gradient(115deg, rgba(213, 246, 255, 0.58), transparent 62%);
  opacity: calc((100 - var(--shade)) * 0.0088 + 0.05);
  transition: opacity 420ms ease;
}

.smart-room-warmth {
  z-index: -2;
  background:
    radial-gradient(circle at 30% 56%, rgba(255, 180, 92, 0.5), transparent 28%),
    linear-gradient(145deg, rgba(255, 128, 41, 0.42), transparent 50%);
  mix-blend-mode: screen;
  opacity: calc(var(--light) * 0.0065);
  transition: opacity 420ms ease;
}

.smart-room-nightfall {
  z-index: -1;
  background: linear-gradient(135deg, rgba(5, 15, 31, 0.82), rgba(8, 33, 55, 0.34));
  /* Activates below light=74, reaches 0.46 at light=12 — matches slider to scene */
  opacity: max(0, calc((74 - var(--light)) * 0.00742));
  transition: opacity 420ms ease;
}

.smart-window-demo {
  position: absolute;
  top: 8%;
  right: 7%;
  width: min(36%, 12.5rem);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 0.45rem solid rgba(246, 251, 248, 0.8);
  border-radius: 8px;
  background: rgba(203, 236, 243, 0.65);
  box-shadow: 0 24px 64px rgba(4, 14, 24, 0.32);
}

.smart-window-sky {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(139, 203, 222, 0.96), rgba(244, 214, 151, 0.7)),
    radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.72), transparent 18%);
}

.smart-shade-panel {
  position: absolute;
  inset-inline: 0;
  top: 0;
  min-height: 0.4rem;
  background:
    repeating-linear-gradient(180deg, rgba(32, 48, 63, 0.9) 0 0.42rem, rgba(57, 75, 91, 0.9) 0.42rem 0.82rem),
    linear-gradient(180deg, rgba(25, 39, 53, 0.98), rgba(72, 86, 97, 0.92));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
  transition: height 460ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.smart-shade-panel::after {
  position: absolute;
  right: 0;
  bottom: -0.28rem;
  left: 0;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  content: "";
}

.smart-window-frame {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(4, 20, 32, 0.2);
}

.smart-window-frame::before,
.smart-window-frame::after {
  position: absolute;
  background: rgba(255, 255, 255, 0.68);
  content: "";
}

.smart-window-frame::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.smart-window-frame::after {
  right: 0;
  bottom: 50%;
  left: 0;
  height: 1px;
}

.smart-light-pool {
  background: radial-gradient(circle at 36% 68%, rgba(255, 204, 118, 0.72), transparent 26%);
  mix-blend-mode: screen;
  opacity: calc(var(--light) * 0.008);
  transition: opacity 420ms ease;
}

.smart-room-temp-chip,
.smart-room-status {
  position: absolute;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(6, 24, 39, 0.72);
  color: #ffffff;
  box-shadow: 0 18px 48px rgba(4, 14, 24, 0.3);
  backdrop-filter: blur(12px);
}

.smart-room-temp-chip {
  left: 1rem;
  bottom: 1rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
}

.smart-room-temp-chip span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.smart-room-temp-chip strong {
  color: #63f0a0;
  font-size: 1.05rem;
  font-weight: 900;
}

.smart-room-status {
  right: 1rem;
  bottom: 1rem;
  max-width: min(62%, 22rem);
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.35;
}

.smart-room-status-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #31c878;
  box-shadow: 0 0 0 0.35rem rgba(49, 200, 120, 0.14);
}

.smart-room-controls {
  display: grid;
  gap: 0.75rem;
}

.smart-control-range {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.85rem;
  color: #ffffff;
}

.smart-control-range > span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 900;
}

.smart-control-range strong {
  color: #63f0a0;
  font-size: 0.82rem;
  font-weight: 900;
}

.smart-control-range input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--brand-accent);
}

.scene-response-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055)),
    rgba(6, 24, 39, 0.46);
  padding: clamp(1.1rem, 2vw, 1.6rem);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.2);
}

.scene-response-header,
.scene-response-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.scene-response-header {
  justify-content: space-between;
}

.scene-response-pill,
.scene-response-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.scene-response-pill {
  background: rgba(48, 212, 125, 0.16);
  padding: 0.46rem 0.78rem;
  color: #63f0a0;
}

.scene-response-pill i {
  width: 0.95rem;
  height: 0.95rem;
}

.scene-response-tag {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.68rem;
  color: rgba(255, 255, 255, 0.76);
}

.scene-response-stage {
  position: relative;
  min-height: 18rem;
}

.scene-response-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.scene-response-kicker {
  color: #63f0a0;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scene-response-title {
  margin-top: 0.7rem;
  color: #ffffff;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 900;
  line-height: 1.14;
}

.scene-response-body {
  margin-top: 0.85rem;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.75;
}

@media (max-width: 640px) {
  .smart-room-stage {
    min-height: 25rem;
  }

  .smart-window-demo {
    top: 7%;
    right: 7%;
    width: 46%;
  }

  .smart-room-status {
    right: 0.75rem;
    bottom: 5.6rem;
    left: 0.75rem;
    max-width: none;
  }
}

.daily-intelligence-card {
  border: 1px solid rgba(16, 33, 49, 0.09);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(12, 31, 45, 0.08);
}

.coverage-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(16, 33, 49, 0.08);
  border-radius: 999px;
  background: #f1f6f4;
  padding: 0.35rem 0.72rem;
  color: #102131;
  font-size: 0.8rem;
  font-weight: 800;
}

.coverage-pill.is-accent {
  border-color: rgba(48, 212, 125, 0.28);
  background: #e8f7ef;
  color: #0d7b45;
}

.coverage-pill svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--brand-accent);
}

.flagship-stat {
  border-top: 2px solid rgba(255, 107, 0, 0.4);
  padding-top: 1.1rem;
}

.flagship-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.1);
  padding: 0.42rem 0.85rem;
  color: #ffb357;
  font-size: 0.8rem;
  font-weight: 700;
}

.uphome-layer-card {
  border: 1px solid rgba(255, 179, 87, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    rgba(32, 18, 7, 0.52);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.uphome-layer-card:hover {
  border-color: rgba(255, 179, 87, 0.36);
  transform: translateY(-3px);
  transition: transform 240ms ease, border-color 240ms ease;
}

/* ── project article rich content ── */
.project-article-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(16, 33, 49, 0.1);
  padding-top: 1.25rem;
}

.project-article-meta dt {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6b7f8c;
}

.project-article-meta dd {
  margin-top: 0.3rem;
  font-size: 1.15rem;
  font-weight: 900;
  color: #061827;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-33.3333%); }
}

@media (prefers-reduced-motion: reduce) {
  #cinematic-layer {
    display: none !important;
  }

  .cinematic-logo-chip {
    transform: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1023px) {
  .corporate-hero {
    background: #f8fbf7;
  }
}

@media (max-width: 767px) {
  .hero-uphome-bridge .bridge-logo-stage {
    min-height: 22rem;
  }

  .bridge-logo-node {
    width: 7.1rem;
    padding: 0.58rem;
  }

  .bridge-logo-node img {
    height: 1.5rem;
  }

  .bridge-logo-core {
    font-size: 0.74rem;
    padding: 0.56rem 0.78rem;
  }

  .cinematic-logo-cluster {
    gap: 0.5rem;
  }

  .cinematic-logo-chip {
    padding: 0.36rem 0.6rem;
    font-size: 0.67rem;
  }

  .section-padding {
    padding-block: 3.5rem;
  }

  .uphome-flagship-inner {
    padding-top: 3rem;
    padding-bottom: 4rem;
  }

  .uphome-flagship h2 {
    font-size: clamp(2.35rem, 12vw, 3rem);
    line-height: 1.05;
  }

  .uphome-flagship .uphome-showcase {
    min-height: 28rem;
  }

  .uphome-flagship .uphome-phone-display {
    width: min(13rem, 68vw);
  }

  .uphome-control-tile {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 107, 0, 0.18);
  }

  .uphome-control-tile:last-child {
    border-bottom: 0;
  }

  main section:first-of-type [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition-duration: 1ms !important;
  }

  .hero-command-panel {
    animation: none;
    transform: none;
  }

  .signal-line {
    display: none;
  }

  .hero-visual-card > .dark-card.absolute,
  .hero-visual-card > .phone-frame.absolute {
    position: relative;
    inset: auto;
    margin: -2rem auto 0;
  }

  .hero-visual-card > .phone-frame.absolute {
    width: min(13rem, 86vw);
  }
}

/* ═══════════════════════════════════════════════════
  CH PAGE LOADER
  Calm branded entry with building image, logo, and
  platform indicators.
═══════════════════════════════════════════════════ */

#ch-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #020d16;
  overflow: hidden;
  pointer-events: all;
  isolation: isolate;
}

/* Legacy keyframes kept harmlessly for older cached markup. */
#ch-loader.chl-exit {
  animation: chlPowerOff 0.68s cubic-bezier(0.55, 0, 0.1, 1) forwards;
  pointer-events: none;
}

@keyframes chlPowerOff {
  0%   { clip-path: inset(0% 0% 0% 0%);       filter: brightness(1);   opacity: 1; }
  18%  { clip-path: inset(0% 0% 0% 0%);       filter: brightness(2.4); opacity: 1; }
  55%  { clip-path: inset(48.5% 0% 48.5% 0%); filter: brightness(3.2); opacity: 1; }
  80%  { clip-path: inset(49.8% 6% 49.8% 6%); filter: brightness(1.2); opacity: 1; }
  100% { clip-path: inset(50% 50% 50% 50%);   filter: brightness(0);   opacity: 0; }
}

/* Dot-matrix background */
.chl-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(48, 212, 125, 0.2) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0;
  animation: chlFadeIn 0.5s ease-out 0.05s forwards;
  pointer-events: none;
}

/* Subtle legacy texture, hidden by the refreshed loader overrides. */
.chl-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.16) 2px,
    rgba(0, 0, 0, 0.16) 4px
  );
  pointer-events: none;
}

/* Green acquisition scan line */
.chl-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  top: -4px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(100, 230, 186, 0.28) 12%,
    #64e6ba 50%,
    rgba(100, 230, 186, 0.28) 88%,
    transparent 100%
  );
  box-shadow:
    0 0 18px 5px rgba(48, 212, 125, 0.52),
    0 0 54px 16px rgba(48, 212, 125, 0.14);
  animation: chlScan 1.28s cubic-bezier(0.37, 0, 0.63, 1) 0.16s forwards;
  pointer-events: none;
}

@keyframes chlFadeIn {
  to { opacity: 1; }
}

@keyframes chlScan {
  0%   { top: -4px;    opacity: 0;   }
  5%   { opacity: 1;                 }
  93%  { opacity: 0.9;               }
  100% { top: 100vh;   opacity: 0;   }
}

/* Corner targeting brackets */
.chl-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  opacity: 0;
  pointer-events: none;
}

.chl-tl {
  top: 1.75rem; left: 1.75rem;
  border-top: 1.5px solid #30d47d;
  border-left: 1.5px solid #30d47d;
  animation: chlCornerIn 0.42s ease-out 0.06s forwards;
}
.chl-tr {
  top: 1.75rem; right: 1.75rem;
  border-top: 1.5px solid #30d47d;
  border-right: 1.5px solid #30d47d;
  animation: chlCornerIn 0.42s ease-out 0.10s forwards;
}
.chl-bl {
  bottom: 1.75rem; left: 1.75rem;
  border-bottom: 1.5px solid #30d47d;
  border-left: 1.5px solid #30d47d;
  animation: chlCornerIn 0.42s ease-out 0.14s forwards;
}
.chl-br {
  bottom: 1.75rem; right: 1.75rem;
  border-bottom: 1.5px solid #30d47d;
  border-right: 1.5px solid #30d47d;
  animation: chlCornerIn 0.42s ease-out 0.18s forwards;
}

@keyframes chlCornerIn {
  from { opacity: 0; transform: scale(1.8);  }
  to   { opacity: 0.8; transform: scale(1);  }
}

/* Bottom progress fill line */
.chl-status {
  position: absolute;
  bottom: 1.75rem;
  left: 1.75rem;
  right: 1.75rem;
  height: 1px;
  background: rgba(48, 212, 125, 0.12);
  overflow: hidden;
  pointer-events: none;
}

.chl-status::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #30d47d, #64e6ba, #30d47d);
  transform-origin: left;
  transform: scaleX(0);
  animation: chlStatusFill 2.1s cubic-bezier(0.12, 0.82, 0.45, 1) 0.08s forwards;
}

@keyframes chlStatusFill {
  to { transform: scaleX(1); }
}

/* Central content body */
.chl-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Logo wrapper */
.chl-logo-wrap {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Acquisition ring that pulses once after logo locks in */
.chl-logo-ring {
  position: absolute;
  inset: -0.6rem;
  border-radius: 50%;
  border: 1px solid transparent;
  opacity: 0;
  animation: chlRingPulse 0.72s ease-out 1.08s forwards;
}

@keyframes chlRingPulse {
  0%   {
    opacity: 0;
    transform: scale(0.65);
    border-color: rgba(48, 212, 125, 0.85);
    box-shadow: 0 0 0 0 rgba(48, 212, 125, 0.5);
  }
  42%  {
    opacity: 1;
    transform: scale(1.06);
    border-color: rgba(48, 212, 125, 0.65);
    box-shadow: 0 0 26px 8px rgba(48, 212, 125, 0.26);
  }
  100% {
    opacity: 0;
    transform: scale(1.38);
    border-color: rgba(48, 212, 125, 0);
    box-shadow: 0 0 0 0 transparent;
  }
}

/* Logo — materialises from blur as scan line passes */
.chl-logo {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0;
  animation: chlLogoIn 0.72s cubic-bezier(0.2, 0.8, 0.4, 1) 0.62s forwards;
}

@keyframes chlLogoIn {
  0%   {
    opacity: 0;
    filter: brightness(0) invert(1) blur(22px);
    transform: scale(1.28);
  }
  100% {
    opacity: 1;
    filter: brightness(0) invert(1) blur(0);
    transform: scale(1);
  }
}

/* CHAMELEON wordmark — wipes in left to right */
.chl-word {
  margin-top: 1.1rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: 0.4em;
  color: #ffffff;
  clip-path: inset(0 100% 0 0);
  animation: chlClipReveal 0.62s ease-out 0.9s forwards;
}

/* SMARTHOME subline — wipes in slightly after */
.chl-sub {
  margin-top: 0.18rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.58em;
  color: rgba(100, 230, 186, 0.65);
  clip-path: inset(0 100% 0 0);
  animation: chlClipReveal 0.56s ease-out 1.1s forwards;
}

@keyframes chlClipReveal {
  to { clip-path: inset(0 0% 0 0); }
}

/* System boot indicators */
.chl-systems {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.8rem;
}

.chl-sys {
  position: relative;
  padding-left: 0.82rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(48, 212, 125, 0.44);
  opacity: 0;
}

.chl-sys::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(48, 212, 125, 0.28);
}

.chl-sys:nth-child(1) { animation: chlSysBoot 0.36s ease-out 1.38s both; }
.chl-sys:nth-child(2) { animation: chlSysBoot 0.36s ease-out 1.58s both; }
.chl-sys:nth-child(3) { animation: chlSysBoot 0.36s ease-out 1.78s both; }

.chl-sys:nth-child(1)::before { animation: chlDotOn 0.24s ease-out 1.54s both; }
.chl-sys:nth-child(2)::before { animation: chlDotOn 0.24s ease-out 1.74s both; }
.chl-sys:nth-child(3)::before { animation: chlDotOn 0.24s ease-out 1.94s both; }

@keyframes chlSysBoot {
  0%   { opacity: 0; transform: translateY(6px); }
  55%  { color: rgba(100, 230, 186, 0.9); }
  100% { opacity: 1; transform: translateY(0); color: rgba(48, 212, 125, 0.62); }
}

@keyframes chlDotOn {
  to {
    background: #30d47d;
    box-shadow: 0 0 6px 2px rgba(48, 212, 125, 0.55);
  }
}

/* Prefers-reduced-motion: skip all loader animations */
@media (prefers-reduced-motion: reduce) {
  #ch-loader.chl-exit {
    clip-path: none !important;
    filter: none !important;
    animation: none !important;
    transition: opacity 0.35s ease !important;
    opacity: 0 !important;
  }

  .chl-grid,
  .chl-scan,
  .chl-corner,
  .chl-status::after,
  .chl-logo,
  .chl-logo-ring,
  .chl-word,
  .chl-sub,
  .chl-sys {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    opacity: 1 !important;
    clip-path: none !important;
    filter: none !important;
    transform: none !important;
  }

  .chl-logo { filter: brightness(0) invert(1) !important; }
  .chl-sys::before { background: #30d47d !important; }
}

/* Chameleon operational hero refresh. */
[data-theme="chameleon"] .intelligence-hero,
[data-theme="chameleon"] .commission-hero,
[data-theme="chameleon"] .atlas-hero {
  min-height: 100vh !important;
  min-height: 100svh !important;
}

/* Home hero — cinematic building render */
[data-theme="chameleon"] .intelligence-hero {
  background:
    linear-gradient(180deg, rgba(14, 28, 42, 0.32) 0%, rgba(14, 28, 42, 0.12) 40%, rgba(14, 28, 42, 0.56) 78%, rgba(14, 28, 42, 0.88) 100%),
    url("../img/hero.png") center / cover no-repeat,
    #1a2e42 !important;
}

/* ICI hero — modern building interior / commissioning context */
[data-theme="chameleon"] .commission-hero {
  background:
    linear-gradient(90deg, rgba(20, 36, 52, 0.5) 0%, rgba(20, 36, 52, 0.54) 28%, rgba(20, 36, 52, 0.76) 58%, rgba(20, 36, 52, 0.9) 100%),
    url("https://images.unsplash.com/photo-1497366216548-37526070297c?w=1600&auto=format&fit=crop&q=85") 36% center / cover no-repeat,
    #263d55 !important;
}

/* Project References hero — glass skyscrapers, building portfolio */
[data-theme="chameleon"] .atlas-hero {
  background:
    radial-gradient(circle at center, rgba(28, 50, 73, 0.16) 0%, rgba(28, 50, 73, 0.46) 36%, rgba(16, 30, 44, 0.8) 72%, rgba(11, 23, 35, 0.92) 100%),
    linear-gradient(180deg, rgba(16, 30, 44, 0.12) 0%, rgba(16, 30, 44, 0.36) 100%),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1600&auto=format&fit=crop&q=85") center 38% / cover no-repeat,
    #1e3249 !important;
}

@media (min-width: 1440px) {
  [data-theme="chameleon"] .commission-hero {
    background:
      linear-gradient(90deg, rgba(20, 36, 52, 0.38) 0%, rgba(20, 36, 52, 0.44) 24%, rgba(20, 36, 52, 0.72) 56%, rgba(20, 36, 52, 0.92) 100%),
      url("https://images.unsplash.com/photo-1497366216548-37526070297c?w=1600&auto=format&fit=crop&q=85") 28% center / cover no-repeat,
      #263d55 !important;
  }

  [data-theme="chameleon"] .atlas-hero {
    background:
      radial-gradient(circle at center, rgba(28, 50, 73, 0.14) 0%, rgba(28, 50, 73, 0.42) 34%, rgba(16, 30, 44, 0.82) 72%, rgba(11, 23, 35, 0.94) 100%),
      linear-gradient(180deg, rgba(16, 30, 44, 0.08) 0%, rgba(16, 30, 44, 0.32) 100%),
      url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1600&auto=format&fit=crop&q=85") center 30% / cover no-repeat,
      #1e3249 !important;
  }
}

[data-theme="chameleon"] .residential-hero {
  min-height: 100vh !important;
  min-height: 100svh !important;
  background: #344d68 !important;
}

[data-theme="chameleon"] .residential-hero > img {
  opacity: 0.64 !important;
  filter: saturate(0.92) contrast(0.98);
}

[data-theme="chameleon"] .residential-hero > div.absolute.inset-0 {
  background: linear-gradient(90deg, rgba(38, 61, 85, 0.9), rgba(52, 77, 104, 0.68) 48%, rgba(52, 77, 104, 0.22)) !important;
}

[data-theme="chameleon"] .intelligence-hero::after {
  background: linear-gradient(180deg, transparent 0%, rgba(14, 28, 42, 0.18) 100%);
}

[data-theme="chameleon"] .commission-hero::after,
[data-theme="chameleon"] .atlas-hero::after,
[data-theme="chameleon"] .cinematic-hero::after {
  background: linear-gradient(180deg, rgba(38, 61, 85, 0.04), rgba(38, 61, 85, 0.3));
}

[data-theme="chameleon"] .hero-mesh,
[data-theme="chameleon"] .hero-scanline,
[data-theme="chameleon"] .cinematic-grid,
[data-theme="chameleon"] .signal-line,
[data-theme="chameleon"] .trace-line,
[data-theme="chameleon"] .map-pin,
[data-theme="chameleon"] .intelligence-hero > .pointer-events-none,
[data-theme="chameleon"] .commission-hero > .pointer-events-none,
[data-theme="chameleon"] .atlas-hero > .pointer-events-none,
[data-theme="chameleon"] .residential-hero > .pointer-events-none {
  display: none !important;
}

[data-theme="chameleon"] .intelligence-hero > .relative.z-10 {
  display: block !important;
}

[data-theme="chameleon"] .commission-hero > .relative.z-10,
[data-theme="chameleon"] .residential-hero > .relative.z-10 {
  grid-template-columns: minmax(0, 58rem) !important;
  justify-content: center;
}

[data-theme="chameleon"] .commission-hero > .relative.z-10 > div:nth-child(2),
[data-theme="chameleon"] .residential-hero > .relative.z-10 > div:nth-child(2) {
  display: none !important;
}

[data-theme="chameleon"] .hero-command-stage,
[data-theme="chameleon"] .atlas-board {
  display: none !important;
}

[data-theme="chameleon"] .intelligence-hero h1 {
  font-size: clamp(2.6rem, 5.8vw, 5.6rem) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.02em !important;
}

[data-theme="chameleon"] .commission-hero h1,
[data-theme="chameleon"] .residential-hero h1,
[data-theme="chameleon"] .atlas-hero h1 {
  font-size: clamp(2.85rem, 5.4vw, 5.35rem) !important;
  line-height: 1.03 !important;
  letter-spacing: 0 !important;
}

[data-theme="chameleon"] .intelligence-hero p,
[data-theme="chameleon"] .commission-hero p,
[data-theme="chameleon"] .residential-hero p,
[data-theme="chameleon"] .atlas-hero p {
  text-shadow: none;
}

[data-theme="chameleon"] .commission-hero .eyebrow,
[data-theme="chameleon"] .residential-hero .eyebrow,
[data-theme="chameleon"] .atlas-hero .eyebrow {
  border-color: rgba(255, 255, 255, 0.48) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #25a968 !important;
  box-shadow: none !important;
}

[data-theme="chameleon"] .hero-data-card,
[data-theme="chameleon"] .commission-board,
[data-theme="chameleon"] .home-command-panel {
  border: 1px solid rgba(255, 255, 255, 0.76) !important;
  background: rgba(255, 255, 255, 0.93) !important;
  box-shadow: 0 20px 48px rgba(23, 43, 63, 0.16) !important;
  backdrop-filter: none !important;
}

[data-theme="chameleon"] .commission-board,
[data-theme="chameleon"] .home-command-panel {
  animation: none !important;
  transform: none !important;
}

[data-theme="chameleon"] .commission-board [class*="text-white"],
[data-theme="chameleon"] .home-command-panel [class*="text-white"],
[data-theme="chameleon"] .hero-data-card [class*="text-white"] {
  color: #172b3f !important;
}

[data-theme="chameleon"] .commission-board [class*="text-white/"],
[data-theme="chameleon"] .home-command-panel [class*="text-white/"],
[data-theme="chameleon"] .hero-data-card [class*="text-white/"] {
  color: #5e6f7f !important;
}

[data-theme="chameleon"] .commission-board [class*="text-[#64e6ba]"],
[data-theme="chameleon"] .home-command-panel [class*="text-[#64e6ba]"],
[data-theme="chameleon"] .hero-data-card [class*="text-[#64e6ba]"] {
  color: #25a968 !important;
}

[data-theme="chameleon"] .commission-board [class*="bg-white/"],
[data-theme="chameleon"] .home-command-panel [class*="bg-white/"],
[data-theme="chameleon"] .hero-data-card [class*="bg-white/"] {
  background: #f6faf8 !important;
}

[data-theme="chameleon"] .scene-slider {
  background: rgba(38, 61, 85, 0.12);
}

[data-theme="chameleon"] .scene-slider span {
  background: #31c878;
}

main section:first-of-type [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition-duration: 1ms !important;
}

@media (max-width: 767px) {
  [data-theme="chameleon"] .intelligence-hero,
  [data-theme="chameleon"] .commission-hero,
  [data-theme="chameleon"] .residential-hero,
  [data-theme="chameleon"] .atlas-hero {
    min-height: 100vh !important;
    min-height: 100svh !important;
  }

  [data-theme="chameleon"] .intelligence-hero > .relative.z-10 {
    display: block !important;
  }
}

/* Calm branded loader. */
#ch-loader {
  background: #f8fbf7 !important;
  color: #263d55;
}

#ch-loader::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248, 251, 247, 0.98) 0%, rgba(248, 251, 247, 0.9) 42%, rgba(248, 251, 247, 0.38) 100%),
    url("../img/hero.png") center / cover no-repeat;
  content: "";
}

#ch-loader::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(52, 77, 104, 0.08));
  content: "";
}

#ch-loader.chl-exit {
  animation: chLoaderFade 0.42s ease forwards !important;
}

@keyframes chLoaderFade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.chl-grid {
  background-image: linear-gradient(rgba(38, 61, 85, 0.08) 1px, transparent 1px);
  background-size: 100% 4.5rem;
  opacity: 0.3 !important;
  animation: none !important;
}

.chl-grid::after,
.chl-scan,
.chl-corner,
.chl-logo-ring {
  display: none !important;
}

.chl-body {
  width: min(29rem, calc(100vw - 3rem));
  align-items: flex-start;
}

.chl-logo-wrap {
  width: 4.6rem;
  height: 4.6rem;
}

.chl-logo {
  width: 4.25rem;
  height: 4.25rem;
  filter: none !important;
  opacity: 0;
  animation: loaderContentRise 0.58s ease 0.08s forwards !important;
}

.chl-word {
  margin-top: 1rem;
  color: #263d55;
  letter-spacing: 0.18em;
  clip-path: none !important;
  opacity: 0;
  animation: loaderContentRise 0.58s ease 0.18s forwards !important;
}

.chl-sub {
  max-width: 100%;
  color: #25a968;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  clip-path: none !important;
  opacity: 0;
  animation: loaderContentRise 0.58s ease 0.28s forwards !important;
}

.chl-systems {
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.chl-sys {
  border: 1px solid rgba(38, 61, 85, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.46rem 0.72rem;
  color: #263d55 !important;
  letter-spacing: 0.08em;
  opacity: 0;
}

.chl-sys::before {
  display: none;
}

.chl-sys:nth-child(1) { animation: loaderContentRise 0.42s ease 0.42s forwards !important; }
.chl-sys:nth-child(2) { animation: loaderContentRise 0.42s ease 0.52s forwards !important; }
.chl-sys:nth-child(3) { animation: loaderContentRise 0.42s ease 0.62s forwards !important; }

.chl-status {
  right: auto;
  bottom: clamp(2rem, 5vw, 3.5rem);
  left: 50%;
  width: min(29rem, calc(100vw - 3rem));
  height: 3px;
  border-radius: 999px;
  background: rgba(38, 61, 85, 0.12);
  transform: translateX(-50%);
}

.chl-status::after {
  background: #31c878;
  animation: chlStatusFill 1.28s cubic-bezier(0.12, 0.82, 0.45, 1) 0.18s forwards !important;
}

@keyframes loaderContentRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chl-logo,
  .chl-word,
  .chl-sub,
  .chl-sys,
  .chl-status::after {
    animation-duration: 0.01ms !important;
  }

  .chl-logo {
    filter: none !important;
  }
}

/* UpHome loader — overrides calm Chameleon white loader on multi-story only */
[data-theme="uphome"] #ch-loader {
  background: linear-gradient(165deg, #fffaf4 0%, #fff2e6 38%, #ffe8d4 72%, #ffd9b8 100%) !important;
  color: #201207;
}

[data-theme="uphome"] #ch-loader::before {
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 107, 0, 0.16), transparent 42%),
    radial-gradient(circle at 18% 82%, rgba(255, 152, 56, 0.12), transparent 38%),
    linear-gradient(90deg, rgba(255, 245, 235, 0.96) 0%, rgba(255, 240, 225, 0.88) 42%, rgba(255, 235, 215, 0.42) 100%),
    url("../img/hero.png") center / cover no-repeat !important;
}

[data-theme="uphome"] #ch-loader::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 107, 0, 0.06)) !important;
}

[data-theme="uphome"] .chl-grid {
  background-image: linear-gradient(rgba(255, 107, 0, 0.06) 1px, transparent 1px) !important;
  background-size: 100% 4.5rem !important;
  opacity: 0.45 !important;
}

[data-theme="uphome"] .chl-word {
  color: #201207 !important;
}

[data-theme="uphome"] .chl-sub {
  color: #e85f00 !important;
}

[data-theme="uphome"] .chl-sys {
  border-color: rgba(255, 107, 0, 0.22) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: #201207 !important;
}

[data-theme="uphome"] .chl-status {
  background: rgba(255, 107, 0, 0.14) !important;
}

[data-theme="uphome"] .chl-status::after {
  background: linear-gradient(90deg, #ff6b00, #ffb357, #ff6b00) !important;
}

/* ═══════════════════════════════════════════════════
   CINEMATIC STAGE
   Pinned scroll narrative with 3 acts
═══════════════════════════════════════════════════ */

.cin-stage {
  background: #0d1f2f;
  color: #f8fbf7;
  isolation: isolate;
}

.cin-bg-stack { z-index: 0; }
.cin-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform, opacity;
}
.cin-bg-smarthome {
  object-position: center 60%;
  transform-origin: 50% 60%;
}
.cin-bg-hero {
  object-position: center 40%;
  opacity: 0;
  transform-origin: 50% 50%;
}

.cin-bg-gradient {
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(13, 31, 47, 0.3) 0%,
    rgba(26, 58, 82, 0.5) 40%,
    rgba(38, 61, 85, 0.75) 70%,
    rgba(38, 61, 85, 0.92) 100%
  );
  transition: background 0.6s ease;
}

.cin-act {
  will-change: opacity, transform;
  z-index: 3;
}

.cin-home-overlay {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(13, 31, 47, 0.15) 30%,
    rgba(13, 31, 47, 0.45) 60%,
    rgba(13, 31, 47, 0.75) 100%
  );
  z-index: 1;
}

.cin-hud-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
}
.cin-hud-item.cin-hud-dark {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}
.cin-hud-item i { color: #31c878; }

.cin-feature {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 120, 0, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #1a0800;
}
.cin-feature i { color: #FF7800; }

.cin-secondary-cta {
  border-color: rgba(255, 255, 255, 0.48) !important;
  background: rgba(6, 24, 39, 0.58) !important;
  color: #ffffff !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}
.cin-secondary-cta:hover {
  background: rgba(6, 24, 39, 0.76) !important;
}

/* === Atmospheric Backdrop (Acts 2 & 4) — premium ambient bg === */
.cin-backdrop {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  will-change: opacity;
}

.cin-backdrop-base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 255, 255, 0.9), transparent 70%),
    linear-gradient(180deg, #eaf2ee 0%, #f4f6f3 45%, #fdf5ec 100%);
}

.cin-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform, background, opacity;
}
.cin-orb-blue {
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  left: -10%;
  top: -15%;
  background: radial-gradient(circle, rgba(38, 61, 85, 0.34) 0%, rgba(52, 77, 104, 0.16) 50%, transparent 75%);
  opacity: 0.85;
}
.cin-orb-orange {
  width: 55vw;
  height: 55vw;
  max-width: 660px;
  max-height: 660px;
  right: -10%;
  bottom: -15%;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.40) 0%, rgba(255, 159, 71, 0.15) 50%, transparent 75%);
  opacity: 0.75;
}

.cin-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(38, 61, 85, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 61, 85, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 80%);
  opacity: 0.65;
}

.cin-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 40%, rgba(15, 30, 50, 0.08) 100%);
  pointer-events: none;
}

/* === Logo Reform (Act 2 centerpiece) === */
.cin-flip-eyebrow {
  position: relative;
  height: 1.3rem;
  margin-bottom: 1.55rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.cin-flip-eyebrow-from,
.cin-flip-eyebrow-to {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  will-change: opacity, transform;
}
.cin-flip-eyebrow-from { color: #1a3a52; }
.cin-flip-eyebrow-to { color: #c44b00; }

.cin-flip-card {
  position: relative;
  width: clamp(260px, 28vw, 360px);
  height: clamp(260px, 28vw, 360px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  isolation: isolate;
  transform-style: preserve-3d;
}
@media (max-width: 1023px) {
  .cin-flip-card {
    width: clamp(210px, 58vw, 260px);
    height: clamp(210px, 58vw, 260px);
  }
}

.cin-reform-field {
  position: absolute;
  inset: -18%;
  z-index: 3;
  pointer-events: none;
  transform-style: preserve-3d;
}
.cin-reform-field::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background-image:
    linear-gradient(rgba(38, 61, 85, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 61, 85, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle, #000 16%, transparent 64%);
  -webkit-mask-image: radial-gradient(circle, #000 16%, transparent 64%);
  opacity: 0.28;
}

.cin-reform-ring,
.cin-reform-beam,
.cin-reform-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  opacity: 0;
  will-change: transform, opacity;
}
.cin-reform-ring {
  border: 1px solid rgba(38, 61, 85, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 32px rgba(38, 61, 85, 0.06);
  transform: translate(-50%, -50%) scale(0.7);
}
.cin-reform-ring-one { width: 56%; height: 56%; }
.cin-reform-ring-two { width: 78%; height: 78%; }
.cin-reform-ring-three { width: 102%; height: 102%; }

.cin-reform-beam {
  width: 72%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(38, 61, 85, 0.34), transparent);
  transform-origin: center;
  transform: translate(-50%, -50%) scaleX(0.18);
}
.cin-reform-beam-one { rotate: 0deg; }
.cin-reform-beam-two { rotate: 58deg; }
.cin-reform-beam-three { rotate: -42deg; }

.cin-reform-particle {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #263d55;
  box-shadow: 0 0 22px rgba(38, 61, 85, 0.68);
  transform: translate(-50%, -50%) scale(0.2);
  z-index: 6;
}

.cin-trace-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: clamp(214px, 22vw, 292px);
  height: clamp(214px, 22vw, 292px);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}
.cin-logo-trace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  will-change: opacity, transform;
}
.cin-logo-trace-ch {
  transform: scale(0.9);
  filter: none;
}
.cin-logo-trace-up {
  transform: scale(0.82);
  filter: none;
}
.cin-trace-path {
  fill: transparent;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  will-change: stroke-dashoffset, opacity;
}
.cin-trace-path-ch {
  stroke: rgba(38, 61, 85, 0.38);
  stroke-width: 3.2;
}
.cin-trace-path-up-house {
  stroke: rgba(255, 107, 0, 0.52);
  stroke-width: 3.4;
}
.cin-trace-path-up-detail {
  stroke: rgba(255, 255, 255, 0.58);
  stroke-width: 2.6;
}

.cin-flip-inner {
  position: relative;
  width: clamp(214px, 22vw, 292px);
  height: clamp(214px, 22vw, 292px);
  z-index: 4;
  will-change: transform;
}

.cin-flip-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  transform-origin: center;
  will-change: clip-path, filter, opacity, transform;
}
.cin-flip-face img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 0;
  display: block;
  filter: none;
}
.cin-flip-front img {
  max-width: 92%;
  max-height: 92%;
}
.cin-flip-back img {
  max-width: 88%;
  max-height: 88%;
}
.cin-flip-back {
  opacity: 0;
}

.cin-flip-glow {
  position: absolute;
  inset: -58%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 61, 85, 0.2) 0%, rgba(38, 61, 85, 0.05) 36%, rgba(38, 61, 85, 0) 68%);
  opacity: 0;
  pointer-events: none;
  filter: blur(32px);
  z-index: 0;
  will-change: opacity, background;
}

.cin-flip-headline {
  position: relative;
  margin-top: 2.5rem;
  height: clamp(2.4rem, 5vw, 3.6rem);
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
}
.cin-flip-headline-from,
.cin-flip-headline-to {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  will-change: opacity, transform;
}
.cin-flip-headline-from { color: #0d1f2f; }
.cin-flip-headline-to { color: #0d1f2f; }

.cin-flip-sub {
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(38, 61, 85, 0.72);
  opacity: 0;
  will-change: opacity;
}

#act-building::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 58% at 50% 54%, rgba(10, 18, 32, 0.52) 0%, rgba(10, 18, 32, 0.24) 52%, transparent 78%),
    linear-gradient(180deg, transparent 0%, transparent 60%, rgba(255, 120, 0, 0.06) 82%, rgba(255, 194, 0, 0.09) 100%);
}

.cin-uphome-gradient-title {
  color: #ffffff;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  text-shadow: 0 2px 28px rgba(6, 12, 24, 0.55);
}
.cin-uphome-grad-word {
  background: linear-gradient(135deg, #FF4E00 0%, #FF7800 60%, #FFC200 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  display: inline;
}

/* === Finale (Act 4) — editorial left-aligned hero === */
#act-finale::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Left-side readability veil + bottom darkening for stats */
  background:
    linear-gradient(100deg, rgba(7, 13, 24, 0.70) 0%, rgba(7, 13, 24, 0.45) 34%, rgba(7, 13, 24, 0.12) 60%, rgba(7, 13, 24, 0.03) 100%),
    linear-gradient(180deg, rgba(7, 13, 24, 0.04) 0%, rgba(7, 13, 24, 0.12) 68%, rgba(7, 13, 24, 0.35) 100%);
  pointer-events: none;
}

/* UpHome × Chameleon badge — inline eyebrow, sets context before headline */
.cin-finale-uphome-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
  padding: 0.45rem 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  opacity: 0;
}
.cin-finale-badge-sep {
  color: rgba(255, 255, 255, 0.28);
  font-weight: 400;
}
.cin-finale-badge-muted {
  color: rgba(255, 255, 255, 0.46);
  font-weight: 400;
  font-size: 0.74rem;
}

/* Eyebrow */
.cin-finale-eyebrow {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
  margin-bottom: 1.25rem;
  opacity: 0;
}

/* Headline */
.cin-finale-headline {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #ffffff;
  max-width: 22ch;
  opacity: 0;
  text-shadow: 0 2px 32px rgba(0, 0, 0, 0.28);
}

/* Body copy */
.cin-finale-tagline {
  margin-top: 1.5rem;
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
  max-width: 44ch;
  opacity: 0;
}

/* Ghost outline CTA */
.cin-finale-ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  text-decoration: none;
}
.cin-finale-ghost-btn:hover {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

#finale-cta { opacity: 0; }

/* Frosted background chameleon — large decorative element, left side */
.cin-finale-bg-chameleon {
  position: absolute;
  left: -7%;
  top: 50%;
  transform: translateY(-54%);
  width: clamp(26rem, 42vw, 56rem);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}
.cin-finale-bg-chameleon img {
  width: 100%;
  height: auto;
  filter: blur(1px) saturate(0.55);
}

/* Stats row */
.cin-finale-stats-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0;
}
.cin-finale-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.cin-finale-stat strong {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
}
.cin-finale-stat span {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.48);
  letter-spacing: 0.02em;
}

/* Cinematic UpHome orange CTA — overrides site green for Act 3 only */
.cin-uphome-btn {
  background: linear-gradient(135deg, #FF4E00 0%, #FF7800 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 32px rgba(255, 107, 0, 0.28) !important;
}
.cin-uphome-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 16px 40px rgba(255, 107, 0, 0.38) !important;
}

/* === Hero Brand === */
.cin-hero-brand {
  position: relative;
  z-index: 10;
}
.cin-hero-brand img {
  border-radius: 0;
  box-shadow: none;
}

/* === Progress === */
.cin-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.cin-progress-track {
  width: 120px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}
.cin-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #31c878, #ff6b00);
  transition: width 0.1s linear;
}
.cin-progress-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  animation: cinPulse 2.4s ease-in-out infinite;
}

@keyframes cinPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.85; }
}

/* === Return Bridge === */
.cin-return-bridge {
  position: relative;
  height: clamp(4rem, 8vh, 6rem);
  background: #ffffff;
  overflow: hidden;
}

.cinematic-enabled {
  scroll-behavior: auto;
}

.cinematic-reduced .cin-stage {
  height: auto !important;
  min-height: 100vh;
}
.cinematic-reduced .cin-act {
  position: relative !important;
  opacity: 1 !important;
  visibility: visible !important;
  min-height: 80vh;
}
.cinematic-reduced .cin-progress {
  display: none;
}

@media (max-width: 1023px) {
  .cin-hud { gap: 0.35rem; }
  .cin-hud-item { padding: 0.35rem 0.6rem; font-size: 0.65rem; }
  .cin-feature { padding: 0.4rem 0.72rem; font-size: 0.72rem; }
  .cin-flip-eyebrow { font-size: 0.65rem; letter-spacing: 0.28em; }
  .cin-flip-headline { font-size: clamp(1.3rem, 4.5vw, 2rem); margin-top: 1.75rem; }
  .cin-flip-inner { width: 188px; height: 188px; }
  .cin-trace-stage { width: 188px; height: 188px; }
  .cin-reform-field { inset: -14%; }
  .cin-reform-particle { width: 5.5px; height: 5.5px; }
  .cin-finale-headline { font-size: clamp(2.2rem, 9vw, 4rem); }
  .cin-finale-uphome-badge { font-size: 0.72rem; padding: 0.4rem 0.9rem; }
  .cin-finale-stats-row { gap: 1.5rem; }
}

/* UpHome FAQ accordion */
.faq-item {
  border: 1px solid rgba(32, 18, 7, 0.1);
  border-radius: 0.5rem;
  background: #fff;
  overflow: hidden;
}

.faq-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  text-align: left;
  font-size: 1rem;
  font-weight: 800;
  color: #201207;
}

.faq-trigger i {
  flex-shrink: 0;
  color: var(--brand-accent);
  transition: transform 300ms ease;
}

.faq-panel {
  border-top: 1px solid rgba(32, 18, 7, 0.08);
  padding: 1rem 1.15rem 1.15rem;
  color: #57534e;
  line-height: 1.7;
}

/* Accordion height animation (grid-template-rows trick) */
.faq-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-body--open {
  grid-template-rows: 1fr;
}

.faq-body > * {
  overflow: hidden;
  min-height: 0;
  transition: opacity 220ms ease, margin 300ms ease, padding 300ms ease, border-color 300ms ease;
}

.faq-body:not(.faq-body--open) > * {
  margin-top: 0 !important;
  border-top-color: transparent;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0;
}

.faq-body--open > * {
  opacity: 1;
}

/* ==========================================================================
   Interactive Control Experience Redesign (scenes section)
   ========================================================================== */

/* Outer glassmorphic container for the active device mockup */
.control-visualizer-container {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)), rgba(4, 14, 24, 0.45);
  box-shadow: 
    0 30px 90px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 400ms ease;
  min-height: 290px;
  width: 100%;
}

/* Glow spotlight in background */
.visualizer-spotlight {
  position: absolute;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(49, 200, 120, 0.12) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 1;
  transition: all 500ms ease;
}

/* Luxury Touch switch Panel */
.luxury-switch-panel {
  width: 136px;
  height: 204px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(16, 28, 41, 0.95), rgba(8, 15, 23, 0.98));
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  position: relative;
  z-index: 2;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 300ms ease, box-shadow 300ms ease;
}

.luxury-switch-panel:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(49, 200, 120, 0.4);
  box-shadow: 
    0 30px 60px -10px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(49, 200, 120, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.luxury-switch-panel:active {
  transform: translateY(-1px) scale(0.99);
}

.switch-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background-color 300ms ease, box-shadow 300ms ease;
}

.switch-indicator-dot.is-active {
  background-color: #31c878;
  box-shadow: 0 0 12px #31c878, 0 0 24px rgba(49, 200, 120, 0.6);
}

.switch-indicator-dot.is-inactive {
  background-color: #ff6b00;
  box-shadow: 0 0 12px #ff6b00, 0 0 24px rgba(255, 107, 0, 0.6);
}

.switch-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.08) 80%, transparent);
}

.switch-touch-area {
  width: 100%;
  height: 64px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.01);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

.luxury-switch-panel:hover .switch-touch-area {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.switch-glow-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(49, 200, 120, 0.16) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
  z-index: 1;
}

.switch-glow-bg.is-active {
  opacity: 1;
}

/* Voice control visualizer */
.voice-wave-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 80px;
  position: relative;
  z-index: 2;
}

.voice-wave-bar {
  width: 5px;
  height: 12px;
  background: linear-gradient(180deg, #64e6ba, #31c878);
  border-radius: 99px;
  animation: voice-pulse 1.2s ease-in-out infinite alternate;
}

.voice-wave-bar:nth-child(1) { height: 16px; animation-delay: 0.1s; }
.voice-wave-bar:nth-child(2) { height: 32px; animation-delay: 0.3s; }
.voice-wave-bar:nth-child(3) { height: 48px; animation-delay: 0.5s; }
.voice-wave-bar:nth-child(4) { height: 64px; animation-delay: 0.2s; }
.voice-wave-bar:nth-child(5) { height: 80px; animation-delay: 0.4s; }
.voice-wave-bar:nth-child(6) { height: 64px; animation-delay: 0.1s; }
.voice-wave-bar:nth-child(7) { height: 48px; animation-delay: 0.6s; }
.voice-wave-bar:nth-child(8) { height: 32px; animation-delay: 0.3s; }
.voice-wave-bar:nth-child(9) { height: 16px; animation-delay: 0.2s; }

@keyframes voice-pulse {
  0% {
    transform: scaleY(0.3);
    opacity: 0.5;
  }
  100% {
    transform: scaleY(1.1);
    opacity: 1;
  }
}

/* Phone Mockup Screen */
.phone-mockup-frame {
  width: 114px;
  height: 246px;
  border: 5px solid #1e293b;
  border-radius: 18px;
  background: #090e17;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.phone-screen-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  outline: none;
}

.phone-screen-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #31c878;
  box-shadow: 0 0 10px #31c878, 0 0 20px rgba(49, 200, 120, 0.6);
  cursor: pointer;
  transition: transform 150ms ease;
}

.phone-screen-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.phone-glow-effect {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(49, 200, 120, 0.22) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* UpHome Branded Mobile App mockup styles */
.uphome-orange-slider::-webkit-slider-thumb {
  background: #ff6b00 !important;
  box-shadow: 0 0 10px #ff6b00, 0 0 20px rgba(255, 107, 0, 0.6) !important;
}

/* Smartwatch mockup */
.watch-mockup-body {
  width: 144px;
  height: 144px;
  border: 5px solid #1e293b;
  border-radius: 50%;
  background: #04080f;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 0 8px rgba(30, 41, 59, 0.2);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.watch-mockup-body::before {
  content: "";
  position: absolute;
  right: -8px;
  top: calc(50% - 9px);
  width: 4px;
  height: 18px;
  background: #334155;
  border-radius: 0 4px 4px 0;
}

.watch-pulse-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(49, 200, 120, 0.35);
  border-radius: 50%;
  animation: watch-ripple 2.2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes watch-ripple {
  0% {
    transform: scale(0.7);
    opacity: 1;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Automation Nodes & Interactive Flow Visualizer */
.pulse-dot-1 {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #31c878;
  box-shadow: 0 0 10px #31c878, 0 0 20px #31c878;
  transform: translate(-50%, -50%);
  animation: pulse-line-1 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.pulse-dot-2 {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #31c878;
  box-shadow: 0 0 10px #31c878, 0 0 20px #31c878;
  transform: translate(-50%, -50%);
  animation: pulse-line-2 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pulse-line-1 {
  0% {
    left: 0%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 50%;
    opacity: 0;
  }
}

@keyframes pulse-line-2 {
  0% {
    left: 50%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

@keyframes spin-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spin-slow 10s linear infinite;
}

/* Selector Tabs */
.control-tab-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.control-tab-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  padding: 16px 20px;
  text-align: left;
  transition: all 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.control-tab-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateX(6px);
}

.control-tab-card.is-active {
  background: rgba(49, 200, 120, 0.07);
  border-color: rgba(49, 200, 120, 0.3);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.25),
    inset 4px 0 0 #31c878;
}

.control-tab-card.is-active p:first-of-type {
  color: #64e6ba;
}
