:root {
    --bg-color: #fbfbf9;
    --text-color: #1a1a1a;
    --text-light: #555555;
    --brand-dark: #0f0f0f;
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: "Cormorant Garamond", "Playfair Display", serif;
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-med: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Loader */
.loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity var(--transition-slow);
}
.loader.fade-out {
    opacity: 0;
    pointer-events: none;
}
.loader-text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-light);
    animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Scroll Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Utility */
img {
    max-width: 100%;
    display: block;
}

/* 1. Hero */
.hero {
    position: relative;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
}

.hero-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: opacity 2.5s ease-in-out, transform 15s ease-out;
}

.img-primary { z-index: 2; opacity: 1; }
.img-primary.hide { opacity: 0; }
.img-secondary { z-index: 1; opacity: 1; }
.hero-img.zoom-in { transform: scale(1.05); }

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 4;
    padding: 0 20px;
    margin-top: 10vh;
    animation: fadeInUp 1.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 400;
    font-style: italic;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 3.5rem;
}

.hero-btn {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 14px 36px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all var(--transition-med);
    border-radius: 40px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.hero-btn:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    transform: scale(1.02);
}

/* 2. Intro Editorial */
.intro {
    padding: 6vh 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(0,0,0,0.03) 50%, var(--bg-color) 100%);
}

.intro-text {
    max-width: 800px;
    font-size: 0.85rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #999;
}

/* 3. Seção Noivos - Editorial Grid */
.couple-section {
    padding: 5vh 20px 15vh;
    max-width: 1440px;
    margin: 0 auto;
}

.editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-flow: dense;
    gap: 3vw;
}

.ed-item {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
}
.ed-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.ed-item:hover img {
    transform: scale(1.03);
}

/* Editorial sizes */
.ed-large { grid-column: span 12; aspect-ratio: 16/9; }
.ed-medium-h { grid-column: span 8; aspect-ratio: 4/3; }
.ed-small-h { grid-column: span 4; aspect-ratio: 4/3; }
.ed-medium-v { grid-column: span 6; aspect-ratio: 4/5; }
.ed-large-v { grid-column: span 8; aspect-ratio: 3/4; }
.ed-small-v { grid-column: span 4; aspect-ratio: 3/4; }

/* Destaque (DSC08876 etc) */
.ed-hero { 
    grid-column: span 12; 
    margin: 8vh 0;
}
.ed-hero img { 
    max-height: 85vh; 
    object-fit: contain; 
}

/* 4. Família e Presenças (Masonry) */
.family-section {
    padding: 15vh 20px 20vh;
    background-color: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 10vh;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-style: italic;
    font-weight: 400;
    color: var(--brand-dark);
}

.masonry-grid {
    column-count: 3;
    column-gap: 2vw;
    max-width: 1600px;
    margin: 0 auto;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 2vw;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 2px;
}
.masonry-item img {
    width: 100%;
    display: block;
    transition: transform var(--transition-med), filter var(--transition-med);
    background-color: #f7f7f7;
}
.masonry-item:hover img {
    transform: scale(1.02);
    filter: brightness(0.9);
}

/* Responsividade */
@media (max-width: 1200px) {
    .editorial-grid { gap: 4vw; }
    .ed-medium-h, .ed-large-v { grid-column: span 12; aspect-ratio: auto; }
    .ed-small-h, .ed-small-v { grid-column: span 6; aspect-ratio: auto; }
}

@media (max-width: 900px) {
    .masonry-grid { column-count: 2; column-gap: 3vw; }
    .masonry-item { margin-bottom: 3vw; }
}

@media (max-width: 768px) {
    .masonry-grid { column-count: 1; column-gap: 5vw; }
    .masonry-item { margin-bottom: 5vw; }
    
    .editorial-grid { display: flex; flex-direction: column; gap: 8vw; }
    .ed-item img { max-height: 70vh; object-fit: cover; }
    .ed-hero img { max-height: 80vh; object-fit: contain; }
    
    .intro { padding: 5vh 20px; }
    .hero-btn { padding: 12px 28px; font-size: 0.8rem; }
}

/* 5. Imagem Final */
.closing-image {
    height: 100vh;
    width: 100%;
}
.closing-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Disabled fixed for better mobile feel, or use a specific element for parallax */
}

/* 6. CTA Encerramento */
.closing-cta {
    padding: 25vh 20px;
    text-align: center;
    background-color: var(--brand-dark);
    color: #fff;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 2.5rem;
    line-height: 1.25;
}

.cta-text {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 300;
    color: #b0b0b0;
    margin-bottom: 4rem;
}

.cta-btn {
    display: inline-block;
    background-color: #fff;
    color: var(--brand-dark);
    text-decoration: none;
    padding: 18px 48px;
    border-radius: 40px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    transition: transform var(--transition-med), background-color var(--transition-med);
}
.cta-btn:hover {
    transform: translateY(-2px);
    background-color: #e5e5e5;
}

/* 7. Footer */
.footer {
    padding: 6vh 20px;
    text-align: center;
    background-color: #fff;
}

.footer-signature {
    font-size: 0.95rem;
    color: #777;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sans-bold {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--brand-dark);
}

.serif-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    font-size: 1.4rem;
    color: var(--brand-dark);
    margin: 0 6px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    border-radius: 2px;
    transform: scale(0.95);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox.active .lightbox-content img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 3rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: opacity var(--transition-med);
    z-index: 10001;
}
.lightbox-close:hover {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .lightbox-close { top: 15px; right: 25px; font-size: 2.5rem; }
}
