/* CSS Variables - Beach-inspired palette */
:root {
  --color-bg: #f8f6f1;
  --color-bg-alt: #f0ede5;
  --color-text: #1e3a4c;
  --color-text-light: #4a6572;
  --color-accent: #4a90a4;
  --color-accent-hover: #3a7a8e;
  --color-sand: #c4a77d;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --section-padding: clamp(4rem, 10vh, 8rem);
  --content-width: min(90%, 800px);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  background: rgba(248, 246, 241, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.nav.visible {
  transform: translateY(0);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: clamp(0.7rem, 2vw, 0.875rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  padding: 0.5rem 0.25rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav a:hover {
  color: var(--color-accent);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh; /* Modern browsers: accounts for mobile browser chrome */
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image-container {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.1);
  transition: transform 0.1s ease-out;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(248, 246, 241, 0.3) 0%,
    rgba(248, 246, 241, 0.5) 50%,
    rgba(248, 246, 241, 0.9) 100%
  );
  z-index: -1;
}

.hero-content {
  text-align: center;
  padding: 2rem;
}

.hero-names {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.hero-date {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

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

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid var(--color-text);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--color-text);
  border-radius: 2px;
  animation: scroll-hint 2s ease-in-out infinite;
}

@keyframes scroll-hint {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}

/* Sections */
.section {
  padding: var(--section-padding) 0;
  background: var(--color-bg);
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-content {
  width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Typography */
h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

p {
  margin-bottom: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

p:last-child {
  margin-bottom: 0;
}

.note {
  font-size: 0.9em;
  color: var(--color-text-light);
  font-style: italic;
}

.gift-text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
  word-break: break-word;
  overflow-wrap: break-word;
}

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

/* Links Grid */
.links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  margin-top: 1.5rem;
}

.links-grid a {
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--color-sand);
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.links-grid a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

/* RSVP Section */
.section-rsvp {
  background: var(--color-text);
  color: var(--color-bg);
}

.section-rsvp h2 {
  color: var(--color-bg);
}

.section-rsvp p {
  color: rgba(248, 246, 241, 0.9);
}

.form-container {
  margin-top: 2rem;
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.form-container iframe {
  width: 100%;
  min-height: 800px;
  border: none;
  border-radius: 8px;
  background: white;
}

.form-placeholder {
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 8px;
}

.form-placeholder small {
  opacity: 0.7;
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  background: var(--color-text);
  color: rgba(248, 246, 241, 0.6);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-inner {
    gap: 0.75rem;
  }

  .links-grid {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .links-grid a {
    width: 100%;
    max-width: 300px;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .form-container iframe {
    min-height: 600px;
  }

  .gift-text {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    gap: 0.25rem 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    min-height: 400px;
  }

  .hero-content {
    padding: 1rem;
  }

  .section-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section-rsvp .section-content {
    padding-left: 0;
    padding-right: 0;
  }

  .form-placeholder {
    padding: 2rem 1rem;
  }

  .scroll-indicator {
    bottom: 1rem;
  }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100svh;
  }

  .hero-names {
    font-size: clamp(2rem, 8vw, 4rem);
  }

  .scroll-indicator {
    display: none;
  }
}
