/* =====================================================
   DOORS NEAR ME — CINEMATIC HOMEPAGE
   Scroll-scrubbed 7-second video hero
   ===================================================== */

/* ------- HERO / CINEMATIC STAGE ------- */
.cinematic {
  position: relative;
  height: 500vh; /* total scroll length for the journey */
  background: #000;
}
.cinematic-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* Video element fills the viewport */
.cinematic-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  background: #000;
  /* Hint to the browser to use GPU compositing */
  will-change: transform;
  transform: translateZ(0);
}

/* Slideshow fallback (mobile / reduced-motion) */
.cinematic-slideshow {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
}
.cinematic-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.cinematic-slideshow img.active { opacity: 1; }
body.use-slideshow .cinematic-video { display: none; }
body.use-slideshow .cinematic-slideshow { display: block; }

/* Loading state */
.cinematic-loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: #000;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: opacity 0.6s ease;
}
.cinematic-loader.hide {
  opacity: 0;
  pointer-events: none;
}
.cinematic-loader-bar {
  width: 140px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}
.cinematic-loader-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 35%;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  animation: loaderSlide 1.4s ease-in-out infinite;
}
@keyframes loaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(380%); }
}

/* Gradient overlay for text legibility */
.cinematic-grad {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.35) 0%,
    rgba(0,0,0,0.05) 25%,
    transparent 45%,
    transparent 60%,
    rgba(0,0,0,0.35) 80%,
    rgba(0,0,0,0.65) 100%);
  pointer-events: none;
}

/* Scene-keyed text overlays — each fades in for its time range */
.scene-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 2rem 8vh;
  text-align: center;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.scene-overlay.active {
  opacity: 1;
  transform: translateY(0);
}
.scene-overlay > * { pointer-events: auto; }

/* The first overlay (hero) sits a bit higher to feel like a true hero */
.scene-overlay[data-scene-time="0,1.5"] {
  justify-content: center;
  padding-bottom: 0;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
}
.hero-eyebrow .num { color: var(--red); margin-right: 0.6rem; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 1;
  font-weight: 400;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
  max-width: 900px;
}
.hero-title em { font-style: italic; color: #fff; font-weight: 500; }
.hero-title em strong { color: var(--red); font-weight: 500; font-style: italic; }

.hero-sub {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 400;
  color: rgba(255,255,255,0.88);
  max-width: 620px;
  line-height: 1.55;
  margin: 0 0 2rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.7);
}

.hero-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
}
.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Scroll cue — only on first scene */
.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: pulseCue 2.4s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.scroll-cue.fade { opacity: 0; }
.scroll-cue::after {
  content: '↓';
  font-size: 1rem;
}
@keyframes pulseCue {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@media (max-width: 700px) { .scroll-cue { right: 1rem; bottom: 1rem; } }

/* Progress dots */
.scene-progress {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  z-index: 15;
}
.scene-progress .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 0.4s ease, transform 0.4s ease;
}
.scene-progress .dot.active {
  background: var(--red);
  transform: scale(1.4);
}
@media (max-width: 700px) { .scene-progress { display: none; } }

/* Reduced motion: hide cinematic overlays' transition, keep things still */
@media (prefers-reduced-motion: reduce) {
  .scene-overlay { transition: opacity 0.2s ease; transform: none !important; }
  .cinematic-loader-bar::after { animation: none; }
  .scroll-cue { animation: none; }
}

/* Mobile responsive */
@media (max-width: 700px) {
  .cinematic { height: 400vh; }
  .hero-cta-row { flex-direction: column; width: 100%; max-width: 320px; margin-bottom: 1rem; }
  .hero-cta-row .btn { width: 100%; justify-content: center; }
  .hero-eyebrow { font-size: 0.65rem; }
  .scene-overlay { padding-bottom: 6vh; padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* ------- PRODUCT CARDS SECTION ------- */
.product-cards {
  background: var(--bone);
  padding: 8rem 2rem;
  position: relative;
}
.product-cards-inner {
  max-width: 1300px;
  margin: 0 auto;
}
.product-cards-head {
  text-align: center;
  margin-bottom: 5rem;
}
.product-cards-head .eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
}
.product-cards-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1.05;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
}
.product-cards-head h2 em { color: var(--red); font-style: italic; }
.product-cards-head p {
  max-width: 580px;
  margin: 1.25rem auto 0;
  color: var(--grey-700);
  font-size: 1.05rem;
  line-height: 1.65;
}

.product-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 1000px) { .product-card-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.product-card {
  position: relative;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.18);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 80px -25px rgba(0,0,0,0.28);
}
.product-card-image {
  aspect-ratio: 4 / 5;
  background: var(--bone);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.product-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.12) 0%, transparent 60%);
}
.product-card-image img {
  max-width: 75%;
  max-height: 95%;
  object-fit: contain;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-card-image img { transform: scale(1.04); }
.product-card-body {
  padding: 2rem 2rem 2.25rem;
}
.product-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.75rem;
}
.product-card-body p {
  color: var(--grey-700);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}
.product-card-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.product-card-link::after {
  content: '→';
  transition: transform 0.3s ease;
}
.product-card:hover .product-card-link::after { transform: translateX(4px); }

/* ------- WHY US SECTION ------- */
.why-us {
  padding: 8rem 2rem;
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.why-us::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(230,33,40,0.1) 0%, transparent 60%);
}
.why-us-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}
@media (max-width: 900px) {
  .why-us-inner { grid-template-columns: 1fr; gap: 3rem; }
}
.why-us-text .eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
}
.why-us-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4vw, 3.4rem);
  line-height: 1.05;
  font-weight: 400;
  margin: 0 0 1.5rem;
}
.why-us-text h2 em { color: var(--red); font-style: italic; }
.why-us-text p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 2rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.92);
}
.feature-list li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' fill='white'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' fill='white'/></svg>") center/contain no-repeat;
}

.why-us-image {
  aspect-ratio: 4 / 5;
  background-image: url('../assets/cinematic/bedroom.png');
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  box-shadow: 0 50px 100px -30px rgba(0,0,0,0.7);
  position: relative;
}
.why-us-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.5) 100%);
}

/* ------- SHOWROOM CTA SECTION ------- */
.showroom-cta {
  padding: 8rem 2rem;
  background: var(--bone);
  text-align: center;
}
.showroom-cta-inner {
  max-width: 880px;
  margin: 0 auto;
}
.showroom-cta .eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
}
.showroom-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1.05;
  font-weight: 400;
  margin: 0 0 1.5rem;
}
.showroom-cta h2 em { color: var(--red); font-style: italic; }
.showroom-cta > p {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--grey-700);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}
.showroom-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------- INFO + MAP SECTION ------- */
.info-map {
  padding: 5rem 2rem 8rem;
  background: var(--bone);
}
.info-map-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: stretch;
}
@media (max-width: 900px) {
  .info-map-inner { grid-template-columns: 1fr; }
}
.info-card {
  background: #fff;
  padding: 2.5rem;
  border-radius: 6px;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.15);
}
.info-card h3 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 500;
  margin: 0 0 1.5rem;
}
.info-card .info-row {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.info-card .info-row:last-child { border-bottom: none; }
.info-card .info-row .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 0.4rem;
}
.info-card .info-row .value {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}
.info-card .info-row .value a:hover { color: var(--red); }

.info-map-frame {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.15);
  min-height: 460px;
  background: #ddd;
}
.info-map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 0;
  display: block;
}

/* ------- SEO SECTION ------- */
.seo-section {
  padding: 6rem 2rem;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.seo-section-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.seo-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.2;
  font-weight: 500;
  margin: 0 0 1.5rem;
  color: var(--ink);
}
.seo-section p {
  color: var(--grey-700);
  line-height: 1.75;
  font-size: 1rem;
}

/* ------- APPOINTMENT MODAL ------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8,8,8,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: #fff;
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  padding: 2.5rem;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  box-shadow: 0 60px 120px rgba(0,0,0,0.4);
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--grey-700);
  transition: background 0.2s ease, color 0.2s ease;
}
.modal-close:hover { background: var(--ink); color: #fff; }

.modal h3 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  padding-right: 2rem;
}
.modal h3 em { color: var(--red); font-style: italic; }
.modal > p {
  color: var(--grey-500);
  font-size: 0.9rem;
  margin: 0 0 1.75rem;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.modal .form-grid {
  gap: 1rem;
}

.modal .checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1rem;
  margin: 0.5rem 0 0.25rem;
}
@media (max-width: 500px) { .modal .checkbox-group { grid-template-columns: 1fr; } }
.modal .checkbox-group .group-label {
  grid-column: 1/-1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 0.25rem;
}
.modal .checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.92rem;
  user-select: none;
}
.modal .checkbox input { width: 16px; height: 16px; accent-color: var(--red); cursor: pointer; }

.modal-confirm {
  text-align: center;
  padding: 2rem 0 0.5rem;
  display: none;
}
.modal-confirm.show { display: block; }
.modal-confirm .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 139, 34, 0.12);
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d6d1d;
  font-size: 2rem;
}
.modal-confirm h4 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  font-weight: 500;
}
.modal-confirm p {
  color: var(--grey-700);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* ------- MOBILE STICKY CTA ------- */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.08);
  z-index: 50;
  display: none;
}
.mobile-sticky-cta .btn { width: 100%; justify-content: center; }
@media (max-width: 700px) {
  .mobile-sticky-cta { display: block; }
  body { padding-bottom: 70px; }
}

/* ------- RESPONSIVE TWEAKS (post-hero) ------- */
@media (max-width: 700px) {
  .info-map-frame { min-height: 320px; }
  .info-map-frame iframe { min-height: 320px; }
}
