/* ============================================================
   LUNA CUSTOM HOMES — Home Page Sections
   Hero, Process (blueprint), About, Features, Our Work, Testimonials
   (responsive rules included at the end)
   ============================================================ */

/* ── Hero ────────────────────────────────────────────────── */
#hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.53), rgba(0, 0, 0, 0.53)),
    url("../images/hero-bg.webp") center 25% / cover no-repeat;
  transform: scale(1.08);
  will-change: transform;
  transition: transform 10s var(--ease);
}
.hero-bg.ready {
  transform: scale(1);
}
.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: 64% 36%;
  align-items: flex-end;
  padding-bottom: clamp(3rem, 8vw, 90px);
  gap: 0;
}
.hero-title {
  font-family: var(--header);
  font-size: clamp(60px, 11vw, 120px);
  font-weight: 400;
  font-style: normal;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeUp 1.3s var(--ease) 0.25s forwards;
}
.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 2vw, 1.6rem);
  opacity: 0;
  transform: translateY(35px);
  animation: fadeUp 1.3s var(--ease) 0.55s forwards;
}
.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 32px);
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
}
.hero-desc {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.72);
}
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 1.6s forwards;
}
.hero-scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(200, 168, 106, 0.45)
  );
  overflow: hidden;
  position: relative;
}
.hero-scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gold);
  animation: scrollPulse 2.2s ease infinite;
}

/* ── Process (Blueprint Scroll Animation) ────────────────── */
#blueprint-section {
  height: 400vh;
  position: relative;
}
.blueprint-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  height: 100%;
}
.blueprint-canvas-col {
  flex: 0 0 60%;
  height: 100%;
}
/* Sticky canvas — no explicit background so it blends into the
   body dark colour, creating a seamless flow from the hero.     */
.blueprint-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* mix-blend-mode: screen dissolves the dark frame backgrounds
   into the page, leaving only the bright blueprint lines visible.
   Canvas fills the column so frames aren't stretched → no pixelation. */
#blueprintCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  mix-blend-mode: screen;
}
.blueprint-content-col {
  flex: 0 0 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 8vh 2.5rem 6vh 2.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--white);
}
.bp-headline {
  font-family: var(--header);
  font-size: clamp(2rem, 3vw, 3.2rem);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0;
  margin: 1.2rem 0 1.5rem;
}
.bp-intro-text {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
}
.bp-steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 30px;
}
.bp-step {
  flex: 1;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-top-color 0.3s var(--ease);
}
.bp-step:hover {
  border-top-color: rgba(200, 168, 106, 0.35);
}
.bp-num {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--gold);
  flex-shrink: 0;
}
.bp-step h3 {
  font-family: var(--serif);
  font-size: clamp(24px, 1.8vw, 2rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 0.6rem;
  letter-spacing: 0;
}
.bp-step-text p {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  max-width: 300px;
}

/* ── About ───────────────────────────────────────────────── */
#about {
  background: #121617;
  color: var(--white);
  padding: 90px 0;
}
.about-layout {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 50px;
}
.about-right {
  display: flex;
  flex-direction: column;
  gap: 60px;
}
.about-section-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--white);
  margin: 0;
}
.about-text p {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}
.about-text p:last-child {
  margin-bottom: 0;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.stat-item {
  padding: 0 3rem;
  display: flex;
  flex-direction: column;
}
.stat-item:first-child {
  padding-left: 0;
}
.stat-item:last-child {
  padding-right: 0;
}
.stat-item:nth-child(2) {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}
.stat-num {
  font-family: var(--header);
  font-size: 80px;
  font-weight: 400;
  line-height: 1;
  color: var(--white);
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.stat-suffix {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 18px;
}
.stat-label {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
}

/* ── Features ────────────────────────────────────────────── */
#features {
  background: #121617;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}
.features-bg-img {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 35%;
  width: 40%;
  height: 100%;
  object-fit: cover;
  opacity: 0.05;
}
#features .luna-container {
  position: relative;
  z-index: 1;
}
.features-layout {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  align-items: stretch;
  position: relative;
}
.features-left {
  width: 25%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 2rem;
}
.features-section-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--white);
  margin: 0;
}
.features-headline {
  font-family: var(--serif);
  font-size: 80px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 0;
  margin: 0;
}
.features-img-wrap {
  width: 40%;
  position: relative;
  overflow: hidden;
  height: 100%;
}
.features-img-wrap img:not(.features-bg-img) {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
  will-change: transform;
}
.features-img-wrap:hover img:not(.features-bg-img) {
  transform: scale(1.04);
}
.features-body {
  width: 35%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.features-intro-text {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  letter-spacing: 0;
  margin-bottom: 2.8rem;
}
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 55px;
}
.feature-item {
  padding: 0;
  border: none;
  cursor: default;
}
.feature-item h4 {
  font-family: var(--serif);
  font-size: 28px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 0.45rem;
  color: var(--white);
}
.feature-item p {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.75);
}

/* ── Our Work ────────────────────────────────────────────── */
#our-work {
  background: #121617;
  padding: 90px 0;
}
.our-work-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}
.our-work-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--white);
  margin: 0;
}

/* ── Carousel ────────────────────────────────────────────── */
.carousel-outer {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
.carousel-viewport {
  overflow: hidden;
  padding-bottom: 60px; /* extra bottom space so staggered-down slides don't clip */
  padding-left: 100px; /* peek slot for prev slide */
  padding-right: 100px; /* peek slot for next slide */
}
.carousel-track {
  display: flex;
  gap: 50px;
  align-items: flex-start;
  transition: transform 0.85s var(--ease);
  will-change: transform;
  cursor: grab;
}
.carousel-track.dragging {
  transition: none;
  cursor: grabbing;
}
/* Default (desktop > 1440px): 3 slides centered + 100px peek of next on right */
.cs {
  flex: 0 0 calc((100vw - 350px) / 3);
  overflow: hidden;
  position: relative;
  transition: opacity 0.4s var(--ease);
}
.cs img {
  width: 100%;
  height: 620px;
  object-fit: cover;
  display: block;
  transition: transform 0.85s var(--ease);
  will-change: transform;
}
.cs:hover img {
  transform: scale(1.06);
}
/* stagger: even-indexed slides sit lower */
.cs.stagger-down {
  margin-top: 100px;
}

.carousel-arrows {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 0;
}
.c-arrow {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.04em;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 200px;
  background: transparent;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  outline: none;
  position: relative;
  overflow: hidden;
}
.c-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 200px;
  background: var(--white);
  transform: translateX(-101%);
  transition: transform 0.35s var(--ease);
  z-index: 0;
}
.c-arrow:hover {
  color: var(--dark);
  border-color: var(--white);
}
.c-arrow:hover::before {
  transform: translateX(0);
}
.c-arrow span {
  position: relative;
  z-index: 1;
}

/* ── Testimonials ────────────────────────────────────────── */
#testimonials {
  background: #121617;
  padding: 90px 0;
  position: relative;
}
.testimonials-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--white);
  margin: 0 0 60px;
}
.t-slider {
  position: relative;
}
/* SVG line arrows — absolute top-right of slider area */
.t-nav-arrows {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 26px;
  z-index: 5;
}
.t-nav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--white);
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.t-nav-btn:hover {
  opacity: 0.5;
}
.t-nav-btn:active {
  transform: scale(0.92);
}
.t-nav-btn svg {
  width: 38px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.3;
}
.t-slides-wrapper {
  position: relative;
  overflow: hidden;
  margin-top: 30px;
}
.t-slides-track {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}
.t-slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  position: relative;
  min-height: 470px;
}
.t-slide-image {
  width: 47%;
  height: 470px;
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
/* Overlapping dark card */
.t-quote-card {
  position: relative;
  background: #161616;
  padding: 70px 70px 50px 75px;
  margin-left: -90px;
  flex: 1;
  align-self: center;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.t-quote-mark {
  position: absolute;
  top: -40px;
  left: 55px;
  width: 105px;
  height: auto;
  z-index: 3;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.3));
  user-select: none;
  pointer-events: none;
}
.t-text {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.005em;
  margin-bottom: 40px;
}
.t-author {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--white);
  text-align: right;
  letter-spacing: 0.01em;
  font-style: normal;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1440px) {
  /* Laptop: 2 slides centered + 100px peek of next on right */
  .cs {
    flex: 0 0 calc((100vw - 300px) / 2);
  }
}

@media (max-width: 1100px) {
  .features-headline {
    font-size: clamp(48px, 7vw, 80px);
  }
}

@media (max-width: 900px) {
  /* ── Hero ── */
  #hero {
    min-height: 560px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    align-content: end; /* pack title + hero-right together at the bottom */
    padding-top: 0;
    padding-bottom: 14svh;
    gap: 12px;
  }
  .hero-right {
    display: flex;
    gap: 12px;
  }
  .hero-desc {
    margin-bottom: 10px;
  }

  /* ── Sections vertical padding ── */
  #about {
    padding: 50px 0;
  }
  #features {
    padding: 50px 0;
  }
  #our-work {
    padding: 50px 0;
  }
  #testimonials {
    padding: 5rem 0;
  }

  /* ── About ── */
  .about-section-title {
    font-size: 24px;
  }
  .about-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .about-right {
    gap: 30px;
  }
  .about-text p {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .about-stats {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .stat-item {
    padding: 0 !important;
    border: none !important;
  }
  .stat-num {
    font-size: 60px;
  }

  /* ── Features ── */
  .features-layout {
    flex-direction: column;
    gap: 20px;
  }
  .features-left,
  .features-img-wrap,
  .features-body {
    width: 100%;
  }
  .features-bg-img {
    left: 0;
    width: 100%;
  }
  .features-left {
    gap: 8px;
    padding-bottom: 0;
  }
  .features-section-title {
    font-size: 24px;
  }
  .features-headline {
    font-size: 56px;
  }
  .features-img-wrap img {
    height: 350px;
  }
  .features-intro-text {
    margin-bottom: 20px;
  }
  .feature-list {
    gap: 20px;
  }
  .feature-item p {
    font-size: 15px;
  }

  /* ── Our Work ── */
  .our-work-title {
    font-size: 24px;
  }
  .our-work-header {
    margin-bottom: 24px;
  }
  .btn-ghost {
    font-size: 16px;
    height: 40px;
    padding: 10px 16px;
  }
  .carousel-viewport {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 30px;
  }
  .carousel-track {
    gap: 30px;
  }
  .cs {
    flex: 0 0 calc((100% - 30px) / 2);
  }
  .cs img {
    height: 400px;
  }
  .cs.stagger-down {
    margin-top: 60px;
  }
  .cs.stagger-down img {
    height: 340px;
  }

  /* ── Testimonials ── */
  .testimonials-title {
    font-size: 26px;
    margin-bottom: 40px;
  }
  .t-slide {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
  }
  .t-slide-image {
    width: 100%;
    height: 280px;
  }
  .t-quote-card {
    margin-left: 0;
    margin-top: -40px;
    width: 92%;
    align-self: center;
    padding: 55px 32px 40px;
  }
  .t-quote-mark {
    width: 80px;
    top: -28px;
    left: 28px;
  }
  .t-text {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .t-nav-arrows {
    gap: 18px;
  }
  .t-nav-btn svg {
    width: 30px;
  }

  /* ── The Process: layout flows naturally; long-pin sticky during section scroll.
     Section keeps the 400vh height (desktop) so the canvas animation has scroll
     room. Layout pins below the nav, then scrolls away when the section ends.  */
  .blueprint-layout {
    flex-direction: column;
    height: auto;
    position: sticky;
    top: 30px;
    padding: 50px 0;
    max-width: 100%;
  }
  .blueprint-canvas-col {
    flex: 0 0 auto;
    height: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .blueprint-sticky {
    position: relative;
    top: auto;
    height: 100%;
    width: 100%;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
  }
  .blueprint-content-col {
    flex: 0 0 auto;
    height: auto;
    padding: 1.25rem 1.5rem 1rem;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .section-label {
    font-size: 24px;
  }
  .bp-steps {
    gap: 20px;
  }
  .bp-step {
    padding-top: 20px;
  }
  .bp-step h3 {
    margin-bottom: 0.25rem;
  }
  .bp-step-text p {
    max-width: 100%;
  }
  .bp-intro-text {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  /* ── Hero ── */
  #hero {
    min-height: 480px;
  }
  .hero-inner {
    padding-bottom: 3.5rem;
  }

  /* ── About ── */
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  /* ── Carousel: 1 slide centered with 50px peek of prev/next on each side ── */
  .carousel-viewport {
    padding-left: 50px;
    padding-right: 50px;
  }
  .carousel-track {
    gap: 20px;
  }
  .cs {
    flex: 0 0 calc(100vw - 120px);
  }
  .cs.stagger-down {
    margin-top: 0;
  }
  .cs img,
  .cs.stagger-down img {
    height: 400px;
  }

  /* ── The Process: small phones ── */
  .blueprint-content-col {
    padding: 1rem 1.25rem 1rem;
  }
  .bp-headline {
    font-size: 42px;
    margin: 0 0 10px;
  }
  .bp-num {
    margin-top: 5px;
  }

  /* ── Features: small phones ── */
  .features-headline {
    font-size: 42px;
  }
  .features-img-wrap img {
    height: 280px;
  }
  .feature-list {
    gap: 24px;
  }
}
