/* Mindy's 30th — Napa Valley */
/* Palette: cream #FFFDF8, gold #C4A265, charcoal #2C2C2C, warm gray #6B6B6B, tan #E8E2D8, sage #4A7C59 */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #2C2C2C;
    background-color: #FFFDF8;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

.section-heading {
    font-size: 1.8rem;
    color: #2C2C2C;
    margin-bottom: 2rem;
    text-align: center;
}

/* ── Layout ── */

.content-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 64px 0;
}

/* ── Hero ── */

.hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('/static/images/hero.jpg') center/cover no-repeat;
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.25) 0%,
        rgba(0,0,0,0.35) 50%,
        rgba(0,0,0,0.55) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 24px;
}

.hero h1 {
    font-size: 2.5rem;
    color: #C4A265;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

.countdown {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.scroll-indicator {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255,255,255,0.7);
    font-size: 1.5rem;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ── Schedule ── */

.schedule {
    background-color: #FFFDF8;
}

.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background-color: #C4A265;
}

.timeline-day {
    position: relative;
    margin-bottom: 2.5rem;
}

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

.timeline-day::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #C4A265;
}

.timeline-day.highlight {
    background: linear-gradient(135deg, rgba(196,162,101,0.06) 0%, rgba(196,162,101,0.02) 100%);
    border-radius: 8px;
    padding: 1.25rem;
    margin-left: -12px;
    padding-left: 40px;
}

.timeline-day.highlight::before {
    left: -13px;
}

.day-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.75rem;
}

.day-events {
    list-style: none;
}

.day-events li {
    font-size: 1rem;
    color: #4a4a4a;
    padding: 0.3rem 0;
    line-height: 1.5;
}

.event-time {
    font-weight: 500;
    color: #2C2C2C;
    min-width: 80px;
    display: inline-block;
}

/* ── The House ── */

.house-photos {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.house-photo {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.house-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    color: #4a4a4a;
}

@media (min-width: 768px) {
    .house-photos {
        grid-template-columns: 1fr 1fr;
    }
}

.house-address {
    font-weight: 500;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.house-address a {
    color: #C4A265;
    text-decoration: none;
}

.house-address a:hover {
    text-decoration: underline;
}

.house-notes {
    color: #6B6B6B;
    font-size: 0.95rem;
}

/* ── Getting There ── */

.getting-there p {
    color: #4a4a4a;
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.getting-there a {
    color: #C4A265;
    text-decoration: none;
}

.getting-there a:hover {
    text-decoration: underline;
}

/* ── RSVP Form ── */

.rsvp-section {
    background-color: #FFFFFF;
    padding: 64px 0;
}

.rsvp-form {
    max-width: 480px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2C2C2C;
    margin-bottom: 0.4rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #E8E2D8;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #2C2C2C;
    background: #FFFDF8;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group textarea {
    height: 100px;
    padding: 12px 16px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #C4A265;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 12px;
    margin-top: 0.25rem;
}

.radio-option {
    flex: 1;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 1px solid #E8E2D8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0;
}

.radio-option input:checked + label {
    border-color: #C4A265;
    background-color: rgba(196,162,101,0.08);
    color: #C4A265;
}

.radio-option input:focus-visible + label {
    outline: 2px solid #C4A265;
    outline-offset: 2px;
}

/* Plus-one toggle */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0.25rem;
}

.toggle {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #E8E2D8;
    border-radius: 28px;
    transition: background-color 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle input:checked + .toggle-slider {
    background-color: #C4A265;
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle input:focus-visible + .toggle-slider {
    outline: 2px solid #C4A265;
    outline-offset: 2px;
}

.plus-one-name {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.plus-one-name.visible {
    max-height: 80px;
    opacity: 1;
    margin-top: 1rem;
}

/* Submit button */
.submit-btn {
    width: 100%;
    height: 48px;
    background-color: #C4A265;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:hover {
    background-color: #b3934f;
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-btn:focus-visible {
    outline: 2px solid #C4A265;
    outline-offset: 2px;
}

.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Form messages */
.form-message {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background-color: rgba(74,124,89,0.08);
    color: #4A7C59;
    display: block;
}

.form-message.error {
    background-color: rgba(200,50,50,0.08);
    color: #c83232;
    display: block;
}

/* ── Who's Coming ── */

.guests-section {
    text-align: center;
}

.guest-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.guest-pill {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(196,162,101,0.1);
    color: #2C2C2C;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    animation: fadeInPill 0.4s ease forwards;
}

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

.guest-empty {
    color: #6B6B6B;
    font-size: 1rem;
    margin-top: 1rem;
}

.guest-shimmer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.shimmer-pill {
    width: 80px;
    height: 32px;
    background: linear-gradient(90deg, #f0ece4 25%, #e8e2d8 50%, #f0ece4 75%);
    background-size: 200% 100%;
    border-radius: 20px;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Scroll animations ── */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Confetti ── */

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    top: -10px;
    opacity: 0;
    animation: confettiFall 2s ease forwards;
}

@keyframes confettiFall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* ── Footer ── */

.site-footer {
    text-align: center;
    padding: 2rem 0;
    color: #6B6B6B;
    font-size: 0.8rem;
    border-top: 1px solid #E8E2D8;
}

/* ── Desktop ── */

@media (min-width: 1024px) {
    .hero h1 {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .countdown {
        font-size: 0.95rem;
    }

    section {
        padding: 100px 0;
    }

    .rsvp-section {
        padding: 100px 0;
    }

    .section-heading {
        font-size: 2.2rem;
    }

    .submit-btn {
        width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .scroll-indicator {
        animation: none;
    }

    .confetti-piece {
        display: none;
    }

    .guest-pill {
        animation: none;
        opacity: 1;
    }

    .shimmer-pill {
        animation: none;
    }
}

/* ── Safe area (iPhone notch/home indicator) ── */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .site-footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }
}
