/* ==========================================================================
   V3 Scrapbook · Mỹ Phụng & Thiên Ân · Wedding Invitation
   Paper / polaroid / washi-tape / postal-stamp aesthetic
   ========================================================================== */

:root {
    --paper:        #FBF8EF;
    --paper-2:      #F5F0E6;
    --paper-3:      #EFE7D6;
    --ink:          #1A1410;
    --ink-2:        #2A1F18;
    --ink-3:        #4A3A2A;
    --muted:        #6B5640;
    --muted-2:      #8A7458;
    --red:          #B8453A;
    --red-2:        #A03A30;
    --teal:         #5A8B89;
    --teal-2:       #487371;
    --polaroid:     #FFFFFF;
    --shadow-sm:    0 2px 6px rgba(26, 20, 16, 0.08);
    --shadow-md:    0 8px 20px rgba(26, 20, 16, 0.14);
    --shadow-lg:    0 18px 36px rgba(26, 20, 16, 0.18);

    --f-display:    'Italiana', 'Cormorant Garamond', Georgia, serif;
    --f-serif:      'Cormorant Garamond', Georgia, serif;
    --f-body:       'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
    --f-script:     'Caveat', cursive;
    --f-mono:       'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--f-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

/* ==========================================================================
   Custom cursor (desktop only — hidden on touch via @media hover:none)
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
    html, body { cursor: none; }
    a, button, label,
    .polaroid, .v3-wish-polaroid, .stamp, .nav-dot, .v3-map-btn,
    .v3-submit, .v3-wish-add, .audio-toggle-btn { cursor: none; }

    /* Keep the native I-beam caret on form fields so users can see where they type */
    input, textarea, [contenteditable] { cursor: text !important; caret-color: var(--ink); }
    select { cursor: pointer !important; }
}
.cursor-dot, .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate3d(-50%, -50%, 0);
    opacity: 0;
    transition: opacity 0.35s ease, width 0.25s ease, height 0.25s ease,
                background-color 0.25s ease, border-color 0.25s ease, mix-blend-mode 0s;
    will-change: transform, width, height;
}
.cursor-dot {
    width: 7px;
    height: 7px;
    background: var(--ink);
    border-radius: 50%;
    mix-blend-mode: multiply;
}
.cursor-ring {
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--ink-3);
    border-radius: 50%;
    background: transparent;
}
/* visible after first mousemove */
.cursor-active .cursor-dot,
.cursor-active .cursor-ring { opacity: 0.85; }

/* Hover variants */
.cursor-link .cursor-ring {
    width: 52px;
    height: 52px;
    border-color: var(--red);
    background: rgba(184, 69, 58, 0.06);
}
.cursor-link .cursor-dot { opacity: 0; }

.cursor-card .cursor-ring {
    width: 64px;
    height: 64px;
    border-color: var(--teal);
    background: rgba(90, 139, 137, 0.07);
}
.cursor-card .cursor-dot { width: 4px; height: 4px; }

/* Over text fields, hide the custom cursor entirely so only the native I-beam shows */
.cursor-text .cursor-dot,
.cursor-text .cursor-ring { opacity: 0 !important; }

/* Click ripple */
.cursor-click .cursor-ring { transform: translate3d(-50%, -50%, 0) scale(0.6); transition: transform 0.15s ease; }
@media (hover: none), (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}

img {
    max-width: 100%;
    display: block;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 400; letter-spacing: 0.02em; color: var(--ink); }

p { margin: 0; }

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

/* ==========================================================================
   Grain overlay (subtle paper noise)
   ========================================================================== */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.12 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ==========================================================================
   Audio player + side nav
   ========================================================================== */
.fixed-audio-player {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-waves {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 22px;
    opacity: 0;
    transition: opacity 0.4s;
}
.fixed-audio-player.playing .audio-waves { opacity: 1; }
.audio-waves .stroke {
    width: 3px;
    height: 4px;
    background: var(--red);
    border-radius: 2px;
    animation: wave 1.1s ease-in-out infinite alternate;
}
.audio-waves .stroke:nth-child(2) { animation-delay: 0.12s; background: var(--teal); }
.audio-waves .stroke:nth-child(3) { animation-delay: 0.24s; }
.audio-waves .stroke:nth-child(4) { animation-delay: 0.36s; background: var(--teal); }
.audio-waves .stroke:nth-child(5) { animation-delay: 0.48s; }
.fixed-audio-player:not(.playing) .audio-waves .stroke { animation-play-state: paused; }
@keyframes wave {
    from { height: 4px; }
    to   { height: 22px; }
}

.audio-toggle-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--paper);
    border: 1.5px dashed var(--ink);
    color: var(--ink);
    font-size: 18px;
    font-family: var(--f-mono);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, background 0.25s ease;
}
.audio-toggle-btn:hover { transform: rotate(-6deg) scale(1.05); background: var(--paper-2); }
.fixed-audio-player.playing .audio-toggle-btn { background: var(--red); color: var(--paper); border-color: var(--red-2); }
.fixed-audio-player.playing .audio-icon {
    display: inline-block;
    animation: discSpin 4s linear infinite;
}
@keyframes discSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.side-navigation {
    position: fixed;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.nav-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--muted);
    transition: all 0.3s ease;
    opacity: 0.6;
}
.nav-dot:hover { opacity: 1; }
.nav-dot.active {
    background: var(--red);
    border-color: var(--red);
    opacity: 1;
    transform: scale(1.35);
    box-shadow: 0 0 0 4px rgba(184, 69, 58, 0.12);
}

/* ==========================================================================
   Polaroid component
   ========================================================================== */
.polaroid {
    --rot: 0deg;
    --lift: 0px;
    --scale: 1;
    --swing: 0deg;       /* scroll-driven extra rotation */
    --parallax-y: 0px;   /* scroll-driven extra translateY */
    --reveal-x: 0px;
    --reveal-y: 0px;
    --reveal-r: 0deg;
    --reveal-s: 1;
    --idle-r: 0deg;      /* continuous keyframe sway */
    --idle-y: 0px;
    background: var(--polaroid);
    padding: 12px 12px 36px;
    box-shadow: var(--shadow-lg);
    position: relative;
    margin: 0;
    transform-origin: 50% 0;
    transform:
        translate(var(--reveal-x), calc(var(--lift) + var(--parallax-y) + var(--reveal-y) + var(--idle-y)))
        rotate(calc(var(--rot) + var(--swing) + var(--reveal-r) + var(--idle-r)))
        scale(calc(var(--scale) * var(--reveal-s)));
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, z-index 0s linear 0.4s;
    will-change: transform;
}
.polaroid::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 30px rgba(26, 20, 16, 0.04);
}
.polaroid:hover {
    --rot: 0deg;
    --lift: -8px;
    --scale: 1.04;
    box-shadow: 0 28px 56px rgba(26, 20, 16, 0.26);
    z-index: 10;
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, z-index 0s;
}
.polaroid .photo-slot {
    aspect-ratio: 4 / 5;
    background:
        repeating-linear-gradient(45deg, var(--paper-3) 0 8px, transparent 8px 16px),
        var(--paper-2);
    border: 1.5px dashed var(--muted-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.polaroid .photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
    filter: saturate(0.92) contrast(1.02);
}
.polaroid figcaption,
.polaroid .cap {
    margin-top: 12px;
    text-align: center;
    font-family: var(--f-script);
    font-size: 22px;
    color: var(--ink-3);
    line-height: 1;
}
.polaroid .role {
    position: absolute;
    top: -10px;
    left: 12px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    padding: 3px 10px;
    text-transform: uppercase;
    transform: rotate(-2deg);
    z-index: 3;
}

/* ==========================================================================
   Washi tape component
   ========================================================================== */
.tape {
    position: absolute;
    width: 96px;
    height: 26px;
    top: -14px;
    left: 50%;
    transform: translateX(-50%) rotate(-6deg);
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0.92;
    border-radius: 1px;
}
.tape.teal {
    background: var(--teal);
}
.tape.teal.stripe {
    background:
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.35) 0 5px,
            transparent 5px 11px
        ),
        var(--teal);
}
.tape.red {
    background: var(--red);
}
.tape.red.dot,
.tape.dot {
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.55) 1.5px, transparent 2.2px) 0 0 / 9px 9px,
        var(--red);
}
.tape.dot:not(.red) {
    background:
        radial-gradient(circle, rgba(26, 20, 16, 0.4) 1.5px, transparent 2.2px) 0 0 / 9px 9px,
        var(--paper-3);
}

/* ==========================================================================
   Postal stamp component
   ========================================================================== */
.stamp {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: var(--f-mono);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--red);
    border: 2px dashed var(--red);
    padding: 12px 16px;
    background: rgba(184, 69, 58, 0.04);
    letter-spacing: 0.18em;
    transform: rotate(-7deg);
    box-shadow: 0 1px 0 rgba(184, 69, 58, 0.2);
}
.stamp span { display: block; }
.stamp-lg {
    font-size: 14px;
    padding: 16px 22px;
}
.stamp-lg span:nth-child(1) { font-size: 22px; font-family: var(--f-display); letter-spacing: 0.04em; }
.stamp-md { font-size: 12px; padding: 10px 14px; }
.stamp-md span:nth-child(1) { font-size: 16px; font-family: var(--f-display); letter-spacing: 0.04em; }

/* ==========================================================================
   Stamp hover wiggle + slow idle drift on the save-the-date
   ========================================================================== */
.stamp {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stamp:hover { transform: rotate(-2deg) scale(1.06); }

.v3-hero-collage .ticket .stamp {
    animation: stampSway 6s ease-in-out infinite;
    transform-origin: 50% 0%;
}
@keyframes stampSway {
    0%, 100% { transform: rotate(-7deg); }
    50%      { transform: rotate(-4deg); }
}

/* Tape: gentle fade in (transform left alone so each variant keeps its rotation) */
.tape {
    animation: tapeFade 0.6s ease-out 0.2s both;
}
@keyframes tapeFade {
    from { opacity: 0; }
    to   { opacity: 0.92; }
}

/* Continuous idle hanging sway — runs on every polaroid so it always feels
   like it's pinned to the page by tape, never frozen. The JS swing handler
   layers scroll-driven motion ON TOP via the --swing variable. */
@keyframes idleHangA {
    0%, 100% { --idle-r: -0.6deg; --idle-y:  0px; }
    50%      { --idle-r:  0.6deg; --idle-y: -1px; }
}
@keyframes idleHangB {
    0%, 100% { --idle-r:  0.5deg; --idle-y: -1px; }
    50%      { --idle-r: -0.7deg; --idle-y:  1px; }
}
@property --idle-r { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --idle-y { syntax: '<length>'; inherits: false; initial-value: 0px; }

.polaroid,
.v3-wish-polaroid {
    --idle-r: 0deg;
    --idle-y: 0px;
}
/* Apply idle animation, alternate the keyframes so neighbouring polaroids
   sway in opposite phases for a natural look */
.polaroid                                       { animation: idleHangA 6.2s ease-in-out infinite; }
.polaroid:nth-of-type(2n)                       { animation: idleHangB 5.8s ease-in-out infinite; animation-delay: -1.4s; }
.polaroid:nth-of-type(3n)                       { animation-delay: -2.6s; }
.v3-couple .couple-card:nth-of-type(1)          { animation: idleHangA 6.5s ease-in-out infinite; animation-delay: -0.4s; }
.v3-couple .couple-card:nth-of-type(2)          { animation: idleHangB 6.1s ease-in-out infinite; animation-delay: -2.1s; }
.v3-wish-polaroid                               { animation: idleHangA 7.4s ease-in-out infinite; }
.v3-wish-polaroid:nth-of-type(2n)               { animation: idleHangB 6.8s ease-in-out infinite; animation-delay: -2.0s; }
.v3-wish-polaroid:nth-of-type(3n)               { animation-delay: -3.5s; }

/* Hover pauses idle sway so the hover transform is clean */
.polaroid:hover,
.v3-wish-polaroid:hover { animation-play-state: paused; }

/* ============================================================
   Mouse-tilt: JS sets --mx (-1..1) and --my (-1..1) on hovered
   polaroids. Composes with existing transform via --reveal-r
   would conflict; we use --tilt-x / --tilt-y rotations instead.
   ============================================================ */
@property --tilt-x { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --tilt-y { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.polaroid, .v3-wish-polaroid { --tilt-x: 0deg; --tilt-y: 0deg; }
.polaroid:hover, .v3-wish-polaroid:hover {
    transform:
        perspective(800px)
        translate(var(--reveal-x), calc(var(--lift) + var(--parallax-y) + var(--reveal-y)))
        rotateX(var(--tilt-x))
        rotateY(var(--tilt-y))
        rotate(calc(var(--rot) + var(--swing) + var(--reveal-r)))
        scale(calc(var(--scale) * var(--reveal-s)));
    transition: transform 0.15s ease-out, box-shadow 0.4s ease, z-index 0s;
}

/* ============================================================
   Heart-burst particles spawned on page click.
   ============================================================ */
.heart-burst-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    overflow: hidden;
}
.heart-particle {
    position: absolute;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
    opacity: 1;
    animation: heartFly 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    pointer-events: none;
}
@keyframes heartFly {
    0%   { transform: translate(-50%, -50%) scale(0.6) rotate(0deg); opacity: 0; }
    18%  { transform: translate(-50%, -50%) scale(1.15) rotate(calc(var(--hr) * 0.3)); opacity: 1; }
    100% {
        transform: translate(calc(-50% + var(--hx)), calc(-50% + var(--hy))) scale(0.7) rotate(var(--hr));
        opacity: 0;
    }
}

/* ==========================================================================
   Reveal animation (hooked by IntersectionObserver in main.js)
   ========================================================================== */
/* All reveal variants share a CSS-var driven transform, so polaroids
   (which already compose --rot/--swing/etc.) can layer reveal motion on top. */
.reveal-up, .reveal-left, .reveal-right, .reveal-scale, .reveal-drop, .reveal-tape, .reveal-stamp {
    opacity: 0;
    --reveal-x: 0px;
    --reveal-y: 0px;
    --reveal-r: 0deg;
    --reveal-s: 1;
    transition: opacity 0.9s ease,
                --reveal-x 0.95s cubic-bezier(0.22, 0.61, 0.36, 1),
                --reveal-y 0.95s cubic-bezier(0.22, 0.61, 0.36, 1),
                --reveal-r 0.95s cubic-bezier(0.22, 0.61, 0.36, 1),
                --reveal-s 0.95s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.95s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Variant initial states */
.reveal-up    { --reveal-y: 28px; }
.reveal-left  { --reveal-x: -40px; --reveal-r: -2deg; }
.reveal-right { --reveal-x:  40px; --reveal-r:  2deg; }
.reveal-scale { --reveal-s: 0.86; }
.reveal-drop  { --reveal-y: -46px; --reveal-r: -10deg; }
.reveal-tape  { --reveal-s: 0.2; --reveal-r: -12deg; transform-origin: 0 50%; }
.reveal-stamp { --reveal-s: 1.6; --reveal-r: -12deg; }

/* Active state: animate to neutral */
.reveal-up.active, .reveal-left.active, .reveal-right.active,
.reveal-scale.active, .reveal-drop.active, .reveal-tape.active {
    opacity: 1;
    --reveal-x: 0px;
    --reveal-y: 0px;
    --reveal-r: 0deg;
    --reveal-s: 1;
}
.reveal-stamp.active { opacity: 1; --reveal-r: -6deg; --reveal-s: 1; }

/* For non-polaroid elements, apply --reveal-* directly as transform */
[class*="reveal-"]:not(.polaroid):not(.v3-wish-polaroid) {
    transform: translate(var(--reveal-x), var(--reveal-y)) rotate(var(--reveal-r)) scale(var(--reveal-s));
}

/* Register reveal custom properties for smooth transitions (browsers that support it) */
@property --reveal-x { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --reveal-y { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --reveal-r { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --reveal-s { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --swing    { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --parallax-y { syntax: '<length>'; inherits: false; initial-value: 0px; }

/* Stagger helper: data-stagger-index gives each child a delay */
[data-stagger-index="0"] { transition-delay: 0ms; }
[data-stagger-index="1"] { transition-delay: 120ms; }
[data-stagger-index="2"] { transition-delay: 240ms; }
[data-stagger-index="3"] { transition-delay: 360ms; }
[data-stagger-index="4"] { transition-delay: 480ms; }
[data-stagger-index="5"] { transition-delay: 600ms; }

/* Hero polaroid stagger: each photo drops in with a tilt, then idle-sways forever.
   Composes via --reveal-y / --reveal-r so the polaroid transform stays consistent
   with swing + idle animations. */
.v3-hero-collage .polaroid {
    opacity: 0;
    animation:
        polaroidEnter 1s cubic-bezier(0.34, 1.56, 0.64, 1) both,
        idleHangA 6.2s ease-in-out infinite;
}
.v3-hero-collage .polaroid.p1 { animation-delay: 0.35s, 1.4s; }
.v3-hero-collage .polaroid.p2 {
    animation-name: polaroidEnter, idleHangB;
    animation-duration: 1s, 5.8s;
    animation-delay: 0.55s, 1.7s;
}
.v3-hero-collage .polaroid.p3 { animation-delay: 0.75s, 1.2s; }
.v3-hero-collage .ticket     {
    opacity: 0;
    animation: ticketDrop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.05s both;
}

@keyframes polaroidEnter {
    0%   { opacity: 0; --reveal-y: -38px; --reveal-r: -10deg; --reveal-s: 0.92; }
    60%  { opacity: 1; }
    100% { opacity: 1; --reveal-y: 0px;   --reveal-r: 0deg;   --reveal-s: 1; }
}
/* Back-compat alias used elsewhere */
@keyframes polaroidFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ticketDrop {
    0%   { opacity: 0; transform: translateY(-20px) scale(0.7); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.v3-hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 48px 5vw 80px;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.v3-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(74, 58, 42, 0.18);
    margin-bottom: 56px;
}
.v3-hero-header .vol b { color: var(--ink); font-weight: 600; }

.v3-hero-collage {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin: 0 auto;
    width: 100%;
    max-width: 760px;
}
.v3-hero-collage .polaroid {
    width: 100%;
    max-width: 230px;
    justify-self: center;
}
.v3-hero-collage .polaroid.p1 { --rot: -5deg; margin-top: 14px; }
.v3-hero-collage .polaroid.p2 { --rot: 2deg; margin-top: -10px; z-index: 2; }
.v3-hero-collage .polaroid.p3 { --rot: 6deg; margin-top: 18px; }
.v3-hero-collage .ticket {
    position: absolute;
    right: -8px;
    bottom: -28px;
    z-index: 4;
}

.v3-hero-title {
    text-align: center;
    margin: 80px auto 56px;
}
.v3-hero-title .label-top {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 18px;
}
.v3-hero-title .name {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(48px, 9vw, 96px);
    line-height: 1;
    color: var(--ink);
    letter-spacing: 0.01em;
}
.v3-hero-title .amp {
    font-family: var(--f-script);
    font-size: clamp(28px, 4vw, 40px);
    color: var(--red);
    margin: 8px 0;
    line-height: 1;
}

.v3-hero-date-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    margin: 0 auto 56px;
}
.v3-hero-date-block .dblk { text-align: center; }
.v3-hero-date-block .lbl-sm {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.v3-hero-date-block .big {
    font-family: var(--f-display);
    font-size: clamp(36px, 6vw, 56px);
    line-height: 1;
    color: var(--ink);
}
.v3-hero-date-block .sep {
    width: 1px;
    height: 48px;
    background: var(--muted);
    opacity: 0.4;
}

.v3-hero-foot {
    margin-top: auto;
    text-align: center;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.scroll-arrow {
    display: inline-block;
    animation: bounceDown 1.6s ease-in-out infinite;
    font-family: var(--f-body);
}
@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* ==========================================================================
   COUNTDOWN
   ========================================================================== */
.v3-countdown {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto 80px;
    padding: 36px 32px 32px;
    background: var(--polaroid);
    box-shadow: var(--shadow-lg);
}
.v3-countdown.reveal-up {
    transform: translateY(28px) rotate(-0.5deg);
}
.v3-countdown.reveal-up.active {
    transform: translateY(0) rotate(-0.5deg);
}
.v3-cd-tape {
    top: -16px;
    left: 50%;
    transform: translateX(-50%) rotate(-4deg);
    width: 130px;
}
.v3-cd-heading {
    text-align: center;
    font-family: var(--f-mono);
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 22px;
}
.v3-cd-heading b { color: var(--red); font-weight: 600; }
.v3-cd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.v3-cd-cell {
    text-align: center;
    padding: 12px 4px;
    border: 1px solid rgba(74, 58, 42, 0.16);
    background: var(--paper-2);
}
.v3-cd-num {
    font-family: var(--f-mono);
    font-weight: 600;
    font-size: clamp(28px, 5vw, 38px);
    color: var(--ink);
    line-height: 1;
}
.v3-cd-label {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 6px;
}

/* ==========================================================================
   Generic section (couple, etc.)
   ========================================================================== */
.v3-section {
    position: relative;
    z-index: 2;
    max-width: 880px;
    margin: 0 auto 96px;
    padding: 0 5vw;
}
.v3-section-tag {
    text-align: center;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 14px;
}
.v3-section-title {
    text-align: center;
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(34px, 6vw, 56px);
    line-height: 1.08;
    color: var(--ink);
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
    width: 100%;
}
.v3-section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -12px;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: width 0.65s cubic-bezier(0.22, 0.61, 0.36, 1), left 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.v3-section-title:hover::after { width: 64px; left: calc(50% - 32px); }
.v3-quote {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 56px;
    font-family: var(--f-serif);
    font-style: italic;
    font-size: clamp(17px, 2.2vw, 21px);
    line-height: 1.5;
    color: var(--ink-3);
}

/* ==========================================================================
   COUPLE
   ========================================================================== */
.v3-couple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    max-width: 640px;
    margin: 0 auto 48px;
}
.v3-couple .couple-card {
    width: 100%;
    max-width: 260px;
    justify-self: center;
}
.v3-couple .couple-card:nth-child(1) { --rot: -3deg; }
.v3-couple .couple-card:nth-child(2) { --rot: 3deg; }

.v3-couple-desc {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 720px;
    margin: 0 auto;
}
.v3-couple-desc h4 {
    font-family: var(--f-display);
    font-size: 26px;
    color: var(--ink);
    margin-bottom: 10px;
    text-align: center;
}
.v3-couple-desc p {
    text-align: center;
    color: var(--ink-3);
    font-size: 15px;
    line-height: 1.6;
}

/* ==========================================================================
   EVENT (postcard)
   ========================================================================== */
.v3-event {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto 96px;
    padding: 56px 40px 48px;
    background: var(--polaroid);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.v3-event::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px dashed rgba(74, 58, 42, 0.2);
    pointer-events: none;
}
.v3-event .tape.tl {
    top: -14px; left: 28px;
    transform: rotate(-12deg);
    width: 110px;
}
.v3-event .tape.tr {
    top: -14px; right: 28px; left: auto;
    transform: rotate(8deg);
    width: 110px;
}
.event-stamp {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 3;
}

.v3-event-head { margin-bottom: 28px; }
.v3-event-head .post {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
.v3-event-head .where {
    font-family: var(--f-display);
    font-size: clamp(28px, 4vw, 38px);
    color: var(--ink);
}

.v3-event-date {
    padding: 18px 0 22px;
    border-top: 1px solid rgba(74, 58, 42, 0.18);
    border-bottom: 1px solid rgba(74, 58, 42, 0.18);
    margin-bottom: 28px;
}
.v3-event-date .day {
    font-family: var(--f-script);
    font-size: 26px;
    color: var(--red);
    line-height: 1;
}
.v3-event-date .big {
    font-family: var(--f-display);
    font-size: clamp(60px, 11vw, 96px);
    line-height: 1;
    color: var(--ink);
    margin: 4px 0 6px;
}
.v3-event-date .big sup {
    font-size: 0.4em;
    vertical-align: middle;
    color: var(--red);
}
.v3-event-date .lunar {
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 14px;
    color: var(--muted);
    margin-top: 8px;
}

.v3-event-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}
.v3-event-times .col { padding: 8px 0; }
.v3-event-times .lbl {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.v3-event-times .tm {
    font-family: var(--f-display);
    font-size: 36px;
    color: var(--ink);
    line-height: 1;
}

.v3-event-venue { padding-top: 4px; }
.v3-event-venue .lbl {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.v3-event-venue .vn {
    font-family: var(--f-display);
    font-size: 26px;
    color: var(--ink);
    margin-bottom: 6px;
}
.v3-event-venue .ad {
    font-size: 14px;
    color: var(--ink-3);
    margin-bottom: 18px;
}
.v3-map-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    transition: background 0.25s ease, transform 0.25s ease;
}
.v3-map-btn:hover { background: var(--red); transform: translateY(-2px); }

/* ==========================================================================
   RSVP
   ========================================================================== */
.v3-rsvp {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto 96px;
    padding: 0 5vw;
}
.v3-rsvp-desc {
    text-align: center;
    max-width: 540px;
    margin: 0 auto 36px;
    color: var(--ink-3);
    font-size: 15px;
    line-height: 1.6;
}
.v3-rsvp-desc b { color: var(--red); }

.v3-form {
    background: var(--polaroid);
    padding: 32px 28px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 18px;
    transform: rotate(-0.3deg);
}
.v3-field { display: flex; flex-direction: column; gap: 6px; }
.v3-field label {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}
.v3-field input,
.v3-field select,
.v3-field textarea {
    font-family: var(--f-body);
    font-size: 15px;
    color: var(--ink);
    background: var(--paper-2);
    border: none;
    border-bottom: 1.5px solid var(--muted-2);
    padding: 10px 4px;
    outline: none;
    transition: border-color 0.25s ease, background 0.25s ease;
    width: 100%;
    border-radius: 0;
}
.v3-field textarea { resize: vertical; min-height: 60px; }
.v3-field input:focus,
.v3-field select:focus,
.v3-field textarea:focus {
    border-bottom-color: var(--red);
    background: var(--paper);
}
.v3-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.v3-submit {
    align-self: stretch;
    margin-top: 8px;
    padding: 14px 24px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}
.v3-submit:hover { background: var(--red); transform: translateY(-2px); }
.v3-submit:active { transform: translateY(0); }

.v3-hotline-card {
    margin: 24px auto 0;
    max-width: 380px;
    background: var(--paper-2);
    border: 1.5px dashed var(--muted-2);
    padding: 14px 22px;
    text-align: center;
    transform: rotate(0.6deg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.v3-hotline-card .lbl {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}
.v3-hotline-card .num {
    font-family: var(--f-mono);
    font-weight: 600;
    color: var(--red);
    font-size: 17px;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   WISHES
   ========================================================================== */
.v3-wishes {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto 96px;
    padding: 0 5vw;
    text-align: center;
}
.v3-wishes-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin: 48px 0 32px;
    align-items: start;
}
.v3-wish-polaroid {
    --rot: 0deg;
    --lift: 0px;
    --scale: 1;
    --swing: 0deg;
    --parallax-y: 0px;
    --reveal-x: 0px;
    --reveal-y: 0px;
    --reveal-r: 0deg;
    --reveal-s: 1;
    --idle-r: 0deg;
    --idle-y: 0px;
    background: var(--polaroid);
    padding: 22px 22px 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    text-align: left;
    transform-origin: 50% 0;
    transform:
        translate(var(--reveal-x), calc(var(--lift) + var(--parallax-y) + var(--reveal-y) + var(--idle-y)))
        rotate(calc(var(--rot) + var(--swing) + var(--reveal-r) + var(--idle-r)))
        scale(calc(var(--scale) * var(--reveal-s)));
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    will-change: transform;
}
.v3-wish-polaroid:hover {
    --lift: -6px;
    --scale: 1.025;
    box-shadow: 0 24px 48px rgba(26, 20, 16, 0.24);
    z-index: 5;
}
.v3-wish-polaroid .tape {
    top: -14px;
    left: 24px;
    transform: rotate(-8deg);
    width: 90px;
}
.v3-wish-polaroid .wbody {
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-2);
    margin-bottom: 18px;
}
.v3-wish-polaroid .wsig {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(74, 58, 42, 0.25);
}
.v3-wish-polaroid .who {
    font-family: var(--f-script);
    font-size: 20px;
    color: var(--red);
    line-height: 1;
}
.v3-wish-polaroid .when {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.v3-wish-add {
    margin: 8px auto 0;
    padding: 12px 28px;
    background: transparent;
    border: 1.5px dashed var(--ink);
    color: var(--ink);
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.v3-wish-add:hover {
    background: var(--ink);
    color: var(--paper);
    transform: translateY(-2px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.v3-footer {
    position: relative;
    z-index: 2;
    background: var(--paper-2);
    padding: 64px 5vw 48px;
    text-align: center;
    border-top: 1px dashed rgba(74, 58, 42, 0.3);
}
.v3-footer-stamp {
    width: 88px;
    height: 88px;
    margin: 0 auto 28px;
    border-radius: 50%;
    border: 2px dashed var(--red);
    color: var(--red);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transform: rotate(-8deg);
    font-family: var(--f-mono);
}
.v3-footer-stamp .ig {
    font-family: var(--f-display);
    font-size: 28px;
    line-height: 1;
}
.v3-footer-stamp .yr {
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.v3-footer .pc-left { margin-bottom: 28px; }
.v3-footer .pc-left .lbl {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}
.v3-footer .pc-left .sig {
    font-family: var(--f-display);
    font-size: clamp(28px, 4vw, 38px);
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 14px;
}
.v3-footer .thanks {
    max-width: 480px;
    margin: 0 auto;
    color: var(--ink-3);
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 16px;
    line-height: 1.5;
}
.v3-footer .copy {
    margin-top: 36px;
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 20, 16, 0.6);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.custom-modal-overlay.open {
    display: flex;
    opacity: 1;
}
.paper-card {
    position: relative;
    background: var(--paper);
    padding: 48px 36px 36px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transform: rotate(-0.4deg);
}
.paper-card.max-w-md { max-width: 520px; text-align: left; }
.paper-card::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px dashed rgba(74, 58, 42, 0.22);
    pointer-events: none;
}
.modal-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    z-index: 3;
}
.modal-close-btn:hover { color: var(--red); }
.center-stamp { margin: 0 auto 18px; }
.modal-title {
    font-family: var(--f-display);
    font-size: clamp(28px, 4vw, 36px);
    color: var(--ink);
    margin-bottom: 14px;
}
.modal-message-body {
    color: var(--ink-3);
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 18px;
}
.modal-signature {
    font-family: var(--f-script);
    font-size: 22px;
    color: var(--red);
    margin-bottom: 20px;
}
.modal-ok { width: 100%; }
.paper-card.max-w-md .modal-title { text-align: center; margin-bottom: 24px; }
.wish-submission-form { transform: none; box-shadow: none; padding: 0; }

/* ==========================================================================
   Petals canvas overlay
   ========================================================================== */
.canvas-petals-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 760px) {
    .side-navigation { left: 10px; gap: 12px; }
    .nav-dot { width: 7px; height: 7px; }
    .fixed-audio-player { right: 14px; bottom: 14px; }

    .v3-hero { padding: 32px 5vw 56px; }
    .v3-hero-header { margin-bottom: 36px; }

    .v3-hero-collage {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        max-width: 420px;
    }
    .v3-hero-collage .polaroid.p1 { --rot: -3deg; margin-top: 0; }
    .v3-hero-collage .polaroid.p2 { --rot: 2deg; margin-top: 14px; }
    .v3-hero-collage .polaroid.p3 {
        grid-column: 1 / -1;
        --rot: -2deg;
        margin: 4px auto 0;
        max-width: 220px;
    }
    .v3-hero-collage .ticket {
        position: static;
        margin: 20px auto 0;
        text-align: center;
        grid-column: 1 / -1;
    }
    .v3-hero-collage .ticket .stamp { display: inline-flex; }

    .v3-hero-title { margin: 56px auto 40px; }
    .v3-hero-date-block { gap: 24px; margin-bottom: 36px; }
    .v3-hero-date-block .sep { height: 36px; }

    .v3-countdown { padding: 30px 22px 26px; margin-bottom: 56px; }
    .v3-cd-grid { gap: 8px; }
    .v3-cd-cell { padding: 10px 2px; }

    .v3-section { margin-bottom: 64px; }

    .v3-couple {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 320px;
    }
    .v3-couple .couple-card { max-width: 280px; }
    .v3-couple-desc {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .v3-event { padding: 48px 24px 36px; margin-bottom: 64px; }
    .event-stamp { top: 20px; right: 18px; }
    .v3-event-times { gap: 16px; }
    .v3-event-times .tm { font-size: 28px; }

    .v3-rsvp { margin-bottom: 64px; }
    .v3-form { padding: 26px 20px; }
    .v3-row { grid-template-columns: 1fr; gap: 18px; }
    .v3-hotline-card { flex-direction: column; gap: 6px; padding: 14px 18px; }

    .v3-wishes { margin-bottom: 64px; }
    .v3-wishes-board { gap: 24px; margin: 36px 0 24px; }
    .v3-wish-polaroid { padding: 20px 18px 18px; }

    .v3-footer { padding: 48px 6vw 36px; }
    .v3-footer-stamp { width: 76px; height: 76px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal-up, .reveal-left, .reveal-right, .reveal-scale, .reveal-drop, .reveal-tape, .reveal-stamp {
        opacity: 1; transform: none;
    }
    .polaroid, .v3-wish-polaroid { --swing: 0deg !important; --parallax-y: 0px !important; }
    .canvas-petals-overlay { display: none; }
}
