/* ==========================================================================
   UNDANGAN DIGITAL - RUSTAM & ELSA
   Theme: Charcoal Editorial Luxury
   Responsive: Mobile-First to Desktop Wide (320px - 1920px)
   ========================================================================== */

:root {
  --bg: #313131;
  --bg-darker: #242424;
  --bg-card: #2a2a2a;
  --bg-card-hover: #333333;
  --paper: #3b3b3b;
  --accent: #d8d1c6;
  --accent-light: #ece7de;
  --accent-gold: #c5a880;
  --ink: #f5f2ec;
  --muted: #c1bbb2;
  --muted-dark: #8e877e;
  --border-color: rgba(216, 209, 198, 0.22);
  --border-focus: #d8d1c6;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', 'Brush Script MT', cursive;
  --sans: 'DM Sans', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --transition-smooth: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background: #191919;
}

body {
  margin: 0;
  padding: 0;
  background: #191919;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.cover-locked {
  overflow: hidden;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: transparent;
}

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

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

/* Focus states for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Ambient Background for Desktop */
.desktop-ambient {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #303030 0%, #151515 85%);
  pointer-events: none;
  z-index: 0;
}

/* Page Shell & Architecture */
.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}

@media (min-width: 769px) {
  .page-shell {
    max-width: 1120px;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.85);
  }
}

.invitation-page {
  position: relative;
  overflow-x: hidden;
}

/* Common Layout Containers */
.container-standard {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.container-story {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* Common Typography & Section Elements */
.section {
  position: relative;
  text-align: center;
  padding: 85px 24px;
  isolation: isolate;
}

@media (min-width: 769px) {
  .section {
    padding: 110px 48px;
  }
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

.eyebrow.light {
  color: var(--accent-light);
}

.section-heading {
  margin: 10px 0 20px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.section-heading.script {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 72px);
  line-height: 1.1;
  color: var(--accent-light);
}

.body-copy {
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 30px;
}

.ornamental-rule {
  font-size: 20px;
  color: var(--accent);
  margin: 28px 0 36px;
  opacity: 0.85;
}

.mini-rule {
  width: 60px;
  height: 1px;
  margin: 16px auto 28px;
  background: var(--accent);
  opacity: 0.5;
}

.separator {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin: 18px 0;
}

.separator span {
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.separator svg {
  width: 32px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

.separator.light {
  color: var(--accent);
}

/* Buttons */
.outline-button, .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: all 0.3s var(--transition-smooth);
}

.outline-button {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--ink);
}

.outline-button:hover {
  background: var(--accent);
  color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(216, 209, 198, 0.2);
}

.primary-button {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #1c1c1c;
  font-weight: 600;
}

.primary-button:hover {
  background: #fff;
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   1. COVER UNDANGAN (FULLSCREEN MODAL)
   ========================================================================== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  background: #171717;
  overflow: hidden;
  transition: opacity 1.1s ease, visibility 1.1s ease, transform 1.1s var(--transition-smooth);
}

.cover-picture {
  position: absolute;
  inset: 0;
  background-position: center 48%;
  background-size: cover;
  animation: coverZoom 18s ease-in-out infinite alternate;
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.45) 45%, rgba(0,0,0,0.92) 100%);
}

.cover-frame {
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
  z-index: 1;
}

@media (min-width: 769px) {
  .cover-frame {
    inset: 35px;
  }
}

.cover-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 580px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: coverRise 1.2s 0.2s both;
}

.cover-subtitle {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.cover-names {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(46px, 10vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.7);
}

.cover-date {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent-light);
  margin: 0;
}

.cover-guest {
  margin-top: clamp(24px, 6vh, 60px);
  max-width: 380px;
  padding: 16px 20px;
  background: rgba(25, 25, 25, 0.55);
  border: 1px solid rgba(216, 209, 198, 0.2);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.cover-guest span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.cover-guest strong {
  display: block;
  font-family: var(--sans);
  font-size: clamp(16px, 4.5vw, 22px);
  font-weight: 600;
  color: #ffffff;
  margin: 6px 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.cover-guest p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 200px;
  min-height: 44px;
  margin-top: 24px;
  padding: 12px 28px;
  border-radius: 999px;
  background: #ffffff;
  color: #151515;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.open-button:hover {
  background: var(--accent-light);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.25);
}

.open-button .envelope-symbol {
  font-size: 16px;
}

.cover.is-opening {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-24px) scale(1.02);
  pointer-events: none;
}

.cover[hidden] {
  display: none !important;
}

@keyframes coverZoom {
  from { transform: scale(1.0); }
  to { transform: scale(1.08); }
}

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

/* ==========================================================================
   2. WEDDING OPENING / HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 80px 24px 60px;
  color: #fff;
  text-align: left;
}

@media (min-width: 769px) {
  .hero-section {
    padding: 100px 56px 80px;
  }
}

.hero-picture {
  position: absolute;
  inset: 0;
  background-position: center 48%;
  background-size: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 700px;
}

.hero-names {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 9vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 12px 0 20px;
  color: #ffffff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

.hero-date {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin: 0;
}

.scroll-guide {
  position: absolute;
  bottom: 28px;
  right: 28px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-guide span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  font-size: 12px;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ==========================================================================
   3. PROFIL MEMPELAI
   ========================================================================== */
.intro-section {
  background: var(--bg);
}

.couple-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 50px;
  align-items: center;
}

@media (min-width: 769px) {
  .couple-grid {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
  }
}

.person-card {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
}

.portrait-wrap {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 3/4;
  margin: 0 auto 24px;
  overflow: hidden;
  border-radius: 160px 160px 8px 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  position: relative;
}

.portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 1.2s var(--transition-smooth);
}

.portrait-wrap:hover img {
  transform: scale(1.05);
}

.person-card h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 10px 0 10px;
  color: var(--ink);
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.person-card > p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 10px;
}

.couple-and {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 48px;
  color: var(--accent);
  align-self: center;
  padding: 20px 0;
}

@media (min-width: 769px) {
  .couple-and {
    padding: 0 15px;
    margin-top: 120px;
  }
}

.social-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 12px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.social-link:hover {
  opacity: 0.8;
}

/* ==========================================================================
   4. OUR LOVE STORY SECTION (CORE NEW FEATURE)
   ========================================================================== */
.story-section {
  background: #272727;
  padding-left: 20px;
  padding-right: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.story-intro {
  font-style: italic;
  font-size: 14px;
  max-width: 600px;
  margin-bottom: 15px;
}

.timeline-container {
  position: relative;
  width: 100%;
  margin-top: 50px;
  padding: 20px 0;
}

/* The vertical connecting stem */
.timeline-track {
  position: absolute;
  top: 10px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, 
    transparent 0%, 
    rgba(216, 209, 198, 0.45) 8%, 
    rgba(216, 209, 198, 0.45) 92%, 
    transparent 100%);
}

/* Mobile: Single Left Column */
@media (max-width: 768px) {
  .timeline-track {
    left: 22px;
  }

  .timeline-item {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
    padding-left: 56px;
    text-align: left;
  }

  .timeline-dot {
    position: absolute;
    top: 24px;
    left: 22px;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #272727;
    border: 2px solid var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(216, 209, 198, 0.35);
    z-index: 2;
  }
}

/* Desktop: Balanced Alternating Left-Right Layout */
@media (min-width: 769px) {
  .timeline-track {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 50px;
  }

  .timeline-item.left {
    padding-right: 52px;
    text-align: right;
  }

  .timeline-item.right {
    margin-left: 50%;
    padding-left: 52px;
    text-align: left;
  }

  .timeline-dot {
    position: absolute;
    top: 30px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #272727;
    border: 2px solid var(--accent);
    color: var(--accent);
    box-shadow: 0 0 16px rgba(216, 209, 198, 0.4);
    z-index: 2;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }

  .timeline-item.left .timeline-dot {
    right: -18px;
  }

  .timeline-item.right .timeline-dot {
    left: -18px;
  }

  .timeline-item:hover .timeline-dot {
    transform: scale(1.15);
    box-shadow: 0 0 24px rgba(216, 209, 198, 0.65);
    background: var(--accent);
    color: #1a1a1a;
  }
}

.dot-heart {
  font-size: 15px;
  line-height: 1;
}

/* Timeline Card */
.timeline-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.timeline-card:hover {
  transform: translateY(-3px);
  border-color: rgba(216, 209, 198, 0.45);
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

@media (min-width: 769px) {
  .timeline-item.left .timeline-header {
    justify-content: flex-end;
  }
}

.timeline-year {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(216, 209, 198, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.timeline-order {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted-dark);
  text-transform: uppercase;
}

.timeline-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 16px;
}

.timeline-image-wrap {
  width: 100%;
  max-height: 250px;
  margin: 16px 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.timeline-image-wrap img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s ease;
}

.timeline-card:hover .timeline-image-wrap img {
  transform: scale(1.04);
}

.timeline-description {
  text-align: left;
}

.timeline-description p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0 0 12px;
}

.timeline-description p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   5. WEDDING QUOTE SECTION
   ========================================================================== */
.quote-section {
  padding: 85px 24px;
  background: #242424;
}

.quote-section .star-mark {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 20px;
}

.quote-section blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 3.5vw, 28px);
  line-height: 1.6;
  color: var(--ink);
  max-width: 680px;
  margin: 0 auto 20px;
}

.quote-section .eyebrow {
  letter-spacing: 0.16em;
  color: var(--accent);
}

/* ==========================================================================
   6. DETAIL ACARA, COUNTDOWN & GOOGLE MAPS
   ========================================================================== */
.detail-section {
  background: #2f2f2f;
}

.event-date {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 4vw, 30px);
  color: var(--ink);
  margin: 0 0 30px;
}

/* Countdown Grid */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 500px;
  margin: 0 auto 45px;
}

.countdown > div {
  padding: 18px 8px;
  background: #242424;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.countdown strong {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.countdown span {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Event Card: Akad & Resepsi */
.event-card {
  background: #262626;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px 24px;
  max-width: 740px;
  margin: 0 auto 50px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.event-flourish {
  display: block;
  width: 120px;
  max-width: 100%;
  height: 28px;
  margin: 0 auto 16px;
  overflow: visible;
  transition: transform 0.3s ease;
}

.event-flourish:hover {
  transform: scale(1.04);
}

.event-schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 28px 0;
}

@media (min-width: 769px) {
  .event-schedule-grid {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
  }
}

.schedule-block {
  flex: 1;
  text-align: center;
}

.schedule-block h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 8px;
  color: var(--ink);
}

.schedule-time {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-light);
  margin: 0;
}

.card-divider {
  width: 80px;
  height: 1px;
  background: var(--border-color);
  margin: 0 auto;
}

@media (min-width: 769px) {
  .card-divider {
    width: 1px;
    height: 70px;
  }
}

.dresscode {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dresscode span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
}

.dresscode strong {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
}

/* Location Card & Google Maps Button */
.location-block {
  margin-top: 36px;
}

.location-card {
  background: #262626;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 34px 26px 36px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.location-header h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  margin: 10px 0 8px;
  color: var(--ink);
}

.venue-address {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 26px;
}

.location-actions {
  display: flex;
  justify-content: center;
  align-items: center;
}

.map-button {
  min-width: 220px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.map-button:hover {
  background: var(--accent);
  color: #1a1a1a;
  border-color: var(--accent);
}

.map-btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
}

/* ==========================================================================
   7. WEDDING GALLERY
   ========================================================================== */
.gallery-section {
  background: #242424;
  padding-left: 16px;
  padding-right: 16px;
}

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

@media (min-width: 769px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 4/5;
  background: #1c1c1c;
  padding: 0;
  border: 0;
}

.gallery-item:first-child,
.gallery-item:nth-child(5n) {
  grid-column: span 2;
  aspect-ratio: 16/10;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease, filter 0.5s ease;
  filter: saturate(0.85) contrast(1.02);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(0.95) brightness(0.85);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item-overlay span {
  font-size: 32px;
  font-weight: 200;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-item-overlay span {
  transform: scale(1);
}

/* ==========================================================================
   8. WEDDING GIFT SECTION (BCA & DANA)
   ========================================================================== */
.gift-section {
  background: #292929;
}

.gift-intro {
  max-width: 580px;
  font-size: 14px;
}

.gift-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 780px;
  margin: 36px auto 0;
}

@media (min-width: 769px) {
  .gift-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

.gift-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.gift-card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 209, 198, 0.5);
  box-shadow: var(--shadow-md);
}

.gift-card .bank-icon {
  font-size: 34px;
  margin-bottom: 12px;
}

.gift-card .eyebrow {
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.gift-holder-label {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}

.gift-holder {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.gift-number {
  display: block;
  font-family: var(--sans);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  margin: 4px 0 24px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(216, 209, 198, 0.3);
  user-select: all;
}

.copy-button {
  min-height: 42px;
  padding: 10px 22px;
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
}

.copy-button .copy-icon {
  font-size: 15px;
}

.copy-button.copied {
  background: #2e663a;
  border-color: #48a85e;
  color: #fff;
}

/* ==========================================================================
   9. RSVP & WISHES SECTION
   ========================================================================== */
.wishes-section {
  background: #313131;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 16px 0;
  margin: 30px auto 40px;
  max-width: 500px;
}

.stats-row > div {
  border-right: 1px solid var(--border-color);
  text-align: center;
}

.stats-row > div:last-child {
  border-right: 0;
}

.stats-row strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 5vw, 36px);
  color: var(--ink);
}

.stats-row span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* RSVP Form */
.rsvp-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  max-width: 540px;
  margin: 0 auto 40px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.rsvp-form h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  text-align: center;
  margin: 0 0 10px;
  color: var(--ink);
}

.rsvp-form label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 6px;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: #202020;
  border: 1px solid rgba(216, 209, 198, 0.25);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-color: var(--accent);
}

.rsvp-form textarea {
  resize: vertical;
}

.rsvp-form .honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.form-feedback {
  text-align: center;
  color: var(--accent);
  font-size: 12px;
  min-height: 18px;
  margin: 6px 0 0;
}

/* Guestbook Wishes List */
.wishes-list {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.wish-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 14px;
}

.wish-header {
  display: flex;
  gap: 12px;
  align-items: center;
}

.wish-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: rgba(216, 209, 198, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
}

.wish-header strong {
  display: block;
  font-size: 13px;
  color: #fff;
}

.wish-header small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.wish-card > p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}

.empty-wishes {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 30px 0;
}

.text-button {
  border: 0;
  background: none;
  color: var(--accent);
  padding: 16px;
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: opacity 0.2s;
}

.text-button:hover {
  opacity: 0.8;
}

/* ==========================================================================
   10. CLOSING SECTION & FOOTER
   ========================================================================== */
.closing-section {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  color: #fff;
  background: #141414;
}

.closing-picture {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.closing-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.92) 100%);
}

.closing-content {
  position: relative;
  z-index: 2;
  max-width: 580px;
}

.closing-names {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 9vw, 76px);
  line-height: 1;
  margin: 16px 0;
  color: #fff;
}

.closing-content > p:not(.eyebrow) {
  font-size: 13px;
  line-height: 2.1;
  color: var(--muted);
  max-width: 480px;
  margin: 20px auto;
}

.footer {
  text-align: center;
  background: #191919;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px 16px;
  font-size: 11px;
  color: var(--muted-dark);
  letter-spacing: 0.1em;
}

/* ==========================================================================
   11. FLOATING CONTROLS & LIGHTBOX & TOAST
   ========================================================================== */
.music-toggle {
  position: fixed;
  z-index: 99;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: rgba(30, 30, 30, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  color: var(--accent);
  backdrop-filter: blur(8px);
  transition: transform 0.2s, background 0.2s;
}

.music-toggle:hover {
  transform: scale(1.08);
  background: rgba(40, 40, 40, 0.95);
}

.music-toggle[hidden] {
  display: none !important;
}

.music-symbol {
  font-size: 18px;
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.music-bars i {
  height: 4px;
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.music-toggle.playing .music-bars i {
  animation: bars 0.75s ease-in-out infinite alternate;
}

.music-toggle.playing .music-bars i:nth-child(2) {
  animation-delay: 0.3s;
}

.music-toggle.playing .music-bars i:nth-child(3) {
  animation-delay: 0.15s;
}

@keyframes bars {
  to { height: 14px; }
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  z-index: 3000;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: min(92vw, 900px);
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-sm);
}

.lightbox button {
  position: absolute;
  z-index: 2;
  color: #fff;
  border: 0;
  background: transparent;
  font-size: 38px;
  font-weight: 200;
  padding: 10px 18px;
  transition: color 0.2s;
}

.lightbox button:hover {
  color: var(--accent);
}

.lightbox-close {
  top: 15px;
  right: 20px;
}

.lightbox-prev {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
}

/* Toast Message */
.toast {
  position: fixed;
  z-index: 4000;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 25px);
  padding: 12px 24px;
  color: #fff;
  background: rgba(38, 38, 38, 0.95);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   12. SCROLL REVEAL ANIMATIONS
   ========================================================================== */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--transition-smooth), transform 0.9s var(--transition-smooth);
}

.js-reveal .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.js-reveal .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.js-reveal .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .js-reveal .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
