/* Romantic Wedding Invitation Style */
:root {
  --primary-color: #d4a574;
  --secondary-color: #e8b4a0;
  --accent-color: #8b6914;
  --text-dark: #2c2c2c;
  --text-light: #7a7a7a;
  --bg-light: #faf8f5;
  --bg-white: rgba(255, 255, 255, 0.85);
  --border-color: rgba(139, 69, 19, 0.15);
  --shadow-light: 0 20px 60px rgba(139, 69, 19, 0.15);
  --border-radius: 24px;
  --container-width: 1024px;
  --transition: all 0.3s ease;
  --hero-bg-image: url('../cover.jpg');
}

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

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background:
    radial-gradient(1000px 800px at 15% 0%, rgba(212, 165, 116, 0.18), transparent 65%),
    radial-gradient(1000px 800px at 85% 100%, rgba(232, 180, 160, 0.16), transparent 62%),
    var(--bg-light);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--text-dark);
}

.script-font {
  font-family: 'Great Vibes', cursive;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.05);
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(250, 248, 245, 0.12),
    rgba(250, 248, 245, 0.88) 58%,
    rgba(250, 248, 245, 1)
  );
  z-index: -1;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 60px 0 40px;
}

.hero-card{
  width: min(520px, 92vw);
  margin: 0 auto;
  background: rgba(186, 169, 144, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 26px 80px rgba(0,0,0,.25);
  overflow: hidden;
}

.hero-card-cap{
  width: 100%;
  height: 220px;
  background: rgba(186, 169, 144, 0.45);
  border-bottom: 1px solid rgba(255,255,255,.10);
  border-radius: 999px 999px 32px 32px;
}

.hero-couple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.hero-groom img,
.hero-bride img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3);
}

.hero-names {
  text-align: center;
}

.hero-card-body{
  padding: 24px 32px 20px;
}

.save-the-date {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: rgba(255,255,255,.9);
  font-weight: 500;
  margin-bottom: 14px;
}

.bride-groom-names {
  margin: 12px 0 8px;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(48px, 10vw, 88px);
  line-height: 1.04;
  font-weight: 400;
  color: #fff;
}

.ampersand {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  letter-spacing: 0.26em;
  color: rgba(255,255,255,.92);
  margin: 5px 0 0;
  font-weight: 600;
}

.wedding-date {
  margin-top: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  font-weight: 500;
}

.hero-venue{
  margin-top: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.92);
  font-weight: 700;
}

.hero-address{
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,.85);
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions--inside{
  margin-top: 14px;
  gap: 20px;
}

.btn-hero{
  padding: 9px 14px;
  font-size: 12px;
  min-width: 0;
  border-radius: 14px;
  border-color: rgba(255,255,255,.32);
  color: rgba(255,255,255,.94);
  background: rgba(255,255,255,.06);
  box-shadow: none;
}

.btn-hero:hover{
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.55);
  transform: translateY(-1px);
}

.scroll-indicator {
  display: inline-block;
  margin-top: 32px;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  font-weight: 500;
}

@media (max-width: 640px) {
  .hero-card-cap{height: 180px}
  .hero-card-body{padding: 20px 20px 16px}
  .bride-groom-names{font-size: clamp(42px, 9vw, 66px)}
  .hero-actions--inside{gap:16px}
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: #c19660;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 165, 116, 0.3);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-dark);
  box-shadow: 0 16px 48px rgba(139, 69, 19, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 20px 56px rgba(139, 69, 19, 0.2);
}

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

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-ghost:hover {
  background: rgba(212, 165, 116, 0.15);
  color: var(--text-dark);
}

/* Sections */
.section {
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

.section-tint {
  background: linear-gradient(180deg, rgba(212, 165, 116, 0.12), transparent);
}

.section-title {
  text-align: center;
  margin: 0 0 24px;
  font-size: 36px;
  font-weight: 600;
}

.section-subtitle {
  text-align: center;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-light);
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.section-header {
  margin-bottom: 32px;
}

/* Couple Introduction */
.couple-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.person-card {
  border-radius: var(--border-radius);
  background: #fef2f4;
  box-shadow: var(--shadow-light);
  overflow: hidden;
  transition: var(--transition);
}

.person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(139, 69, 19, 0.2);
}

.person-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: var(--transition);
}

.person-image-bride {
  object-position: center;
}

.person-card:hover .person-image img {
  transform: scale(1.05);
}

.person-info {
  padding: 16px 20px;
  text-align: center;
}

.person-label {
  letter-spacing: 0.20em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--text-light);
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  margin-bottom: 8px;
}

.person-name {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 4px;
  font-family: 'Great Vibes', cursive;
}

.person-year {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 12px;
}

.person-desc {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 14px;
}

/* Gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 18px;
  transition: var(--transition);
}

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

.gallery-item img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 30px rgba(139, 69, 19, 0.15);
}

/* Events */
.events-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.event-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  transition: var(--transition);
}

.event-card:hover {
  transform: none;
  box-shadow: none;
}

.event-image {
  background: center/cover no-repeat;
  min-height: 240px;
  transition: var(--transition);
}

.event-card:hover .event-image {
  transform: none;
}

.event-content {
  padding: 20px;
}

.event-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.event-place {
  font-size: 14px;
  margin-bottom: 4px;
}

.event-time {
  font-size: 13px;
  margin-bottom: 8px;
}

.event-date-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.event-weekday,
.event-date,
.event-year {
  font-size: 12px;
}

.event-lunar {
  font-size: 11px;
  margin-bottom: 12px;
}

.event-actions {
  margin-top: 12px;
}

.event-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #666;
  text-decoration: none;
}

.event-map-link:hover {
  background: #e0e0e0;
}

/* Countdown */
.countdown-header {
  text-align: center;
  margin-bottom: 32px;
}

.countdown-subtitle {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-light);
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 500;
}

.countdown-title {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(139, 69, 19, 0.65);
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.countdown-item {
  min-width: 130px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 38px rgba(139, 69, 19, 0.12);
  text-align: center;
  transition: var(--transition);
}

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

.countdown-number {
  font-family: 'Playfair Display', serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--primary-color);
}

.countdown-label {
  color: var(--text-light);
  font-size: 13px;
  margin-top: 8px;
}

/* Wishes */
.wishes-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.wishes-list {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-white);
  box-shadow: var(--shadow-light);
  padding: 24px;
  min-height: 300px;
  max-height: 400px;
  overflow-y: auto;
}

.wish-item {
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.wish-item:hover {
  transform: translateY(-1px);
}

.wish-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.wish-name {
  font-weight: 600;
  color: var(--text-dark);
}

.wish-time {
  font-size: 12px;
  color: var(--text-light);
}

.wish-message {
  color: var(--text-light);
  line-height: 1.7;
  font-size: 14px;
  white-space: pre-wrap;
}

.wish-form {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-white);
  box-shadow: var(--shadow-light);
  padding: 24px;
}

.form-title {
  margin: 0 0 16px;
  font-size: 22px;
  color: var(--text-dark);
}

.form-note {
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  font: inherit;
  background: rgba(255, 255, 255, 0.7);
  outline: none;
  transition: var(--transition);
  font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
}

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

.form-checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0 20px;
  color: var(--text-light);
  font-size: 13px;
}

.form-checkbox input {
  margin-top: 3px;
}

/* Gift Section */
.gift-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.gift-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-white);
  box-shadow: var(--shadow-light);
  padding: 10px;
  text-align: center;
  transition: var(--transition);
}

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

.gift-card img {
  width: 100%;
  max-width: 180px;
  margin: 0 auto 8px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 30px rgba(139, 69, 19, 0.12);
}

.gift-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
}

/* Footer */
.footer {
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

.footer-title {
  text-align: center;
  margin: 0 0 24px;
  font-size: 36px;
  font-weight: 600;
}

.footer-text {
  max-width: 800px;
  margin: 0 auto 32px;
  color: var(--text-light);
  line-height: 1.8;
  text-align: center;
  font-size: 15px;
}

/* Music Button */
.music-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(212, 165, 116, 0.3);
  z-index: 1000;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.music-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(212, 165, 116, 0.4);
}

.music-btn:focus-visible {
  outline: none;
  box-shadow:
    0 8px 25px rgba(212, 165, 116, 0.3),
    0 0 0 4px rgba(212, 165, 116, 0.25);
}

.music-icon {
  display: inline-block;
  line-height: 1;
  transform: translateY(-1px);
}

.music-btn.playing {
  animation: pulse 2s infinite;
}

.music-btn.playing .music-icon {
  animation: spin 2.4s linear infinite;
}

@keyframes spin {
  from { transform: translateY(-1px) rotate(0deg); }
  to { transform: translateY(-1px) rotate(360deg); }
}

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

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 980px) {
  .couple-intro {
    grid-template-columns: 1fr;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-image {
    min-height: 200px;
  }

  .wishes-container {
    grid-template-columns: 1fr;
  }

  .gift-cards {
    grid-template-columns: 1fr;
  }

  .photo-gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .countdown-timer {
    gap: 12px;
  }

  .countdown-item {
    min-width: 110px;
    padding: 16px;
  }

  .countdown-number {
    font-size: 32px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 60px 0;
  }

  .hero {
    min-height: 90vh;
  }

  .hero-content {
    padding: 48px 0 24px;
  }

  .bride-groom-names {
    font-size: clamp(42px, 9vw, 72px);
  }

  .ampersand {
    font-size: 18px;
  }

  .section-title {
    font-size: 28px;
  }

  .hero-actions {
    gap: 12px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 13px;
  }

  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .countdown-timer {
    gap: 8px;
  }

  .countdown-item {
    min-width: 90px;
    padding: 12px;
  }

  .countdown-number {
    font-size: 28px;
  }

  .countdown-label {
    font-size: 12px;
  }

  .footer {
    padding: 60px 0;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c19660;
}

/* =========================
   LOVE STORY (full background like mẫu)
   ========================= */
#love-story{
  padding: 0;
  background: #2b2320;
  color: #fff;
}
#love-story .container{
  max-width: 100%;
  padding: 0;
}
#love-story .section-header{
  padding: 74px 18px 26px;
  text-align: center;
}
#love-story .section-subtitle{
  color: rgba(255,255,255,.90);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 500;
}
#love-story .section-title{
  color: #fff;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-size: 34px;
  margin: 0;
}

/* Timeline wrapper */
#timeline.timeline{
  width: 100%;
}

/* Each story block */
.timeline-item{
  position: relative;
  min-height: 760px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* background image */
.timeline-bg{
  position:absolute;
  inset:0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}
.timeline-dim{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.48);
}

/* center content */
.timeline-center{
  position: relative;
  z-index: 2;
  width: min(960px, 92vw);
  margin: 0 auto;
  text-align: center;
  padding: 58px 16px 74px;
}

/* Arch photo: rounded top + flat-ish bottom */
.timeline-arch{
  width: min(420px, 78vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto 18px;
  border-radius: 999px 999px 26px 26px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0,0,0,.30);
}
.timeline-arch img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* text */
.timeline-date{
  color: rgba(255,255,255,.92);
  letter-spacing: .12em;
  font-size: 12px;
  margin-top: 6px;
  font-family: 'Playfair Display', serif;
}
.timeline-title{
  margin-top: 6px;
  font-family: 'Great Vibes', cursive;
  font-size: 40px;
  font-weight: 400;
  color: #fff;
}
.timeline-text{
  margin: 10px auto 0;
  max-width: 760px;
  color: rgba(255,255,255,.92);
  line-height: 1.75;
  font-size: 16px;
}

/* Center vertical line */
.timeline-pin{
  width: 2px;
  height: 46px;
  background: rgba(255,255,255,.65);
  margin: 22px auto 0;
  border-radius: 999px;
}

.timeline-divider{
  height: 84px;
  position: relative;
  background: #2b2320;
}
.timeline-divider::before{
  content:"";
  position:absolute;
  left:50%;
  top: 12px;
  transform: translateX(-50%);
  width: 2px;
  height: 60px;
  background: rgba(255,255,255,.65);
  border-radius: 999px;
}

@media (max-width: 480px){
  #love-story .section-header{ padding: 58px 14px 18px; }
  #love-story .section-title{ font-size: 28px; }
  .timeline-item{ min-height: 680px; }
  .timeline-title{ font-size: 36px; }
  .timeline-text{ font-size: 15px; }
}

/* Snow canvas */
#snow{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999; /* above content */
}
