/* ==========================================================================
   Mariana & Marco · 10.04.2027
   Cores extraídas de assets/canva/ (monograma e florais em aquarela)
   ========================================================================== */
:root {
    /* Papel */
    --paper: #eeece1; /* base creme/marfim */
    --paper-light: #f7f5ee; /* cards e cartão do convite */
    --envelope: #e4dfcc; /* fundo das fotos enquanto carregam */

    /* Tinta (monograma) */
    --ink: #1f1e1a;
    --ink-soft: #57564c;
    --line: rgba(31, 30, 26, 0.14);

    /* Destaques (florais) */
    --primary: #819450; /* verde-sálvia dos ramos */
    --primary-deep: #5e6d38; /* sálvia escuro: botões (contraste AA com texto claro) */
    --secondary: #e1744a; /* terracota das pétalas */
    --accent: #e7b03f; /* dourado/mostarda dos botões florais */

    /* Tipografia */
    --font-script: 'Great Vibes', cursive;
    --font-title: 'Cinzel', serif;
    --font-body: 'Cardo', Georgia, serif;

    /* Espaçamento */
    --section-pad: clamp(88px, 14vw, 168px);
    --gutter: clamp(20px, 5vw, 40px);
    --radius: 6px;
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: clamp(17px, 1.15vw + 12px, 20px);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

[hidden] {
    display: none !important;
}

main,
.footer {
    position: relative;
    z-index: 1;
}

/* Partículas: atrás de tudo, sem capturar toque */
#atmosphere {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease;
}
#atmosphere.is-on {
    opacity: 1;
}

/* ==========================================================================
   Hero: foto em tela cheia que se dissolve no papel com a rolagem
   ========================================================================== */
.hero {
    position: relative;
    height: 100svh;
    overflow: hidden;
    isolation: isolate;
    color: var(--paper-light);
}

.hero-media,
.hero-shade,
.hero-glow,
.hero-paper {
    position: absolute;
    inset: 0;
}

/* Base da foto sempre se funde no creme: sem corte reto com a seção seguinte */
.hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 22%;
    background: linear-gradient(0deg, var(--paper), rgba(238, 236, 225, 0));
    pointer-events: none;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 52% 45%; /* casal no centro */
}

/* Vinheta: escurece topo e base para o texto ler bem sobre o céu/água */
.hero-shade {
    background:
        linear-gradient(
            180deg,
            rgba(31, 30, 26, 0.35) 0%,
            rgba(31, 30, 26, 0) 30%
        ),
        linear-gradient(
            0deg,
            rgba(31, 30, 26, 0.6) 0%,
            rgba(31, 30, 26, 0.15) 45%,
            rgba(31, 30, 26, 0) 65%
        );
}

/* Luz de fim de tarde nas cores dos florais; cresce com o scroll */
.hero-glow {
    background: radial-gradient(
        120% 80% at 50% 110%,
        rgba(231, 176, 63, 0.85),
        rgba(225, 116, 74, 0.45) 45%,
        transparent 75%
    );
    mix-blend-mode: soft-light;
    opacity: 0;
}

/* Papel creme subindo de baixo: a foto "vira" a página */
.hero-paper {
    background: linear-gradient(
        0deg,
        var(--paper) 0%,
        var(--paper) 45%,
        rgba(238, 236, 225, 0) 100%
    );
    transform: translateY(100%);
}

.hero-content {
    position: absolute;
    inset: auto 0 max(17svh, 120px);
    padding: 0 var(--gutter);
    text-align: center;
}
/* Entrada nos filhos: o GSAP anima o .hero-content, então os dois não disputam opacity/transform */
.hero-content > * {
    animation: hero-in 1.6s ease-out both;
}
.hero-content > :nth-child(2) {
    animation-delay: 0.15s;
}
.hero-content > :nth-child(3) {
    animation-delay: 0.3s;
}
@keyframes hero-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

.hero-mono {
    width: clamp(44px, 9vw, 64px);
    margin: 0 auto 10px;
    filter: invert(1);
    opacity: 0.9;
}
.hero-names {
    margin: 0;
    font-family: var(--font-title);
    font-weight: 400;
    font-size: clamp(3rem, 11vw, 6.5rem);
    line-height: 1.1;
    text-shadow: 0 2px 24px rgba(31, 30, 26, 0.35);
}
.hero-names span {
    color: var(--accent);
    margin: 0 0.1em;
}
/* Mobile: um nome por linha, "&" no meio */
@media (max-width: 600px) {
    .hero-names span { display: block; margin: 0; }
}
.hero-date {
    margin: 8px 0 0;
    font-family: var(--font-title);
    font-size: clamp(0.85rem, 2.2vw, 1.1rem);
    letter-spacing: 0.45em;
}

.scroll-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: max(4svh, 20px);
    z-index: 1; /* acima da transição creme da base */
    color: var(--accent); /* mesmo amarelo do "&" */
    font-weight: 600;
    text-shadow: 0 1px 8px rgba(31, 30, 26, 0.45); /* destaca o amarelo sobre o creme da base */
    margin: 0;
    font-family: var(--font-title);
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    display: grid;
    justify-items: center;
    gap: 10px;
}
.scroll-hint::after {
    content: '';
    width: 1px;
    height: 36px;
    background: linear-gradient(var(--accent), transparent);
    animation: hint 2.2s ease-in-out infinite;
    transform-origin: top;
}
@keyframes hint {
    0% {
        transform: scaleY(0);
        opacity: 1;
    }
    60% {
        transform: scaleY(1);
        opacity: 1;
    }
    100% {
        transform: scaleY(1);
        opacity: 0;
    }
}

/* ==========================================================================
   Seções
   ========================================================================== */
.section {
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--section-pad) var(--gutter) 0;
    text-align: center;
}

.section-head {
    margin-bottom: clamp(40px, 7vw, 72px);
}

.ornament {
    width: 120px;
    margin: 0 auto 8px;
    opacity: 0.95;
}

h2 {
    margin: 0;
    font-family: var(--font-title);
    font-weight: 400;
    font-size: clamp(1.3rem, 2.4vw + 0.6rem, 2rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.eyebrow {
    margin: 0 0 20px;
    font-family: var(--font-title);
    font-size: 0.8rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--primary-deep);
}

/* Contagem regressiva: logo após o banner, que já termina em papel creme */
.countdown-section {
    padding-top: clamp(32px, 6vw, 64px);
}
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 640px;
    margin: 0 auto;
}
.cd-item {
    display: grid;
    gap: 6px;
    padding: 0 8px;
}
.cd-item + .cd-item {
    border-left: 1px solid var(--line);
}
.cd-num {
    font-family: var(--font-title);
    font-size: clamp(2rem, 7vw, 3.6rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.cd-label {
    font-family: var(--font-title);
    font-size: clamp(0.6rem, 1.6vw, 0.75rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.countdown-done {
    font-family: var(--font-script);
    font-size: 2.6rem;
    margin: 0;
}
.countdown-date {
    margin: 28px 0 0;
    font-family: var(--font-title);
    letter-spacing: 0.4em;
    color: var(--secondary);
}

/* Galeria: 3 fotos retrato; no celular a primeira em destaque */
.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(20px, 3vw, 36px);
    align-items: start;
}
.gallery .photo:first-child {
    grid-column: 1 / -1;
}
@media (min-width: 820px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    .gallery .photo:first-child {
        grid-column: auto;
    }
    .gallery .photo:nth-child(2) {
        margin-top: 72px;
    } /* deslocamento editorial */
}

.photo {
    margin: 7px;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    /* moldura dupla fina por fora (não é cortada pelo overflow) */
    box-shadow:
        0 0 0 6px var(--paper-light),
        0 0 0 7px var(--line);
    background: var(--envelope);
    cursor: zoom-in;
}
.photo img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transform: scale(1.14); /* folga para o parallax */
    transition: filter 0.4s ease;
}
.gallery .photo:first-child img {
    aspect-ratio: 4 / 5;
}
@media (min-width: 820px) {
    .gallery .photo:first-child img {
        aspect-ratio: 3 / 4;
    }
}
.photo:hover img {
    filter: brightness(1.04) saturate(1.05);
}

/* Cards */
.card-grid {
    display: grid;
    gap: clamp(20px, 3vw, 32px);
    max-width: 980px;
    margin: 0 auto;
}
@media (min-width: 820px) {
    .card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    display: flex;
    flex-direction: column;
    padding: clamp(36px, 5vw, 56px) clamp(24px, 4vw, 44px);
    background: var(--paper-light);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: 1px solid var(--line);
    outline-offset: -10px;
}
.card .btn-row {
    margin-top: auto;
    padding-top: 28px;
} /* botões alinhados na base dos dois cards */
.card-kicker {
    margin: 0 0 14px;
    font-family: var(--font-title);
    font-size: 0.75rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--secondary);
}
.card-date {
    margin: 10px 0 0;
    font-family: var(--font-title);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary-deep);
}
.card-title {
    margin: 0;
    font-family: var(--font-title);
    font-weight: 500;
    font-size: clamp(1.15rem, 1.6vw + 0.6rem, 1.5rem);
    letter-spacing: 0.06em;
    line-height: 1.35;
}
.card-text {
    margin: 18px auto 0;
    max-width: 32em;
}

/* Informações importantes: cards numerados */
.info-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 1080px;
    display: grid;
    gap: clamp(20px, 3vw, 32px);
    counter-reset: none;
}
@media (min-width: 900px) {
    .info-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.info {
    position: relative;
    padding: clamp(32px, 4vw, 44px) clamp(24px, 3vw, 36px)
        clamp(28px, 4vw, 40px);
    background: var(--paper-light);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-top: 3px solid var(--accent);
    text-align: left;
}
.info:nth-child(2) {
    border-top-color: var(--primary);
}
.info:nth-child(3) {
    border-top-color: var(--secondary);
}
.info-num {
    display: block;
    font-family: var(--font-title);
    font-size: clamp(2.6rem, 5vw, 3.4rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--ink-soft); /* número vazado, estilo editorial */
    margin-bottom: 14px;
}
.info-title {
    margin: 0 0 10px;
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.info p {
    margin: 0;
    color: var(--ink-soft);
}
.info strong {
    color: var(--ink);
}

.swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}
.swatch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-title);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.swatch::before {
    content: '';
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--c);
    border: 1px solid var(--line);
    /* risco diagonal: "evitar" */
    background-image: linear-gradient(
        135deg,
        transparent 46%,
        var(--ink-soft) 47%,
        var(--ink-soft) 53%,
        transparent 54%
    );
    background-color: var(--c);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 32px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 28px;
    border: 1px solid var(--primary-deep);
    border-radius: 999px;
    background: var(--primary-deep);
    color: var(--paper-light);
    font-family: var(--font-title);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}
.btn:hover {
    background: var(--ink);
    border-color: var(--ink);
    transform: translateY(-2px);
}
.btn-ghost {
    background: transparent;
    color: var(--primary-deep);
}
.btn-ghost:hover {
    color: var(--paper-light);
}
.btn:focus-visible,
.lightbox-close:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .btn-row {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
}

/* Rodapé */
.footer {
    padding: var(--section-pad) var(--gutter) 56px;
    text-align: center;
    font-family: var(--font-title);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--ink-soft);
}
.footer img {
    width: 56px;
    margin: 0 auto 16px;
    opacity: 0.85;
}

/* Lightbox */
.lightbox {
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: var(--gutter);
    border: 0;
    background: transparent;
    place-items: center;
}
.lightbox[open] {
    display: grid;
}
.lightbox::backdrop {
    background: rgba(31, 30, 26, 0.88);
}
.lightbox img {
    max-width: min(92vw, 1400px);
    max-height: 86svh;
    width: auto;
    border-radius: var(--radius);
    box-shadow: 0 0 0 6px var(--paper-light);
}
.lightbox-close {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: 16px;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(247, 245, 238, 0.4);
    border-radius: 50%;
    background: transparent;
    color: var(--paper-light);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}
