@import url('CormorantGaramond.css');

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: #06172b;
    color: #fff5e1;
    font: 16px Montserrat, Arial, sans-serif;
    text-align: center
}

h1,
h2,
h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    margin: .3em 0
}

h1 {
    font-size: clamp(64px, 12vw, 120px);
    font-family: 'Great Vibes', cursive
}

h2 {
    font-size: clamp(38px, 7vw, 66px);
    color: #f3d393
}

p {
    line-height: 1.9
}

button,
a.btn {
    cursor: pointer;
    border: 1px solid #e6c17b;
    border-radius: 40px;
    padding: 15px 25px;
    background: linear-gradient(120deg, #f9e6b4, #c69a50);
    color: #13233a;
    font: 600 13px Montserrat, Arial;
    text-decoration: none;
    display: inline-block
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid white
}

#intro {
    position: fixed;
    inset: 0;
    z-index: 10;
    background: linear-gradient(#03132644, #03132655), url('../../assets/img/jardin.png') center/cover;
    display: grid;
    place-items: center;
    transition: opacity 1s, visibility 1s
}

#intro.open {
    opacity: 0;
    visibility: hidden
}

.introtext {
    padding: 30px;
    max-width: 450px
}

.seal {
    font-size: 60px;
    color: #f5d28b;
    text-shadow: 0 0 25px gold
}

.eyebrow {
    letter-spacing: 5px;
    font-size: 11px;
    text-transform: uppercase;
    color: #f4d99e
}

.hero {
    min-height: 100svh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    background: radial-gradient(ellipse at 20% 40%, #25466a, #06172b 75%)
}

.portrait {
    width: 100%;
    height: 100svh;
    object-fit: contain;
    display: block
}

.heroText {
    padding: 40px
}

.ornament {
    color: #e9c57c;
    font-size: 28px;
    letter-spacing: 10px
}

.section {
    padding: 90px 24px;
    max-width: 850px;
    margin: auto
}

.panel {
    background: #112b46a8;
    border: 1px solid #c5a66a66;
    border-radius: 120px 120px 20px 20px;
    padding: 55px 25px
}

.garden {
    background: linear-gradient(#06172b44, #06172bee), url('../../assets/img/jardin.png') center/cover
}

.count {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap
}

.count div {
    border: 1px solid #d9b77577;
    border-radius: 12px;
    padding: 16px;
    min-width: 72px
}

.count b {
    display: block;
    font: 36px Georgia;
    color: #f6d99f
}

.count small {
    font-size: 10px;
    text-transform: uppercase
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px
}

.tile {
    border: 1px solid #c5a66a66;
    padding: 35px 20px;
    border-radius: 90px 90px 12px 12px;
    background: #102943
}

.tile span {
    font-size: 35px;
    color: #e9c57c
}

.timeline {
    max-width: 360px;
    margin: auto;
    text-align: left;
    border-left: 1px solid #c5a66a;
    padding-left: 25px
}

.timeline p {
    position: relative
}

.timeline p:before {
    content: '✦';
    position: absolute;
    left: -34px;
    color: #f3d393
}

.gallery img {
    width: 100%;
    border-radius: 12px;
    cursor: zoom-in
}

.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px
}

input,
select {
    width: 100%;
    padding: 15px;
    margin: 8px 0;
    border: 1px solid #c5a66a88;
    background: #071b30;
    color: white;
    border-radius: 8px;
    font: inherit
}

form {
    max-width: 400px;
    margin: auto
}

nav {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #07182bee;
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 14px;
    overflow: auto
}

nav a {
    color: #f3d393;
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap
}

#music {
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 5;
    width: 54px;
    height: 54px;
    padding: 0;
    font-size: 20px;
    box-shadow: 0 0 25px #e9c57c66
}

.spark {
    position: fixed;
    pointer-events: none;
    color: #ffe6a0;
    z-index: 4;
    animation: float 9s linear infinite;
    opacity: 0
}

@keyframes float {
    0% {
        transform: translateY(0);
        opacity: 0
    }

    25% {
        opacity: .8
    }

    100% {
        transform: translateY(-110vh);
        opacity: 0
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 1s
}

.reveal.visible {
    opacity: 1;
    transform: none
}

dialog {
    background: #07182b;
    border: 1px solid #e9c57c;
    color: white;
    max-width: 90vw
}

dialog img {
    max-width: 80vw;
    max-height: 75vh
}

footer {
    padding: 40px;
    color: #e9c57c;
    font-size: 12px
}

@media(max-width:700px) {
    .hero {
        display: block
    }

    .portrait {
        height: auto;
        max-height: 100svh
    }

    .heroText {
        padding: 30px 20px 60px
    }

    nav {
        justify-content: flex-start
    }

    .section {
        padding: 65px 20px
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important
    }

    .reveal {
        opacity: 1;
        transform: none
    }
}

.hero {
    overflow: hidden;
    position: relative
}

.portrait {
    will-change: transform;
    transform: translateY(var(--shift, 0px)) scale(1.04)
}

.garden,
.parallax {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: none
}

.garden:before,
.parallax:before {
    content: '';
    position: absolute;
    inset: -22% 0;
    z-index: -1;
    background: linear-gradient(#06172b55, #06172baa), url('../../assets/img/jardin.png') center/cover;
    transform: translateY(var(--shift, 0px));
    will-change: transform
}

.parallax.detail:before {
    background-image: linear-gradient(#06172b44, #06172b99), url('../../assets/img/detalles.png')
}

.parallax {
    min-height: 65vh;
    display: grid;
    place-items: center;
    padding: 40px 20px
}

.parallax h2 {
    text-shadow: 0 3px 25px #000
}

.gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px
}

.gallery figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid #d9b77588;
    border-radius: 100px 100px 12px 12px;
    background: #102943
}

.gallery figure:first-child {
    grid-row: span 2
}

.gallery figure:last-child {
    grid-column: 1/-1
}

.gallery img {
    height: 100%;
    min-height: 180px;
    max-height: 460px;
    object-fit: cover;
    display: block;
    transition: transform .8s
}

.gallery figure:first-child img {
    max-height: none
}

.gallery figure:hover img {
    transform: scale(1.07)
}

.gallery figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, #031326ee);
    padding: 30px 10px 12px;
    font-size: 12px
}

.gallery button {
    padding: 0;
    border: 0;
    background: none;
    width: 100%;
    height: 100%;
    display: block
}

.reveal {
    transform: translateY(50px) scale(.96);
    filter: blur(5px);
    transition: transform 1.1s cubic-bezier(.2, .8, .2, 1), opacity 1.1s, filter 1.1s
}

.reveal.visible {
    filter: none
}

.visible .tile {
    animation: rise .9s both
}

.visible .tile:nth-child(2) {
    animation-delay: .18s
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(35px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.seal {
    animation: glow 2.5s infinite alternate
}

@keyframes glow {
    to {
        text-shadow: 0 0 45px #ffd477;
        transform: scale(1.08)
    }
}

.heroText {
    animation: rise 1.5s both
}

.progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #f3d393;
    z-index: 12;
    width: var(--progress, 0%)
}

.butterfly {
    position: fixed;
    pointer-events: none;
    z-index: 4;
    color: #b9dcff;
    font-size: 30px;
    filter: drop-shadow(0 0 8px #f7d58a);
    animation: fly 16s linear infinite;
    opacity: 0
}

@keyframes fly {
    0% {
        transform: translate(0, 0) rotate(-20deg);
        opacity: 0
    }

    20% {
        opacity: .8
    }

    70% {
        opacity: .7
    }

    100% {
        transform: translate(35vw, -110vh) rotate(25deg);
        opacity: 0
    }
}

dialog::backdrop {
    background: #000d;
    backdrop-filter: blur(8px)
}

dialog {
    border-radius: 16px
}

dialog img {
    display: block;
    margin: auto;
    object-fit: contain
}

.lightcontrols {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px
}

.lightcontrols button {
    padding: 10px 15px
}

@media(max-width:700px) {
    .gallery {
        gap: 9px
    }

    .gallery img {
        min-height: 140px
    }

    .gallery figure {
        border-radius: 50px 50px 8px 8px
    }

    .parallax {
        min-height: 55vh
    }
}

@media(prefers-reduced-motion:reduce) {

    .portrait,
    .garden:before,
    .parallax:before {
        transform: none !important
    }

    .reveal {
        filter: none !important
    }

    .butterfly,
    .spark {
        display: none
    }
}

.envelope {
    width: min(300px, 75vw);
    height: 185px;
    margin: 0 auto 30px;
    position: relative;
    background: linear-gradient(145deg, #c5e6ff, #436e99);
    border: 1px solid #e6d0a1;
    border-radius: 8px;
    box-shadow: 0 15px 65px #0009;
    display: grid;
    place-items: center;
    perspective: 500px
}

.envelope:before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #8db6d8, #d7edff);
    clip-path: polygon(0 0, 100% 0, 50% 65%);
    transform-origin: top;
    transition: transform .7s
}

.open .envelope:before {
    transform: rotateX(160deg)
}

.envelope .seal {
    z-index: 1;
    border-radius: 50%;
    background: radial-gradient(#e4c88f, #94703c);
    color: #fff5df;
    font: 32px 'Cormorant Garamond', serif;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border: 3px double #f9e0ad
}

.count {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 580px;
    margin: 25px auto
}

.count div {
    min-width: 0;
    padding: 18px 4px;
    background: linear-gradient(145deg, #244d70aa, #071b30);
    box-shadow: 0 0 20px #a8dcff22
}

.count b {
    font-size: clamp(25px, 6vw, 48px);
    font-variant-numeric: tabular-nums
}

.count small {
    font-size: clamp(8px, 2vw, 11px)
}

.count b.changed {
    animation: pulse .4s
}

@keyframes pulse {
    50% {
        transform: scale(1.12);
        color: #c4eaff
    }
}

.videoFrame {
    padding: 12px;
    border: 1px solid #e9c57c;
    border-radius: 24px;
    background: #102943;
    box-shadow: 0 0 40px #8acaff22
}

.videoFrame iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: 0;
    display: block;
    border-radius: 14px
}

.videoFrame video {
    width: 100%;
    display: block;
    border-radius: 14px
}

.memory {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: center;
    text-align: left
}

.memory img {
    width: 100%;
    border-radius: 90px 90px 12px 12px
}

.note {
    font-size: 12px;
    color: #c1d8eb
}

textarea {
    width: 100%;
    min-height: 110px;
    padding: 15px;
    background: #071b30;
    color: white;
    border: 1px solid #c5a66a88;
    border-radius: 8px;
    font: inherit;
    margin: 8px 0
}

.guestphoto {
    width: 100%;
    max-height: 260px;
    object-fit: contain
}

.monogram {
    font: 64px 'Great Vibes', cursive;
    color: #f3d393
}

.actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px
}

.dressicons {
    font-size: 42px;
    letter-spacing: 14px
}

.qr {
    width: 180px;
    height: 180px;
    background: white;
    padding: 10px;
    margin: 15px auto
}

.section {
    scroll-margin-top: 60px
}

@media(max-width:500px) {
    .memory {
        grid-template-columns: 1fr;
        text-align: center
    }

    .count {
        gap: 5px
    }

    .panel {
        padding: 45px 12px
    }
}

.hero .portrait {
    object-fit: contain;
    transform: translateY(var(--shift, 0px)) scale(1);
}

@media(max-width:700px) {
    .hero .portrait {
        height: auto;
        max-height: 100svh;
        transform: none;
    }
}

.mapa-evento {
    width: 100%;
    height: 280px;
    border: 1px solid rgba(212, 175, 55, 0.65);
    border-radius: 18px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.20);
    display: block;
}

@media (max-width: 768px) {
    .mapa-evento {
        height: 240px;
    }
}