/* Home Page Specific Styles */
/* This file contains all styles specific to the home/landing page including wedding-landing functionality */
:root {
  --pepe-bg: #fcfcfc;
  --pepe-fg: #1c1b1a;
  --pepe-muted: #6d6863;
  --pepe-accent: #c7a27a; /* warm sand */
  --pepe-accent-2: #9fb7aa; /* soft sage */
  --pepe-radius: 16px;
}

/* Prevent all scrolling on the home page */
body {
  overflow: hidden !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100% !important;
}

html {
  overflow: hidden !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100% !important;
}

/* Ensure the wedding-landing section takes full height and can handle animations */
.wedding-landing {
  height: 100vh !important;
  overflow: visible !important;
  position: relative !important;
}

/* Hide the original site when landing is active */
body.wedding-landing-active header,
body.wedding-landing-active main,
body.wedding-landing-active footer { display: none !important; }

/* Force no scrolling on the landing page */
.wedding-landing-active {
  overflow: hidden !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100% !important;
}

.wedding-landing-active body {
  overflow: hidden !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100% !important;
}

.wedding-landing-active html {
  overflow: hidden !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100% !important;
}

/* Base */
.wedding-landing {
  color: var(--pepe-fg);
  background: var(--pepe-bg);
  min-height: 100vh;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

.wedding-landing .container {
  width: min(90%, 100%);
  margin-inline: auto;
}

/* Top-right actions inside landing */
.wedding-landing .pepe-top-actions {
  position: sticky;
  top: 0;
  z-index: 1001;
  display: flex;
  justify-content: flex-end;
  padding: 12px 0 0;
}

.wedding-landing .pepe-top-actions .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 600px) {
  .wedding-landing .pepe-top-actions { padding-top: 8px; }
}

/* Hero */
.wedding-landing .pepe-hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 28px;
  padding: 0 0 24px;
  /* Remove top padding to touch the navbar */
}

.wedding-landing .eyebrow {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pepe-muted);
  margin: 0 0 8px;
}

.wedding-landing h1 {
  font-size: clamp(48px, 9vw, 96px);
  line-height: 1.0;
  margin: 0 0 12px;
  font-weight: 600;
}

.wedding-landing .date {
  font-size: 18px;
  color: var(--pepe-muted);
  margin: 0 0 16px;
}

.wedding-landing .lede {
  font-size: 17px;
  line-height: 1.6;
  color: #3a3835;
  margin: 0 0 18px;
}

.wedding-landing .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wedding-landing .btn {
  appearance: none;
  border: none;
  background: linear-gradient(180deg, var(--pepe-accent), #b78d61);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(199,162,122,0.35);
}

.wedding-landing .btn:hover { filter: brightness(1.05); }

.wedding-landing .link {
  color: var(--pepe-fg);
  text-underline-offset: 3px;
}

/* Right-side stacked gallery */
.wedding-landing .pepe-right { position: relative }

.wedding-landing .stack-section { position: relative; }

.wedding-landing .stack-gallery {
  position: relative;
  height: 68vh; /* visible height */
  min-height: 420px;
}

.wedding-landing .stack-viewport {
  position: sticky;
  top: 10vh;
  height: 68vh;
  min-height: 420px;
}

.wedding-landing .stack-inner { position: relative; width: 100%; height: 85%; }

.wedding-landing .stack-card {
  position: absolute;
  inset: 0;
  border-radius: var(--pepe-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  transform: translateZ(0);
  will-change: transform, opacity;
}

.wedding-landing .stack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Default layered offsets (without JS) */
.wedding-landing .stack-card:nth-child(1) { transform: translateY(0px) scale(1); z-index: 5; }
.wedding-landing .stack-card:nth-child(2) { transform: translateY(28px) scale(.995); z-index: 4; }
.wedding-landing .stack-card:nth-child(3) { transform: translateY(56px) scale(.99); z-index: 3; }
.wedding-landing .stack-card:nth-child(4) { transform: translateY(84px) scale(.985); z-index: 2; }
.wedding-landing .stack-card:nth-child(5) { transform: translateY(112px) scale(.98); z-index: 1; }

/* WOW-driven full-viewport stack variant */
.wedding-landing .wow-stack.stack-gallery { height: 100vh; min-height: 560px; }
.wedding-landing .wow-stack .stack-viewport { top: 0; height: 100vh; min-height: 560px; }
.wedding-landing .wow-stack .stack-card { opacity: 0; transform: translateY(100%); }
.wedding-landing .wow-stack .stack-card:first-child { opacity: 1; transform: translateY(0); }
/* Cancel default layered offsets for wow variant */
.wedding-landing .wow-stack .stack-card:nth-child(n) { z-index: auto; }

/* Details section */
.wedding-landing .pepe-details {
  padding: 44px 0 80px;
}

.wedding-landing .detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.wedding-landing .detail-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.035);
}

.wedding-landing .detail-item img { width: 56px; height: 56px; object-fit: contain; }

.wedding-landing .detail-item .title { font-weight: 600; margin: 0 0 4px; }
.wedding-landing .detail-item .desc { margin: 0; color: var(--pepe-muted); font-size: 14px; }

/* Footer strip */
.wedding-landing .mini-footer {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 20px 0 40px;
  color: var(--pepe-muted);
  font-size: 13px;
}

/* Fixed bottom date banner (fills width, black background, soft shadow) */
.date-banner {
  position: fixed;
  left: 65%;
  right: 15%;
  bottom: 0;
  transform: translateY(30%); /* overshoot the bottom by 30% of its own height */
  background: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18); /* same soft shadow as stack cards */
  border-top-left-radius: var(--pepe-radius);
  border-top-right-radius: var(--pepe-radius);
  overflow: hidden;
  z-index: 9999; /* above everything else */
  pointer-events: none; /* don't block clicks or scroll */
}
.date-banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* Countdown mobile optimization for home page */
@media (max-width: 859px) {
  .wedding-landing .countdown-container {
    gap: 0.3rem !important;
    padding: 0 0.5rem;
    justify-content: space-between;
  }
  
  .wedding-landing .countdown-item {
    min-width: 60px !important;
    max-width: 70px !important;
    padding: 0.6rem 0.4rem !important;
    flex: 1;
    margin: 0;
  }
  
  .wedding-landing .countdown-number {
    font-size: 1.2rem !important;
    line-height: 1.2;
  }
  
  .wedding-landing .countdown-label {
    font-size: 0.7rem !important;
    line-height: 1.2;
    margin-top: 0.3rem;
  }
}

/* Extra small screens for home page countdown */
@media (max-width: 360px) {
  .wedding-landing .countdown-container {
    gap: 0.2rem !important;
    padding: 0 0.3rem;
  }
  
  .wedding-landing .countdown-item {
    min-width: 50px !important;
    max-width: 60px !important;
    padding: 0.5rem 0.3rem !important;
  }
  
  .wedding-landing .countdown-number {
    font-size: 1rem !important;
  }
  
  .wedding-landing .countdown-label {
    font-size: 0.65rem !important;
  }
}

/* Mobile overlay layout - text visible first, images overlay on scroll */
@media (max-width: 859px) {
  .wedding-landing .pepe-hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    /* Override grid layout completely */
    display: block !important;
  }
  
  .wedding-landing .pepe-left {
    position: relative;
    z-index: 1;
    background: var(--pepe-bg);
    background-image: url('../images/black-and-red.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 10px;
    padding-top: 90px; /* Add extra top padding for mobile navbar */
    margin-bottom: 50vh; /* Make room for images below */
    max-width: none !important;
    margin-right: 0 !important;
    width: 100% !important;
    /* Ensure the div takes full height from below header to bottom */
    min-height: calc(100vh - 60px); /* Adjust 60px based on navbar height */
    /* Center all content within the left pane */
    text-align: center;
  }

  .wedding-landing .pepe-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: -1;
  }
  
  .wedding-landing .pepe-right {
    /* Override grid layout completely */
    width: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }
  
  .wedding-landing .stack-section {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
  }
  
  .wedding-landing .stack-gallery {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
  }
  
  .wedding-landing .stack-viewport {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
  }
  
  .wedding-landing .stack-inner {
    position: relative;
    width: 100%;
    height: 100%;
  }
  
  .wedding-landing .stack-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    transform: translateZ(0);
    will-change: transform, opacity;
  }
  
  .wedding-landing .stack-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  /* Initial state - ALL images hidden below viewport to show text first */
  .wedding-landing .stack-card {
    opacity: 0;
    transform: translateY(100%);
    z-index: 10;
  }
}

/* Desktop */
@media (min-width: 860px) {
  .wedding-landing .pepe-hero {
    grid-template-columns: 1.00fr 1.00fr;
    align-items: center;
    gap: 10px;
    padding: 0 0 2vh;
    /* Remove top padding to touch the navbar */
  }
  .wedding-landing .pepe-left {
    position: relative;
    z-index: 1;
    background: var(--pepe-bg);
    background-image: url('../images/black-and-red.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Ensure the div takes full height from below header to bottom */
    min-height: calc(100vh - 60px); /* Adjust 60px based on navbar height */
    /* Add top padding to account for navbar height and ensure content is visible */
    padding-top: 80px;
    /* Center all content within the left pane */
    text-align: center;
  }

  .wedding-landing .pepe-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: -1;
  }
  .wedding-landing .stack-gallery { height: 76vh; }
  .wedding-landing .stack-viewport { height: 76vh; }
  .wedding-landing .pepe-details .detail-grid { grid-template-columns: 1fr 1fr; }
}


/* Right-justified, progressively narrower stack cards */
/* Each successive image is 20% narrower and aligned to the right */
.wedding-landing .stack-card { left: auto; right: 0; }
.wedding-landing .stack-card:nth-child(1) { width: 100%; }
.wedding-landing .stack-card:nth-child(2) { width: 85%; }
.wedding-landing .stack-card:nth-child(3) { width: 70%; }
.wedding-landing .stack-card:nth-child(4) { width: 55%; }
.wedding-landing .stack-card:nth-child(5) { width: 40%; }
