:root {
  --cream: #f5f0e6;
  --ink: #1f2430;
  --accent-blue: #355c7d;
  --accent-gold: #c69e4f;

  /* Very wide foliage panels so they overflow off-screen horizontally */
  --flora-width: 1800px;

  /* Half of content max-width (480px) */
  --content-half: 240px;
  --center-offset: 120px;
}

/* Base */
* { box-sizing: border-box; margin: 0; padding: 0px; }

body {
  font-family: 'Playfair Display', serif;
  background-color: var(--cream);
  color: var(--accent-gold);
  font-size: 1.2rem;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('../img/wedding_home_background.png');
  background-size: cover;
  background-position: center;
  opacity: 1;
  z-index: -10;
}

/* Pinecone intro */
.pinecone-intro {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -80%);
  width: 320px;
  opacity: 0;
  animation: pineconeIntro 3.6s ease forwards;
  z-index: 0;
}

.pinecone-intro img { width: 100%; height: auto; }


.text-wrapper {
  opacity: 0;
  animation: wrapperFadeIn 0.8s ease forwards;
  animation-delay: 0.0s; 
}

.countdown-line {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 2px; /* tune spacing */
  opacity: 0; /* required for fade-in */
}

.count-num {
  font-size: 4.2rem; /* big numbers */
  font-weight: 420;
  color: var(--accent-blue);
}

.count-label {
  font-size: 1.0rem; /* normal size */
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-left: 2px; /* small gap between number and label */
}


.fade-in-1,
.fade-in-2,
.fade-in-3,
.fade-in-4,
.fade-in-5 {
  opacity: 0; /* REQUIRED */
}

/* Foliage */
.parallax-layer {
  position: fixed;
  top: -150vh;                 /* start well above viewport */
  height: calc(var(--flora-width)*5.09);               /* 5.09× width to preserve png proportions */
  width: var(--flora-width);   /* very wide, fills side white space */
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
  opacity: 0;
  z-index: -6;                 /* above background, below leaves/content */
}

/* LH near */
.layer1 {
  background-image: url('../img/flora_layer1.png');
  background-position: right center;
  left: calc(50vw - var(--flora-width) - var(--content-half) + var(--center-offset));
  transform: translateX(calc(var(--slide-x)*-1));
  animation: foliageSlideInLeft 1.4s ease forwards;
  animation-delay: 0.0s;
}

/* RH near */
.layer2 {
  background-image: url('../img/flora_layer2.png');
  background-position: left center;
  left: calc(50vw + var(--content-half) - var(--center-offset));
  transform: translateX((var(--slide-x)));
  animation: foliageSlideInRight 1.4s ease forwards;
  animation-delay: 0.0s;
}

/* LH far */
.layer3 {
  background-image: url('../img/flora_layer1.png');
  background-position: right center;
  left: calc(50vw - var(--flora-width) - var(--content-half) + var(--center-offset));
  transform: translateX(calc(var(--slide-x)*-1));
  animation: foliageSlideInLeft 1.4s ease forwards;
  animation-delay: 0.0s;
}

/* RH far */
.layer4 {
  background-image: url('../img/flora_layer2.png');
  background-position: left center;
  left: calc(50vw + var(--content-half) - var(--center-offset));
  transform: translateX((var(--slide-x)));
  animation: foliageSlideInRight 1.4s ease forwards;
  animation-delay: 0.0s;
}

.parallax-wrapper {
  transform: translateY(calc(var(--scroll) * -1));
  will-change: transform;
  contain: layout;
}


/* Falling leaves */
.falling-leaf {
  position: fixed;
  top: calc(-10vh - (100vh * var(--y)));
  left: calc(1% + 99% * var(--x));
  width: 75px;
  opacity: 0;
  animation: fall var(--speed) linear infinite, leavesFadeIn 2s ease forwards;
  z-index: -4;
}

@keyframes pineconeIntro {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50%  { transform: translate(-50%, -50%) scale(1.8); }
  70%  { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0.2; }
}


/* Foliage slide-in keyframes */
@keyframes foliageSlideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 0.4; }
}

@keyframes foliageSlideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 0.4; }
}



@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(210vh) rotate(360deg); }
}

@keyframes leavesFadeIn {
  from { opacity: 0; }
  to { opacity: 0.4; }
}



/* Content */
.content {
  width: 100%;
  max-width: 480px;
  margin: auto;
  padding: 120px 20px 40px;
  text-align: center;
  opacity: 1;
  position: relative;
  z-index: 1;
}

.content-photo {
  width: 100%;
  max-width: 480px;
  display: block;
  margin: 2rem auto;
  border-radius: 8px;
}


/* Text fade-in sequence */
.fade-in-1 { animation: fadeInUp 1.2s ease forwards; animation-delay: 0.3s; }
.fade-in-2 { animation: fadeInUp 1.2s ease forwards; animation-delay: 0.6s; }
.fade-in-3 { animation: fadeInUp 1.2s ease forwards; animation-delay: 0.9s; }
.fade-in-4 { animation: fadeInUp 1.2s ease forwards; animation-delay: 1.2s; }
.fade-in-5 { animation: fadeInUp 1.2s ease forwards; animation-delay: 1.5s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Typography */
.title-script {
  font-family: 'Great Vibes', cursive;
  font-size: 5rem;
  color: var(--accent-blue);
  margin-bottom: 40px;
}

.title-serif {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 60px;
}

.countdown-label {
  font-size: 1.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: -10px;
}

.countdown-days {
  font-size: 3.8rem;
  margin-bottom: 60px;
  padding-bottom: 60px;
}

.countdown-days span {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-top: 0px;
  margin-bottom: 120px;
}

/* Buttons */
.button-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 60px;
}

.btn {
  padding: 15px 15px;
  border-radius: 999px;
  background: rgba(245,240,230,0.9);
  opacity: 0.8;
  color: var(--accent-gold);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 3px solid var(--accent-blue);
}

.btn-primary {
  color: var(--accent-gold);
  padding: 15px 15px;
}

/* Menu */
.menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 75vw;
  max-width: 320px;
  background: rgba(245,240,230,0.97);
  box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  z-index: 19;
  padding: 60px 20px 20px;
}

.menu.open { transform: translateX(0); }

.menu h2 {
  font-family: 'Great Vibes', cursive;
  font-size: 2.4rem;
  margin-bottom: 20px;
  color: var(--accent-gold);
}

.menu ul {
  list-style: none;
  font-size: 1.2rem;
  line-height: 2;
  color: var(--accent-blue);
}

.menu li a {
  text-decoration: none;
  color: var(--ink);
}

@keyframes wrapperFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}