/* ============================================================
   DESIGN TOKENS — Two themes: Navy+White (default) / Pink+White
   ============================================================ */
:root {
  /* Palette */
  --navy:      #1a3a5c;
  --navy-2:    #2d5a8e;
  --pink-deep: #7a4f7a;
  --pink-2:    #9a6f9a;
  --pink-bg:   #f7f3f6;
  --white:     #ffffff;

  /* Active theme — Navy + White */
  --dark:           #1a3a5c;
  --dark-2:         #2d5a8e;
  --on-dark:        #ffffff;
  --on-dark-dim:    rgba(255,255,255,0.62);
  --on-dark-label:  rgba(255,255,255,0.50);
  --light-bg:       #f0f4f8;
  --on-light:       #1a3a5c;
  --on-light-mid:   #3a5a7a;
  --on-light-muted: #6a8aaa;

  /* Fonts */
  --font-script: 'Great Vibes', cursive;
  --font-serif:  'Cormorant Garamond', serif;
  --font-sans:   'Cormorant Garamond', serif;

  --max-w: 480px;
}

/* Pink + White theme */
body.theme-pink {
  --dark:           #7a4f7a;
  --dark-2:         #9a6f9a;
  --on-dark:        #ffffff;
  --on-dark-dim:    rgba(255,255,255,0.65);
  --on-dark-label:  rgba(255,255,255,0.48);
  --light-bg:       #f7f3f6;
  --on-light:       #5a3a5a;
  --on-light-mid:   #7a5a7a;
  --on-light-muted: #9a7a9a;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  color: var(--on-light);
  background: var(--white);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
img[src=""], img:not([src]) { display: none; }
button { cursor: pointer; }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 600px) { .wrapper { padding: 0 36px; } }

section { padding: 72px 24px; }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
}
/* On dark backgrounds */
.on-dark .section-eyebrow,
.section-eyebrow.on-dark { color: var(--on-dark-label); }
/* On light backgrounds */
.section-eyebrow { color: var(--on-light-muted); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 400;
  font-style: italic;
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.2;
}
.section-title.on-dark { color: var(--on-dark); }
.section-title         { color: var(--on-light); }

.divider {
  width: 48px;
  height: 1px;
  margin: 0 auto 40px;
}
.divider.on-dark { background: rgba(255,255,255,0.3); }
.divider         { background: var(--on-light-muted); opacity: 0.4; }

/* ============================================================
   IMAGE LOADING — fade-in + shimmer skeleton
   ============================================================ */

/* Shimmer animation for placeholders */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.img-skeleton {
  background: linear-gradient(90deg, #e8e0d8 25%, #f5f0ea 50%, #e8e0d8 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* Images start transparent, fade in on load */
.img-fade {
  opacity: 0;
  transition: opacity .5s ease;
}
.img-fade.loaded { opacity: 1; }

/* Carousel slide holds shimmer until image ready */
.carousel-slide:not(.img-ready)::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, #e8e0d8 25%, #f5f0ea 50%, #e8e0d8 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
.carousel-slide.img-ready::before { display: none; }
.carousel-slide img { position: relative; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .img-skeleton, .carousel-slide:not(.img-ready)::before { animation: none; }
  .img-fade { opacity: 1 !important; }
}

/* ============================================================
   SCROLL ANIMATION
   ============================================================ */
.animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(.22,.61,.36,1), transform 0.75s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
  backface-visibility: hidden;
}
.animate.visible {
  opacity: 1; transform: translateY(0);
  will-change: auto;
}

/* Variant directions */
.animate.from-left  { transform: translateX(-40px); }
.animate.from-right { transform: translateX(40px); }
.animate.from-zoom  { transform: scale(.92); }
.animate.from-blur  { filter: blur(8px); }
.animate.from-left.visible,
.animate.from-right.visible { transform: translateX(0); }
.animate.from-zoom.visible  { transform: scale(1); }
.animate.from-blur.visible  { filter: blur(0); }

/* Stagger children when parent becomes visible */
.stagger > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.stagger.visible > *           { opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(1) { transition-delay: .05s; }
.stagger.visible > *:nth-child(2) { transition-delay: .15s; }
.stagger.visible > *:nth-child(3) { transition-delay: .25s; }
.stagger.visible > *:nth-child(4) { transition-delay: .35s; }
.stagger.visible > *:nth-child(5) { transition-delay: .45s; }
.stagger.visible > *:nth-child(6) { transition-delay: .55s; }

/* Floating decoration */
@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}
.float-soft { animation: floatY 4.5s ease-in-out infinite; }

/* Shine sweep on hover */
@keyframes shine {
  0%   { transform: translateX(-120%) skewX(-15deg); }
  100% { transform: translateX(220%)  skewX(-15deg); }
}

@media (prefers-reduced-motion: reduce) {
  .animate, .animate.visible,
  .stagger > *, .stagger.visible > * {
    opacity: 1 !important; transform: none !important; filter: none !important;
    transition: none !important;
  }
  .hero-img, .float-soft { animation: none !important; }
}

/* ============================================================
   SIDE CHOOSER OVERLAY
   ============================================================ */
.chooser {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 55%, rgba(0,0,0,.25) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 24px;
  transition: opacity .7s ease, visibility .7s ease;
}
.chooser.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.chooser-inner { text-align: center; width: 100%; max-width: 440px; }

.chooser-eyebrow {
  font-family: var(--font-sans); font-size: 10px; font-weight: 700;
  letter-spacing: 5px; text-transform: uppercase;
  color: var(--on-dark-label); margin-bottom: 18px;
}
.chooser-title {
  font-family: var(--font-script);
  font-size: clamp(26px, 6.8vw, 52px);
  color: var(--on-dark); line-height: 1.1; margin-bottom: 10px;
  white-space: nowrap;
}
.chooser-title span { opacity: .65; }
.chooser-dates {
  font-family: var(--font-serif); font-size: 14px; font-style: italic;
  color: var(--on-dark-dim); letter-spacing: 3px; margin-bottom: 28px;
}
.chooser-divider {
  width: 40px; height: 1px; background: rgba(255,255,255,.22);
  margin: 0 auto 24px;
}
.chooser-sub {
  font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--on-dark-label); margin-bottom: 18px;
}
.chooser-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.chooser-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18); border-radius: 12px;
  padding: 28px 12px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: var(--on-dark);
  transition: background .25s, border-color .25s, transform .25s;
}
.chooser-card:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.45);
  transform: translateY(-4px);
}
.chooser-card:active { transform: translateY(-1px); }
.chooser-icon  { font-size: 36px; margin-bottom: 4px; }
.chooser-name  {
  font-family: var(--font-serif); font-size: 19px;
  font-style: italic; color: var(--on-dark);
}
.chooser-day   {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: var(--on-dark-dim);
}
.chooser-time  {
  font-family: var(--font-sans); font-size: 20px; font-weight: 700;
  color: var(--on-dark);
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-btn {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 800;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  background: var(--dark);
  color: var(--on-dark);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  transition: transform .2s, background .3s;
}
.theme-btn:hover { transform: scale(1.1); }

.side-btn {
  position: fixed;
  top: 20px; left: 20px;
  z-index: 800;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  background: var(--dark);
  color: var(--on-dark);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  transition: transform .2s, background .3s;
}
.side-btn:hover { transform: scale(1.1); }

/* ============================================================
   1. HERO
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 55%, rgba(255,255,255,0.1) 100%);
}
.hero-img-wrap {
  position: absolute; inset: 0; overflow: hidden;
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  animation: kenburns 22s ease-in-out infinite alternate;
  transform-origin: var(--photo-x, 50%) var(--photo-y, 0%);
  will-change: transform;
}
@keyframes kenburns {
  0%   { transform: scale(var(--photo-zoom, 1)) translate(0, 0); }
  100% { transform: scale(calc(var(--photo-zoom, 1) * 1.12)) translate(-2.5%, -2.5%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-img {
    animation: none;
    transform: scale(var(--photo-zoom, 1));
  }
  .carousel-slide.is-active img { animation: none; }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.08) 0%,
    rgba(0,0,0,.38) 50%,
    rgba(0,0,0,.72) 100%
  );
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 0 24px 80px;
  width: 100%; max-width: var(--max-w);
}
.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: 5px; text-transform: uppercase;
  color: rgba(255,255,255,.50);
  margin-bottom: 20px;
}
.hero-date {
  font-family: var(--font-sans);
  font-size: clamp(32px, 8.5vw, 56px);
  font-weight: 700; color: var(--on-dark);
  letter-spacing: 2px; line-height: 1;
  white-space: nowrap;
  margin-bottom: 20px;
}
.hero-rule {
  width: 56px; height: 1px;
  background: rgba(255,255,255,.38);
  margin: 0 auto 20px;
}
.hero-names {
  font-family: var(--font-script);
  font-size: clamp(30px, 8vw, 46px);
  font-weight: 400; color: rgba(255,255,255,.88);
  line-height: 1.15;
}
.hero-scroll {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: bounce 2.2s ease-in-out infinite;
}
.hero-scroll span {
  font-size: 10px; letter-spacing: 2px;
  color: rgba(255,255,255,.45); text-transform: uppercase;
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(7px); }
}

/* ============================================================
   1b. COUPLE REVEAL  (curtain reveal animation)
   ============================================================ */
.couple-reveal {
  background: var(--white);
  padding: 88px 24px;
  overflow: hidden;
  text-align: center;
}
.cr-inner { max-width: 420px; margin: 0 auto; }

.cr-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 18px 48px rgba(0,0,0,.18);
  background: var(--dark);
}
.cr-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 2.6s ease-out;
}
.cr-curtain {
  position: absolute; top: 0; bottom: 0;
  width: 52%;
  background: linear-gradient(var(--dark), var(--dark-2));
  z-index: 2;
  transition: transform 1.6s cubic-bezier(0.77, 0, 0.175, 1);
}
.cr-curtain.left  { left: 0;  transform: translateX(0); }
.cr-curtain.right { right: 0; transform: translateX(0); }
.cr-curtain::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: rgba(255,255,255,.12);
}
.cr-curtain.left::after  { right: 0; }
.cr-curtain.right::after { left: 0; }

.cr-heart {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  z-index: 3;
  font-size: 42px;
  color: rgba(255,255,255,.85);
  opacity: 0;
  transition: opacity .6s ease .2s, transform .8s ease .2s;
}

.cr-text {
  margin-top: 32px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s ease 1.2s, transform 1s ease 1.2s;
}
.cr-names {
  font-family: var(--font-script);
  font-size: clamp(26px, 6.5vw, 36px);
  color: var(--on-light);
  line-height: 1.1;
  margin-bottom: 10px;
}
.cr-tagline {
  font-family: var(--font-serif);
  font-size: 17px;
  font-style: italic;
  color: var(--on-light-mid);
  letter-spacing: 1px;
}

/* Pre-reveal state: heart visible through curtain */
.animate-reveal .cr-heart { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Revealed state */
.animate-reveal.visible .cr-curtain.left  { transform: translateX(-101%); }
.animate-reveal.visible .cr-curtain.right { transform: translateX(101%); }
.animate-reveal.visible .cr-img           { transform: scale(1); }
.animate-reveal.visible .cr-heart         { opacity: 0; transform: translate(-50%, -50%) scale(1.4); transition: opacity .5s ease, transform .6s ease; }
.animate-reveal.visible .cr-text          { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .cr-curtain { display: none; }
  .cr-img, .cr-text { transform: none; opacity: 1; transition: none; }
}

/* ============================================================
   2. COUNTDOWN  (dark section)
   ============================================================ */
.countdown {
  background: var(--dark);
  text-align: center;
}
.countdown .section-eyebrow { color: var(--on-dark-label); }
.countdown .section-title   { color: var(--on-dark); }
.countdown .divider         { background: rgba(255,255,255,.28); opacity: 1; }

.countdown-grid {
  display: flex; align-items: flex-start;
  justify-content: center; gap: 2px; flex-wrap: nowrap;
}
.countdown-item {
  display: flex; flex-direction: column;
  align-items: center; min-width: 72px;
}
.countdown-num {
  font-family: var(--font-sans);
  font-size: clamp(36px, 9.5vw, 62px);
  font-weight: 700; color: var(--on-dark);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.countdown-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--on-dark-dim);
  margin-top: 8px;
}
.countdown-sep {
  font-family: var(--font-serif);
  font-size: clamp(28px, 7vw, 44px);
  color: var(--on-dark-dim);
  line-height: 1; margin-top: 4px;
  align-self: flex-start;
}

/* ============================================================
   3. CALENDAR  (light section)
   ============================================================ */
.calendar-section { background: var(--light-bg); text-align: center; }

.calendar-wrap { max-width: 300px; margin: 0 auto; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-hdr {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--on-light-muted);
  text-align: center; padding: 4px 0 10px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--on-light-mid);
  border-radius: 8px;
}
.cal-day.wed-pre {
  background: var(--dark-2);
  color: var(--on-dark);
  font-weight: 700;
  border-radius: 8px;
  flex-direction: column;
  aspect-ratio: auto;
  padding: 5px 2px;
  gap: 1px;
}
.cal-day.wed-pre::after {
  content: '★';
  font-size: 9px;
  color: rgba(255,255,255,0.75);
  line-height: 1;
}
.cal-day.wed {
  background: var(--dark); color: var(--on-dark);
  font-weight: 700; position: relative;
  flex-direction: column;
  aspect-ratio: auto;
  padding: 5px 2px;
  gap: 1px;
  border-radius: 8px;
}
.cal-day.wed::after {
  content: '♥';
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  line-height: 1;
}
.calendar-note {
  margin-top: 22px;
  font-family: var(--font-serif); font-size: 15px;
  font-style: italic; color: var(--on-light-mid);
}

/* ============================================================
   4. FAMILY  (light section)
   ============================================================ */
.family-section { background: var(--white); text-align: center; }

.family-pair {
  display: flex; flex-direction: column;
  gap: 44px; align-items: center;
  max-width: var(--max-w); margin: 0 auto;
}
.family-person {
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
}
.polaroid {
  background: var(--white);
  padding: 10px 10px 32px;
  box-shadow: 0 6px 28px rgba(0,0,0,.13);
  width: 168px;
  transition: transform .3s ease;
}
.polaroid.groom { transform: rotate(-2deg); }
.polaroid.bride { transform: rotate(2deg); }
.polaroid:hover { transform: rotate(0) scale(1.04); }
.polaroid-media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--light-bg);
  cursor: zoom-in;
}
.polaroid-img {
  position: absolute;
  max-width: none;
  object-fit: fill;
  background: var(--light-bg);
  display: block;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.polaroid-view {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(0,0,0,.62);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.polaroid-media:hover .polaroid-view,
.polaroid-media:focus-visible .polaroid-view {
  opacity: 1;
  transform: translateY(0);
}
.polaroid-media:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
@media (hover: none) {
  .polaroid-media:has(.polaroid-img.loaded) .polaroid-view {
    opacity: 1;
    transform: translateY(0);
  }
}
.polaroid-ph {
  width: 100%; height: 100%;
  background: var(--light-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
}
.family-nick {
  font-family: var(--font-script);
  font-size: clamp(30px, 8vw, 46px);
  color: var(--on-light); line-height: 1;
}
.family-fullname {
  font-family: var(--font-serif);
  font-size: 18px; font-style: italic;
  color: var(--on-light-mid);
}
.family-parents {
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 400;
  color: var(--on-light-mid); line-height: 2;
}
.family-parents strong { font-weight: 600; color: var(--on-light); font-style: normal; }
.family-amp {
  display: flex; align-items: center; gap: 16px;
  width: 100%; max-width: 280px;
}
.family-amp::before, .family-amp::after {
  content: ''; flex: 1; height: 1px;
  background: var(--on-light-muted); opacity: 0.25;
}
.family-amp span { font-size: 24px; color: var(--on-light); opacity: 0.5; }

/* ============================================================
   5. INVITE CARD
   ============================================================ */
.venue-section {
  background: #fafafa;
  padding: 40px 0;
  text-align: center;
}
.venue-section .wrapper {
  max-width: none;
  padding: 0 12px;
}

.invitation-card {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 36px 18px;
  background: #fff;
  box-sizing: border-box;
  box-shadow: 0 10px 32px rgba(20,20,20,.055);
  text-align: center;
}

.parents {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
  text-align: center;
}
.parent-title {
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: #9a8f8f;
  margin-bottom: 9px;
}
.parent-name {
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: .5px;
  color: #1f2a44;
  text-transform: none;
}
.parent-address {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.6;
  color: #9a8f8f;
}

.invitation-section-title {
  margin-bottom: 30px;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 5px;
  color: #1f2a44;
  text-transform: uppercase;
}

.couple-name {
  font-family: var(--font-script);
  font-size: clamp(40px, 12.5vw, 54px);
  line-height: 1.08;
  color: #9b1f32;
  text-align: center;
}
.couple-name .bride,
.couple-name .groom {
  display: block;
}
.couple-name .ampersand {
  display: block;
  margin: 13px 0;
  font-size: 24px;
  line-height: 1;
}

.date {
  margin-top: 46px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 5px;
  color: #1f2a44;
}

.invitation-divider {
  width: 38px;
  height: 1px;
  margin: 20px auto;
  background: #c9c0bc;
}

.lunar-date {
  font-size: 11.5px;
  line-height: 1.5;
  color: #9a8f8f;
}

.event-info {
  margin-top: 52px;
  text-align: center;
}
.event-info .label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #1f2a44;
}
.event-info .time {
  margin-top: 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #9b1f32;
}
.event-info .address {
  margin-top: 22px;
  font-size: 13px;
  line-height: 1.7;
  color: #1f2a44;
}

.map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 168px;
  height: 40px;
  margin-top: 24px;
  border: 1px solid #c9c0bc;
  background: transparent;
  font-size: 11.5px;
  letter-spacing: 1.2px;
  color: #1f2a44;
  text-decoration: none;
  transition: border-color .2s, background .2s, color .2s;
}
.map-button:hover {
  border-color: #9b1f32;
  background: #9b1f32;
  color: #fff;
}
.map-button svg { fill: currentColor; }

@media (min-width: 390px) {
  .venue-section {
    padding: 52px 0;
  }
  .venue-section .wrapper {
    padding: 0 16px;
  }
  .invitation-card {
    padding: 40px 24px;
  }
  .parents {
    gap: 28px;
    margin-bottom: 56px;
  }
  .parent-title {
    font-size: 11px;
    letter-spacing: 3px;
  }
  .parent-name { font-size: 15px; }
  .parent-address { font-size: 13px; }
  .invitation-section-title {
    margin-bottom: 36px;
    font-size: 20px;
    letter-spacing: 7px;
  }
  .couple-name {
    font-size: clamp(48px, 13vw, 58px);
  }
  .couple-name .ampersand {
    margin: 16px 0;
    font-size: 28px;
  }
  .date {
    margin-top: 54px;
    font-size: 19px;
    letter-spacing: 7px;
  }
  .event-info {
    margin-top: 60px;
  }
  .event-info .label {
    font-size: 12px;
    letter-spacing: 4px;
  }
  .event-info .time {
    margin-top: 20px;
    font-size: 18px;
    letter-spacing: 3px;
  }
  .event-info .address {
    margin-top: 26px;
    font-size: 14px;
  }
  .map-button {
    width: 180px;
    height: 42px;
    margin-top: 28px;
    font-size: 12px;
    letter-spacing: 1.5px;
  }
}

@media (min-width: 768px) {
  .venue-section { padding: 72px 0; }
  .invitation-card {
    max-width: 560px;
    padding: 48px 56px;
  }
  .parents {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 72px;
  }
  .parent-name {
    font-size: 15px;
    text-transform: uppercase;
  }
  .couple-name { font-size: 70px; }
  .date {
    font-size: 22px;
    letter-spacing: 8px;
  }
}

/* ============================================================
   6. TIMELINE  (light section)
   ============================================================ */
.timeline-section { background: var(--light-bg); }
.timeline-section .section-eyebrow,
.timeline-section .section-title { text-align: center; }

.timeline {
  position: relative; max-width: 420px; margin: 0 auto;
}
.timeline::before {
  content: ''; position: absolute;
  left: 60px; top: 0; bottom: 0;
  width: 1px; background: var(--on-light-muted); opacity: 0.2;
}
.tl-item {
  display: flex; gap: 18px; margin-bottom: 32px;
}
.tl-item:last-child { margin-bottom: 0; }
.tl-time {
  font-size: 13px; font-weight: 700;
  color: var(--on-light-muted);
  width: 60px; flex-shrink: 0;
  text-align: right; padding-top: 6px;
}
.tl-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--on-light-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; z-index: 1; font-size: 15px;
  opacity: 0.85;
}
.tl-body { flex: 1; padding-top: 4px; }
.tl-title {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 600;
  color: var(--on-light); margin-bottom: 5px;
}
.tl-desc {
  font-size: 15px; font-weight: 400;
  color: var(--on-light-mid); line-height: 1.65;
}

/* ============================================================
   7. DRESS CODE  (white section)
   ============================================================ */
.dresscode-section { background: var(--white); text-align: center; }

.swatches {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-bottom: 28px;
  max-width: 320px; margin-left: auto; margin-right: auto;
}
.swatch-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.swatch {
  width: 70px; height: 70px; border-radius: 50%;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.swatch.c1 { background: var(--dark); }
.swatch.c2 { background: var(--dark-2); }
.swatch.c3 { background: var(--white); border: 1px solid #ddd; }
.swatch-name {
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--on-light-mid);
}
.swatch-hex { font-size: 12px; font-weight: 400; color: var(--on-light-muted); }

.dresscode-note {
  font-family: var(--font-serif); font-size: 16px;
  font-style: italic; color: var(--on-light-mid);
  max-width: 340px; margin: 0 auto; line-height: 1.75;
}

/* ============================================================
   8. GALLERY  (light section, carousel)
   ============================================================ */
.gallery-section {
  background: var(--light-bg);
  padding: 82px 18px 76px;
  text-align: center;
}
.gallery-section .section-eyebrow,
.gallery-section .section-title { text-align: center; }
.album-intro {
  max-width: 360px;
  margin: -18px auto 18px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  line-height: 1.65;
  color: var(--on-light-mid);
}
.album-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--on-light-muted);
}

/* Fluent-style gallery frame */
.carousel-wrap {
  max-width: min(760px, calc(100vw - 28px));
  margin: 8px auto 0;
  padding: 12px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 14px 42px rgba(26,58,92,.14), 0 2px 8px rgba(0,0,0,.06);
  overflow: hidden; /* prevent any internal scroll bleeding to page */
}

.carousel {
  position: relative;
  width: 100%;
  background: #1a1a1a;
  overflow: hidden;
  overscroll-behavior: contain; /* prevent touch swipe chaining to page */
  aspect-ratio: 16/10;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0,0,0,.22);
}
.album-progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 4;
  background: rgba(255,255,255,.2);
}
.album-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--on-dark);
  transition: width .45s ease;
}
.carousel-stage { position: absolute; inset: 0; border-radius: 6px; overflow: hidden; }
.carousel-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .9s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
}
.carousel-slide.is-active {
  opacity: 1;
}
.carousel-slide.is-active img {
  animation: albumKenburns 7s ease-out both;
}
@keyframes albumKenburns {
  from { transform: scale(1.015); }
  to   { transform: scale(1.055); }
}
.carousel-slide-bg {
  position: absolute; inset: -20px;
  background-size: cover; background-position: center;
  filter: blur(20px) brightness(.55) saturate(.8);
  transform: scale(1.1);
  pointer-events: none;
}
.carousel-slide img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  position: relative; z-index: 1;
  user-select: none; -webkit-user-drag: none;
}
.carousel-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; background: #f5f0ea;
}
.carousel-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.3));
  pointer-events: none;
}

.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none; border-radius: 50%;
  font-size: 24px; line-height: 1; color: #333;
  cursor: pointer; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.carousel-btn:hover {
  background: rgba(255,255,255,.95);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; z-index: 3;
  max-width: calc(100% - 36px);
  overflow: hidden;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(4px);
  padding: 5px 10px; border-radius: 20px;
}
.carousel-dots button {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.5); border: none;
  cursor: pointer; padding: 0;
  transition: width .28s ease, border-radius .28s ease, background .28s ease;
}
.carousel-dots button.is-active {
  width: 18px; border-radius: 4px; background: #fff;
}

/* Thumb strip inside the frame */
.album-thumb-label {
  margin: 12px 2px 0;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--on-light-muted);
}
.carousel-thumbs {
  display: flex; gap: 8px; padding: 8px 2px 2px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; /* prevent scroll chaining to page */
  scrollbar-width: none;
}
.carousel-thumbs::-webkit-scrollbar { display: none; }
.carousel-thumb {
  flex: 0 0 66px; height: 66px;
  cursor: pointer; opacity: .5;
  transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
.carousel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-thumb:hover { opacity: .8; }
.carousel-thumb.is-active {
  opacity: 1;
  border-color: var(--dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(26,58,92,.24);
}

/* Legacy hidden grid (lightbox source) */
.gallery-grid[hidden] { display: none !important; }

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.93); z-index: 2000;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lb-img { max-width: 90vw; max-height: 85vh; object-fit: contain; user-select: none; }
.lb-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: #fff;
  font-size: 36px; line-height: 1; padding: 8px;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-size: 28px; padding: 16px 12px; border-radius: 2px;
  transition: background .2s;
}
.lb-nav:hover { background: rgba(255,255,255,.22); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }

/* ============================================================
   9. MUSIC BUTTON (floating)
   ============================================================ */
.music-btn {
  position: fixed; bottom: 24px; right: 20px;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--dark); border: 2px solid rgba(255,255,255,.35);
  color: var(--on-dark);
  display: flex; align-items: center; justify-content: center;
  z-index: 900; box-shadow: 0 4px 20px rgba(0,0,0,.25);
  transition: transform .2s, background .2s;
}
.music-btn:hover { background: var(--dark-2); transform: scale(1.1); }
.music-btn.playing { animation: pulse 2s infinite; }
.music-btn svg { width: 22px; height: 22px; fill: currentColor; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(255,255,255,.3); }
  70%  { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0   rgba(255,255,255,0); }
}

/* ============================================================
   10. RSVP  (dark section)
   ============================================================ */
.rsvp-section { background: var(--dark); }
.rsvp-section .section-eyebrow { color: var(--on-dark-label); }
.rsvp-section .section-title   { color: var(--on-dark); }
.rsvp-section .divider         { background: rgba(255,255,255,.28); opacity: 1; }

.rsvp-form {
  display: flex; flex-direction: column; gap: 18px;
  max-width: 400px; margin: 0 auto;
}
.form-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--on-dark-dim); margin-bottom: 7px;
}
.form-input, .form-select {
  width: 100%; padding: 13px 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18); border-radius: 2px;
  color: var(--on-dark);
  font-family: var(--font-sans); font-size: 15px; font-weight: 400;
  outline: none; transition: border-color .2s;
}
.form-input::placeholder { color: rgba(255,255,255,.28); }
.form-input:focus, .form-select:focus { border-color: rgba(255,255,255,.55); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px; cursor: pointer;
}
.form-select option { background: var(--dark); }
.attend-toggle {
  display: flex; border: 1px solid rgba(255,255,255,.18);
  border-radius: 2px; overflow: hidden;
}
.attend-btn {
  flex: 1; padding: 13px;
  background: transparent; border: none;
  color: rgba(255,255,255,.45);
  font-family: var(--font-sans); font-size: 14px; font-weight: 700;
  letter-spacing: 1px; transition: background .2s, color .2s;
}
.attend-btn.on { background: rgba(255,255,255,.18); color: var(--on-dark); }
.submit-btn {
  width: 100%; padding: 15px;
  background: var(--on-dark); border: none; border-radius: 2px;
  color: var(--dark);
  font-family: var(--font-sans); font-size: 12px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  transition: opacity .2s, transform .1s;
}
.submit-btn:hover  { opacity: .88; }
.submit-btn:active { transform: scale(.98); }
.submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.rsvp-thanks { display: none; text-align: center; padding: 28px; }
.rsvp-thanks.show { display: block; }
.rsvp-thanks p {
  font-family: var(--font-serif); font-size: 24px;
  font-style: italic; color: var(--on-dark); margin-bottom: 12px;
}
.rsvp-thanks small { font-size: 15px; font-weight: 400; color: var(--on-dark-dim); }

/* ============================================================
   11. WISHES  (light section)
   ============================================================ */
.wishes-section { background: var(--light-bg); }
.wishes-section .section-eyebrow,
.wishes-section .section-title { text-align: center; }

.wish-form {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 420px; margin: 0 auto 40px;
}
.wish-input {
  width: 100%; padding: 13px 16px;
  background: var(--white);
  border: 1px solid rgba(0,0,0,.12); border-radius: 2px;
  color: var(--on-light);
  font-family: var(--font-sans); font-size: 15px; font-weight: 400;
  outline: none; resize: none; transition: border-color .2s;
}
.wish-input:focus { border-color: var(--on-light-muted); }
.wish-submit-btn {
  align-self: flex-end; padding: 11px 26px;
  background: var(--dark); border: none; border-radius: 2px;
  color: var(--on-dark);
  font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  transition: background .2s;
}
.wish-submit-btn:hover   { background: var(--dark-2); }
.wish-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.wish-stream-wrap {
  position: relative;
  height: 380px;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 84%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 84%, transparent 100%);
}
.wish-list {
  height: 100%;
  overflow-y: scroll;
  scrollbar-width: none;
  display: flex; flex-direction: column;
  gap: 10px;
  padding: 20px 4px 20px 0;
}
.wish-list::-webkit-scrollbar { display: none; }
.wish-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 13px 16px;
  border-radius: 0 16px 16px 16px;
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 2px 14px rgba(0,0,0,.07);
  flex-shrink: 0;
  animation: wishIn .5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transform-origin: bottom left;
}
@keyframes wishIn {
  from { opacity: 0; transform: translateY(24px) scale(0.88); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.wish-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 15px; font-weight: 700;
  color: #fff; flex-shrink: 0; margin-top: 1px;
}
.wish-body { flex: 1; min-width: 0; }
.wish-name    { font-family: var(--font-serif); font-size: 15px; font-weight: 700; color: var(--on-light); margin-bottom: 4px; }
.wish-message { font-size: 14px; font-weight: 400; color: var(--on-light-mid); line-height: 1.6; word-break: break-word; }
.wish-time    { font-size: 11px; color: var(--on-light-muted); margin-top: 7px; }
.wish-reaction { font-size: 14px; margin-left: 6px; display: inline-block; animation: wishReact .6s cubic-bezier(0.34,1.56,0.64,1) both; }
@keyframes wishReact {
  from { transform: scale(0) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

/* Floating emoji particles */
@keyframes wishEmojiFloat {
  0%   { opacity: 0;   transform: translateY(0)     scale(0.5) rotate(-8deg); }
  12%  { opacity: 1;   transform: translateY(-30px)  scale(1.1) rotate(5deg); }
  75%  { opacity: .85; transform: translateY(-200px) scale(1)   rotate(-4deg); }
  100% { opacity: 0;   transform: translateY(-260px) scale(0.7) rotate(10deg); }
}
.wish-float-emoji {
  position: absolute;
  bottom: 8px;
  pointer-events: none;
  z-index: 20;
  line-height: 1;
  animation: wishEmojiFloat var(--dur, 3.5s) ease-in-out forwards;
  will-change: transform, opacity;
}

/* ============================================================
   QR BUTTON & MODAL
   ============================================================ */
.qr-btn {
  padding: 13px 30px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.32); border-radius: 2px;
  color: var(--on-dark-dim);
  font-family: var(--font-sans); font-size: 12px;
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.qr-btn:hover {
  background: rgba(255,255,255,.1);
  color: var(--on-dark);
  border-color: rgba(255,255,255,.6);
}

.qr-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); z-index: 1500;
  align-items: center; justify-content: center;
  padding: 24px;
}
.qr-modal.open { display: flex; }

.qr-modal-inner {
  background: var(--white); border-radius: 8px;
  padding: 36px 28px 28px;
  width: 100%; max-width: 300px;
  text-align: center; position: relative;
  box-shadow: 0 12px 48px rgba(0,0,0,.25);
}
.qr-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none;
  font-size: 26px; color: #bbb; line-height: 1; padding: 4px;
}
.qr-close:hover { color: #555; }
.qr-title {
  font-family: var(--font-serif); font-size: 22px;
  font-style: italic; color: var(--on-light);
  margin-bottom: 6px;
}
.qr-subtitle {
  font-size: 13px; color: var(--on-light-muted); margin-bottom: 20px;
}
.qr-img {
  width: 100%; max-width: 220px; margin: 0 auto;
  border: 1px solid #eee; border-radius: 4px; display: none;
}
.qr-placeholder {
  font-size: 14px; color: #bbb;
  padding: 36px 0; display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--dark); padding: 40px 24px; text-align: center;
}
.footer-names {
  font-family: var(--font-script); font-size: 36px;
  color: var(--on-dark); margin-bottom: 10px;
}
.footer-date {
  font-size: 12px; font-weight: 400; letter-spacing: 3px;
  text-transform: uppercase; color: var(--on-dark-dim);
}

/* ============================================================
   MOBILE FIXES
   ============================================================ */

/* Prevent any element causing horizontal scroll */
body { overflow-x: hidden; }

/* Floating buttons: avoid overlap on small screens */
@media (max-width: 380px) {
  .theme-btn { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 14px; }
  .music-btn { bottom: 16px; right: 12px; width: 44px; height: 44px; }
}

/* Countdown: tighten on tiny screens */
@media (max-width: 340px) {
  .countdown-item { min-width: 52px; }
}

/* Hero date: tighten on tiny screens */
@media (max-width: 320px) {
  .hero-date { letter-spacing: 0px; font-size: 28px; }
}

/* QR modal safe on 320px */
.qr-modal-inner { max-width: min(300px, calc(100vw - 48px)); }

/* RSVP attend buttons: ensure touch target >= 44px */
.attend-btn { min-height: 44px; }

/* Swatches: shrink on very small screens */
@media (max-width: 300px) {
  .swatch { width: 52px; height: 52px; }
}

/* Couple-reveal: ensure frame not too tall on landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .cr-frame { aspect-ratio: 16/9; }
}

/* Carousel: tighter on small screens */
@media (max-width: 480px) {
  .gallery-section { padding-left: 14px; padding-right: 14px; }
  .carousel-wrap { border-radius: 8px; padding: 8px; }
  .carousel { aspect-ratio: 4/5; border-radius: 5px; }
  .carousel-stage { border-radius: 5px; }
  .carousel-btn { width: 34px; height: 34px; font-size: 20px; border-radius: 10px; }
  .carousel-thumb { flex: 0 0 54px; height: 54px; border-radius: 4px; }
  .album-meta { gap: 10px; letter-spacing: 1.5px; }
}
