/* ============================================
   Haidberg-Party — Clean White Premium Theme
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --white: #ffffff;
    --off-white: #fafafa;
    --light-gray: #f2f2f2;
    --mid-gray: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --text-muted: #999999;
    --accent: #3d5a40;
    --accent-hover: #2c4330;
    --success: #4caf50;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--white);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
}

/* ============ NAV ============ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    padding: 14px 40px;
}

.nav-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav.scrolled .nav-logo {
    color: var(--text-primary);
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 20px;
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 100px;
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--white);
    color: var(--text-primary);
    border-color: var(--white);
}

.nav.scrolled .nav-link {
    color: var(--text-primary);
    border-color: var(--mid-gray);
}

.nav.scrolled .nav-link:hover {
    background: var(--text-primary);
    color: var(--white);
    border-color: var(--text-primary);
}

/* ============ HERO ============ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('images/hero.jpg') center/cover no-repeat;
    filter: brightness(0.7);
    transform: scale(1.05);
    transition: transform 8s ease-out;
}

.hero.loaded .hero-bg {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.5) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 0 20px;
}

.hero-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    color: var(--white);
    letter-spacing: -1px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.5s;
}

.hero-sub {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.85);
    font-weight: 300;
    max-width: 500px;
    margin: 0 auto 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.7s;
}

.hero-cta {
    display: inline-block;
    padding: 14px 40px;
    background: var(--white);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 100px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.9s;
}

.hero-cta:hover {
    background: var(--text-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 1.2s;
}

.scroll-indicator span {
    display: block;
    width: 2px;
    height: 40px;
    background: rgba(255,255,255,0.5);
    margin: 0 auto;
    animation: scrollPulse 2s ease-in-out infinite;
}

/* ============ CONTAINER ============ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ SECTIONS ============ */
.section {
    padding: 120px 0;
}

.section-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-desc {
    max-width: 550px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.8;
}

.section-desc.centered {
    margin: 0 auto;
    text-align: center;
}

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

/* ============ INFO SECTION ============ */
.info-section {
    background: var(--off-white);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.info-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

/* ============ GALLERY ============ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 16px;
    margin-top: 60px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.gallery-item:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.15), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ============ RSVP SECTION ============ */
.rsvp-section {
    background: var(--off-white);
}

.rsvp-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
    margin-top: 60px;
}

.rsvp-info h3 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.rsvp-info p {
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 24px;
}

.rsvp-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: 0.95rem;
}

.rsvp-detail-icon {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

.rsvp-card {
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* ============ FORM ============ */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--mid-gray);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(61,90,64,0.08);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 90px;
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    padding: 14px 18px;
    border: 1.5px solid var(--mid-gray);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.toggle-group:hover {
    border-color: var(--accent);
}

.toggle-group input {
    display: none;
}

.toggle-switch {
    display: block;
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--mid-gray);
    border-radius: 100px;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-group input:checked ~ .toggle-switch {
    background: var(--accent);
}

.toggle-group input:checked ~ .toggle-switch::after {
    left: 23px;
}

.toggle-label {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-primary);
}

/* Accommodation Options */
.accommodation-options {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease,
                margin 0.4s ease;
    margin-top: 0;
}

.accommodation-options.visible {
    max-height: 300px;
    opacity: 1;
    margin-top: 24px;
}

.accommodation-label {
    font-weight: 500;
    font-size: 0.88rem;
    margin-bottom: 12px;
    display: block;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1.5px solid var(--mid-gray);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.radio-option:hover {
    border-color: var(--accent);
    background: rgba(61,90,64,0.02);
}

.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--mid-gray);
    border-radius: 50%;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked {
    border-color: var(--accent);
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
}

.radio-option input[type="radio"]:checked ~ .radio-text {
    font-weight: 500;
}

.radio-icon {
    font-size: 1.2rem;
}

.radio-text {
    font-size: 0.95rem;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61,90,64,0.25);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Success State */
.success-message {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.success-message.visible {
    display: block;
    animation: fadeUp 0.6s ease forwards;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.success-message h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--accent);
}

.success-message p {
    color: var(--text-secondary);
    font-weight: 300;
}

/* ============ MAP ============ */
.map-container {
    margin-top: 24px;
}

.map-container iframe {
    box-shadow: var(--shadow-sm);
}

.map-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.map-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ============ TESTIMONIAL ============ */
.testimonial-section {
    background: var(--off-white);
}

.testimonial-card {
    max-width: 700px;
    margin: 0 auto;
}

.testimonial-quote {
    position: relative;
    padding: 10px 0 0 0;
}

.quote-mark {
    font-size: 5rem;
    font-family: Georgia, serif;
    color: var(--accent);
    opacity: 0.15;
    line-height: 1;
    display: block;
    margin-bottom: -30px;
}

.testimonial-quote blockquote {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
    padding: 0;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.testimonial-quote cite {
    display: block;
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    font-style: normal;
}

/* ============ FOOTER ============ */
footer {
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid var(--light-gray);
}

footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 300;
}

/* ============ LIGHTBOX ============ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    background: none;
    border: none;
    font-family: inherit;
}

.lightbox-close:hover {
    opacity: 1;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50% { opacity: 0.8; transform: scaleY(1); }
}

/* Scroll-triggered fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-item:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .rsvp-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .nav { padding: 16px 20px; }
    .nav.scrolled { padding: 12px 20px; }
    .nav-logo { font-size: 1.1rem; }
    .nav-link { padding: 6px 14px; font-size: 0.75rem; }

    .section { padding: 80px 0; }

    .hero h1 { font-size: 2.8rem; }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-item:nth-child(1) {
        grid-column: auto;
    }

    .rsvp-card { padding: 30px 24px; }

    .info-card { padding: 30px 20px; }
}
