/* ─── Hochzeit: Rosa, Blush & Ivory ─── */
:root {
    --ivory: #fff9fa;
    --cream: #fdf2f4;
    --paper: #fffcfd;
    --rose: #d4899a;
    --rose-dark: #9e5f70;
    --rose-light: #e8b4c0;
    --rose-pale: #f5e0e6;
    --rose-deep: #7a4555;
    --gold: #c9959f;
    --gold-light: #ddb8bf;
    --gold-pale: #f0d8de;
    --blush: #fae8ec;
    --sage: #8fa88f;
    --sage-dark: var(--rose-deep);
    --sage-light: var(--rose-light);
    --text: #3d3035;
    --text-muted: #8a737a;
    --text-light: #b5a0a6;
    --success: #6a8f6e;
    --error: #b05a52;
    --shadow-soft: 0 8px 40px rgba(158, 95, 112, 0.1);
    --shadow-card: 0 4px 24px rgba(158, 95, 112, 0.06), 0 0 0 1px rgba(212, 137, 154, 0.15);
    --radius: 4px;
    --font-script: 'Great Vibes', cursive;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Jost', system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text);
    background-color: var(--ivory);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232, 180, 192, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(245, 224, 230, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 0% 80%, rgba(250, 232, 236, 0.6) 0%, transparent 50%);
    min-height: 100vh;
    line-height: 1.65;
    position: relative;
    overflow-x: hidden;
}

/* Aquarell-Blumen als Seiten-Dekoration */
.deco-floral {
    position: fixed;
    width: min(260px, 42vw);
    height: auto;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

.deco-floral--left {
    top: -20px;
    left: -40px;
    transform: rotate(-15deg);
}

.deco-floral--right {
    bottom: 40px;
    right: -50px;
    transform: scaleX(-1) rotate(-10deg);
}

.page {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
    padding-bottom: max(4rem, env(safe-area-inset-bottom));
}

/* ─── Hero / Einladungsstil ─── */
.hero {
    text-align: center;
    padding: 2rem 0 3.5rem;
}

.hero-frame {
    position: relative;
    padding: 2rem 1.5rem 2.5rem;
    background: var(--paper);
    border: 1px solid var(--rose-pale);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.hero-frame::before,
.hero-frame::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(212, 137, 154, 0.3);
    pointer-events: none;
}

.hero-illustration {
    position: relative;
    z-index: 1;
    margin: 0 auto 0.5rem;
    max-width: 300px;
}

.hero-car {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(158, 95, 112, 0.15));
}

.hero-pretitle {
    position: relative;
    z-index: 1;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--rose);
    margin: 0 0 1rem;
}

.ornament {
    position: relative;
    z-index: 1;
    display: block;
    width: min(280px, 80%);
    margin: 0 auto;
    color: var(--gold);
}

.ornament--top { margin-bottom: 1.25rem; }
.ornament--bottom { margin-top: 1rem; }

.hero-names {
    position: relative;
    z-index: 1;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1em;
}

.name {
    font-family: var(--font-script);
    font-size: clamp(3.2rem, 12vw, 5.5rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--rose-deep);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.ampersand {
    font-family: var(--font-script);
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--rose);
    line-height: 1;
    margin: -0.15em 0;
}

.hero-date {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.08em;
    color: var(--gold);
    margin: 1.25rem 0 0;
}

.hero-subtitle {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-muted);
    margin: 1.5rem 0 0;
    line-height: 1.7;
}

/* ─── Paar-Fotos Showcase ─── */
.couple-section {
    padding-bottom: 2rem;
}

.couple-showcase {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 1rem;
}

.couple-photo {
    margin: 0;
    cursor: pointer;
    transition: transform 0.35s ease;
}

.couple-photo:hover {
    transform: translateY(-4px);
    z-index: 2;
}

.couple-photo-frame {
    background: var(--paper);
    padding: 8px 8px 28px;
    box-shadow:
        0 4px 20px rgba(158, 95, 112, 0.12),
        0 0 0 1px var(--rose-pale);
    position: relative;
}

.couple-photo-frame::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(212, 137, 154, 0.2);
    pointer-events: none;
}

.couple-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto;
}

.couple-photo figcaption {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-style: italic;
    text-align: center;
    color: var(--rose);
    margin-top: 0.65rem;
    letter-spacing: 0.02em;
}

/* Collage-Layout Desktop */
.couple-photo--1 {
    grid-column: 1 / 8;
    grid-row: 1 / 2;
}

.couple-photo--1 .couple-photo-frame img {
    aspect-ratio: 16 / 10;
}

.couple-photo--2 {
    grid-column: 8 / 13;
    grid-row: 1 / 3;
}

.couple-photo--2 .couple-photo-frame img {
    aspect-ratio: 3 / 4;
    min-height: 100%;
}

.couple-photo--3 {
    grid-column: 1 / 8;
    grid-row: 2 / 3;
}

.couple-photo--3 .couple-photo-frame img {
    aspect-ratio: 16 / 10;
}

.couple-photo--4 {
    grid-column: 1 / 7;
    grid-row: 3 / 4;
}

.couple-photo--4 .couple-photo-frame img {
    aspect-ratio: 3 / 4;
}

.couple-photo--5 {
    grid-column: 7 / 13;
    grid-row: 3 / 4;
}

.couple-photo--5 .couple-photo-frame img {
    aspect-ratio: 16 / 10;
}

.couple-photo--1 .couple-photo-frame { transform: rotate(-0.5deg); }
.couple-photo--2 .couple-photo-frame { transform: rotate(0.8deg); }
.couple-photo--3 .couple-photo-frame { transform: rotate(0.4deg); }
.couple-photo--4 .couple-photo-frame { transform: rotate(-0.6deg); }
.couple-photo--5 .couple-photo-frame { transform: rotate(0.3deg); }

.couple-photo:hover .couple-photo-frame {
    transform: rotate(0deg) !important;
    box-shadow: 0 10px 32px rgba(158, 95, 112, 0.2);
}

/* ─── Karten im Einladungslook ─── */
.card {
    position: relative;
    background: var(--paper);
    padding: 2.25rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
    border-top: 3px solid var(--rose-light);
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--rose-pale), transparent);
}

.section-head {
    text-align: center;
    margin-bottom: 1.75rem;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cream) 0%, var(--rose-pale) 100%);
    color: var(--rose);
    margin-bottom: 0.75rem;
}

.section-icon svg {
    width: 22px;
    height: 22px;
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: var(--rose-deep);
    letter-spacing: 0.02em;
}

.section-tagline {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--rose);
    margin: 0.25rem 0 0;
}

.hint {
    text-align: center;
    color: var(--text-muted);
    margin: 0 0 1.75rem;
    font-size: 0.92rem;
}

.hint strong {
    color: var(--rose-deep);
    font-weight: 500;
}

/* ─── Formular ─── */
.form-group {
    margin-bottom: 1.35rem;
}

.form-group label {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--rose-deep);
    margin-bottom: 0.45rem;
}

.label-note {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 0;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--rose-pale);
    border-bottom: 2px solid var(--rose-light);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 16px;
    background: var(--ivory);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input[type="text"]::placeholder {
    color: var(--text-light);
    font-style: italic;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--rose-light);
    box-shadow: 0 0 0 3px rgba(212, 137, 154, 0.18);
}

.file-drop {
    position: relative;
    border: 1px dashed var(--rose-light);
    border-radius: var(--radius);
    padding: 2.25rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s;
    background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
}

.file-drop:hover,
.file-drop.dragover {
    border-color: var(--rose);
    background: linear-gradient(180deg, #fff5f7 0%, var(--blush) 100%);
}

.file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-icon {
    display: block;
    margin: 0 auto 0.75rem;
    width: 48px;
    height: 48px;
    color: var(--rose);
}

.file-drop-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--rose-deep);
    margin: 0 0 0.2rem;
}

.file-drop-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0.75rem 0 0;
    letter-spacing: 0.05em;
}

.file-list {
    list-style: none;
    padding: 0.75rem 0 0;
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    border-top: 1px solid var(--rose-pale);
}

.file-list li {
    padding: 0.3rem 0;
    padding-left: 1rem;
    position: relative;
}

.file-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--rose-light);
    font-size: 0.6rem;
    top: 0.45rem;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.9rem 2.5rem;
    border: none;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--rose) 0%, var(--rose-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(158, 95, 112, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--rose-dark) 0%, var(--rose-deep) 100%);
    box-shadow: 0 6px 20px rgba(158, 95, 112, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--rose-deep);
    border: 1px solid var(--rose);
    box-shadow: inset 0 0 0 1px rgba(212, 137, 154, 0.15);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--rose-pale);
}

.download-section {
    text-align: center;
}

.download-text {
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 1.5rem;
}

.download-text strong {
    color: var(--rose);
    font-weight: 600;
}

.status {
    margin-top: 1rem;
    font-size: 0.88rem;
    text-align: center;
    min-height: 1.4em;
}

.status.success { color: var(--success); }
.status.error { color: var(--error); }

/* ─── Galerie ─── */
.gallery-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rose-pale);
}

.gallery-count {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-muted);
    margin: 0;
}

.gallery-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
}

.gallery-controls select {
    padding: 0.55rem 0.85rem;
    min-height: 44px;
    border: 1px solid var(--rose-pale);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 16px;
    background: var(--ivory);
    color: var(--text);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.gallery-gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.gallery-group {
    margin: 0;
}

.gallery-group-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--rose-pale);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--rose-deep);
    letter-spacing: 0.03em;
}

.gallery-group-count {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-muted);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    background: var(--cream);
    padding: 6px 6px 22px;
    box-shadow: 0 2px 12px rgba(158, 95, 112, 0.1);
    transform: rotate(0deg);
    transition: transform 0.3s, box-shadow 0.3s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.gallery-item:nth-child(odd) {
    transform: rotate(-1deg);
}

.gallery-item:nth-child(even) {
    transform: rotate(1deg);
}

.gallery-item:hover {
    transform: rotate(0deg) scale(1.03);
    box-shadow: 0 8px 24px rgba(158, 95, 112, 0.18);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: calc(100% - 16px);
    object-fit: cover;
    display: block;
}

.gallery-item .overlay {
    position: absolute;
    bottom: 6px;
    left: 6px;
    right: 6px;
    padding: 0.35rem 0.25rem;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-style: italic;
    text-align: center;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-style: italic;
    padding: 2.5rem 1rem;
}

.empty-icon {
    display: block;
    font-size: 1.5rem;
    color: var(--rose-light);
    margin-bottom: 0.75rem;
}

/* ─── Lightbox ─── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(61, 48, 53, 0.94);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-frame {
    padding: 12px;
    background: var(--paper);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    max-width: 92vw;
    max-height: 82vh;
}

.lightbox img {
    display: block;
    max-width: 88vw;
    max-height: 78vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: var(--rose-light);
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s, color 0.2s;
    line-height: 1;
    padding: 0.75rem;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    color: #fff;
}

.lightbox-close {
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
}

.lightbox-prev {
    left: max(0.5rem, env(safe-area-inset-left));
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: max(0.5rem, env(safe-area-inset-right));
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-caption {
    font-family: var(--font-display);
    font-style: italic;
    color: rgba(255,255,255,0.8);
    margin-top: 1.25rem;
    font-size: 1rem;
    letter-spacing: 0.03em;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ─── Footer ─── */
.footer {
    text-align: center;
    padding: 2rem 0 1rem;
}

.footer-floral {
    display: block;
    width: min(140px, 40%);
    height: auto;
    margin: 0 auto 1rem;
    opacity: 0.7;
}

.ornament--footer {
    width: 160px;
    margin-bottom: 1.25rem;
    color: var(--rose-light);
}

.footer-love {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--rose);
    margin: 0;
    line-height: 1;
}

.footer-names {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-light);
    margin: 0.5rem 0 0;
}

/* ─── Responsive / Mobile (Android & iPhone) ─── */
@media (max-width: 600px) {
    .page {
        padding-top: max(1rem, env(safe-area-inset-top));
    }

    .hero {
        padding: 1.5rem 0 2.5rem;
    }

    .hero-frame {
        padding: 1.5rem 1rem 2rem;
    }

    .hero-illustration {
        max-width: 240px;
    }

    .hero-subtitle br {
        display: none;
    }

    .name {
        font-size: clamp(2.8rem, 14vw, 4rem);
    }

    .card {
        padding: 1.5rem 1.15rem;
    }

    .deco-floral {
        width: min(160px, 38vw);
        opacity: 0.35;
    }

    .deco-floral--left { left: -30px; }
    .deco-floral--right { right: -35px; bottom: 20px; }

    .gallery-toolbar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .gallery-controls {
        justify-content: center;
    }

    .gallery-controls select {
        flex: 1;
        max-width: 100%;
    }

    .gallery,
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .gallery-gallery {
        gap: 1.5rem;
    }

    .gallery-group-title {
        font-size: 1rem;
    }

    .gallery-item {
        padding: 4px 4px 18px;
        transform: none !important;
    }

    .gallery-item:hover {
        transform: scale(1.02) !important;
    }

    .btn {
        letter-spacing: 0.1em;
        padding: 0.9rem 1.25rem;
        width: 100%;
    }

    .file-drop {
        padding: 1.75rem 1rem;
    }

    .lightbox-frame {
        padding: 8px;
        margin: 0 0.5rem;
    }

    .lightbox img {
        max-width: calc(100vw - 2rem);
        max-height: 70vh;
    }

    .footer-floral {
        width: min(110px, 35%);
    }

    .couple-showcase {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
        gap: 0.75rem;
    }

    .couple-photo--1,
    .couple-photo--2,
    .couple-photo--3,
    .couple-photo--4,
    .couple-photo--5 {
        grid-column: auto;
        grid-row: auto;
    }

    .couple-photo--1 {
        grid-column: 1 / 3;
    }

    .couple-photo--1 .couple-photo-frame img,
    .couple-photo--3 .couple-photo-frame img,
    .couple-photo--5 .couple-photo-frame img {
        aspect-ratio: 16 / 10;
    }

    .couple-photo--2 .couple-photo-frame img,
    .couple-photo--4 .couple-photo-frame img {
        aspect-ratio: 3 / 4;
    }

    .couple-photo-frame {
        padding: 6px 6px 22px;
        transform: none !important;
    }

    .couple-photo figcaption {
        font-size: 0.78rem;
    }
}

@media (max-width: 380px) {
    .gallery,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-illustration {
        max-width: 200px;
    }
}

@media (min-width: 900px) {
    .hero-names {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0.4em;
    }

    .ampersand {
        margin: 0 0.1em;
    }

    .hero-illustration {
        max-width: 340px;
    }
}
