/* ═══════════════════════════════════════════
   A1 WINDOWS — Custom Styles
   Tailwind CDN handles utility classes;
   this file covers gradients, animations,
   patterns, and component-specific styles.
   ═══════════════════════════════════════════ */

/* ─── Brand color tokens (mirrors tailwind.config.js) ─── */
:root {
  --color-brand-500: #2563eb;
  --color-brand-800: #1e3a5f;
  --color-brand-900: #0f172a;
  --color-frame: #f5f0e8;
  --color-frame-dark: #e8e2d8;
  --color-frame-shadow: #d6cfc3;
  --color-hardware: #b8a88a;
  --color-hardware-dark: #a0926e;
}

/* ─── Base ─── */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ─── Navbar height utility ─── */
.h-18 {
  height: 4.5rem;
}

/* ─── Hero Gradient ─── */
.hero-gradient {
  background: linear-gradient(
    135deg,
    var(--color-brand-900) 0%,
    var(--color-brand-800) 35%,
    #1e40af 65%,
    var(--color-brand-500) 100%
  );
}

/* ─── CTA Section Gradient ─── */
.cta-gradient {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(30, 64, 175, 0.2) 0%, transparent 50%);
}

/* ─── Grid pattern overlay ─── */
.hero-grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ─── Text gradient for hero emphasis ─── */
.text-gradient-light {
  background: linear-gradient(135deg, #93c5fd 0%, #bfdbfe 50%, #dbeafe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Brand gradient for "Windows" wordmark ─── */
.text-gradient-brand {
  background: linear-gradient(135deg, var(--color-brand-500) 0%, #60a5fa 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Lighter variant for footer (dark background) */
.text-gradient-brand-light {
  background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 50%, #dbeafe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Hamburger menu animation ─── */
.hamburger-line {
  display: block;
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: #1e293b;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-line-1 {
  transform: translateY(-6px);
}

.hamburger-line-2 {
  transform: translateY(0);
}

.hamburger-line-3 {
  transform: translateY(6px);
}

/* Active state */
.menu-open .hamburger-line-1 {
  transform: rotate(45deg);
}

.menu-open .hamburger-line-2 {
  opacity: 0;
  transform: scaleX(0);
}

.menu-open .hamburger-line-3 {
  transform: rotate(-45deg);
}

/* ─── Mobile Menu ─── */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
  max-height: 80vh;
  overflow-y: auto;
}

/* ─── Scroll-triggered reveal animations ─── */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-up:nth-child(2) { transition-delay: 0.08s; }
.reveal-up:nth-child(3) { transition-delay: 0.16s; }
.reveal-up:nth-child(4) { transition-delay: 0.24s; }

/* ─── Navbar shadow on scroll ─── */
.navbar-scrolled {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ─── Focus styles ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Form input autofill styling ─── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px #f8fafc inset;
  -webkit-text-fill-color: var(--color-brand-900);
  transition: background-color 5000s ease-in-out 0s;
}

/* ─── Smooth hover for service cards ─── */
.service-card:hover {
  will-change: transform, box-shadow;
}

/* ─── Selection color ─── */
::selection {
  background-color: var(--color-brand-500);
  color: white;
}

/* ─── Mega Menu ─── */
.mega-panel {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.mega-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mega-trigger.active {
  color: var(--color-brand-500) !important;
  background: #eff6ff !important;
}

.mega-trigger.active .mega-chevron {
  transform: rotate(180deg);
}

.mega-item {
  cursor: pointer;
}

/* ─── Mobile Accordion ─── */
.mobile-acc-body.open {
  display: flex !important;
}

.acc-chevron.open {
  transform: rotate(180deg);
}

/* ─── Double Hung Window — Interactive Demo ─── */
/*
 * JS-driven 4-phase slider:
 *   Phase 0: Bottom sash slides up
 *   Phase 1: Top sash slides down
 *   Phase 2: Both open together
 *   Phase 3: Bottom sash tilts in for cleaning
 */

.dh-scene {
  max-width: 420px;
  margin: 0 auto;
}

/* Wall background */
.dh-wall {
  position: relative;
  width: 100%;
  padding-top: 125%;
  background: linear-gradient(180deg, #d4c5b0 0%, #c9b89d 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 25px 60px rgba(0,0,0,0.3),
    inset 0 0 60px rgba(0,0,0,0.05);
}

/* Brick/stucco texture */
.dh-wall::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px, transparent 22px,
      rgba(0,0,0,0.03) 22px, rgba(0,0,0,0.03) 23px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0px, transparent 46px,
      rgba(0,0,0,0.02) 46px, rgba(0,0,0,0.02) 47px
    );
  z-index: 1;
  pointer-events: none;
}

/* Exterior scene */
.dh-exterior {
  position: absolute;
  top: 6%;
  left: 12%;
  right: 12%;
  bottom: 18%;
  border-radius: 2px;
  overflow: hidden;
  z-index: 0;
}

.dh-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #87CEEB 0%, #b8dff0 50%, #d4eaf7 100%);
}

/* Clouds */
.dh-cloud {
  position: absolute;
  background: white;
  border-radius: 50px;
  opacity: 0.85;
}
.dh-cloud::before,
.dh-cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.dh-cloud-1 {
  width: 60px; height: 18px; top: 15%; left: -10%;
  animation: dh-drift 25s linear infinite;
}
.dh-cloud-1::before { width: 28px; height: 28px; top: -14px; left: 10px; }
.dh-cloud-1::after  { width: 20px; height: 20px; top: -8px;  left: 32px; }

.dh-cloud-2 {
  width: 45px; height: 14px; top: 28%; left: 20%;
  animation: dh-drift 32s linear infinite;
  animation-delay: -10s;
}
.dh-cloud-2::before { width: 22px; height: 22px; top: -11px; left: 8px; }
.dh-cloud-2::after  { width: 16px; height: 16px; top: -6px;  left: 24px; }

@keyframes dh-drift {
  0%   { transform: translateX(-20px); }
  100% { transform: translateX(350px); }
}

/* Trees */
.dh-trees {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 55%;
}
.dh-tree { position: absolute; bottom: 0; }
.dh-tree::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 40%, #5a8f3e, #3d6b2e 60%, #2d5420);
}
.dh-tree::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  background: #5c3d2e;
  border-radius: 2px;
}
.dh-tree-1 { left: 10%; }
.dh-tree-1::before { width: 70px; height: 80px;  bottom: 20px; left: -20px; }
.dh-tree-1::after  { width: 8px;  height: 28px; }

.dh-tree-2 { left: 45%; }
.dh-tree-2::before { width: 90px; height: 100px; bottom: 24px; left: -30px; }
.dh-tree-2::after  { width: 10px; height: 32px; }

.dh-tree-3 { right: 5%; }
.dh-tree-3::before { width: 60px; height: 70px;  bottom: 18px; left: -18px; }
.dh-tree-3::after  { width: 7px;  height: 24px; }

.dh-ground {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 20%;
  background: linear-gradient(180deg, #6aaa45 0%, #4d8a30 100%);
}

/* ── Window frame ── */
.dh-frame {
  position: absolute;
  top: 6%; left: 12%; right: 12%; bottom: 18%;
  border: 8px solid #f5f0e8;
  border-radius: 3px;
  z-index: 2;
  box-shadow:
    inset 0 0 0 2px #d6cfc3,
    0 2px 10px rgba(0,0,0,0.15),
    inset 0 0 20px rgba(0,0,0,0.05);
  overflow: hidden;
}

/* ── Sash shared ── */
.dh-sash {
  position: absolute;
  left: 0; right: 0;
  height: 50%;
  z-index: 3;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dh-sash-upper {
  top: 0;
  z-index: 3;
  transform: translateY(0);
}

.dh-sash-lower {
  bottom: 0;
  z-index: 4;
  transform-origin: 50% 50%;
  transform: translateY(0);
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 1.2s ease;
  box-shadow: none;
}

/* JS applies these state classes */
.dh-sash-lower.dh-open    { transform: translateY(-38%); }
.dh-sash-upper.dh-open    { transform: translateY(25%); }

/* Tilt: perspective on parent frame — eye at ~40% from top
   gives a balanced view of both inside and outside faces */
.dh-frame.dh-frame-tilt {
  perspective: 500px;
  perspective-origin: 50% 40%;
}

.dh-sash-lower.dh-tilt {
  transform: rotateX(-38deg);
  z-index: 10;
  box-shadow:
    0 25px 40px -8px rgba(0,0,0,0.3),
    0 12px 16px -4px rgba(0,0,0,0.12);
}

/*
 * With pivot at 50%, when tilted:
 *  - Top half swings TOWARD the viewer (you see its top surface)
 *  - Bottom half swings AWAY from viewer (you see its underside/bottom frame)
 */

/* ── Top edge thickness — visible as the top comes toward you ── */
.dh-sash-lower::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  background: linear-gradient(180deg, #f5f0e8, #ddd5c5);
  transform-origin: bottom center;
  transition: height 1.2s cubic-bezier(0.4,0,0.2,1),
              top 1.2s cubic-bezier(0.4,0,0.2,1);
  z-index: 8;
  border-radius: 1px 1px 0 0;
}

.dh-sash-lower.dh-tilt::before {
  height: 14px;
  top: -14px;
  background: linear-gradient(180deg, #ede7db 0%, #d6cfc3 50%, #c4bba8 100%);
  box-shadow:
    0 -2px 6px rgba(0,0,0,0.1),
    inset 0 2px 0 rgba(255,255,255,0.5);
}

/* ── Bottom frame underside — visible as the bottom recedes away ── */
.dh-sash-lower::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: #c4bba8;
  transition: height 1.2s cubic-bezier(0.4,0,0.2,1),
              bottom 1.2s cubic-bezier(0.4,0,0.2,1),
              opacity 1.2s ease;
  opacity: 0;
  z-index: -1;
}

.dh-sash-lower.dh-tilt::after {
  height: 14px;
  bottom: -14px;
  opacity: 1;
  background: linear-gradient(0deg, #968a76 0%, #a89c88 30%, #bbb0a0 100%);
  box-shadow:
    inset 0 -2px 0 rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Top rail shows its depth/surface */
.dh-sash-lower.dh-tilt .dh-sash-rail-top {
  height: 14px;
  background: linear-gradient(180deg, #f5f0e8 0%, #e8e2d8 40%, #d6cfc3 100%);
  box-shadow:
    0 -1px 3px rgba(0,0,0,0.12),
    inset 0 2px 0 rgba(255,255,255,0.6);
}

/* Bottom rail (visible from below, darker) */
.dh-sash-lower.dh-tilt .dh-glass {
  background: linear-gradient(
    180deg,
    rgba(180,210,235,0.22) 0%,
    rgba(255,255,255,0.18) 40%,
    rgba(135,206,235,0.08) 100%
  );
  border-bottom-color: #c4bba8;
}

/* Reflection — glare shifts to a wide horizontal band */
.dh-sash-lower.dh-tilt .dh-reflection {
  opacity: 0.55;
  width: 90%;
  height: 60%;
  top: 10%;
  transform: rotate(-3deg);
}

/* Shadow cast onto the wall/exterior behind the tilted sash */
.dh-tilt-shadow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(0,0,0,0.3) 0%, transparent 70%),
    linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 60%);
}

.dh-tilt-shadow.dh-visible {
  opacity: 1;
}

/* ── Glass ── */
.dh-glass {
  position: absolute;
  inset: 3px;
  background: linear-gradient(
    135deg,
    rgba(135,206,235,0.12) 0%,
    rgba(255,255,255,0.05) 40%,
    rgba(135,206,235,0.08) 100%
  );
  border: 2px solid #e8e2d8;
  border-radius: 1px;
  overflow: hidden;
}

/* Glass reflection */
.dh-reflection {
  position: absolute;
  top: -20%; left: -20%;
  width: 60%; height: 140%;
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(255,255,255,0.25) 40%,
    rgba(255,255,255,0.08) 50%,
    transparent 60%
  );
  transform: rotate(-15deg);
  transition: opacity 0.8s ease;
}

.dh-reflection-lower {
  left: 10%;
  opacity: 0.7;
}

/* Dim reflections when sash is moving */
.dh-open .dh-reflection,
.dh-tilt .dh-reflection { opacity: 0.25; }

/* ── Muntin bar ── */
.dh-muntin-v {
  position: absolute;
  top: 3px; bottom: 3px;
  left: 50%; width: 5px; margin-left: -2.5px;
  background: linear-gradient(90deg, #e8e2d8, #f5f0e8, #e8e2d8);
  z-index: 5;
  box-shadow: 0 0 3px rgba(0,0,0,0.08);
}

/* ── Sash rails ── */
.dh-sash-rail {
  position: absolute;
  left: 0; right: 0; height: 8px;
  background: linear-gradient(180deg, #f5f0e8, #e8e2d8);
  z-index: 6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.dh-sash-rail-bottom { bottom: 0; }
.dh-sash-rail-top    { top: 0; }

/* ── Lock hardware ── */
.dh-lock {
  position: absolute;
  top: 2px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 8px;
  background: linear-gradient(180deg, #b8a88a, #a0926e);
  border-radius: 2px 2px 0 0;
  z-index: 7;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.dh-lock::after {
  content: '';
  position: absolute;
  top: 2px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 4px;
  background: #8a7c60;
  border-radius: 1px;
}

/* ── Frame shadow ── */
.dh-frame-shadow {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.08);
  z-index: 8;
  pointer-events: none;
}

/* ── Sill ── */
.dh-sill {
  position: absolute;
  bottom: 16.2%; left: 10%; right: 10%;
  height: 10px;
  background: linear-gradient(180deg, #f5f0e8, #e8e2d8);
  border-radius: 0 0 2px 2px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.dh-sill-front {
  position: absolute;
  bottom: 14.7%; left: 9%; right: 9%;
  height: 12px;
  background: linear-gradient(180deg, #ede7db, #ddd5c5);
  border-radius: 0 0 3px 3px;
  z-index: 5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ── Breeze lines ── */
.dh-breeze {
  position: absolute;
  top: 20%; right: 5%;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
}

.dh-breeze-line {
  width: 30px; height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.6), transparent);
  border-radius: 2px;
  margin-bottom: 6px;
}
.dh-breeze-1 { animation: dh-breeze-flow 1.5s ease-in-out infinite;        width: 24px; }
.dh-breeze-2 { animation: dh-breeze-flow 1.5s ease-in-out 0.3s infinite;   width: 32px; margin-left: 4px; }
.dh-breeze-3 { animation: dh-breeze-flow 1.5s ease-in-out 0.6s infinite;   width: 20px; margin-left: 2px; }

@keyframes dh-breeze-flow {
  0%   { transform: translateX(0) scaleX(1);   opacity: 0.7; }
  50%  { transform: translateX(12px) scaleX(1.3); opacity: 1; }
  100% { transform: translateX(24px) scaleX(0.5); opacity: 0; }
}

/* Breeze visibility — JS toggles .dh-visible */
.dh-breeze-bottom,
.dh-breeze-top {
  transition: opacity 0.6s ease;
}
.dh-breeze.dh-visible { opacity: 1; }

/* ── Label (single, text swapped by JS) ── */
.dh-label {
  position: absolute;
  bottom: 3.5%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.dh-label.dh-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dh-label-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 58, 95, 0.88);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.dh-label-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: rgba(37, 99, 235, 0.6);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Slider controls ── */
.dh-controls {
  margin-top: 16px;
}

.dh-tabs {
  display: flex;
  gap: 6px;
}

.dh-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dh-tab:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
}

.dh-tab.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.4);
}

.dh-tab-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  transition: all 0.3s;
}

.dh-tab.active .dh-tab-num {
  background: var(--color-brand-500);
  color: white;
}

.dh-tab-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-align: center;
  line-height: 1.2;
  transition: color 0.3s;
}

.dh-tab.active .dh-tab-label {
  color: rgba(255,255,255,0.9);
}

/* Progress bar inside each tab */
.dh-tab-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.dh-tab-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--color-brand-500);
  border-radius: 0 0 12px 12px;
  transition: width 0.1s linear;
}

.dh-tab.active .dh-tab-bar {
  animation: dh-progress 5s linear forwards;
}

@keyframes dh-progress {
  0%   { width: 0%; }
  100% { width: 100%; }
}

/* ─── Casement Window Scene ─── */

.cm-scene {
  max-width: 480px;
  margin: 0 auto;
}

.cm-wall {
  position: relative;
  width: 100%;
  padding-top: 70%; /* wide horizontal aspect */
  background: linear-gradient(180deg, #c9b89d 0%, #baa886 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3), inset 0 0 60px rgba(0,0,0,0.05);
}

/* Stucco texture */
.cm-wall::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0px, transparent 18px, rgba(0,0,0,0.03) 18px, rgba(0,0,0,0.03) 19px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 40px, rgba(0,0,0,0.02) 40px, rgba(0,0,0,0.02) 41px);
  z-index: 1;
  pointer-events: none;
}

/* Garden exterior */
.cm-exterior {
  position: absolute;
  top: 12%;
  left: 8%;
  right: 8%;
  bottom: 18%;
  overflow: hidden;
  z-index: 0;
}

.cm-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #87CEEB 0%, #a8d8ea 40%, #c8e6c9 100%);
}

.cm-trees {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75%;
}

.cm-tree {
  position: absolute;
  bottom: 0;
}

.cm-tree::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 35%, #6aaa45, #4d8a30 50%, #3a7025);
}

.cm-tree::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #5c3d2e;
  border-radius: 2px;
}

.cm-tree-1 { left: 5%; }
.cm-tree-1::before { width: 60px; height: 70px; bottom: 15px; left: -15px; }
.cm-tree-1::after { width: 6px; height: 20px; }

.cm-tree-2 { left: 30%; }
.cm-tree-2::before { width: 80px; height: 95px; bottom: 20px; left: -25px; background: radial-gradient(ellipse at 45% 35%, #5a9f3e, #3d7a28 50%, #2d6020); }
.cm-tree-2::after { width: 8px; height: 26px; }

.cm-tree-3 { right: 20%; }
.cm-tree-3::before { width: 70px; height: 80px; bottom: 18px; left: -22px; background: radial-gradient(ellipse at 40% 40%, #5ea043, #468a2e 55%, #357020); }
.cm-tree-3::after { width: 7px; height: 22px; }

.cm-tree-4 { right: 0; }
.cm-tree-4::before { width: 55px; height: 65px; bottom: 14px; left: -18px; }
.cm-tree-4::after { width: 6px; height: 18px; }

/* Flower bed */
.cm-flowers {
  position: absolute;
  bottom: 15%;
  left: 10%;
  right: 20%;
  height: 12%;
  background:
    radial-gradient(circle at 10% 50%, #e879a0 3px, transparent 3px),
    radial-gradient(circle at 25% 40%, #c084fc 3px, transparent 3px),
    radial-gradient(circle at 40% 60%, #f9a8d4 3px, transparent 3px),
    radial-gradient(circle at 55% 35%, #fbbf24 3px, transparent 3px),
    radial-gradient(circle at 70% 55%, #e879a0 3px, transparent 3px),
    radial-gradient(circle at 85% 45%, #c084fc 3px, transparent 3px),
    linear-gradient(180deg, transparent 40%, #4d8a30 100%);
  z-index: 1;
}

.cm-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 18%;
  background: linear-gradient(180deg, #6aaa45 0%, #4d8a30 100%);
}

/* Window frame (white to match double-hung) */
.cm-frame {
  position: absolute;
  top: 12%;
  left: 8%;
  right: 8%;
  bottom: 18%;
  border: 8px solid #f5f0e8;
  border-radius: 3px;
  z-index: 2;
  box-shadow:
    inset 0 0 0 2px #d6cfc3,
    0 2px 10px rgba(0,0,0,0.15),
    inset 0 0 20px rgba(0,0,0,0.05);
  perspective: 500px;
  perspective-origin: 70% 50%;
}

/* Center mullion (vertical divider) */
.cm-mullion {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 6px;
  margin-left: -3px;
  background: linear-gradient(90deg, #e8e2d8, #f5f0e8, #e8e2d8);
  z-index: 6;
  box-shadow: 0 0 3px rgba(0,0,0,0.08);
}

/* Panels */
.cm-panel {
  position: absolute;
  top: 0;
  bottom: 0;
}

/* Left panel — hinged on left, swings outward */
.cm-panel-left {
  left: 0;
  width: 50%;
  transform-origin: left center;
  transform: rotateY(0deg);
  z-index: 5;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* JS applies .cm-open to swing panels outward */
.cm-panel-left.cm-open {
  transform: rotateY(40deg);
}

/* Panel frame edges (white to match outer frame) */
.cm-panel-frame-top,
.cm-panel-frame-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(180deg, #f5f0e8, #e8e2d8);
  z-index: 3;
}
.cm-panel-frame-top { top: 0; }
.cm-panel-frame-bottom { bottom: 0; }

.cm-panel-frame-left,
.cm-panel-frame-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(90deg, #f5f0e8, #e8e2d8);
  z-index: 3;
}
.cm-panel-frame-left { left: 0; }
.cm-panel-frame-right { right: 0; }

/* Right panel — hinged on right, swings outward (mirrored) */
.cm-panel-right {
  right: 0;
  width: 50%;
  z-index: 3;
  transform-origin: right center;
  transform: rotateY(0deg);
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cm-panel-right.cm-open {
  transform: rotateY(-40deg);
}

/* Glass */
.cm-glass {
  position: absolute;
  inset: 4px;
  background: linear-gradient(
    135deg,
    rgba(135,206,235,0.08) 0%,
    rgba(255,255,255,0.03) 50%,
    rgba(135,206,235,0.06) 100%
  );
  border: 2px solid #e8e2d8;
  border-radius: 1px;
  overflow: hidden;
}

.cm-glass-closed {
  background: linear-gradient(
    135deg,
    rgba(135,206,235,0.12) 0%,
    rgba(255,255,255,0.06) 40%,
    rgba(135,206,235,0.1) 100%
  );
}

/* Glass reflection */
.cm-reflection {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 50%;
  height: 130%;
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(255,255,255,0.2) 40%,
    rgba(255,255,255,0.06) 50%,
    transparent 60%
  );
  transform: rotate(-15deg);
}

.cm-reflection-right {
  left: 10%;
  width: 60%;
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(255,255,255,0.25) 35%,
    rgba(255,255,255,0.1) 50%,
    transparent 60%
  );
}

/* Handle (brass, like double-hung lock) */
.cm-handle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 20px;
  background: linear-gradient(180deg, #b8a88a, #a0926e);
  border-radius: 2px;
  z-index: 4;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.cm-handle-right {
  left: 6px;
  right: auto;
}

/* Sill (white/cream to match frame) */
.cm-sill {
  position: absolute;
  bottom: 16.2%;
  left: 6%;
  right: 6%;
  height: 10px;
  background: linear-gradient(180deg, #f5f0e8, #e8e2d8);
  border-radius: 0 0 2px 2px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.cm-sill-front {
  position: absolute;
  bottom: 14.5%;
  left: 5%;
  right: 5%;
  height: 12px;
  background: linear-gradient(180deg, #ede7db, #ddd5c5);
  border-radius: 0 0 3px 3px;
  z-index: 5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Breeze lines */
.cm-breeze {
  position: absolute;
  top: 30%;
  left: 2%;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.cm-breeze.cm-visible {
  opacity: 1;
}

.cm-breeze-line {
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.5), transparent);
  border-radius: 2px;
  margin-bottom: 8px;
}

.cm-bl-1 { animation: dh-breeze-flow 1.8s ease-in-out infinite; width: 22px; }
.cm-bl-2 { animation: dh-breeze-flow 1.8s ease-in-out 0.35s infinite; width: 30px; margin-left: 5px; }
.cm-bl-3 { animation: dh-breeze-flow 1.8s ease-in-out 0.7s infinite; width: 18px; margin-left: 2px; }

/* ─── Scroll-Driven Video Scrubbing ─── */

.scrub-section {
  height: 400vh; /* tall scroll runway — 4x viewport gives smooth control */
  position: relative;
}

.scrub-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scrub-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content slides overlaid on video */
.scrub-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.scrub-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.scrub-slide.scrub-active {
  opacity: 1;
  pointer-events: auto;
}

.scrub-slide-content {
  max-width: 480px;
  padding: 0 2rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

/* Positioning variants */
.scrub-slide-center {
  margin: 0 auto;
  text-align: center;
}

.scrub-slide-left {
  margin-left: 5%;
}

.scrub-slide-right {
  margin-left: auto;
  margin-right: 5%;
}

/* Frosted card for feature callouts */
.scrub-card {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px;
}

@media (max-width: 767px) {
  .scrub-slide-left,
  .scrub-slide-right {
    margin: 0 auto;
    text-align: center;
  }

  .scrub-slide-content {
    padding: 0 1.5rem;
  }
}

/* Scroll hint */
.scrub-scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.5s ease;
}

/* Progress bar at bottom */
.scrub-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.1);
  z-index: 3;
}

.scrub-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--color-brand-500);
  transition: width 0.05s linear;
}

/* ─── Bay Window Scene ─── */

.bay-scene {
  max-width: 460px;
  margin: 0 auto;
}

/* Exterior — wider to accommodate the bay projection */
.bay-exterior {
  position: absolute;
  top: 8%;
  left: 6%;
  right: 6%;
  bottom: 16%;
  overflow: hidden;
  z-index: 0;
}

/* Bay frame container — uses 3D perspective to show the angled panels */
.bay-frame {
  position: absolute;
  top: 8%;
  left: 6%;
  right: 6%;
  bottom: 16%;
  z-index: 2;
  display: flex;
  perspective: 600px;
  perspective-origin: 50% 50%;
}

/* Shared panel styles */
.bay-panel {
  position: relative;
  border: 6px solid #f5f0e8;
  box-shadow: inset 0 0 0 1px #d6cfc3;
  overflow: hidden;
}

/* Left angled panel — rotated inward */
.bay-panel-left {
  flex: 0 0 22%;
  transform-origin: right center;
  transform: rotateY(35deg);
  z-index: 3;
  border-radius: 2px 0 0 2px;
}

/* Center panel — flat, largest */
.bay-panel-center {
  flex: 0 0 56%;
  z-index: 4;
  border-left: none;
  border-right: none;
}

/* Right angled panel — rotated inward (mirrored) */
.bay-panel-right {
  flex: 0 0 22%;
  transform-origin: left center;
  transform: rotateY(-35deg);
  z-index: 3;
  border-radius: 0 2px 2px 0;
}

/* Glass */
.bay-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(135,206,235,0.08) 0%,
    rgba(255,255,255,0.03) 50%,
    rgba(135,206,235,0.06) 100%
  );
  overflow: hidden;
}

.bay-glass-center {
  background: linear-gradient(
    135deg,
    rgba(135,206,235,0.1) 0%,
    rgba(255,255,255,0.05) 40%,
    rgba(135,206,235,0.08) 100%
  );
}

/* Sill — follows the bay shape */
.bay-sill {
  position: absolute;
  bottom: 14.5%;
  left: 4%;
  right: 4%;
  height: 10px;
  background: linear-gradient(180deg, #f5f0e8, #e8e2d8);
  border-radius: 0 0 2px 2px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.bay-sill-front {
  position: absolute;
  bottom: 13%;
  left: 3%;
  right: 3%;
  height: 12px;
  background: linear-gradient(180deg, #ede7db, #ddd5c5);
  border-radius: 0 0 3px 3px;
  z-index: 5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ─── Awning Window Scene ─── */

.aw-scene {
  max-width: 420px;
  margin: 0 auto;
}

/* Exterior positioned for awning (taller window, higher on wall) */
.aw-exterior {
  position: absolute;
  top: 10%;
  left: 12%;
  right: 12%;
  bottom: 18%;
  overflow: hidden;
  z-index: 0;
}

/* Frame */
.aw-frame {
  position: absolute;
  top: 10%;
  left: 12%;
  right: 12%;
  bottom: 18%;
  border: 8px solid #f5f0e8;
  border-radius: 3px;
  z-index: 2;
  box-shadow:
    inset 0 0 0 2px #d6cfc3,
    0 2px 10px rgba(0,0,0,0.15),
    inset 0 0 20px rgba(0,0,0,0.05);
  overflow: visible;
  perspective: 500px;
  perspective-origin: 50% 80%;
}

/* Sash — hinged at top, bottom swings outward */
.aw-sash {
  position: absolute;
  inset: 0;
  transform-origin: top center;
  transform: rotateX(0deg);
  z-index: 3;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 1.2s ease;
}

/* JS applies these — negative rotateX = bottom swings OUTWARD (away from viewer) */
.aw-sash.aw-partial {
  transform: rotateX(-25deg);
  box-shadow: 0 -8px 20px -5px rgba(0,0,0,0.1);
}

.aw-sash.aw-full {
  transform: rotateX(-42deg);
  box-shadow: 0 -12px 30px -8px rgba(0,0,0,0.15);
}

/* Glass */
.aw-glass {
  position: absolute;
  inset: 3px;
  background: linear-gradient(
    135deg,
    rgba(135,206,235,0.1) 0%,
    rgba(255,255,255,0.04) 40%,
    rgba(135,206,235,0.07) 100%
  );
  border: 2px solid #e8e2d8;
  border-radius: 1px;
  overflow: hidden;
}

/* Sash frame rails */
.aw-rail {
  position: absolute;
  background: linear-gradient(180deg, #f5f0e8, #e8e2d8);
  z-index: 4;
}

.aw-rail-top, .aw-rail-bottom {
  left: 0; right: 0; height: 5px;
}
.aw-rail-top { top: 0; }
.aw-rail-bottom {
  bottom: 0;
  transition: height 1.2s ease, background 1.2s ease;
}

.aw-rail-left, .aw-rail-right {
  top: 0; bottom: 0; width: 5px;
}
.aw-rail-left { left: 0; }
.aw-rail-right { right: 0; }

/* Top surface of bottom rail visible when tilted outward */
.aw-sash.aw-partial .aw-rail-bottom,
.aw-sash.aw-full .aw-rail-bottom {
  height: 12px;
  background: linear-gradient(180deg, #f5f0e8 0%, #e8e2d8 40%, #d6cfc3 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.5);
}

/* Top rail (hinge side) thickens slightly */
.aw-sash.aw-partial .aw-rail-top,
.aw-sash.aw-full .aw-rail-top {
  height: 8px;
  background: linear-gradient(180deg, #d6cfc3 0%, #c4bba8 100%);
}

/* Handle */
.aw-handle {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 6px;
  background: linear-gradient(180deg, #b8a88a, #a0926e);
  border-radius: 2px;
  z-index: 5;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Reflection dims when open */
.aw-sash.aw-partial .cm-reflection,
.aw-sash.aw-full .cm-reflection {
  opacity: 0.3;
}

/* Breeze — rises from below when open */
.aw-breeze {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.aw-breeze.aw-visible {
  opacity: 1;
}

.aw-breeze-line {
  width: 2px;
  height: 24px;
  background: linear-gradient(0deg, rgba(255,255,255,0.5), transparent);
  border-radius: 2px;
  display: inline-block;
  margin: 0 8px;
}

.aw-bl-1 { animation: aw-rise 1.6s ease-in-out infinite;        height: 20px; }
.aw-bl-2 { animation: aw-rise 1.6s ease-in-out 0.3s infinite;   height: 28px; }
.aw-bl-3 { animation: aw-rise 1.6s ease-in-out 0.6s infinite;   height: 18px; }

@keyframes aw-rise {
  0%   { transform: translateY(0) scaleY(1);   opacity: 0.6; }
  50%  { transform: translateY(-14px) scaleY(1.2); opacity: 1; }
  100% { transform: translateY(-28px) scaleY(0.5); opacity: 0; }
}

/* Rain drops — realistic, full coverage */
.aw-rain {
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  bottom: 20%;
  z-index: 11;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.aw-rain.aw-visible {
  opacity: 1;
}

.aw-drop {
  position: absolute;
  width: 1.5px;
  background: linear-gradient(180deg, transparent 0%, rgba(140,200,255,0.3) 30%, rgba(100,180,255,0.7) 100%);
  border-radius: 0 0 1px 1px;
}

/* Varying heights and speeds for realism */
.aw-drop-1 { left: 5%;  height: 18px; animation: aw-fall-fast 0.7s linear infinite; animation-delay: 0s; }
.aw-drop-2 { left: 15%; height: 14px; animation: aw-fall-med  0.9s linear infinite; animation-delay: 0.15s; }
.aw-drop-3 { left: 22%; height: 20px; animation: aw-fall-fast 0.65s linear infinite; animation-delay: 0.4s; }
.aw-drop-4 { left: 32%; height: 12px; animation: aw-fall-slow 1.1s linear infinite; animation-delay: 0.1s; }
.aw-drop-5 { left: 40%; height: 16px; animation: aw-fall-med  0.85s linear infinite; animation-delay: 0.55s; }
.aw-drop-6 { left: 48%; height: 22px; animation: aw-fall-fast 0.6s linear infinite; animation-delay: 0.25s; }
.aw-drop-7 { left: 55%; height: 13px; animation: aw-fall-slow 1.0s linear infinite; animation-delay: 0.7s; }
.aw-drop-8 { left: 63%; height: 19px; animation: aw-fall-fast 0.7s linear infinite; animation-delay: 0.35s; }
.aw-drop-9 { left: 72%; height: 15px; animation: aw-fall-med  0.9s linear infinite; animation-delay: 0.5s; }
.aw-drop-10 { left: 78%; height: 21px; animation: aw-fall-fast 0.65s linear infinite; animation-delay: 0.1s; }
.aw-drop-11 { left: 85%; height: 11px; animation: aw-fall-slow 1.05s linear infinite; animation-delay: 0.6s; }
.aw-drop-12 { left: 93%; height: 17px; animation: aw-fall-med  0.8s linear infinite; animation-delay: 0.3s; }

/* Second layer — slightly offset for depth */
.aw-drop-13 { left: 8%;  height: 10px; width: 1px; animation: aw-fall-slow 1.2s linear infinite; animation-delay: 0.45s; opacity: 0.5; }
.aw-drop-14 { left: 28%; height: 9px;  width: 1px; animation: aw-fall-slow 1.15s linear infinite; animation-delay: 0.2s; opacity: 0.4; }
.aw-drop-15 { left: 58%; height: 11px; width: 1px; animation: aw-fall-slow 1.1s linear infinite; animation-delay: 0.65s; opacity: 0.5; }
.aw-drop-16 { left: 88%; height: 10px; width: 1px; animation: aw-fall-slow 1.25s linear infinite; animation-delay: 0.35s; opacity: 0.4; }

@keyframes aw-fall-fast {
  0%   { transform: translateY(-10px); opacity: 0; }
  8%   { opacity: 1; }
  85%  { opacity: 0.8; }
  100% { transform: translateY(120px); opacity: 0; }
}

@keyframes aw-fall-med {
  0%   { transform: translateY(-8px); opacity: 0; }
  10%  { opacity: 0.8; }
  85%  { opacity: 0.6; }
  100% { transform: translateY(100px); opacity: 0; }
}

@keyframes aw-fall-slow {
  0%   { transform: translateY(-5px); opacity: 0; }
  12%  { opacity: 0.6; }
  85%  { opacity: 0.4; }
  100% { transform: translateY(85px); opacity: 0; }
}

/* ─── Slider Window Scene ─── */

.sl-scene {
  max-width: 420px;
  margin: 0 auto;
}

/* Frame — wide horizontal, white */
.sl-frame {
  position: absolute;
  top: 12%;
  left: 8%;
  right: 8%;
  bottom: 18%;
  border: 8px solid #f5f0e8;
  border-radius: 3px;
  z-index: 2;
  box-shadow:
    inset 0 0 0 2px #d6cfc3,
    0 2px 10px rgba(0,0,0,0.15),
    inset 0 0 20px rgba(0,0,0,0.05);
  overflow: hidden;
}

/* Track grooves */
.sl-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(180deg, #d6cfc3, #e8e2d8, #d6cfc3);
  z-index: 8;
}

.sl-track-top { top: 0; }
.sl-track-bottom { bottom: 0; }

/* Panels — slide horizontally */
.sl-panel {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 52%;
  z-index: 5;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid #e8e2d8;
}

.sl-panel-left {
  left: 0;
  z-index: 5;
  transform: translateX(0);
}

.sl-panel-right {
  right: 0;
  z-index: 6;
  transform: translateX(0);
}

/* JS applies these to slide open */
.sl-panel-right.sl-open-left {
  transform: translateX(-42%);
}

.sl-panel-left.sl-open-right {
  transform: translateX(42%);
}

/* Glass */
.sl-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(135,206,235,0.1) 0%,
    rgba(255,255,255,0.04) 40%,
    rgba(135,206,235,0.07) 100%
  );
  overflow: hidden;
}

/* Vertical muntin — hidden for clean two-pane look */
.sl-muntin {
  display: none;
}

/* Handles */
.sl-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 6px;
  background: linear-gradient(180deg, #b8a88a, #a0926e);
  border-radius: 2px;
  z-index: 7;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.sl-handle-right { right: 6px; }
.sl-handle-left { left: 6px; }

/* ─── Fixed Picture Window Scene ─── */

.fp-scene {
  max-width: 480px;
  margin: 0 auto;
}

/* Frame — single large pane, no dividers */
.fp-frame {
  position: absolute;
  top: 12%;
  left: 8%;
  right: 8%;
  bottom: 18%;
  border: 8px solid #f5f0e8;
  border-radius: 3px;
  z-index: 2;
  box-shadow:
    inset 0 0 0 2px #d6cfc3,
    0 2px 10px rgba(0,0,0,0.15),
    inset 0 0 20px rgba(0,0,0,0.05);
  overflow: hidden;
}

.fp-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(135,206,235,0.1) 0%,
    rgba(255,255,255,0.04) 40%,
    rgba(135,206,235,0.07) 100%
  );
  border: 2px solid #e8e2d8;
  border-radius: 1px;
  overflow: hidden;
}

.fp-reflection {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 50%;
  height: 140%;
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(255,255,255,0.22) 38%,
    rgba(255,255,255,0.08) 50%,
    transparent 60%
  );
  transform: rotate(-15deg);
}

/* Sun rays streaming through the glass */
.fp-sunrays {
  position: absolute;
  top: 14%;
  right: 4%;
  z-index: 10;
  pointer-events: none;
}

.fp-ray {
  position: absolute;
  background: linear-gradient(180deg, rgba(255,255,200,0.3), transparent);
  border-radius: 0 0 50% 50%;
  transform-origin: top center;
  animation: fp-glow 4s ease-in-out infinite alternate;
}

.fp-ray-1 {
  width: 30px;
  height: 60px;
  top: 0;
  right: 20px;
  transform: rotate(10deg);
  opacity: 0.6;
}

.fp-ray-2 {
  width: 22px;
  height: 50px;
  top: 5px;
  right: 55px;
  transform: rotate(-5deg);
  opacity: 0.4;
  animation-delay: 0.8s;
}

.fp-ray-3 {
  width: 26px;
  height: 55px;
  top: 2px;
  right: 85px;
  transform: rotate(3deg);
  opacity: 0.5;
  animation-delay: 1.5s;
}

@keyframes fp-glow {
  0%   { opacity: 0.3; }
  100% { opacity: 0.7; }
}

/* ─── Quote Modal — Drawer (desktop) / Bottom Sheet (mobile) ─── */

/* Backdrop */
.quote-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.quote-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer panel — defaults (desktop: slide from right) */
.quote-drawer {
  position: fixed;
  z-index: 91;
  background: white;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);

  /* Desktop: right side panel */
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100%;
  height: 100%;
  transform: translateX(100%);
  border-radius: 0;
  box-shadow: -8px 0 30px rgba(0,0,0,0.12);
}

.quote-drawer.open {
  transform: translateX(0);
}

/* Close button */
.quote-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.quote-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Drag handle — hidden on desktop */
.quote-drag-handle {
  display: none;
}

/* Header */
.quote-header {
  padding: 24px 24px 0;
  flex-shrink: 0;
}

/* Form */
.quote-form {
  padding: 20px 24px;
  flex: 1;
}

/* Floating label field wrapper */
.qm-field {
  position: relative;
}

/* Inputs */
.qm-input {
  width: 100%;
  padding: 20px 16px 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.9375rem;
  color: var(--color-brand-800);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.qm-input:focus {
  border-color: var(--color-brand-500);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Hide the space placeholder — it's only there to trigger :placeholder-shown */
.qm-input::placeholder {
  color: transparent;
}

.qm-textarea {
  resize: none;
  min-height: 90px;
  padding-top: 24px;
}

/* Floating label */
.qm-label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9375rem;
  color: #94a3b8;
  pointer-events: none;
  transform-origin: left center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  padding: 0 2px;
}

/* Textarea label starts at top, not center */
.qm-textarea + .qm-label {
  top: 16px;
  transform: translateY(0);
}

/* Float up when focused OR when input has a value (not showing placeholder) */
.qm-float:focus + .qm-label,
.qm-float:not(:placeholder-shown) + .qm-label {
  top: 6px;
  transform: translateY(0) scale(0.75);
  color: var(--color-brand-500);
  font-weight: 500;
}

/* Unfocused but has value — label stays up, neutral color */
.qm-float:not(:focus):not(:placeholder-shown) + .qm-label {
  color: #64748b;
}

/* Success state */
.quote-success {
  padding: 0 24px;
}

/* Phone callout at bottom */
.quote-phone {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  flex-shrink: 0;
  margin-top: auto;
}

/* Body scroll lock when modal open */
body.quote-open {
  overflow: hidden;
}

/* ── Mobile: bottom sheet ── */
@media (max-width: 767px) {
  .quote-drawer {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 92vh;
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.15);
  }

  .quote-drawer.open {
    transform: translateY(0);
  }

  /* Show drag handle on mobile */
  .quote-drag-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 4px;
    flex-shrink: 0;
    cursor: grab;
  }

  .quote-drag-bar {
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
  }

  .quote-close {
    top: 12px;
    right: 12px;
  }

  .quote-header {
    padding: 12px 20px 0;
  }

  .quote-form {
    padding: 16px 20px;
  }

  .quote-phone {
    padding: 14px 20px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .reveal-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }

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

  /* Instant transitions for window demo */
  .dh-sash { transition-duration: 0.01ms !important; }
  .dh-tab-bar { animation: none !important; width: 100% !important; }
}

/* ─── Custom scrollbar (webkit) ─── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ─── RECENT PROJECTS CAROUSEL ─────────────────────────────── */
.carousel-viewport {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  padding: 0 8px;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .carousel-slide {
    flex: 0 0 55%;
  }
}

@media (min-width: 1024px) {
  .carousel-slide {
    flex: 0 0 38%;
  }
}

.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid #e2e8f0;
  color: #1e3a5f;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: #2563eb;
  transform: scale(1.3);
}

/* ─── PROJECT GALLERY PAGE ───────────────────────────────────── */

/* Sticky filter bar sits just below the 4.5rem (72px) navbar */
.gal-sticky-tabs {
  top: 4.5rem;
}

/* Gallery photo: enforces 4:3 ratio without arbitrary Tailwind class */
.gallery-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

/* Hover zoom on the photo itself */
.gitem img {
  transition: transform 0.4s ease;
}
.gitem:hover img {
  transform: scale(1.06);
}

/* Hover overlay gradient */
.gal-overlay {
  background: linear-gradient(to top, rgba(15,23,42,0.80) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Scroll-reveal animation */
.gal-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.gal-reveal.gal-vis {
  opacity: 1;
  transform: none;
}

/* Active filter button */
.filter-btn.gal-active {
  background: var(--color-brand-500);
  color: #fff;
}

/* Lightbox z-index (above quote modal at z-50) */
.gal-lightbox-z {
  z-index: 200;
}

/* Lightbox image constraints */
.lb-img-max {
  max-height: 75vh;
  object-fit: contain;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
}

