:root {
    --bg-color: #FDFBF8;
    /* Very subtle warm white */
    --text-primary: #121212;
    --text-secondary: #757575;
    --accent: #D4D4D4;
    /* Light grey for lines */
    --spacing-loose: 120px;
    --spacing-tight: 24px;

    --font-main: 'Manrope', sans-serif;
    --font-display: 'Playfair Display', serif;
}

.ampersand {
    font-family: var(--font-main);
    font-weight: 200;
    font-size: 0.5em;
    vertical-align: middle;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.line {
    width: 100%;
    height: 1px;
    background-color: var(--accent);
    margin: 30px 0;
}

.flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

/* Language Toggle - Fixed top right, minimal */
.lang-switch {
    position: fixed;
    top: 40px;
    right: 40px;
    z-index: 100;
    font-size: 12px;
    letter-spacing: 1px;
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.3s;
}

.lang-btn.active,
.lang-btn:hover {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.lang-en {
    display: none;
}

body[data-lang="en"] .lang-en {
    display: block;
}

body[data-lang="en"] .lang-pl {
    display: none;
}

/* Typography */
h1 {
    font-family: var(--font-display);
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    margin-left: -5px;
    /* Visual optical alignment */
}

h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    font-weight: 500;
}

.label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: block;
}

/* Hero */
.hero {
    min-height: 100vh;
    padding-top: 20vh;
    position: relative;
    /* Correct hero overflow on mobile */
    overflow-x: hidden;
}

.hero-details {
    margin-top: 100px;
    display: flex;
    gap: 60px;
}

.hero-detail-item {
    flex: 0 0 auto;
}

.hero-image {
    position: absolute;
    right: 10%;
    top: 15%;
    width: 300px;
    height: 400px;
    z-index: -1;
    /* filter: grayscale(100%);  Remove filter for SVG */
    opacity: 0.8;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Removes bottom space */
}

/* Sections General */
section {
    padding: var(--spacing-loose) 0;
}

/* Story - Asymmetric Grid */
.story-section .grid {
    align-items: center;
}

.story-left {
    grid-column: 2 / span 4;
}

.story-right {
    grid-column: 7 / span 5;
}

.big-text {
    font-size: 2rem;
    line-height: 1.4;
    font-family: var(--font-display);
    font-style: italic;
}

.minimal-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.minimal-img:hover {
    filter: grayscale(0%);
}

/* Info Grid - Clean Lines */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--accent);
}

.info-cell {
    padding: 40px;
    border-right: 1px solid var(--accent);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-cell:last-child {
    border-right: none;
}

.info-content {
    font-size: 1.5rem;
    font-weight: 200;
}

/* Gallery - Horizontal Scroll */
.gallery-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 40px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-img {
    height: 500px;
    flex: 0 0 auto;
    filter: grayscale(100%);
    /* Ensure images don't stretch */
    max-width: 80vw;
    object-fit: cover;
}

/* RSVP - Minimal Form */
.rsvp-container {
    max-width: 600px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.input-group {
    flex: 1;
    position: relative;
    margin-bottom: 1rem;
    /* Better spacing on mobile if wrapped */
}

input,
select,
textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-primary);
    padding: 15px 0;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    border-radius: 0;
}

label {
    position: absolute;
    left: 0;
    top: 15px;
    pointer-events: none;
    transition: 0.3s;
    color: var(--text-secondary);
}

input:focus+label,
textarea:focus+label,
input:not(:placeholder-shown)+label,
textarea:not(:placeholder-shown)+label {
    top: -10px;
    font-size: 12px;
    color: var(--text-primary);
}

/* Hide select arrow roughly */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

button.submit {
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    padding: 20px 60px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

button.submit:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    :root {
        --spacing-loose: 80px;
    }

    .container {
        padding: 0 20px;
    }

    /* Fixed top buttons alignment */
    .lang-switch {
        top: 20px;
        right: 20px;
    }

    h1 {
        font-size: 15vw;
        /* Responsive font size */
        margin-left: 0;
        line-height: 1.1;
    }

    .grid {
        display: block;
    }

    .story-left,
    .story-right {
        margin-bottom: 60px;
        grid-column: span 12;
    }

    .hero-details {
        flex-direction: column;
        gap: 30px;
        margin-top: 60px;
    }

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

    .info-cell {
        border-right: none;
        border-bottom: 1px solid var(--accent);
        min-height: auto;
        padding: 30px 0;
    }

    .info-cell:last-child {
        border-bottom: none;
    }

    .hero-image {
        /* Keep abstract art visible but smaller on mobile? 
           Or hide it as previously done. 
           User said "looks great on mobile", maybe keeping it is better aesthetic */
        display: block;
        width: 200px;
        height: 250px;
        right: -50px;
        top: 10%;
        opacity: 0.5;
    }

    /* Make gallery swipeable with visible hint */
    .gallery-track {
        padding-right: 20px;
        /* Peek effect */
    }

    .gallery-img {
        height: 300px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .big-text {
        font-size: 1.5rem;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1em;
    width: 80%;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 2.5em;
    width: 60%;
}

.skeleton-image {
    width: 100%;
    height: 300px;
}

[data-key]:empty::before {
    content: '';
    display: block;
    background: var(--skeleton-base);
    height: 1em;
    border-radius: 4px;
    animation: skeleton-loading 1.5s infinite;
}

.content-loaded {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Utilities */
.flex-end {
    align-items: flex-end;
}

.pt-0 {
    padding-top: 0;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.text-secondary {
    color: var(--text-secondary);
}

.detail-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 10px;
    display: block;
}

.gallery-wrapper {
    padding-left: 40px;
    overflow: hidden;
}

.rsvp-col {
    grid-column: 2 / span 10;
}

.footer-inner {
    padding-top: 80px;
    padding-bottom: 40px;
}