/* ==========================================================================
   1. ZMIENNE & RESET (Fine Art Jasna Paleta)
   ========================================================================== */
:root {
    --primary-color: #77876F;      
    --primary-hover: #5d6b56;      
    --accent-pink: #C88788;        
    --accent-champagne: #E5D0A9;   
    --accent-gold: #C39B62;        
    --bg-pearl: #F3EFE5;           
    --border-color: rgba(193, 178, 168, 0.4); 
    
    --card-bg: rgba(255, 255, 255, 0.85);            
    --text-main: #2c302a;          
    --text-muted: #5a5f57;         
    --error-color: #d32f2f;

    --font-hero: "Alex Brush", cursive;
    --font-heading: "Lora", serif;
    --font-body: "Montserrat", sans-serif;
}

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

html { 
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    position: relative; 
    font-family: var(--font-body);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    background-color: var(--bg-pearl);
    
    background-image: 
        linear-gradient(rgba(243, 239, 229, 0.92), rgba(243, 239, 229, 0.92)), 
        url('../assets/background.jpeg');
    background-repeat: repeat;
    background-size: auto; 
    background-attachment: fixed;
    background-position: top left;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
}

/* ==========================================================================
   2. ETERYCZNA GŁĘBIA & ŚWIATŁO
   ========================================================================== */
.ethereal-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; 
    min-height: 100vh;
    background: linear-gradient(
        to bottom,
        #E3B6B7 0%,             
        #e0b0b1 400px,           
        rgba(227, 182, 183, 0.7) 800px, 
        rgba(227, 182, 183, 0) 1300px    
    );
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.top-vignette {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 50vh;
    background: radial-gradient(120% 100% at 50% -10%, rgba(30, 20, 20, 0.25) 0%, transparent 100%);
}

.light-leak {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px); 
    opacity: 0.6;
    animation: slow-drift 25s infinite alternate ease-in-out;
    mix-blend-mode: overlay; 
}

.leak-1 { background: rgba(255,255,255,0.8); width: clamp(260px, 45vw, 600px); height: clamp(260px, 45vw, 600px); top: -10vh; left: -10vw; }
.leak-2 { background: rgba(195,155,98,0.5); width: clamp(300px, 55vw, 700px); height: clamp(300px, 55vw, 700px); top: 30vh; right: -20vw; animation-delay: -5s; }
.leak-3 { background: rgba(255,255,255,0.7); width: clamp(220px, 35vw, 500px); height: clamp(220px, 35vw, 500px); top: 60vh; left: 20vw; animation-delay: -12s; }

@keyframes slow-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 10%) scale(1.1); }
    100% { transform: translate(-5%, -5%) scale(0.95); }
}

/* ==========================================================================
   3. NARZĘDZIA & DEKORACJE
   ========================================================================== */
.text-center { text-align: center; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.text-sm { font-size: clamp(0.75rem, 2vw, 0.85rem); }
.text-muted { color: var(--text-muted); }

.balanced-text {
    text-wrap: balance;
}

.prose-narrow {
    max-width: 40ch;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    line-height: 1.7;
}

.section-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: clamp(1.8rem, 6vw, 2.2rem);
    margin-bottom: 5px;
}

.subtitle {
    color: var(--accent-gold);
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
}

.elegant-divider {
    width: 75%;
    max-width: 300px;
    height: 30px;
    margin: 15px auto;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0,5 L45,5 M55,5 L100,5" stroke="%2377876F" stroke-width="0.5"/><circle cx="50" cy="5" r="1.5" fill="%23C88788"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

/* ==========================================================================
   4. NAWIGACJA & LAYOUT
   ========================================================================== */
.top-nav {
    background-color: rgba(255, 255, 255, 0.75); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); 
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(119, 135, 111, 0.2); 
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    min-height: 75px;
    gap: clamp(5px, 2vw, 20px); 
}

.nav-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px clamp(10px, 3vw, 25px);
    text-decoration: none;
    color: var(--primary-color); 
    font-family: var(--font-heading);
    font-size: clamp(0.85rem, 3vw, 1.15rem); 
    font-weight: 500;   
    line-height: 1.25;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color); 
    transition: width 0.3s ease;
}

.nav-link:hover { color: var(--primary-hover); }
.nav-link:hover::after { width: 40%; }
.nav-link.active { color: var(--primary-hover); font-weight: 700; }
.nav-link.active::after { width: 100%; }

.app-main {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(20px, 5vw, 40px) clamp(15px, 4vw, 20px) 60px;
    overflow-x: hidden;
    position: relative; 
    z-index: 2; 
}

.card-container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: clamp(25px, 6vw, 40px); 
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04); 
    border: 1px solid rgba(119, 135, 111, 0.15); 
    position: relative;
    z-index: 1; 
}

.card-container::before {
    content: '';
    position: absolute;
    top: 12px; left: 12px; right: 12px; bottom: 12px;
    border: 1px solid rgba(195, 155, 98, 0.35); 
    border-radius: 8px;
    pointer-events: none;
    z-index: -1;
    transition: all 0.4s ease;
}

.card-container:hover::before {
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border-color: rgba(195, 155, 98, 0.8);
}

.welcome-card { padding-top: clamp(40px, 8vw, 50px); }
.welcome-card::before {
    border-radius: 150px 150px 8px 8px; 
    border-width: 1.5px;
    border-color: rgba(195, 155, 98, 0.5);
}

.card-ornament {
    width: clamp(25px, 5vw, 35px);
    height: clamp(25px, 5vw, 35px);
    margin: 0 auto clamp(15px, 4vw, 20px) auto;
    opacity: 0.8;
}

.view-section { display: none; }
.view-section.active { display: block; }

/* ==========================================================================
   6. AKT I: ZAPIERAJĄCE DECH HERO (Oryginalny układ)
   ========================================================================== */
.hero-cinematic {
    position: relative;
    height: clamp(550px, 85vh, 800px);
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(40px, 10vw, 80px);
    perspective: 1000px; 
}

.hero-date-top {
    font-family: var(--font-hero); 
    color: var(--bg-pearl);
    font-size: clamp(3.2rem, 12vw, 5.5rem);
    font-weight: 700; 
    z-index: 5;
    margin-bottom: -15px; 
    text-align: center;
    width: 100%;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2), 0 4px 15px rgba(100, 30, 30, 0.25); 
    opacity: 0;
    animation: textIntro 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

.hero-visual-center {
    position: relative;
    z-index: 2;
    width: clamp(240px, 55vw, 450px);
    aspect-ratio: 4/5;
}

.main-photo-mask {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; 
    z-index: 1; 
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    opacity: 0;
    animation: photoIntro 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes photoIntro {
    0% { opacity: 0; transform: translateY(40px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.main-photo-mask img { width: 100%; height: 100%; object-fit: cover; }

.gold-frame-offset {
    position: absolute;
    top: 15px; left: -15px; right: 15px; bottom: -15px; 
    border: 2.5px solid var(--accent-gold); 
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: 3; 
    opacity: 0;
    animation: frameIntro 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.3s;
}

@keyframes frameIntro {
    0% { opacity: 0; transform: translateY(-30px) scale(0.95); }
    100% { opacity: 0.9; transform: translateY(0) scale(1); } 
}

.hero-typography {
    position: absolute;
    z-index: 5;
    text-align: center;
    pointer-events: none;
    width: 100%;
    margin-top: clamp(80px, 15vw, 110px); 
}

.names-elegant {
    font-family: var(--font-hero);
    color: var(--accent-gold); 
    font-size: clamp(3.5rem, 14vw, 7rem); 
    font-weight: 400; 
    line-height: 0.9;
    text-shadow: 2px 3px 10px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 255, 255, 0.6); 
    opacity: 0;
    animation: textIntro 2.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.5s;
}

@keyframes textIntro {
    0% { opacity: 0; transform: scale(0.95); filter: blur(4px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.names-elegant .ampersand {
    display: block; 
    font-size: clamp(2.2rem, 8vw, 3.8rem); 
    color: var(--primary-color); 
    margin: -10px 0;
}

.welcome-greeting {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
    font-weight: 700; 
}
.welcome-text {
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    color: var(--text-muted);
    line-height: 1.8;
}

/* ==========================================================================
   7. SEKCJE DZIELONE
   ========================================================================== */
.split-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(15px, 4vw, 20px);
    align-items: stretch; 
}

.split-text.card-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.split-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.framed-image {
    width: 100%;
    height: 100%;
    min-height: clamp(300px, 60vw, 100%);
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
}

.arch-image {
    border-radius: 150px 150px 12px 12px;
    border: 6px solid #fff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(195, 155, 98, 0.3);
}

/* ==========================================================================
   8. MAPY, KONTAKT & FAQ
   ========================================================================== */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(15px, 4vw, 20px);
}

.location-card {
    display: flex;
    flex-direction: column;
}

.location-time {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.location-address {
    margin-bottom: 20px;
}

.map-responsive {
    margin-top: auto;
    position: relative;
    padding-bottom: 75%;
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid rgba(195,155,98,0.2);
}

.map-responsive iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-person {
    background: rgba(255,255,255,0.7); 
    padding: clamp(10px, 3vw, 15px) clamp(15px, 4vw, 25px);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-person:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(195, 155, 98, 0.1);
}

.contact-person .role {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent-gold);
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
}

.phone-link {
    margin-top: 5px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(1rem, 3vw, 1.1rem);
    transition: color 0.2s;
    cursor: pointer;
}

.phone-link::after {
    content: attr(data-country) "\00a0" attr(data-a) "\00a0" attr(data-b) "\00a0" attr(data-c);
}

.phone-link:hover { color: var(--accent-pink); }

.faq-container { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--border-color);
    border-left: 4px solid transparent; 
    border-radius: 8px;
    overflow: hidden;
    transition: background 0.3s, border-color 0.3s;
}
.faq-item:hover { 
    background: #fff; 
    border-left-color: var(--accent-pink); 
}
.faq-item[open] {
    background: rgba(200, 135, 136, 0.05); 
    border-color: rgba(200, 135, 136, 0.3);
    border-left-color: var(--accent-pink);
}

.faq-item summary {
    padding: clamp(14px, 3vw, 18px) 48px clamp(14px, 3vw, 18px) clamp(15px, 4vw, 20px);
    font-weight: 500;
    font-family: var(--font-heading);
    cursor: pointer;
    list-style: none;
    position: relative;
    color: var(--primary-color); 
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    transition: color 0.3s;
}

.faq-item[open] summary { color: var(--accent-pink); }

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(20px, 5vw, 24px);
    font-weight: 300;
    color: var(--accent-pink); 
    transition: transform 0.3s;
}

.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-content {
    padding: 0 20px 20px 20px;
    color: var(--text-muted);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    line-height: 1.6;
}

.custom-list {
    padding-left: 20px;
    list-style-type: disc;
    color: var(--primary-color);
}
.custom-list li { margin-bottom: 6px; }
.custom-list li strong { color: var(--text-main); }

.inline-link {
    color: var(--accent-pink);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--accent-pink);
    transition: opacity 0.2s;
}

.inline-link:hover { 
    opacity: 0.7;
}

.info-box {
    padding: 15px;
    background-color: rgba(200, 135, 136, 0.08);
    border-left: 3px solid var(--accent-pink);
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
}

/* ==========================================================================
   9. FORMULARZE (RSVP) & ZDJĘCIA
   ========================================================================== */
.rsvp-title { font-size: clamp(2rem, 7vw, 2.8rem); }
.rsvp-desc { font-size: clamp(0.95rem, 3vw, 1.15rem); line-height: 1.6; }

.photos-title { font-size: clamp(2.3rem, 8vw, 3.5rem); }
.photos-subtitle { 
    font-size: clamp(0.95rem, 3vw, 1.1rem); 
    letter-spacing: 2px; 
    color: var(--accent-gold); 
}
.cta-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
}

input[type="text"], 
select, 
textarea {
    width: 100%;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid rgba(195, 155, 98, 0.5); 
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    background-color: transparent;
    transition: all 0.3s;
    color: var(--text-main);
}

select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 24px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%2377876F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 4px center;
    cursor: pointer;
}

input[type="text"]::placeholder, textarea::placeholder { color: #999; }

input[type="text"]:focus, select:focus, textarea:focus {
    outline: none;
    border-bottom-color: var(--accent-pink);
}

textarea { resize: vertical; min-height: 70px; }

.submit-btn {
    width: 100%;
    padding: clamp(12px, 3vw, 16px);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    font-weight: 500;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(119, 135, 111, 0.2);
}

.submit-btn:hover { 
    background-color: var(--primary-hover); 
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(119, 135, 111, 0.3);
}
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled { background-color: #a4b09e; cursor: not-allowed; box-shadow: none; transform: none; }

.inline-btn { 
    display: inline-block; 
    width: auto; 
    max-width: 100%;
    padding: 14px clamp(18px, 5vw, 35px); 
    text-decoration: none; 
}

.outline-btn {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: none;
}
.outline-btn:hover { background: var(--primary-color); color: #fff; }

.add-guest-btn {
    background-color: transparent;
    color: var(--accent-gold);
    border: 1px dashed var(--accent-gold);
    padding: clamp(10px, 2.5vw, 12px);
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: clamp(0.85rem, 3vw, 1rem);
}

.add-guest-btn span { font-size: 1.2rem; }
.add-guest-btn:hover { 
    background-color: var(--accent-gold);
    color: #fff;
    border-style: solid;
}

.guest-row {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 3vw, 15px);
    background: rgba(243, 239, 229, 0.5);
    padding: clamp(15px, 4vw, 25px) clamp(10px, 3vw, 20px);
    border-radius: 8px;
    position: relative;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.guest-line { 
    display: flex; 
    gap: clamp(10px, 3vw, 20px); 
    width: 100%; 
}
.guest-line > * { flex: 1; }

.remove-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    background-color: var(--bg-pearl);
    color: var(--accent-pink);
    border: 1px solid var(--accent-pink);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}
.remove-btn:hover { background-color: var(--accent-pink); color: #fff; transform: scale(1.1); }

.comment-group { margin-top: 10px; padding-top: 20px; }

.cf-turnstile-wrapper { 
    display: flex; 
    justify-content: center; 
    margin: 20px 0;
    width: 100%;
    overflow: hidden;
}

.success-message { text-align: center; padding: 50px 20px; }
.success-icon { font-size: 3rem; margin-bottom: 15px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* ==========================================================================
   10. ANIMACJE SCROLL & MEDIA QUERIES
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    .hero-cinematic {
        height: auto;
        padding: 10px 0;
        margin-bottom: 45px;
    }

    .hero-date-top {
        -webkit-text-stroke: 0.8px var(--bg-pearl);
        paint-order: stroke fill;
    }

    .split-section.reverse .split-text { order: unset; }
    .split-section.reverse .split-image { order: unset; }
}

@media (max-width: 550px) {
    .guest-line { flex-direction: column; }
}