:root {
  --bg: #f8f6f2;
  --bg-warm: #f2efe9;
  --bg-dark: #2b2b2b;
  --text: #2b2b2b;
  --text-light: #5a5a5a;
  --text-muted: #8a8a8a;
  --accent: #c9a86c;
  --accent-dark: #a88a54;
  --olive: #6b7c5e;
  --white: #ffffff;
  --shadow: rgba(43, 43, 43, 0.06);
  --shadow-strong: rgba(43, 43, 43, 0.1);
  --radius: 6px;
  --font-serif: Georgia, 'Times New Roman', Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: 0.8rem;
  z-index: 100;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

main {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(201, 168, 108, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(107, 124, 94, 0.10) 0%, transparent 45%),
    var(--bg);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  animation: fadeInUp 1s ease-out both;
}

.subtitle {
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.names {
  font-family: var(--font-serif);
  font-size: clamp(3.2rem, 13vw, 8rem);
  font-weight: 400;
  line-height: 0.95;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.ampersand {
  font-style: italic;
  color: var(--accent);
  display: inline-block;
  margin: 0 0.05em;
}

.date-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.line {
  display: block;
  width: clamp(36px, 10vw, 90px);
  height: 1px;
  background: var(--accent);
}

.date {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 3.5vw, 1.7rem);
  letter-spacing: 0.2em;
  color: var(--text);
}

.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: var(--text-light);
  margin-bottom: 2.5rem;
}

/* Countdown */
.countdown {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.25rem);
  margin-bottom: 3rem;
  padding: clamp(1rem, 3vw, 1.5rem) clamp(1.25rem, 4vw, 2.5rem);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(201, 168, 108, 0.25);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 40px var(--shadow);
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(48px, 14vw, 80px);
}

.countdown-value {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: clamp(0.55rem, 1.5vw, 0.7rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 0.4rem;
}

.countdown-separator {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: var(--accent);
  line-height: 1.1;
  opacity: 0.7;
}

.scroll-link {
  display: inline-flex;
  animation: bounce 2.5s infinite;
}

.mouse {
  width: 24px;
  height: 38px;
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.mouse span {
  width: 4px;
  height: 6px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 1.8s infinite;
}

/* Florals */
.floral {
  position: absolute;
  width: clamp(140px, 32vw, 360px);
  height: clamp(140px, 32vw, 360px);
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.22;
  pointer-events: none;
  z-index: 1;
}

.floral-top-left {
  top: -50px;
  left: -50px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='%236b7c5e' d='M45 30c15-5 30 5 35 20 8-12 26-15 38-5 12 10 10 30-2 40 14 5 22 22 15 36-7 14-26 18-40 10-5 14-22 22-36 15-14-7-18-26-10-40-14-5-22-22-15-36 5-12 18-18 30-16-8-12-5-28 5-38-5 5-15 10-20 14z'/%3E%3C/svg%3E");
}

.floral-bottom-right {
  bottom: -50px;
  right: -50px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='%23c9a86c' d='M160 170c-15 5-30-5-35-20-8 12-26 15-38 5-12-10-10-30 2-40-14-5-22-22-15-36 7-14 26-18 40-10 5-14 22-22 36-15 14 7 18 26 10 40 14 5 22 22 15 36-5 12-18 18-30 16 8 12 5 28-5 38 5-5 15-10 20-14z'/%3E%3C/svg%3E");
}

/* Sections */
.section {
  padding: clamp(4rem, 10vw, 7rem) 1.5rem;
  text-align: center;
}

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

.container.narrow {
  max-width: 880px;
}

.label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.lead {
  font-size: clamp(1rem, 2.3vw, 1.2rem);
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto 2rem;
  font-weight: 300;
  line-height: 1.8;
}

/* Message */
.message {
  background: var(--bg-warm);
}

.signature {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  color: var(--accent-dark);
  margin-top: 2rem;
}

/* Story */
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
  text-align: left;
}

.story-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.story-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 50px var(--shadow-strong);
}

.story-card .number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.story-card h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.story-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* Music */
.music {
  background: var(--bg-dark);
  color: var(--white);
}

.music h2 {
  color: var(--white);
}

.play-button {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 1.5rem 0 1rem;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.play-button:hover,
.play-button:focus {
  background: rgba(201, 168, 108, 0.12);
  transform: scale(1.06);
  box-shadow: 0 0 0 8px rgba(201, 168, 108, 0.08);
}

.play-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.play-icon {
  width: 0;
  height: 0;
  border-left: 22px solid var(--accent);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 5px;
  transition: all 0.2s ease;
}

.play-button.playing .play-icon {
  border: 0;
  width: 22px;
  height: 26px;
  background: transparent;
  margin-left: 0;
  position: relative;
}

.play-button.playing .play-icon::before,
.play-button.playing .play-icon::after {
  content: '';
  position: absolute;
  top: 0;
  width: 7px;
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
}

.play-button.playing .play-icon::before {
  left: 0;
}

.play-button.playing .play-icon::after {
  right: 0;
}

.song-title {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.08em;
  min-height: 1.5em;
}

/* Location */
.location {
  background: var(--bg);
}

.location-card {
  display: inline-flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
  background: var(--white);
  padding: 1.75rem 2rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px var(--shadow);
  max-width: 480px;
  width: 100%;
}

.location-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.location-info h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}

.location-info p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.location-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Calendar & RSVP */
.calendar {
  background: var(--bg-warm);
}

.rsvp {
  background: var(--bg);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 50px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--white);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.btn:hover,
.btn:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.btn-outline:hover,
.btn-outline:focus {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-large {
  padding: 1.15rem 2.75rem;
  font-size: 0.8rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.8);
}

.footer p {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.footer .small {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(10px);
  }
  60% {
    transform: translateY(5px);
  }
}

@keyframes scrollWheel {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Responsive */
@media (min-width: 640px) {
  .story-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .location-card {
    width: auto;
  }
}

@media (min-width: 768px) {
  .section {
    padding: 6rem 2rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 1.5rem 1rem;
  }

  .countdown {
    gap: 0.35rem;
    padding: 1rem;
  }

  .countdown-item {
    min-width: 54px;
  }

  .countdown-label {
    letter-spacing: 0.1em;
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }

  .play-button {
    width: 76px;
    height: 76px;
  }

  .story-card {
    padding: 1.5rem;
  }

  .location-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
