:root {
  --green-teal-900: #0f3b38;
  --green-teal-700: #1f5f59;
  --green-teal-500: #2f8078;
  --green-teal-200: #cce4de;
  --cream: #f8f4ec;
  --text-dark: #17322f;
  --overlay-start: rgba(3, 25, 22, 0.68);
  --overlay: rgba(8, 32, 29, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  touch-action: pan-x pan-y;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
}

body {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  color: var(--text-dark);
  background: linear-gradient(180deg, #f6f8f4 0%, #edf3ef 100%);
  line-height: 1.6;
  touch-action: pan-x pan-y;
}

h1,
h2,
h3,
.eyebrow,
.calendar-label {
  margin: 0;
  line-height: 1.2;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.narrow {
  width: min(760px, 92vw);
}

.section {
  padding: 6rem 0;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero-slides,
.slide,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: fadeSlide 10s infinite;
  transform: scale(1.08);
}

.slide-1 {
    background-image: linear-gradient(var(--overlay-start), var(--overlay)), url("slide_1.JPG");
    animation-delay: 0s;
    background-position: top;
    transform: scale(1);
}

.slide-2 {
    background-image: url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1800&q=80");
    animation-delay: 5s;
}

.slide-3 {
    background-image: url("slide_2.jpg");
  animation-delay: 10s;
}

.hero-overlay {
  background: linear-gradient(180deg, rgba(6, 31, 28, 0.4), rgba(6, 31, 28, 0.65));
}

.hero-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.flower {
  position: absolute;
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  animation: floatFlower 6s ease-in-out infinite;
}

.flower-1 {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
  opacity: 0;
  animation: floatFlower 6s ease-in-out infinite, fadeInDelayed 1s ease-out 2s forwards;
}

.flower-2 {
  top: 25%;
  right: 15%;
  animation-delay: 1.5s;
  opacity: 0;
  animation: floatFlower 6s ease-in-out infinite 1.5s, fadeInDelayed 1s ease-out 2.3s forwards;
}

.flower-3 {
  bottom: 20%;
  left: 12%;
  animation-delay: 3s;
  opacity: 0;
  animation: floatFlower 6s ease-in-out infinite 3s, fadeInDelayed 1s ease-out 2.6s forwards;
}

.flower-4 {
  bottom: 30%;
  right: 8%;
  animation-delay: 4.5s;
  opacity: 0;
  animation: floatFlower 6s ease-in-out infinite 4.5s, fadeInDelayed 1s ease-out 2.9s forwards;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--cream);
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.95rem;
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 0.3s forwards;
}

h1 {
  margin-top: 0.8rem;
  font-family: "Jim Nightshade", cursive;
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 400;
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 0.6s forwards;
}
h1#subtitle {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.invite-message {
  margin: 1rem auto 0;
  max-width: 620px;
  font-size: clamp(1.1rem, 2.3vw, 1.5rem);
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 0.9s forwards;
}

.wedding-date {
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 2rem 0;
  padding: 1.2rem 2.5rem;
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  display: inline-block;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  backdrop-filter: blur(3px);
  font-weight: 600;
  position: relative;
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 1.2s forwards;
}

.wedding-date::before,
.wedding-date::after {
  content: '✦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0.9;
}

.wedding-date::before {
  left: 0.8rem;
}

.wedding-date::after {
  right: 0.8rem;
}

.scroll-down {
  position: absolute;
  bottom: calc(15vh - 5px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  cursor: pointer;
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 1.8s forwards, bounce 2s ease-in-out 2.5s infinite;
  transition: transform 0.3s ease;
}

.scroll-down:hover {
  transform: translateX(-50%) scale(1.1);
}

.scroll-down svg {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.hero-content .btn {
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 1.5s forwards;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: "Jim Nightshade", cursive;
  color: var(--green-teal-900);
  text-align: center;
  margin-bottom: 2.4rem;
}

.program h2 {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.program {
  position: relative;
  background-image: url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=2000&q=80");
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}

.program::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(47, 128, 120, 0.88), rgba(15, 59, 56, 0.85));
  z-index: 0;
}

.program .container {
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .program {
    background-attachment: fixed;
  }
}

.program-timeline {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 0;
}

.program-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 0;
}

.program-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: white;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
  margin-bottom: 0.5rem;
}

.program-icon svg, .program-icon img {
  width: 25px;
  height: 25px;
  color: var(--green-teal-700);
  filter: brightness(0) saturate(100%) invert(32%) sepia(23%) saturate(1152%) hue-rotate(131deg) brightness(93%) contrast(90%);
}

.program-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.program-item h3 {
  color: white;
  font-size: 1.6rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.program-subtitle {
  font-size: 0.95rem;
  color: var(--cream);
  margin: 0;
  font-style: italic;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.program-time {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin: 0;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.program-connector {
  position: absolute;
  left: 50%;
  top: calc(100% - 1.2rem);
  transform: translateX(-50%);
  width: 2px;
  height: 3rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
  z-index: 1;
}

.program-item:last-child .program-connector {
  display: none;
}

.location {
  padding: 0;
  background: #f4f9f6;
}

.location-visual {
  min-height: 65vh;
  background-image: linear-gradient(var(--overlay-start), var(--overlay)), url("venue_6.png");
  background-position: center;
  background-size: cover;
  background-attachment: scroll;
}

@media (min-width: 768px) {
  .location-visual {
    background-attachment: fixed;
  }
}

.location-content {
  margin-top: -3rem;
  margin-bottom: 5rem;
  padding: 2.4rem;
  border-radius: 16px;
  background: rgba(248, 244, 236, 0.95);
  box-shadow: 0 18px 36px rgba(20, 48, 43, 0.15);
  text-align: center;
}

.location-content p {
  margin-top: 0;
  font-size: 1.15rem;
}

.map-embed {
  margin-top: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(20, 48, 43, 0.2);
}

.map-embed iframe {
  width: 100%;
  height: 400px;
  display: block;
  filter: brightness(1.1) contrast(0.9) saturate(0.7);
}

.parallax {
  background-image: radial-gradient(circle at top left, rgba(47, 128, 120, 0.12), rgba(47, 128, 120, 0.02));
  background-attachment: fixed;
}

.rsvp {
  background-image: 
    linear-gradient(rgba(15, 59, 56, 0.75), rgba(31, 95, 89, 0.7)),
    url("https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}

@media (min-width: 768px) {
  .rsvp {
    background-attachment: fixed;
  }
}
.rsvp h2 {
  color: var(--cream);
}

.rsvp-form {
  display: grid;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(31, 95, 89, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
}

label,
legend {
  font-size: 1.05rem;
  color: var(--green-teal-900);
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(31, 95, 89, 0.35);
  font: inherit;
  background: white;
}

fieldset {
  border: 1px solid rgba(31, 95, 89, 0.35);
  border-radius: 10px;
  padding: 0.9rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.3rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.primary {
  background: var(--green-teal-500);
  color: #fff;
  box-shadow: 0 8px 24px rgba(24, 89, 83, 0.35);
}

.primary:hover {
  background: var(--green-teal-700);
}

.secondary {
  background: var(--green-teal-900);
  color: #fff;
}

.calendar {
  padding-top: 2rem;
}

.calendar-card {
  text-align: center;
  background: linear-gradient(160deg, rgba(31, 95, 89, 0.98), rgba(47, 128, 120, 0.95));
  color: #fff;
  border-radius: 22px;
  padding: 2.2rem;
  box-shadow: 0 18px 40px rgba(22, 70, 64, 0.35);
}

.calendar-label {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

.calendar-card h2 {
  color: #fff;
  margin-top: 0.7rem;
  margin-bottom: 1.4rem;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.calendar-btn {
  background: #ffffff;
  color: var(--green-teal-900);
}

.calendar-btn.outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #fff;
}

.gifts {
  background: rgba(255, 255, 255, 0.75);
}

.gifts-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 95, 89, 0.2);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 12px 28px rgba(20, 48, 43, 0.12);
}

.gifts-message {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--green-teal-900);
  margin: 0 auto 1.8rem;
  max-width: 580px;
}

.wish-account {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #eb1947;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(31, 95, 89, 0.25);
}

.account-label {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.5rem 0;
}

.account-number {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.15em;
  margin: 0;
  font-family: "Cormorant Garamond", serif;
}

.countdown {
  background: linear-gradient(135deg, rgba(31, 95, 89, 0.05), rgba(47, 128, 120, 0.08));
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.countdown-item {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--green-teal-200);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 8px 20px rgba(20, 48, 43, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.countdown-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(20, 48, 43, 0.15);
}

.countdown-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--green-teal-700);
  font-family: "Cormorant Garamond", serif;
  line-height: 1;
  animation: pulse 2s ease-in-out infinite;
}

.countdown-label {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-teal-900);
  margin-top: 0.5rem;
}

@keyframes fadeSlide {
  0% {
    opacity: 0;
  }
  10%,
  50% {
    opacity: 1;
  }
  90%,
  100% {
    opacity: 0;
  }
}

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

@keyframes floatFlower {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes fadeInDelayed {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 0.7;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-15px);
  }
}

@media (max-width: 720px) {
  .section {
    padding: 4rem 0;
  }

  .location { 
    padding-top: 0;
  }

  .location-content {
    margin-top: -2rem;
    margin-bottom: 3rem;
    padding: 1.4rem;
  }

  .flower {
    width: 50px;
    height: 50px;
  }

  .countdown-grid {
    gap: 1rem;
  }

  .countdown-item {
    padding: 1rem 0.5rem;
  }

  .program-timeline {
    padding: 1rem 0;
  }

  .program-item {
    padding: 1rem 0;
  }

  .program-icon {
    width: 45px;
    height: 45px;
  }

  .program-icon svg, .program-icon img {
    width: 22px;
    height: 22px;
  }

  .program-item h3 {
    font-size: 1.4rem;
  }

  .program-time {
    font-size: 1rem;
  }

  .program-connector {
    height: 2.5rem;
  }
}
