:root {
  --primary-color: #2d302a;
  --bg-color: #FAF9F6;
  --accent-color: #A38C6D;
  --text-main: #333333;
  --text-light: #777777;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lora', serif;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Preloader Splash Screen */
#preloader {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-color);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.heart {
  background-color: var(--accent-color);
  display: inline-block;
  height: 30px;
  margin: 0 10px;
  position: relative;
  top: 0;
  transform: rotate(-45deg);
  width: 30px;
  animation: heartbeat 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}
.heart:before,
.heart:after {
  content: "";
  background-color: var(--accent-color);
  border-radius: 50%;
  height: 30px;
  position: absolute;
  width: 30px;
}
.heart:before { top: -15px; left: 0; }
.heart:after { left: 15px; top: 0; }

@keyframes heartbeat {
  0% { transform: scale(0.95) rotate(-45deg); }
  5% { transform: scale(1.1) rotate(-45deg); }
  39% { transform: scale(0.85) rotate(-45deg); }
  45% { transform: scale(1) rotate(-45deg); }
  60% { transform: scale(0.95) rotate(-45deg); }
  100% { transform: scale(0.9) rotate(-45deg); }
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 2px;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 4px;
}

.divider {
  width: 50px;
  height: 2px;
  background-color: var(--accent-color);
  margin: 0 auto 3rem;
}

.bg-light {
  background-color: #fff;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 5%;
}

.section {
  padding: 8rem 0;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: var(--transition);
  background: transparent;
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  padding: 1rem 0;
}

nav.scrolled .logo,
nav.scrolled .nav-links a {
  color: var(--primary-color);
}

nav.scrolled .hamburger span {
  background: var(--primary-color);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #fff;
  transition: var(--transition);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: #fff;
  transition: var(--transition);
}

/* Hero */
.hero {
  height: 100vh;
  min-height: 600px;
  background: url('https://static.wixstatic.com/media/d63b81_25d254f2815e46f8baccf12e07544439~mv2.jpeg') center/cover no-repeat fixed;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
}

.names {
  font-size: 5.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 5px 25px rgba(0,0,0,0.4);
}

.amp {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 4.5rem;
  color: var(--accent-color);
}

.subtitle {
  font-size: 1.2rem;
  letter-spacing: 10px;
  text-transform: uppercase;
  margin-bottom: 3.5rem;
  font-family: var(--font-heading);
}

.btn {
  display: inline-block;
  padding: 1.2rem 3rem;
  background: var(--accent-color);
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  transition: var(--transition);
  border: 1px solid var(--accent-color);
}

.btn:hover {
  background: transparent;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Story */
.story-text {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
  font-size: 1.2rem;
  line-height: 2;
  color: var(--text-light);
}

.story-image {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  /* An ultra-soft, premium vignette fade that flawlessly blends into the background */
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 65%);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 65%);
}

.story-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.2s ease;
}

.story-image:hover img {
  transform: scale(1.05);
}



/* Details */
.details-parallax {
  background: url('https://static.wixstatic.com/media/d63b81_5d8aafba50524e7781af8dae84c9f889~mv2.jpeg') center/cover no-repeat fixed;
  position: relative;
}

.details-parallax::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.85); /* Frosty elegant overlay */
}

.details-card {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 5rem 4rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.03);
  text-align: center;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.detail-item h3 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
}

.detail-item p {
  color: var(--text-light);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

/* RSVP */
#rsvp {
  text-align: center;
}
.rsvp-text {
  margin-bottom: 3rem;
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 5rem 0 3rem;
}

.footer-names {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
}

.footer-links {
  margin-bottom: 3rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 1rem;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.copyright {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  font-family: var(--font-body);
}

/* Countdown Timer */
.countdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 4rem;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-color);
  padding: 1.5rem;
  min-width: 100px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.02);
}

.time-block span {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.time-block small {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-light);
}

/* Animations */
.animate-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.animate-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  animation: fadeIn 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 1rem 0;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--primary-color);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    background: var(--primary-color);
  }

  .names { font-size: 3.5rem; }
  .amp { font-size: 3rem; }
  .subtitle { font-size: 0.9rem; letter-spacing: 6px; }
  .section-title { font-size: 2rem; }
  .details-grid { grid-template-columns: 1fr; gap: 3rem; }
  .details-card { padding: 3rem 1.5rem; box-shadow: none; border: none; }
  
  .countdown { gap: 0.5rem; margin-bottom: 3rem; flex-wrap: nowrap; }
  .time-block { min-width: 0; padding: 0.8rem 0.5rem; flex: 1; box-shadow: 0 3px 10px rgba(0,0,0,0.05); }
  .time-block span { font-size: 1.5rem; }
  .time-block small { font-size: 0.65rem; letter-spacing: 1px; }
  
  .hero { 
    background-attachment: scroll; 
    background-position: center 20%; /* Shifts focus higher up to keep faces visible */
  } 
  .details-parallax { background-attachment: scroll; }
}
