/* ═══════════════════════════════════════════════
   LANDING.CSS
   Landing page only: storyWrapper, sticky visual,
   scroll-text blocks, hero, mobile layout.
   Requires base.css to be loaded first.
═══════════════════════════════════════════════ */

/* ─── MOBILE IMAGES: hidden on desktop ─── */
.mob-img { display: none; }

/* ─── STORY WRAPPER ─── */
#storyWrapper {
  position: relative;
  height: auto;
  min-height: 650vh;
  background: var(--parchment);
  overflow: clip;
}

/* dot grid background */
#storyWrapper::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(var(--subtle) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ─── STICKY VISUAL ─── */
#storySticky {
  position: sticky; top: 0;
  height: 100vh;
  overflow: visible;
  background: transparent;
  z-index: 5;
}

.story-right {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  background: transparent;
}

/* ─── LAYER 0: HERO BACKGROUND IMAGE ─── */
#imgBg {
  position: absolute;
  right: -2%; top: 50%;
  transform: translateY(-50%);
  height: 90vh; width: auto;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  will-change: opacity;
}

/* ─── LAYER 1: GRADIENT VEIL ─── */
#heroVeil {
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    var(--parchment) 30%,
    rgba(242,237,227,0.6) 58%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
  will-change: opacity;
}

/* ─── LAYER 2: VISUAL ANCHOR ─── */
.visual-anchor {
  position: relative;
  will-change: transform;
  z-index: 3;
}

.iso-stack { position: relative; }
.iso-stack img {
  position: absolute; top: 0; left: 0;
  height: 75vh; display: block;
  will-change: opacity;
}
#imgIso { position: relative; height: 75vh; opacity: 0; }
#imgLR, #imgBR, #imgBA, #imgFull { opacity: 0; }
#imgBA  { z-index: 20; }

.perspective-wrap { position: absolute; inset: 0; }
#imgPlan {
  height: 93%; display: block;
  will-change: transform, opacity;
  position: relative; top: -8px; left: -16px;
  opacity: 0;
}

/* ─── ROOM BADGE ─── */
.room-badge {
  position: absolute; top: 1.75rem; right: 1.75rem; z-index: 10;
  padding: 0.28rem 0.8rem; border-radius: 100px;
  background: rgba(242,237,227,0.82); backdrop-filter: blur(8px);
  border: 1px solid var(--subtle);
  font-size: 0.67rem; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--terra);
  opacity: 0; will-change: opacity;
}

/* ─── PARSE LABEL ─── */
.parse-label {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(0,21,37,0.3);
  display: flex; align-items: center; gap: 0.55rem;
  opacity: 0; will-change: opacity; white-space: nowrap;
}
.parse-label::before {
  content: ''; display: block; width: 5px; height: 5px;
  border-radius: 50%; background: var(--terra); animation: pulse 1s ease infinite;
}

/* ─── SCROLL TEXT BLOCKS (desktop) ─── */
.scroll-text {
  position: absolute;
  z-index: 6;
  max-width: 320px;
  pointer-events: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(242,237,227,0.85);
}

/* shared type styles (used by scroll-text) */
.s-tag {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--terra); margin-bottom: 0.9rem;
}
.s-tag::before {
  content: ''; display: block; width: 12px; height: 1.5px;
  background: var(--terra); border-radius: 1px;
}
.s-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
  font-weight: 400; color: var(--navy);
  line-height: 1.1; margin-bottom: 0.8rem;
}
.s-body {
  font-size: 0.875rem; color: var(--warm-mid);
  line-height: 1.75; max-width: 36ch;
}

/* ─── HERO SCROLL-TEXT ─── */
.st-hero {
  top: 15vh; left: 7%;
  max-width: 500px;
  pointer-events: auto;
  background: transparent;
  padding: 0; border-radius: 0;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.85rem; border-radius: 100px;
  border: 1px solid rgba(196,132,90,0.35);
  background: rgba(196,132,90,0.08);
  font-size: 0.72rem; font-weight: 500; color: var(--terra);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 1.75rem;
}
.badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--terra); animation: pulse 2s ease infinite;
}
.st-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300; font-size: clamp(2.2rem, 3.5vw, 3.6rem);
  line-height: 1.05; color: var(--navy); margin-bottom: 1.25rem;
}
.st-hero h1 em { font-style: italic; font-weight: 500; color: var(--terra); }
.hero-sub {
  font-size: 0.92rem; line-height: 1.75;
  color: var(--warm-mid); margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ─── SCROLL-TEXT POSITIONS ─── */
.st-upload        { top: 110vh; left: 7%; }
.st-describe      { top: 190vh; left: 7%; }
.st-describe-rooms{ top: 265vh; left: 7%; }
.st-lr            { top: 330vh; left: 5%; }
.st-br            { top: 430vh; left: 5%; }
.st-ba            { top: 530vh; right: 5%; text-align: right; }
.st-deliver       { top: 600vh; left: 7%; }
.st-ba .s-tag     { flex-direction: row-reverse; }

/* ─── BOTTOM: waitlist + footer wrapper ─── */
#bottom {
  height: 100vh;
  display: flex;
  flex-direction: column;
  margin-top: 580vh;
}

/* override base .waitlist for landing: rolls over sticky visual */
#bottom .waitlist {
  z-index: 20;
  background: rgba(242,237,227,0.95);
  padding: 0 5%;
  flex-grow: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

#bottom footer {
  position: relative;
  z-index: 20;
}

/* ═══════════════════════════════════════════════
   MOBILE LAYOUT ≤ 860px
═══════════════════════════════════════════════ */
@media (max-width: 860px) {

  /* wrapper becomes normal flow */
  #storyWrapper {
    height: auto;
    min-height: unset;
    overflow: visible;
    padding-top: 64px;
  }
  #storyWrapper::before { display: none; }

  /* hide desktop sticky visual */
  #storySticky { display: none; }

  /* full-bleed mobile images */
  .mob-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* reset scroll-text to normal flow */
  .scroll-text {
    position: static;
    max-width: 100%;
    width: 100%;
    padding: 2.5rem 6%;
    background: transparent;
    border-radius: 0;
    pointer-events: auto;
    background-color: rgba(242,237,227,0.95);
  }

  .st-hero {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }
  .st-hero h1 { font-size: clamp(2.4rem, 9vw, 3.5rem); }

  /* bathroom: reset right-align */
  .st-ba         { text-align: left; }
  .st-ba .s-tag  { flex-direction: row; }

  /* bottom section: reset desktop margins */
  #bottom { margin-top: 0; height: auto; }

  #bottom .waitlist {
    padding: 5rem 6%;
    display: block;
  }
}

/* ─── MOBILE ENTRANCE ANIMATION ─── */
@media (max-width: 860px) {
  .scroll-text,
  .mob-img {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity   0.5s cubic-bezier(0.23, 1, 0.32, 1),
      transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  }
  .mob-img     { transition-delay: 0ms; }
  .scroll-text { transition-delay: 80ms; }

  .scroll-text.is-visible{
    opacity: 1;
    transform: translateY(0);
    background-color: rgba(242,237,227,0.9);
  }

  .mob-img.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1.2);
  }
}

/* ─── PREFERS REDUCED MOTION (landing-specific) ─── */
@media (prefers-reduced-motion: reduce) {
  /* kill entrance animations */
  .scroll-text,
  .mob-img {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* kill badge and parse dot pulses */
  .badge-dot,
  .parse-label::before { animation: none; }

  /* show final animation state so desktop isn't blank */
  #imgBg    { opacity: 0 !important; }
  #heroVeil { opacity: 0 !important; }
  #imgPlan  { opacity: 0 !important; }
  #imgIso   { opacity: 1 !important; }
  #imgFull  { opacity: 1 !important; }
  #imgLR    { opacity: 0 !important; }
  #imgBR    { opacity: 0 !important; }
  #imgBA    { opacity: 1 !important; }
}