/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  color: #444; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: #445747; text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #2e3c30; }
img { max-width: 100%; height: auto; }

/* === HERO — extends down behind photos === */
.hero {
  min-height: 100vh;
  background: linear-gradient(160deg, #5a7a5e 0%, #445747 35%, #374938 75%, #2a3a2c 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 32px 48px 60px;
  margin-bottom: -140px;
  padding-bottom: 200px;
  z-index: 1;
}
.sparkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sparkle {
  position: absolute; background: rgba(255,255,255,0.65); border-radius: 50%;
  animation: sparkle-twinkle var(--dur) ease-in-out infinite;
}
@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0.08; transform: scale(0.6); }
  50% { opacity: var(--max-o, 0.8); transform: scale(1.2); }
}

/* Flags */
.hero-flags { position: absolute; top: 28px; right: 40px; display: flex; gap: 12px; z-index: 10; }
.flag {
  background: none; border: 2px solid rgba(255,255,255,0.25); border-radius: 4px;
  padding: 0; width: 36px; height: 24px; cursor: pointer; opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s; overflow: hidden;
}
.flag svg { display: block; width: 100%; height: 100%; }
.flag:hover { opacity: 0.85; transform: scale(1.08); }
.flag.active { opacity: 1; border-color: rgba(255,255,255,0.6); }

/* Hero layout */
.hero-content {
  display: flex; align-items: center; gap: 72px;
  max-width: 1400px; width: 100%; z-index: 5;
}
.hero-gif { flex-shrink: 0; }
/* GIF -10%: 540->486 */
.gif-image {
  width: 486px; border-radius: 14px;
  border: 3px solid rgba(255,255,255,0.18);
  transform: rotate(6deg); display: block;
}
.hero-text {
  flex: 1; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.logo-wrapper { margin-bottom: 24px; }
.logo-img { width: 280px; height: 280px; object-fit: contain; }

/* Countdown */
.countdown { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; }
.cd-unit { text-align: center; }
.cd-number {
  display: block; font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 42px; font-weight: 300; color: #fff; line-height: 1; min-width: 56px;
}
.cd-label {
  display: block; font-family: 'Open Sans', sans-serif; font-size: 11px;
  color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 4px;
}
.cd-sep { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 36px; color: rgba(255,255,255,0.3); padding-bottom: 18px; }

/* Hero text */
.hero-message {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-weight: 300; font-size: 28px;
  color: rgba(255,255,255,0.9); line-height: 1.75; max-width: 540px; margin-bottom: 16px;
}
.hero-thanks {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-weight: 400; font-size: 30px;
  color: rgba(255,255,255,0.95); line-height: 1.65;
}
.hero-sign {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-weight: 300; font-size: 25px;
  color: rgba(255,255,255,0.6); margin-top: 8px;
}

/* Scroll down — 2x size */
.scroll-down {
  position: absolute; bottom: 160px; left: 50%;
  transform: translateX(-50%);
  width: 112px; height: 112px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6); text-decoration: none;
  background: rgba(255,255,255,0.05);
  transition: background 0.3s, border-color 0.3s;
  animation: bounce-gentle 2s ease-in-out infinite; z-index: 10;
}
.scroll-down svg { width: 48px; height: 48px; }
.scroll-down:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.45); }
@keyframes bounce-gentle {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* === TIMELINE — scattered, overlaps hero === */
.timeline {
  background: transparent;
  padding: 24px 0 32px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}
.timeline-track {
  display: flex; gap: 0; padding: 0 40px;
  cursor: grab; user-select: none;
  overflow-x: auto; overflow-y: hidden;
  -ms-overflow-style: none; scrollbar-width: none;
  align-items: center;
  min-height: 300px;
}
.timeline-track::-webkit-scrollbar { display: none; }
.timeline-track:active { cursor: grabbing; }

.tl-item { flex-shrink: 0; padding: 0; margin-left: -28px; }
.tl-item:first-child { margin-left: 0; }
.tl-item:nth-child(1)  { transform: rotate(-5deg) translateY(12px); z-index: 1; }
.tl-item:nth-child(2)  { transform: rotate(3deg) translateY(-8px); z-index: 2; }
.tl-item:nth-child(3)  { transform: rotate(-2deg) translateY(16px); z-index: 3; }
.tl-item:nth-child(4)  { transform: rotate(6deg) translateY(-14px); z-index: 4; }
.tl-item:nth-child(5)  { transform: rotate(-4deg) translateY(6px); z-index: 5; }
.tl-item:nth-child(6)  { transform: rotate(2deg) translateY(-10px); z-index: 6; }
.tl-item:nth-child(7)  { transform: rotate(-6deg) translateY(18px); z-index: 7; }
.tl-item:nth-child(8)  { transform: rotate(4deg) translateY(-6px); z-index: 8; }
.tl-item:nth-child(9)  { transform: rotate(-3deg) translateY(10px); z-index: 9; }
.tl-item:nth-child(10) { transform: rotate(5deg) translateY(-16px); z-index: 10; }
.tl-item:nth-child(11) { transform: rotate(-1deg) translateY(4px); z-index: 11; }
.tl-item:nth-child(12) { transform: rotate(3deg) translateY(-12px); z-index: 12; }
.tl-item:nth-child(13) { transform: rotate(-5deg) translateY(14px); z-index: 13; }
.tl-item:nth-child(14) { transform: rotate(2deg) translateY(-4px); z-index: 14; }
.tl-item:nth-child(15) { transform: rotate(-4deg) translateY(8px); z-index: 15; }
.tl-item:nth-child(16) { transform: rotate(6deg) translateY(-10px); z-index: 16; }
.tl-item:nth-child(17) { transform: rotate(-2deg) translateY(12px); z-index: 17; }
.tl-item:nth-child(18) { transform: rotate(4deg) translateY(-8px); z-index: 18; }
.tl-item:nth-child(19) { transform: rotate(-3deg) translateY(6px); z-index: 19; }
.tl-item:hover { z-index: 50; }

.tl-photo {
  width: 200px; height: 260px; border-radius: 6px; background: #e3dfd7;
  overflow: hidden; position: relative; cursor: pointer;
  border: 4px solid #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18), 0 1px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.tl-photo:hover { transform: scale(1.08) rotate(0deg); box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
.tl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-photo--final { border-color: #445747; }
.tl-overlay {
  position: absolute; inset: 0; background: rgba(40,60,42,0.72);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s; border-radius: 3px;
}
.tl-photo:hover .tl-overlay { opacity: 1; }
.tl-overlay span {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 42px; font-weight: 300; color: #fff; letter-spacing: 3px;
}
.timeline-hint {
  text-align: center; margin-top: 16px; color: #ccc;
  display: flex; align-items: center; justify-content: center;
}

/* === SECTIONS === */
.section { padding: 64px 56px; }
.section--white { background: #fff; }
.section--cream { background: #f4f2ed; }
.section--green { background: #445747; }
.section--green .section-title, .section--green p,
.section--green .event-name, .section--green .event-desc,
.section--green .event-time, .section--green .day-label { color: rgba(255,255,255,0.92); }
.section--green .section-divider { background: rgba(255,255,255,0.2); }
.section--green a { color: rgba(255,255,255,0.95); }

.section-header { text-align: center; margin-bottom: 44px; }
.section-icon { display: block; font-size: 56px; margin-bottom: 16px; line-height: 1; }
.section-title {
  font-family: 'Carattere', cursive; font-weight: 400; font-size: 76px;
  color: #445747; letter-spacing: 0.5px;
}
.section--green .section-title { color: #fff; }

.section-body { max-width: 920px; margin: 0 auto; }
.section-body--narrow { max-width: 760px; }
.section-body--center { text-align: center; }
.section-body p {
  font-family: 'Open Sans', sans-serif; font-size: 20px; font-weight: 300;
  color: #555; line-height: 1.65; margin-bottom: 18px;
}
.section--green .section-body p { color: rgba(255,255,255,0.88); }
.section-divider { width: 60px; height: 1px; background: #ddd; margin: 36px auto; }

/* === SCHEDULE === */
.day-block { margin-bottom: 44px; }
.day-block:last-child { margin-bottom: 0; }
.day-label {
  font-family: 'Carattere', cursive; font-weight: 400; font-size: 38px;
  color: #445747; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid #e5e2da;
}
.event { display: flex; gap: 24px; margin-bottom: 32px; padding-left: 20px; border-left: 2px solid #445747; }
.event:last-child { margin-bottom: 0; }
.event-time {
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 28px; font-weight: 500;
  color: #445747; min-width: 140px; flex-shrink: 0; padding-top: 2px;
}
.event-name {
  font-family: 'Carattere', cursive; font-size: 35px; font-weight: 400;
  color: #445747; margin-bottom: 8px; line-height: 1.3;
}
.event-desc {
  font-family: 'Open Sans', sans-serif; font-size: 19px; font-weight: 300;
  color: #777; line-height: 1.6;
}
.cta-button {
  display: inline-block; margin-top: 18px; padding: 14px 36px;
  background: #445747; color: #fff; border-radius: 8px;
  font-family: 'Carattere', cursive; font-size: 24px;
  text-decoration: none; transition: background 0.2s, transform 0.15s; cursor: pointer; border: none;
}
.cta-button:hover { background: #374938; color: #fff; transform: translateY(-2px); }

/* === POPUP === */
.popup-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 1000; align-items: center; justify-content: center;
}
.popup-overlay.active { display: flex; }
.popup {
  background: #fff; border-radius: 16px; padding: 40px 44px;
  max-width: 440px; width: 92%; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: popup-in 0.25s ease-out;
}
@keyframes popup-in { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.popup-close {
  position: absolute; top: 14px; right: 18px; background: none; border: none;
  font-size: 28px; color: #999; cursor: pointer; line-height: 1; padding: 4px;
}
.popup-close:hover { color: #333; }
.popup-title {
  font-family: 'Carattere', cursive; font-size: 36px; color: #445747;
  text-align: center; margin-bottom: 28px;
}
.popup-field { margin-bottom: 18px; }
.popup-field label {
  display: block; font-family: 'Open Sans', sans-serif; font-size: 14px;
  color: #666; margin-bottom: 6px; font-weight: 400;
}
.popup-field input, .popup-field select {
  width: 100%; padding: 10px 14px; border: 1.5px solid #ddd; border-radius: 8px;
  font-family: 'Open Sans', sans-serif; font-size: 16px; color: #333;
  transition: border-color 0.2s; outline: none;
}
.popup-field input:focus, .popup-field select:focus { border-color: #445747; }
.popup-buttons { display: flex; gap: 12px; margin-top: 28px; }
.popup-btn {
  flex: 1; padding: 12px 20px; border-radius: 8px; font-family: 'Carattere', cursive;
  font-size: 24px; cursor: pointer; transition: background 0.2s, transform 0.15s; border: 2px solid #445747;
}
.popup-btn--green { background: #445747; color: #fff; }
.popup-btn--green:hover { background: #374938; transform: translateY(-1px); }
.popup-btn--outline { background: #fff; color: #445747; }
.popup-btn--outline:hover { background: #f4f2ed; }
.popup-success {
  text-align: center; padding: 20px 0;
}
.popup-success .popup { background: #445747; }
.popup-success-msg {
  font-family: 'Carattere', cursive; font-size: 32px; color: #445747;
  line-height: 1.4; margin-bottom: 24px;
}
.popup.popup--success { background: #445747; }
.popup.popup--success .popup-close { color: rgba(255,255,255,0.5); }
.popup.popup--success .popup-close:hover { color: #fff; }
.popup.popup--success .popup-success-msg { color: #fff; }
.popup.popup--success .popup-btn--green { background: #fff; color: #445747; border-color: #fff; }
.popup.popup--success .popup-btn--green:hover { background: #f0f0f0; }

/* === FOOTER === */
.footer { background: #2a3a2c; padding: 44px 56px; text-align: center; }
.footer-logo { width: 180px; height: 180px; object-fit: contain; margin-bottom: 18px; }
.footer-contact { margin-bottom: 8px; }
.footer-contact a {
  color: rgba(255,255,255,0.7); font-family: 'Open Sans', sans-serif;
  font-size: 18px; text-decoration: none; transition: color 0.2s;
}
.footer-contact a:hover { color: rgba(255,255,255,0.95); }
.footer-address { font-family: 'Open Sans', sans-serif; font-size: 14px; color: rgba(255,255,255,0.35); }

/* === RESPONSIVE — Large === */
@media (min-width: 1400px) { .gif-image { width: 520px; } .hero-content { gap: 80px; } }

/* === RESPONSIVE — Tablet === */
@media (max-width: 1100px) {
  .hero { padding: 32px 36px 60px; margin-bottom: -100px; padding-bottom: 160px; }
  .hero-content { gap: 48px; }
  .gif-image { width: 360px; }
  .logo-img { width: 220px; height: 220px; }
  .hero-message { font-size: 22px; } .hero-thanks { font-size: 24px; } .hero-sign { font-size: 20px; }
  .cd-number { font-size: 36px; }
  .scroll-down { width: 80px; height: 80px; bottom: 120px; }
  .scroll-down svg { width: 36px; height: 36px; }
  .section { padding: 52px 40px; }
  .section-title { font-size: 56px; } .section-icon { font-size: 44px; }
  .section-body p { font-size: 18px; }
  .event-desc { font-size: 16px; } .event-name { font-size: 28px; } .event-time { font-size: 24px; }
  .day-label { font-size: 30px; }
  .tl-photo { width: 160px; height: 208px; } .tl-item { margin-left: -20px; }
}

/* === RESPONSIVE — Mobile === */
@media (max-width: 700px) {
  .hero { padding: 70px 24px 50px; min-height: 100svh; margin-bottom: -80px; padding-bottom: 120px; }
  .hero-flags { top: 20px; right: 20px; gap: 8px; }
  .flag { width: 30px; height: 20px; }
  .hero-content { flex-direction: column; gap: 24px; }
  .gif-image { width: 240px; transform: rotate(4deg); }
  .logo-img { width: 180px; height: 180px; }
  .hero-message { font-size: 18px; max-width: 340px; }
  .hero-thanks { font-size: 20px; } .hero-sign { font-size: 17px; }
  .cd-number { font-size: 28px; min-width: 40px; }
  .cd-label { font-size: 9px; } .cd-sep { font-size: 24px; padding-bottom: 14px; }
  .scroll-down { bottom: 80px; width: 64px; height: 64px; }
  .scroll-down svg { width: 28px; height: 28px; }
  .timeline { padding: 16px 0 24px; }
  .tl-photo { width: 130px; height: 170px; } .tl-item { margin-left: -16px; }
  .tl-overlay span { font-size: 28px; }
  .timeline-track { min-height: 220px; }
  .section { padding: 40px 24px; }
  .section-icon { font-size: 36px; } .section-title { font-size: 40px; }
  .section-body p { font-size: 16px; }
  .day-label { font-size: 26px; }
  .event { flex-direction: column; gap: 4px; }
  .event-time { font-size: 20px; min-width: auto; }
  .event-name { font-size: 24px; } .event-desc { font-size: 15px; }
  .footer { padding: 32px 24px; }
  .popup { padding: 28px 24px; }
  .popup-title { font-size: 28px; }
  .popup-btn { font-size: 20px; }
}
