/* ========================================
   ELEGANT MINIMAL WEDDING WEBSITE
   Modern, Sleek, Simple Design System
   ======================================== */

/* CSS Variables - Color Palette */
:root {
  --black: #070707;
  --white: #FFFFFF;
  --timberwolf: #DCD2CC;
  --powder: #A8B0D2;
  --silver: #6B6B6B;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  
  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  
  /* Transitions */
  --transition: all 0.25s ease;
}

/* ========================================
   BASE STYLES
   ======================================== */

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

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

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--black);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.02em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--black);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--powder);
}

/* ========================================
   LAYOUT HELPERS
   ======================================== */

.container {
  max-width: 1080px;
  padding: 0 20px;
  margin: 0 auto;
  width: 100%;
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.story-header-image {
  text-align: center;
  margin: var(--spacing-md) 0;
}

.header-pattern {
  max-width: 400px;
  width: 100%;
  height: auto;
  opacity: 0.7;
  object-fit: cover;
  border-radius: 8px;
}

.header-pattern.left-crop {
  object-position: left center;
  max-width: 300px;
  width: 100%;
  height: 250px;
  object-fit: cover;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

header {
  background: var(--white);
  border-bottom: 1px solid var(--silver);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.logo a {
  color: var(--black);
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
}

nav a {
  color: var(--black);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

nav a:hover,
nav a.active {
  border-bottom-color: var(--powder);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--black);
  margin: 5px 0;
  transition: var(--transition);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
  background: var(--white);
  border-top: 1px solid var(--silver);
  padding: var(--spacing-md) 0;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 0.9rem;
  color: var(--silver);
}

.footer-content p {
  margin-bottom: var(--spacing-xs);
}

.back-to-top {
  display: inline-block;
  margin-top: var(--spacing-sm);
  color: var(--powder);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.back-to-top:hover {
  text-decoration: underline;
}

/* ========================================
   COMPONENTS
   ======================================== */

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--powder);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn:hover {
  background: var(--black);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--silver);
}

.btn-secondary:hover {
  background: var(--timberwolf);
  border-color: var(--powder);
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: 8px;
  padding: var(--spacing-md);
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: var(--spacing-sm);
}

.card p {
  color: var(--black);
  margin-bottom: var(--spacing-md);
}

/* Muted Sections */
.muted {
  background: var(--timberwolf);
}

/* ========================================
   HOME PAGE STYLES
   ======================================== */

.hero {
  background: linear-gradient(to bottom, var(--timberwolf) 0%, var(--white) 100%);
  background-image: url('../assets/images/floralpattern.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
  padding: var(--spacing-xl) 0 var(--spacing-xl);
  border-bottom: 1px solid var(--silver);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  margin-bottom: var(--spacing-xs);
}

.hero-date {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  color: var(--black);
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-location {
  font-size: 1rem;
  color: var(--silver);
  letter-spacing: 0.05em;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

/* ========================================
   STORY PAGE - TIMELINE
   ======================================== */

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
  grid-column: 2;
}

.timeline-item:nth-child(even) .timeline-content {
  grid-column: 1;
}

.timeline-item::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  background-image: url('assets/images/floralpattern.png');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: 0;
}

.timeline-item:nth-child(odd)::after {
  left: 20px;
}

.timeline-item:nth-child(even)::after {
  right: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: -3rem;
  width: 2px;
  background: var(--silver);
  transform: translateX(-50%);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-content {
  position: relative;
}

.timeline-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--black);
}

.timeline-content p {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--black);
}

.timeline-item:nth-child(odd) .timeline-content {
  padding-left: var(--spacing-md);
}

.timeline-item:nth-child(even) .timeline-content {
  padding-right: var(--spacing-md);
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--powder);
  border: 2px solid var(--white);
  z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-content::before {
  left: -6px;
}

.timeline-item:nth-child(even) .timeline-content::before {
  right: -6px;
}

.timeline-image {
  width: 100%;
  max-width: 500px;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: var(--spacing-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.timeline-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.timeline-image.rotate-90 {
  transform: rotate(90deg);
}

.timeline-image.rotate-90:hover {
  transform: rotate(90deg) translateY(-2px);
}

.timeline-image.rotate-180 {
  transform: rotate(180deg);
}

.timeline-image.rotate-180:hover {
  transform: rotate(180deg) translateY(-2px);
}

.timeline-image.rotate-270 {
  transform: rotate(270deg);
}

.timeline-image.rotate-270:hover {
  transform: rotate(270deg) translateY(-2px);
}

.timeline-image.crop-faces {
  object-position: center 30%;
}

/* ========================================
   DETAILS PAGE
   ======================================== */

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  align-items: stretch;
}

.details-grid .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.details-grid .card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.map-container {
  margin: var(--spacing-lg) 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--silver);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* ========================================
   RSVP FORM
   ======================================== */

.form-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--silver);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--powder);
  box-shadow: 0 0 0 3px rgba(168, 176, 210, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.radio-group {
  display: flex;
  gap: var(--spacing-md);
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-weight: 400;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* Guest Name Fields - Dynamic */
.guest-name-field {
  margin-bottom: 0.75rem;
}

.guest-name-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--silver);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

.guest-name-input:focus {
  outline: none;
  border-color: var(--powder);
  box-shadow: 0 0 0 3px rgba(168, 176, 210, 0.1);
}

.guest-name-input::placeholder {
  color: var(--silver);
  opacity: 0.8;
}

/* Story Page - Full Background Image */
.story-main-bg {
  position: relative;
  width: 100%;
}

.story-page-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Details Page - Full Background Image */
.details-main-bg {
  position: relative;
  min-height: 100vh;
}

.details-main-bg::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../detailspage.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -1;
  opacity: 0.3; /* Adjust for readability */
}

/* Add semi-transparent overlay to content sections for better readability */
.details-main-bg .section {
  position: relative;
}

.details-main-bg .container {
  background: rgba(255, 255, 255, 0.95);
  padding: var(--spacing-md);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.details-main-bg .section-title {
  background: transparent;
  margin-bottom: var(--spacing-md);
}

/* RSVP Page - Full Background Image */
.rsvp-main-bg {
  position: relative;
  min-height: 100vh;
}

.rsvp-main-bg::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../rsvppage.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -1;
  opacity: 0.3; /* Adjust for readability */
}

/* Add semi-transparent overlay to content sections for better readability */
.rsvp-main-bg .section {
  position: relative;
}

.rsvp-main-bg .container {
  background: rgba(255, 255, 255, 0.95);
  padding: var(--spacing-md);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rsvp-main-bg .section-title {
  background: transparent;
  margin-bottom: var(--spacing-md);
}

.success-message {
  display: none;
  background: var(--timberwolf);
  border: 1px solid var(--powder);
  border-radius: 8px;
  padding: var(--spacing-md);
  text-align: center;
  margin-top: var(--spacing-md);
}

.success-message.show {
  display: block;
}

.success-message h3 {
  color: var(--powder);
  margin-bottom: var(--spacing-sm);
}

/* ========================================
   GALLERY
   ======================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-sm);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--timberwolf);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 7, 7, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: var(--black);
  font-size: 2rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--powder);
  color: var(--white);
}

/* ========================================
   REGISTRY PAGE
   ======================================== */

.registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.registry-card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: 8px;
  padding: var(--spacing-md);
  text-align: center;
  transition: var(--transition);
}

.registry-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.registry-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-sm);
  border-radius: 50%;
  background: var(--timberwolf);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--powder);
}

.registry-card h3 {
  margin-bottom: var(--spacing-sm);
}

.registry-card p {
  font-size: 0.9rem;
  color: var(--silver);
  margin-bottom: var(--spacing-md);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

:focus-visible {
  outline: 2px solid var(--powder);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--powder);
  outline-offset: 4px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  /* Mobile Navigation */
  .menu-toggle {
    display: block;
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--white);
    transition: var(--transition);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }
  
  nav.open {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    padding: var(--spacing-xl) var(--spacing-md);
    gap: var(--spacing-sm);
  }
  
  nav a {
    font-size: 1.125rem;
  }
  
  /* Timeline mobile */
  .timeline-item {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  
  .timeline-item::before {
    left: 0;
    transform: none;
  }
  
  .timeline-content {
    grid-column: 1 !important;
    padding-left: var(--spacing-md);
    padding-right: 0;
  }
  
  .timeline-content::before {
    left: -6px !important;
    right: auto !important;
  }
  
  .timeline-item::after {
    display: none;
  }
  
  /* Lightbox mobile */
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: var(--spacing-md) 0 var(--spacing-lg);
  }
  
  .section {
    padding: var(--spacing-md) 0;
  }
  
  .feature-cards,
  .details-grid,
  .gallery-grid,
  .registry-grid {
    grid-template-columns: 1fr;
  }
}

