@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,200;0,300;0,400;1,200;1,300&family=DM+Sans:wght@200;300;400;500&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #7A6B55;
    --secondary: #E8DED0;
    --accent: #B8956A;
    --sage: #8F9E8B;
    --light: #FAF8F4;
    --dark: #1C1B18;
    --text: #3A3832;
    --text-light: #9A9590;
    --white: #FFFFFF;
    --border: rgba(0,0,0,0.08);

    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', sans-serif;

    --section-padding: 5rem 0;
    --container-padding: 0 2rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ─── Header ─────────────────────────────────────────────── */
.header {
    background-color: rgba(250, 248, 244, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.logo {
    height: 52px;
    width: auto;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    opacity: 0.92;
}

.logo-container h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 80;
    letter-spacing: 0.04em;
    color: var(--dark);
}

/* ─── Navigation ──────────────────────────────────────────── */
.nav-list {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.nav-list a {
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 2px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-list a:hover {
    color: var(--dark);
    background-color: var(--secondary);
}

.social-icon {
    margin-left: 0.5rem;
}

.social-icon a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    padding: 0.35rem;
    transition: color 0.25s ease;
    background: none !important;
}

.social-icon a:hover {
    color: var(--dark);
}

/* ─── Mobile menu toggle ─────────────────────────────────── */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
    background: none;
    border: none;
}

.mobile-menu-toggle span {
    width: 22px;
    height: 1.5px;
    background-color: var(--dark);
    transition: 0.3s;
    display: block;
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    margin: 0;
}

.hero-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-image {
    flex: 1;
    min-width: 0;
    height: 100%;
    position: relative;
}

.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 60%, rgba(143, 158, 139, 0.15));
    pointer-events: none;
}

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

.hero-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--sage);
    padding: 3rem 2.5rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 60%;
    height: 140%;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 200;
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin-bottom: 1.25rem;
    color: var(--white);
}

.hero p {
    font-size: 1.05rem;
    font-weight: 300;
    max-width: 420px;
    margin: 0 auto 1.75rem;
    color: rgba(255,255,255,0.88);
    letter-spacing: 0.02em;
    line-height: 1.8;
}

.btn-cta {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: 1px solid rgba(255,255,255,0.6);
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.btn-cta:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--white);
}

/* ─── Sections ────────────────────────────────────────────── */
.section {
    padding: var(--section-padding);
}

.section h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 200;
    letter-spacing: 0.03em;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark);
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: var(--accent);
}

/* ─── O nas ───────────────────────────────────────────────── */
.onas-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
}

.onas-text {
    flex: 1;
    min-width: 300px;
}

.onas-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.9;
    color: var(--text);
}

.onas-text strong {
    color: var(--dark);
    font-weight: 500;
}

/* ─── Oferta ──────────────────────────────────────────────── */
.oferta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.oferta-item {
    background: var(--white);
    padding: 2.25rem 2rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.oferta-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
    border-color: var(--accent);
}

.oferta-item h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
    color: var(--dark);
    letter-spacing: 0.02em;
}

.oferta-item p {
    color: var(--text-light);
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ─── Gallery ─────────────────────────────────────────────── */
/*
  Single unified gallery block.
  Key decisions:
  - aspect-ratio: 1/1 holds grid space before images load (zero CLS)
  - opacity: 0 on img, flipped to 1 via .loaded (JS Intersection Observer)
  - No fixed height anywhere — aspect-ratio does that job
  - Skeleton shimmer uses site palette colors
  - Hover effects scoped to .loaded so skeleton never lifts
*/
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;

    /* Skeleton shimmer — visible until .loaded is added by JS */
    background: linear-gradient(90deg, #ede9e2 25%, #e2ddd6 50%, #ede9e2 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

/* Hover only after image has loaded */
.gallery-item.loaded:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.gallery-item.loaded:hover img {
    transform: scale(1.08);
    filter: saturate(1.05);
}

/* Kill skeleton once JS marks item as loaded */
.gallery-item.loaded {
    background: none;
    animation: none;
}

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

/* picture element fills the full cell */
.gallery-item picture {
    display: block;
    width: 100%;
    height: 100%;
}

/* img: invisible until .loaded; smooth fade + zoom transitions */
.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.55s ease, filter 0.55s ease;
}

.gallery-item.loaded img {
    opacity: 1;
}

/* First image is eager-loaded — visible immediately, no skeleton */
.gallery-item:first-child {
    background: none;
    animation: none;
}

.gallery-item:first-child img {
    opacity: 1;
}

/* ─── Kontakt ─────────────────────────────────────────────── */
.kontakt-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: flex-start;
}

.kontakt-info {
    flex: 1;
    min-width: 300px;
}

.kontakt-info h3 {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 200;
    margin-bottom: 1.5rem;
    color: var(--dark);
    letter-spacing: 0.03em;
}

.kontakt-info p,
.kontakt-static p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
}

.kontakt-info strong,
.kontakt-static strong {
    color: var(--dark);
    font-weight: 500;
}

.kontakt-info a,
.kontakt-static a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.kontakt-info a:hover,
.kontakt-static a:hover {
    color: var(--dark);
}

.kontakt-static {
    font-style: normal;
    margin-bottom: 2rem;
}

.mapa-kontener {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    width: 100%;
}

/* ─── Oferta ślubu ────────────────────────────────────────── */
.slub-intro {
    max-width: 680px;
    margin: 0 auto 3rem;
    text-align: center;
}

.slub-intro p {
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.9;
    color: var(--text);
}

.slub-form {
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.slub-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slub-form-group label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
}

.slub-form-group input,
.slub-form-group textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: var(--text);
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.85rem 1rem;
    width: 100%;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
    resize: vertical;
}

.slub-form-group input::placeholder,
.slub-form-group textarea::placeholder {
    color: var(--text-light);
    font-weight: 300;
}

.slub-form-group input:focus,
.slub-form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.12);
}

.slub-btn {
    align-self: flex-start;
    padding: 0.8rem 2.25rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.slub-btn:hover {
    background: var(--accent);
    color: var(--white);
}

.slub-success {
    max-width: 620px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 3px solid var(--sage);
    border-radius: 3px;
    font-size: 1rem;
    font-weight: 300;
    color: var(--text);
    line-height: 1.8;
}

/* ─── Footer ──────────────────────────────────────────────── */
.footer {
    background-color: var(--dark);
    color: rgba(255,255,255,0.55);
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 4rem;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    line-height: 2;
}

.footer a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--white);
}

/* ─── Lightbox ────────────────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(28, 27, 24, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: 2px;
}

.close-btn {
    position: absolute;
    top: -44px;
    right: 0;
    color: rgba(255,255,255,0.7);
    font-size: 2rem;
    font-weight: 200;
    cursor: pointer;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--white);
}

/* ─── Accessibility ───────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus,
button:focus {
    outline: 1.5px solid var(--accent);
    outline-offset: 3px;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .header-content {
        padding: 0.85rem 0;
    }

    .logo {
        height: 40px;
    }

    .logo-text {
        font-size: 1.6rem;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(250, 248, 244, 0.97);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.06);
        gap: 0;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-list a {
        display: block;
        padding: 0.85rem 1.5rem;
        font-size: 0.85rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        height: auto;
    }

    .hero-container {
        flex-direction: column;
    }

    .hero-image {
        height: 40vh;
        width: 100%;
    }

    .hero-content {
        width: 100%;
        padding: 2rem 1.5rem;
    }

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

    .hero p {
        font-size: 1rem;
    }

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

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

@media (max-width: 480px) {
    :root {
        --container-padding: 0 1.25rem;
    }

    .hero-image {
        height: 35vh;
    }

    .hero-content {
        padding: 1.5rem 1.25rem;
    }

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

    .hero p {
        font-size: 0.95rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .onas-text,
    .kontakt-info {
        min-width: 100%;
    }

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

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