:root {
  --cream:    #F5EFE3;
  --warm:     #FCF8F1;
  --gold:     #C8A35A;
  --gold-l:   #EDE0C0;
  --gold-dk:  #9A7A3A;
  --champagne:#F5EBD0;
  --blush:    #D4B8A8;
  --blush-l:  #EFE2DA;
  --navy:     #273349;
  --ink:      #2C2520;
  --mid:      #7A6055;
  --light:    #B09888;
  --white:    #FFFDF9;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', system-ui, sans-serif; background: var(--cream); color: var(--ink); font-weight: 400; -webkit-font-smoothing: antialiased; }
.serif { font-family: 'Lora', Georgia, serif; }
.hand { font-family: 'Caveat', cursive; }

/* Password overlay */
#pw-overlay { position: fixed; inset: 0; z-index: 999; background: var(--warm); display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 24px; }
#pw-overlay.hidden { display: none; }
#pw-overlay .pw-card { background: var(--white); border-radius: 16px; padding: 40px 32px; box-shadow: 0 8px 48px rgba(44,37,32,0.12); text-align: center; max-width: 420px; width: 100%; }
#pw-overlay .pw-leaf { color: var(--gold); font-size: 26px; margin-bottom: 16px; opacity: 0.7; }
#pw-overlay h2 { font-family: 'Lora', serif; font-style: italic; font-size: clamp(1.8rem,5vw,2.6rem); color: var(--ink); margin-bottom: 6px; }
#pw-overlay p { font-size: 14px; color: var(--mid); margin-bottom: 28px; line-height: 1.6; }
#pw-input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--gold-l); border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 16px; color: var(--ink); background: var(--warm); outline: none; margin-bottom: 12px; transition: border-color 200ms; text-align: center; }
#pw-input:focus { border-color: var(--gold); }
#pw-input.shake { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97); border-color: #c05050; }
#pw-btn { width: 100%; padding: 14px; background: var(--gold); color: white; border: none; border-radius: 8px; font-family: 'Caveat', cursive; font-size: 22px; font-weight: 700; cursor: pointer; transition: background 200ms; }
#pw-btn:hover { background: var(--gold-dk); }
#pw-error { font-size: 13px; color: #c05050; margin-top: 10px; min-height: 18px; }
@keyframes shake { 10%,90% { transform: translateX(-2px); } 20%,80% { transform: translateX(4px); } 30%,50%,70% { transform: translateX(-6px); } 40%,60% { transform: translateX(6px); } }

/* Nav — mobile-first */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--white); border-bottom: 2px solid var(--gold-l); padding: 0 20px; display: flex; justify-content: space-between; align-items: center; height: 56px; }
.nav-logo { font-family: 'Caveat', cursive; font-size: 24px; font-weight: 700; color: var(--gold); text-decoration: none; }
.nav-links { display: none; gap: 0; }
.nav-links a { font-family: 'Caveat', cursive; font-size: 18px; font-weight: 600; color: var(--mid); text-decoration: none; padding: 4px 2px; transition: color 150ms; }
.nav-links a:hover, .nav-links a.nav-current { color: var(--gold); }
.nav-links a.nav-rsvp { background: var(--gold); color: white; padding: 5px 14px; border-radius: 20px; transition: background 150ms; }
.nav-links a.nav-rsvp:hover { background: var(--gold-dk); }
.nav-links a.nav-rsvp.nav-current { color: white; }
@media (min-width: 680px) { nav { padding: 0 clamp(20px,5vw,48px); } .nav-links { display: flex; gap: clamp(12px,2.5vw,24px); } .hamburger { display: none !important; } }

/* Hamburger */
.hamburger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 6px; border-radius: 8px; transition: background 150ms; }
.hamburger:hover { background: var(--champagne); }
.hamburger span { display: block; height: 2px; background: var(--gold-dk); border-radius: 2px; transition: transform 250ms ease, opacity 250ms ease; }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
#mobile-menu { position: fixed; inset: 56px 0 0 0; z-index: 99; background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; transform: translateY(-110%); transition: transform 320ms cubic-bezier(0.4,0,0.2,1); pointer-events: none; border-top: 2px solid var(--gold-l); }
#mobile-menu.is-open { transform: translateY(0); pointer-events: auto; }
.mobile-menu-inner { display: flex; flex-direction: column; align-items: center; gap: 0; width: 100%; padding: 32px 24px 40px; }
.mobile-menu-link { font-family: 'Caveat', cursive; font-size: 30px; font-weight: 700; color: var(--ink); text-decoration: none; padding: 14px 32px; width: 100%; text-align: center; border-radius: 12px; transition: background 150ms, color 150ms; }
.mobile-menu-link:hover, .mobile-menu-link:active, .mobile-menu-link.nav-current { background: var(--champagne); color: var(--gold-dk); }
.mobile-menu-divider { width: 48px; height: 1px; background: var(--gold-l); margin: 2px 0; }
.mobile-menu-rsvp { margin-top: 24px; width: 100%; max-width: 280px; background: var(--gold); color: white; border-radius: 40px; font-family: 'Caveat', cursive; font-size: 28px; font-weight: 700; padding: 16px 32px; text-decoration: none; text-align: center; display: block; box-shadow: 0 4px 24px rgba(200,163,90,0.4); transition: background 150ms; }
.mobile-menu-rsvp:hover { background: var(--gold-dk); }
.mobile-menu-deadline { margin-top: 10px; font-size: 13px; color: var(--light); text-align: center; font-style: italic; }

/* Washi tape dividers */
.washi { height: 14px; opacity: 0.6; width: 100%; }
.washi-gold { background: repeating-linear-gradient(90deg, var(--gold-l) 0, var(--gold-l) 18px, rgba(237,224,192,0.5) 18px, rgba(237,224,192,0.5) 22px, var(--gold-l) 22px, var(--gold-l) 36px, rgba(237,224,192,0.5) 36px, rgba(237,224,192,0.5) 40px); }
.washi-champagne { background: repeating-linear-gradient(90deg, var(--champagne) 0, var(--champagne) 18px, rgba(245,235,208,0.5) 18px, rgba(245,235,208,0.5) 22px, var(--champagne) 22px, var(--champagne) 36px, rgba(245,235,208,0.5) 36px, rgba(245,235,208,0.5) 40px); }
.washi-blush { background: repeating-linear-gradient(90deg, var(--blush-l) 0, var(--blush-l) 18px, rgba(239,226,218,0.5) 18px, rgba(239,226,218,0.5) 22px, var(--blush-l) 22px, var(--blush-l) 36px, rgba(239,226,218,0.5) 36px, rgba(239,226,218,0.5) 40px); }

/* Polaroid frame + photo slot */
.frame { background: var(--white); padding: 10px 10px 32px; box-shadow: 2px 6px 24px rgba(44,37,32,0.14), 0 1px 4px rgba(44,37,32,0.08); position: relative; display: inline-block; width: 100%; }
.frame-caption { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-family: 'Caveat', cursive; font-size: 15px; color: var(--mid); }
.photo-slot { background: var(--gold-l); width: 100%; aspect-ratio: 4/3; position: relative; overflow: hidden; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; image-orientation: from-image; display: block; }

/* Card */
.card { background: var(--white); border-radius: 8px; padding: 20px; box-shadow: 2px 4px 16px rgba(44,37,32,0.08); }

/* Details grid — mobile first */
.details-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .details-grid { grid-template-columns: repeat(2, 1fr); } }

/* Story grid — mobile first */
.story-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 700px) { .story-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Gallery grid — mobile first */
.gallery-grid { columns: 1; column-gap: 16px; }
.gallery-item { break-inside: avoid; margin-bottom: 16px; }
.gallery-frame { background: var(--white); padding: 8px 8px 28px; box-shadow: 2px 6px 20px rgba(44,37,32,0.12); position: relative; }
.gallery-frame img { width: 100%; display: block; image-orientation: from-image; aspect-ratio: 3/4; object-fit: cover; }
.gallery-caption { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-family: 'Caveat', cursive; font-size: 13px; color: var(--mid); }
@media (min-width: 480px) { .gallery-grid { columns: 2; column-gap: 16px; } }
@media (min-width: 900px) { .gallery-grid { columns: 3; column-gap: 20px; } .gallery-item { margin-bottom: 20px; } }

/* QR box */
.qr-box { border: 3px dashed rgba(44,37,32,0.18); border-radius: 16px; padding: 32px 24px; display: inline-flex; flex-direction: column; align-items: center; gap: 12px; background: var(--white); box-shadow: 2px 4px 16px rgba(44,37,32,0.06); text-align: center; }
.qr-box-light { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.12); }

/* Badge link */
.badge-link { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; background: rgba(255,255,255,0.1); border-radius: 20px; font-size: 11px; color: rgba(255,255,255,0.4); text-decoration: none; transition: background 200ms; }
.badge-link:hover { background: rgba(255,255,255,0.18); }

/* Hero */
.hero { position: relative; min-height: 100svh; overflow: hidden; display: flex; align-items: flex-end; padding-top: 56px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; image-orientation: from-image; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.62) 75%, rgba(0,0,0,0.72) 100%); }
.floral-corner { position: absolute; width: clamp(70px,12vw,140px); height: clamp(70px,12vw,140px); color: var(--gold-l); pointer-events: none; z-index: 2; opacity: 0.55; }
.floral-corner--tl { top: 64px; left: 0; }
.floral-corner--tr { top: 64px; right: 0; transform: scaleX(-1); }
.floral-corner--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.floral-corner--br { bottom: 0; right: 0; transform: scale(-1,-1); }
.hero-content { position: relative; z-index: 3; width: 100%; padding: 48px 24px 64px; text-align: center; }

/* Section utility classes */
.section-pad { padding: clamp(56px,10vw,100px) clamp(20px,5vw,80px); }
.section-inner { max-width: 1000px; margin: 0 auto; }
.section-inner--narrow { max-width: 680px; margin: 0 auto; }
.section-inner--mid { max-width: 900px; margin: 0 auto; }
.section-title { font-family: 'Caveat', cursive; font-size: clamp(2rem,6vw,3.5rem); font-weight: 700; text-align: center; margin-bottom: 32px; }

/* Page header */
.page-header { padding: clamp(48px,8vw,80px) clamp(20px,5vw,80px) clamp(40px,6vw,64px); text-align: center; padding-top: calc(56px + clamp(40px,6vw,64px)); }

/* Btn */
.btn { display: inline-block; background: var(--gold); color: white; text-decoration: none; padding: 16px 44px; border-radius: 40px; font-family: 'Caveat', cursive; font-size: 24px; font-weight: 700; box-shadow: 0 4px 24px rgba(200,163,90,0.4); transition: background 150ms, transform 150ms; }
.btn:hover { background: var(--gold-dk); transform: translateY(-1px); }

/* Animations */
@keyframes pop { from { opacity: 0; transform: scale(0.9) translateY(16px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.pop-1 { animation: pop 0.6s cubic-bezier(0.34,1.56,0.64,1) 100ms both; }
.pop-2 { animation: pop 0.6s cubic-bezier(0.34,1.56,0.64,1) 220ms both; }
.pop-3 { animation: pop 0.6s cubic-bezier(0.34,1.56,0.64,1) 340ms both; }
.pop-4 { animation: pop 0.6s cubic-bezier(0.34,1.56,0.64,1) 460ms both; }
@media (prefers-reduced-motion: reduce) { .pop-1,.pop-2,.pop-3,.pop-4 { animation: none !important; } #pw-input.shake { animation: none !important; } }
