:root {
    --primary: #d4a574;
    --primary-dim: rgba(212, 165, 116, 0.15);
    --primary-glow: rgba(212, 165, 116, 0.3);
    --bg: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --text: #d4d4d4;
    --text-dim: #888;
    --text-bright: #fff;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 12px;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === LIGHT THEME === */
[data-theme="light"] {
    --bg: #f5f5f7; --bg-card: #ffffff; --bg-card-hover: #f0f0f2;
    --text: #374151; --text-dim: #6b7280; --text-bright: #111827;
    --border: rgba(0, 0, 0, 0.1); --primary-dim: rgba(212, 165, 116, 0.1);
    --primary-glow: rgba(212, 165, 116, 0.15);
}
.theme-toggle-float {
    position: fixed; bottom: 1.25rem; right: 1.25rem; width: 40px; height: 40px;
    border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-dim); cursor: pointer; display: flex; align-items: center;
    justify-content: center; z-index: 1000; transition: all 0.2s;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.theme-toggle-float:hover { color: var(--text-bright); transform: scale(1.1); }
@media print { .theme-toggle-float { display: none !important; } }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* === NAV === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: transform 0.3s;
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.nav-links { display: flex; gap: 0.25rem; }
.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-bright);
    background: var(--bg-card);
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 3rem;
    position: relative;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 10, 0.7) 0%,
        rgba(10, 10, 10, 0.5) 40%,
        rgba(10, 10, 10, 0.8) 100%
    );
    z-index: 1;
}
.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}
.hero-ornament {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}
.hero-names {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}
.hero-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.hero-divider span:first-child,
.hero-divider span:last-child {
    display: block;
    width: 60px;
    height: 1px;
    background: var(--primary);
    opacity: 0.5;
}
.divider-text {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--primary);
    text-transform: lowercase;
    letter-spacing: 0.1em;
}
.hero-date {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--text);
    font-weight: 400;
    margin-bottom: 0.5rem;
    letter-spacing: 0.04em;
}
.hero-venue {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    letter-spacing: 0.03em;
}

/* Countdown */
.countdown {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}
.countdown-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}
.countdown-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 0.375rem;
}
.countdown-finished {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
    font-style: italic;
}
.countdown-number {
    animation: countdownPulse 0.8s ease-out;
}
@keyframes countdownPulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero CTA */
.hero-cta { margin-bottom: 1rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: var(--primary);
    color: #0a0a0a;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 6px 25px var(--primary-glow); }
.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 8px 30px var(--primary-glow);
}
.btn-large:hover {
    box-shadow: 0 12px 40px var(--primary-glow);
    transform: translateY(-3px) scale(1.05);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--text-dim); background: var(--bg-card); }

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}
.hero-scroll span { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.15em; }
.scroll-indicator {
    width: 20px;
    height: 32px;
    border: 2px solid var(--border);
    border-radius: 10px;
    position: relative;
}
.scroll-indicator::after {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 1; top: 4px; }
    50% { opacity: 0.3; top: 16px; }
}

/* === SECTIONS === */
.section { padding: 5rem 1.5rem; }
.section:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
.container { max-width: 900px; margin: 0 auto; }
.section-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* === STORY === */
.story-content {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
}
.story-content p {
    font-size: 1.05rem;
    color: var(--text-dim);
    line-height: 1.9;
    font-style: italic;
}

/* === EVENT TIMELINE === */
.event-timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}
.event-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    transform: translateX(-50%);
}
.event-timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
    position: relative;
}
.event-timeline-item:last-child { margin-bottom: 0; }

.event-timeline-time {
    width: calc(50% - 40px);
    text-align: right;
    padding-right: 1.5rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    padding-top: 0.5rem;
}
.event-timeline-dot {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-timeline-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 0 0 6px var(--bg);
}
.event-timeline-content {
    width: calc(50% - 40px);
    padding-left: 1.5rem;
    padding-top: 0.25rem;
}
.event-timeline-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.375rem;
}
.event-timeline-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* === GALLERY === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    font-size: 0.85rem;
    color: var(--text-bright);
    opacity: 0;
    transition: opacity 0.3s;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

/* === VENUE === */
.venue-content {
    text-align: center;
}
.venue-info {
    margin-bottom: 2rem;
}
.venue-name {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.75rem;
}
.venue-address {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-dim);
}
.venue-address svg { color: var(--primary); flex-shrink: 0; }
.venue-map {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.venue-map iframe {
    display: block;
    width: 100%;
    min-height: 400px;
}

/* === RSVP === */
.rsvp-subtitle {
    text-align: center;
    color: var(--text-dim);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    font-style: italic;
}
.rsvp-form {
    max-width: 600px;
    margin: 0 auto;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-row .form-group { margin-bottom: 0; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-bright);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
    opacity: 0.6;
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 1.5rem;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text);
}
.radio-label input[type="radio"] {
    display: none;
}
.radio-custom {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    position: relative;
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary);
}
.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* === THANKS PAGE === */
.thanks-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.thanks-content {
    text-align: center;
    max-width: 500px;
}
.thanks-ornament {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}
.thanks-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 1rem;
}
.thanks-text {
    font-size: 1.1rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}
.thanks-date {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 2rem;
    font-style: italic;
}

/* === ANIMATIONS === */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-link { padding: 0.75rem 1rem; }

    .hero { padding: 5rem 1.25rem 3rem; }
    .hero-names { font-size: clamp(2rem, 8vw, 3rem); }

    .countdown { gap: 0.75rem; }
    .countdown-number { font-size: 1.75rem; }
    .countdown-item { min-width: 55px; }

    .section { padding: 3.5rem 1.25rem; }
    .section-title { font-size: 1.75rem; }

    /* Timeline mobile - stack vertically */
    .event-timeline::before {
        left: 24px;
        transform: none;
    }
    .event-timeline-item {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .event-timeline-time {
        width: auto;
        text-align: left;
        padding-right: 0;
        padding-left: 72px;
        padding-top: 0;
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
        order: 1;
        flex-basis: 100%;
    }
    .event-timeline-dot {
        position: absolute;
        left: 0;
        top: 0;
    }
    .event-timeline-content {
        width: auto;
        padding-left: 72px;
        order: 2;
        flex-basis: 100%;
    }

    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-row .form-group { margin-bottom: 1.25rem; }

    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (max-width: 480px) {
    .countdown { gap: 0.5rem; }
    .countdown-number { font-size: 1.5rem; }
    .countdown-item { min-width: 48px; }
    .countdown-label { font-size: 0.6rem; }
}

/* === PRINT === */
@media print {
    * { background: #fff !important; color: #111 !important; box-shadow: none !important; }
    .nav, .hero-scroll, .hero-cta, .btn, .rsvp-form { display: none !important; }
    .hero { min-height: auto; padding: 2rem 0; }
    .hero-bg, .hero-overlay { display: none !important; }
    .hero-names { font-size: 2rem; }
    .section { padding: 1.5rem 0; page-break-inside: avoid; }
    .section:nth-child(even) { background: transparent !important; }
    .fade-in { opacity: 1 !important; transform: none !important; }
    .gallery-item { break-inside: avoid; }
    .venue-map { display: none !important; }
    a { text-decoration: none; }
}
