/* ===== VARIABLES ===== */
:root {
    --blush: #FEF0F3;
    --lavender: #F0EBFF;
    --mint: #E8FAF5;
    --cream: #FFFBF7;
    --white: #FFFFFF;
    --rose: #E87399;
    --lilac: #9B7EC8;
    --sage: #5BAF94;
    --peach: #F5A880;
    --text: #3A2E40;
    --text-mid: #7A6E82;
    --text-light: #AFA7BA;
    --border: #EAE2F0;
    --shadow: rgba(155, 126, 200, 0.15);
    --shadow-rose: rgba(232, 115, 153, 0.22);
    --r: 20px;
    --r-lg: 32px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Nunito', sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }


/* ===== CONFETTI CANVAS ===== */
#confettiCanvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    display: none;
}
#confettiCanvas.active { display: block; }

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 18px 48px;
    transition: background 0.35s, box-shadow 0.35s;
}
.site-header.scrolled {
    background: rgba(255, 251, 247, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 2px 24px var(--shadow);
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-left: 40px;
}
.header-logo {
    font-family: 'Dancing Script', cursive;
    font-size: 30px;
    font-weight: 700;
    color: var(--rose);
}
.header-logo span { color: var(--lilac); padding-left: 6px;}

.header-nav { display: flex; gap: 28px; }
.header-nav a {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-mid);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
    position: relative;
}
.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0; right: 0;
    height: 2px;
    background: var(--rose);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.2s;
}
.header-nav a:hover { color: var(--rose); cursor: none; }
.header-nav a:hover::after { transform: scaleX(1); }

.music-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid var(--rose);
    background: transparent;
    color: var(--rose);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;

}
.music-btn:hover,
.music-btn.playing { background: var(--rose); color: white; }
.music-btn.playing .music-icon { display: inline-block; animation: musicSpin 1.8s linear infinite; }

@keyframes musicSpin { to { transform: rotate(360deg); } }

/* ===== SECTION COMMON ===== */
.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 40px;
}
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 12px;
}
.section-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(38px, 5.5vw, 60px);
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}
.section-sub { margin-top: 12px; color: var(--text-mid); font-size: 16px; }

/* ===== REVEAL ANIMATION ===== */
.reveal-up {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up.visible { opacity: 1; transform: translateY(0); }

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--blush) 0%, var(--lavender) 50%, var(--mint) 100%);
    text-align: center;
    padding: 100px 40px 60px;
}
.hearts-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.hero-content { position: relative; z-index: 1; }

.hero-pre {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 24px;
}
.hero-names {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(72px, 12vw, 144px);
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: column;
}
.hero-heart {
    font-size: 0.45em;
    color: var(--rose);
    animation: heartbeat 1.5s ease infinite;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14%       { transform: scale(1.35); }
    28%       { transform: scale(1.1); }
    42%       { transform: scale(1.35); }
    70%       { transform: scale(1); }
}

.hero-date {
    font-family: 'Lora', serif;
    font-size: 22px;
    font-style: italic;
    color: var(--text-mid);
    margin-bottom: 8px;
}
.hero-place {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-mid);
    margin-bottom: 44px;
}
.hero-cta {
    display: inline-block;
    padding: 16px 48px;
    background: var(--rose);
    color: white;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 100px;
    box-shadow: 0 8px 28px var(--shadow-rose);
    transition: transform 0.2s, box-shadow 0.2s;

}
.hero-cta:hover { transform: translateY(-4px); box-shadow: 0 14px 36px var(--shadow-rose); }

.hero-scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
}
.scroll-dot {
    display: block;
    width: 8px; height: 8px;
    background: var(--rose);
    border-radius: 50%;
    animation: scrollBounce 1.6s ease infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%       { transform: translateY(14px); opacity: 0.3; }
}

/* floating hearts keyframe (used by JS) */
@keyframes floatHeart {
    0%   { transform: translateY(110vh) rotate(0deg) scale(0.4); opacity: 0; }
    8%   { opacity: 0.75; }
    90%  { opacity: 0.4; }
    100% { transform: translateY(-80px) rotate(300deg) scale(1.1); opacity: 0; }
}

/* ===== STORY SECTION ===== */
.story-section { background: var(--white); }
.story-timeline { display: flex; flex-direction: column; gap: 80px; }
.story-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.story-item--reverse .story-photo { order: 2; }
.story-item--reverse .story-text  { order: 1; }

.story-photo {
    aspect-ratio: 4/3;
    border-radius: var(--r-lg);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    /* padding: 24px; */
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}
.story-photo--warm   { background: linear-gradient(135deg, #FFCC80 0%, #FF8A65 100%); }
.story-photo--cool   { background: linear-gradient(135deg, #80DEEA 0%, #5C6BC0 100%); }
.story-photo--blush  { background: linear-gradient(135deg, #F8BBD0 0%, #CE93D8 100%); }
.story-photo--mint   { background: linear-gradient(135deg, #A5D6A7 0%, #4DB6AC 100%); }

.story-photo--cool img { object-position: 0 100px; }
.story-photo--blush img { object-position: 0 100px; }

.photo-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.06em;
    background: rgba(0,0,0,0.15);
    padding: 6px 16px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
}

.story-year {
    font-family: 'Dancing Script', cursive;
    font-size: 56px;
    font-weight: 700;
    color: var(--rose);
    display: block;
    line-height: 1;
    margin-bottom: 10px;
}
.story-text h3 {
    font-family: 'Lora', serif;
    font-size: 26px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 14px;
}
.story-text p { color: var(--text-mid); font-size: 16px; line-height: 1.8; }

/* ===== GALLERY / POLAROIDS ===== */
.gallery-section {
    background: linear-gradient(180deg, var(--lavender) 0%, var(--blush) 100%);
}
.polaroid-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.polaroid {
    background: white;
    padding: 14px 14px 44px;
    border-radius: 3px;
    box-shadow: 0 6px 28px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
    will-change: transform;

}
.polaroid:nth-child(odd)  { transform: rotate(-1.8deg); }
.polaroid:nth-child(even) { transform: rotate(1.5deg); }

.polaroid-photo {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 2px;
}

.polaroid-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* placeholder camera icon */
/* .polaroid-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    opacity: 0.5;
} */

.ph-rose   { background: linear-gradient(135deg, #FFCDD2, #F06292); }
.ph-blue   { background: linear-gradient(135deg, #B3E5FC, #42A5F5); }
.ph-green  { background: linear-gradient(135deg, #DCEDC8, #8BC34A); }
.ph-purple { background: linear-gradient(135deg, #E1BEE7, #AB47BC); }
.ph-yellow { background: linear-gradient(135deg, #FFF9C4, #FDD835); }
.ph-pink   { background: linear-gradient(135deg, #FCE4EC, #F48FB1); }

.polaroid > p {
    font-family: 'Dancing Script', cursive;
    font-size: 19px;
    color: var(--text-mid);
    text-align: center;
    padding-top: 14px;
    line-height: 1.2;
}

/* ===== FUN FACTS ===== */
.facts-section { background: var(--white); }
.facts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.fact-card {
    background: linear-gradient(160deg, var(--blush), var(--lavender));
    border-radius: var(--r);
    padding: 40px 24px;
    text-align: center;
    transition: transform 0.22s;
    cursor: default;
}
.fact-card:hover { transform: translateY(-7px); }
.fact-icon { font-size: 36px; margin-bottom: 16px; }
.fact-num {
    font-family: 'Dancing Script', cursive;
    font-size: 52px;
    font-weight: 700;
    color: var(--rose);
    line-height: 1;
    margin-bottom: 8px;
}
.fact-label { font-size: 13px; font-weight: 700; color: var(--text-mid); letter-spacing: 0.04em; }

/* ===== COUNTDOWN ===== */
.countdown-section {
    background: linear-gradient(135deg, #9B7EC8 0%, #E87399 100%);
    padding: 100px 40px;
    text-align: center;
}
.countdown-inner { max-width: 860px; margin: 0 auto; }
.countdown-label-top {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    margin-bottom: 40px;
    display: block;
}
.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cd-item { text-align: center; }
.cd-num {
    display: block;
    font-family: 'Dancing Script', cursive;
    font-size: clamp(54px, 10vw, 104px);
    font-weight: 700;
    color: white;
    line-height: 1;
}
.cd-lab {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-top: -6px;
}
.cd-sep {
    font-family: 'Dancing Script', cursive;
    font-size: 80px;
    color: rgba(255,255,255,0.35);
    line-height: 1;
    margin-bottom: 18px;
}
.countdown-date {
    margin-top: 36px;
    font-family: 'Lora', serif;
    font-size: 20px;
    font-style: italic;
    color: rgba(255,255,255,0.75);
    display: block;
}

/* ===== DETAILS ===== */
.details-section { background: var(--cream); }
.detail-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.detail-card {
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 40px 28px;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow);
    border-top: 4px solid var(--rose);
    transition: transform 0.22s, box-shadow 0.22s;
}
.detail-card:hover { transform: translateY(-8px); box-shadow: 0 18px 44px var(--shadow); }
.detail-card-icon { font-size: 38px; margin-bottom: 18px; }
.detail-card h3 {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
}
.detail-card p  { font-size: 15px; color: var(--text); line-height: 1.8; }
.detail-card strong { font-weight: 700; }

/* ===== SCHEDULE ===== */
.schedule-section { background: var(--white); }
.schedule-list {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
}
.schedule-list::before {
    content: '';
    position: absolute;
    left: 88px;
    top: 10px; bottom: 10px;
    width: 2px;
    background: linear-gradient(to bottom, var(--rose), var(--lilac));
    border-radius: 2px;
}
.schedule-item {
    display: grid;
    grid-template-columns: 80px 20px 1fr;
    gap: 0 20px;
    align-items: flex-start;
    padding-bottom: 40px;
}
.schedule-item:last-child { padding-bottom: 0; }
.sch-time {
    font-family: 'Lora', serif;
    font-size: 16px;
    font-style: italic;
    color: var(--rose);
    text-align: right;
    padding-top: 2px;
}
.sch-dot {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--rose);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    transition: background 0.2s;
    margin-top: 2px;
}
.schedule-item:hover .sch-dot { background: var(--rose); }
.sch-content h4 {
    font-family: 'Lora', serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}
.sch-content p { font-size: 14px; color: var(--text-mid); }

/* ===== RSVP ===== */
.rsvp-section {
    background: linear-gradient(160deg, var(--lavender) 0%, var(--blush) 100%);
}
.rsvp-form {
    max-width: 760px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 56px 64px;
    box-shadow: 0 20px 60px var(--shadow);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.form-group { margin-bottom: 28px; }
.form-group > label:first-child {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-mid);
    margin-bottom: 10px;
    cursor: default;
}

/* inputs */
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--r);
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--cream);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;

}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(232,115,153,0.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* select wrapper */
.select-wrap { position: relative; }
.select-wrap::after {
    content: '▾';
    position: absolute;
    right: 18px; top: 50%;
    transform: translateY(-50%);
    color: var(--rose);
    pointer-events: none;
    font-size: 14px;
}
.form-group select {
    width: 100%;
    padding: 14px 44px 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--r);
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--cream);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;

}
.form-group select:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(232,115,153,0.12);
}

/* radio pills */
.attend-options { display: flex; gap: 12px; flex-wrap: wrap; }
.attend-options input[type="radio"] { display: none; }
.attend-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border: 2px solid var(--border);
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-mid);
    background: var(--cream);
    transition: all 0.2s;

    user-select: none;
}
.attend-btn--sm { padding: 10px 20px; font-size: 14px; }
.attend-options input[type="radio"]:checked + .attend-btn {
    border-color: var(--rose);
    background: var(--rose);
    color: white;
    box-shadow: 0 4px 18px var(--shadow-rose);
}

/* checkboxes as pills */
.check-group { display: flex; flex-wrap: wrap; gap: 10px; }
.check-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: 2px solid var(--border);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-mid);
    background: var(--cream);

    transition: all 0.2s;
    user-select: none;
}
.check-item input[type="checkbox"] { display: none; }
.check-item:has(input:checked) {
    border-color: var(--lilac);
    background: var(--lilac);
    color: white;
}

/* submit */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--rose), var(--lilac));
    color: white;
    border: none;
    border-radius: 100px;
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 28px var(--shadow-rose);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;

}
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 44px var(--shadow-rose); }

/* success state */
.form-success {
    display: none;
    text-align: center;
    padding: 80px 40px;
    max-width: 760px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--r-lg);
    box-shadow: 0 20px 60px var(--shadow);
}
.form-success.show { display: block; animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }
@keyframes popIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}
.success-emoji  { font-size: 64px; margin-bottom: 24px; }
.success-title  {
    font-family: 'Dancing Script', cursive;
    font-size: 56px;
    font-weight: 700;
    color: var(--rose);
    margin-bottom: 12px;
}
.success-text { font-size: 18px; color: var(--text-mid); line-height: 1.8; }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--text);
    text-align: center;
    padding: 80px 40px;
}
.footer-hearts { font-size: 18px; color: var(--rose); margin-bottom: 20px; letter-spacing: 14px; }
.footer-names {
    font-family: 'Dancing Script', cursive;
    font-size: 52px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}
.footer-date {
    font-family: 'Lora', serif;
    font-size: 18px;
    font-style: italic;
    color: rgba(255,255,255,0.5);
    margin-bottom: 24px;
}
.footer-note { font-size: 14px; color: rgba(255,255,255,0.35); }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .story-item,
    .story-item--reverse {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .story-item--reverse .story-photo,
    .story-item--reverse .story-text { order: unset; }
    .polaroid-grid     { grid-template-columns: repeat(2, 1fr); }
    .facts-grid        { grid-template-columns: repeat(2, 1fr); }
    .detail-cards      { grid-template-columns: repeat(2, 1fr); }
    .rsvp-form         { padding: 40px 32px; }
    .form-row          { grid-template-columns: 1fr; gap: 0; }
    .header-nav        { display: none; }
    .site-header       { padding: 16px 24px; }
}
@media (max-width: 600px) {
    .section-inner     { padding: 80px 24px; }
    .polaroid-grid     { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .facts-grid        { grid-template-columns: repeat(2, 1fr); }
    .detail-cards      { grid-template-columns: 1fr; }
    .rsvp-form         { padding: 32px 20px; }
    .schedule-list::before { left: 66px; }
    .schedule-item     { grid-template-columns: 58px 20px 1fr; }
    .countdown-section { padding: 80px 24px; }
    .cd-sep            { font-size: 56px; }
}
