/* =========================
   CONFIGURACIÓN GENERAL
========================= */

:root {
    --navy: #07152e;
    --navy-light: #10264a;
    --blue: #183967;
    --gold: #e8c778;
    --gold-light: #f8e5ad;
    --cream: #f5edda;
    --white: #fffdf7;
    --muted: #c4c8d4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--navy);
    color: var(--cream);
    overflow-x: hidden;
}

button, a {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.hidden {
    display: none !important;
}

.section {
    padding: 110px 8%;
    position: relative;
    overflow: hidden;
}


/* =========================
   FONDO DE ESTRELLAS
========================= */

.stars-background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--gold-light);
    opacity: 0.6;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}


/* =========================
   PORTADA
========================= */

.cover {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 30px 20px;

    background:
        linear-gradient(
            rgba(5, 15, 35, 0.45),
            rgba(5, 15, 35, 0.72)
        ),
        url("img/noche-estrellada.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 1;
    transform: scale(1);

    transition:
        opacity 1.2s ease,
        transform 1.5s ease;
}

.cover.fade-out {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

.cover-content {
    max-width: 800px;
    animation: appear 1.5s ease;
}

.small-subtitle,
.eyebrow {
    color: var(--gold);
    font-size: 0.72rem;
    letter-spacing: 4px;
    display: block;
    margin-bottom: 22px;
}

.cover h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 500;
    color: var(--white);
    text-shadow: 0 0 25px rgba(232, 199, 120, 0.35);
}

.cover h1 span,
.logo span,
.footer h2 span {
    color: var(--gold);
}

.gold-line {
    height: 1px;
    width: 100px;
    background: var(--gold);
    margin: 25px auto;
}

.cover-description {
    max-width: 540px;
    margin: 0 auto;
    color: #e0e1e8;
    line-height: 1.9;
    font-size: 0.95rem;
}

.cover-date {
    margin: 25px 0 35px;
    color: var(--gold-light);
    letter-spacing: 5px;
    font-size: 0.85rem;
}

.enter-button,
.gold-button {
    border: 1px solid var(--gold);
    background: rgba(232, 199, 120, 0.08);
    color: var(--gold-light);
    padding: 14px 28px;
    border-radius: 30px;
    transition: 0.35s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.enter-button:hover,
.gold-button:hover {
    background: var(--gold);
    color: var(--navy);
    box-shadow: 0 0 25px rgba(232, 199, 120, 0.25);
    transform: translateY(-3px);
}

.enter-button:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.cover-bottom {
    position: absolute;
    bottom: 25px;
    font-size: 0.6rem;
    letter-spacing: 4px;
    color: var(--gold-light);
    opacity: 0.75;
}


/* =========================
   ANIMACIONES
========================= */

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mainContent {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 1.3s ease,
        transform 1.3s ease;
}

#mainContent.show {
    opacity: 1;
    transform: translateY(0);
}

.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition:
        opacity 0.9s ease,
        transform 0.9s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* =========================
   MENÚ
========================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 75px;
    padding: 12px 7%;
    background: rgba(5, 16, 37, 0.92);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(232, 199, 120, 0.15);

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--white);
}

.navigation {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navigation a {
    font-size: 0.75rem;
    color: var(--muted);
    transition: 0.3s;
}

.navigation a:hover,
.navigation a.active {
    color: var(--gold);
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--gold);
    margin: 5px;
    transition: 0.3s;
}


/* =========================
   ENCABEZADOS
========================= */

.section-heading {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 65px;
}

.section-heading h2,
.hero h2 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 500;
    font-size: clamp(2.7rem, 6vw, 4.5rem);
    color: var(--white);
}

.section-heading h2 span,
.hero h2 span {
    color: var(--gold);
}

.section-heading p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.8;
}


/* =========================
   INICIO
========================= */

.hero {
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    background:
        radial-gradient(
            ellipse at center,
            rgba(29, 67, 120, 0.38),
            transparent 70%
        );
}

.hero-content {
    max-width: 750px;
}

.hero-content > p {
    max-width: 600px;
    margin: 25px auto 30px;
    color: var(--muted);
    line-height: 2;
    font-size: 0.95rem;
}

.anniversary-counter {
    margin-top: 75px;
    padding: 30px 40px;
    max-width: 650px;
    width: 100%;
    border-top: 1px solid rgba(232, 199, 120, 0.35);
    border-bottom: 1px solid rgba(232, 199, 120, 0.35);
    text-align: center;
}

.counter-label {
    color: var(--gold);
    font-size: 0.65rem;
    letter-spacing: 3px;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.counter-grid div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.counter-grid strong {
    color: var(--white);
    font-family: "Cormorant Garamond", serif;
    font-size: 2.5rem;
    font-weight: 500;
}

.counter-grid small {
    color: var(--gold);
    font-size: 0.7rem;
}

.anniversary-counter > p {
    color: var(--muted);
    font-size: 0.75rem;
}


/* =========================
   HISTORIA
========================= */

.story-section {
    background: rgba(17, 39, 73, 0.4);
}

.story-content {
    max-width: 750px;
    margin: auto;
    text-align: center;
    position: relative;
    padding: 45px 30px;
    border: 1px solid rgba(232, 199, 120, 0.2);
    background: rgba(7, 21, 46, 0.55);
    border-radius: 12px;
}

.story-content p {
    color: var(--muted);
    line-height: 2.1;
    margin-bottom: 22px;
    font-size: 0.95rem;
}

.story-decoration {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 25px;
}

.story-signature {
    color: var(--gold);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
    font-style: italic;
}


/* =========================
   GALERÍA 3D
========================= */

.gallery-section {
    background:
        radial-gradient(
            ellipse at center,
            rgba(26, 58, 103, 0.32),
            transparent 70%
        );
}

.gallery-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 1100px;
    margin: auto;
}

.carousel {
    position: relative;
    width: min(100%, 720px);
    height: 440px;
    perspective: 1100px;
}

.photo-card {
    position: absolute;
    width: 55%;
    height: 100%;
    left: 22.5%;
    top: 0;
    border: 2px solid rgba(232, 199, 120, 0.6);
    border-radius: 13px;
    overflow: hidden;
    background: var(--navy-light);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);

    transition:
        transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1),
        opacity 0.65s ease,
        filter 0.65s ease;

    opacity: 0;
    pointer-events: none;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-card.active {
    transform: translateX(0) scale(1);
    opacity: 1;
    z-index: 5;
    filter: brightness(1);
}

.photo-card.left {
    transform: translateX(-65%) scale(0.78) rotateY(12deg);
    opacity: 0.65;
    z-index: 4;
}

.photo-card.right {
    transform: translateX(65%) scale(0.78) rotateY(-12deg);
    opacity: 0.65;
    z-index: 4;
}

.photo-card.far-left {
    transform: translateX(-105%) scale(0.6);
    opacity: 0.18;
    z-index: 2;
}

.photo-card.far-right {
    transform: translateX(105%) scale(0.6);
    opacity: 0.18;
    z-index: 2;
}

.gallery-arrow {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    background: rgba(232, 199, 120, 0.06);
    font-size: 1rem;
    transition: 0.3s;
    z-index: 10;
}

.gallery-arrow:hover {
    background: var(--gold);
    color: var(--navy);
}

.gallery-footer {
    max-width: 650px;
    margin: 30px auto 0;
    display: flex;
    justify-content: space-between;
    color: var(--gold);
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.gallery-hint {
    color: var(--muted);
    letter-spacing: 0;
}


/* =========================
   CANCIONES
========================= */

.music-section {
    background: rgba(17, 39, 73, 0.4);
}

.music-container {
    max-width: 800px;
    margin: auto;
    padding: 35px;
    border: 1px solid rgba(232, 199, 120, 0.25);
    border-radius: 15px;
    background: rgba(5, 17, 39, 0.6);

    display: grid;
    grid-template-columns: 240px 1fr;
    align-items: center;
    gap: 40px;
}

.album-cover {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-note {
    position: absolute;
    right: 12px;
    bottom: 10px;
    font-size: 2rem;
    color: var(--gold);
    text-shadow: 0 2px 8px #000;
}

.music-label {
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--gold);
}

.music-details h3 {
    margin-top: 12px;
    font-family: "Cormorant Garamond", serif;
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--white);
}

.music-details > p {
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 25px;
}

#progressBar {
    width: 100%;
    accent-color: var(--gold);
    cursor: pointer;
}

.audio-times {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.65rem;
    margin-top: 5px;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.player-controls button {
    border: none;
    color: var(--gold);
    background: transparent;
    font-size: 1.5rem;
    transition: 0.3s;
}

.player-controls button:hover {
    transform: scale(1.12);
}

.player-controls .play-button {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-size: 1.1rem;
}

.song-position {
    text-align: center;
    color: var(--gold);
    margin-top: 15px;
    font-size: 0.7rem;
}

.song-list {
    max-width: 800px;
    margin: 25px auto 0;
    display: grid;
    gap: 10px;
}

.song-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    background: rgba(5, 17, 39, 0.5);
    border: 1px solid rgba(232, 199, 120, 0.1);
    border-radius: 9px;
    cursor: pointer;
    transition: 0.3s;
}

.song-item:hover,
.song-item.active {
    border-color: var(--gold);
    background: rgba(232, 199, 120, 0.08);
}

.song-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.song-number {
    color: var(--gold);
    font-size: 0.75rem;
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-info strong {
    display: block;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
}

.song-info small {
    color: var(--muted);
    font-size: 0.7rem;
}

.song-play-icon {
    color: var(--gold);
}


/* =========================
   RAZONES
========================= */

.reason-card {
    max-width: 650px;
    margin: auto;
    padding: 55px 30px;
    text-align: center;
    background: rgba(17, 39, 73, 0.55);
    border: 1px solid rgba(232, 199, 120, 0.25);
    border-radius: 14px;
}

.reason-star {
    color: var(--gold);
    font-size: 3rem;
    margin-bottom: 25px;
}

.reason-card p {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    line-height: 1.6;
    color: var(--white);
    margin-bottom: 30px;
}


/* =========================
   CARTA
========================= */

.letter-section {
    background: rgba(17, 39, 73, 0.4);
}

.letter-container {
    max-width: 650px;
    margin: auto;
}

.letter-envelope,
.letter-message {
    text-align: center;
    padding: 45px 35px;
    border: 1px solid rgba(232, 199, 120, 0.35);
    border-radius: 14px;
    background: linear-gradient(
        145deg,
        rgba(25, 51, 88, 0.9),
        rgba(7, 21, 46, 0.95)
    );
}

.envelope-icon {
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.letter-envelope h3,
.letter-message h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--gold-light);
    margin-bottom: 15px;
}

.letter-envelope p,
.letter-message p {
    color: var(--muted);
    line-height: 2;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.letter-decoration {
    color: var(--gold);
    font-size: 2rem;
}

.letter-ending {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem !important;
    color: var(--gold-light) !important;
    font-style: italic;
}

.text-button {
    border: 0;
    background: none;
    color: var(--gold);
    text-decoration: underline;
    padding: 10px;
}


/* =========================
   FUTURO
========================= */

.future-section {
    text-align: center;
    background:
        radial-gradient(
            ellipse at center,
            rgba(31, 65, 110, 0.35),
            transparent 70%
        );
}

.future-content {
    max-width: 700px;
    margin: auto;
}

.future-star {
    color: var(--gold);
    font-size: 3rem;
    margin-bottom: 25px;
}

.future-content p {
    color: var(--muted);
    line-height: 2.1;
    margin-bottom: 20px;
}

.future-content .future-final {
    color: var(--gold-light);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.6rem;
    font-style: italic;
}


/* =========================
   PIE DE PÁGINA
========================= */

.footer {
    text-align: center;
    padding: 75px 20px 35px;
    background: #040d1d;
}

.footer-star {
    font-size: 2.5rem;
    color: var(--gold);
}

.footer h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 2.7rem;
    font-weight: 500;
    margin: 15px 0;
}

.footer p {
    color: var(--muted);
    font-size: 0.8rem;
}

.footer-date {
    display: block;
    color: var(--gold);
    margin-top: 20px;
    letter-spacing: 3px;
    font-size: 0.75rem;
}

.footer-line {
    width: 70px;
    height: 1px;
    background: var(--gold);
    margin: 30px auto;
}

.footer small {
    color: var(--muted);
    font-size: 0.6rem;
    letter-spacing: 2px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    .navigation {
        gap: 13px;
    }

    .navigation a {
        font-size: 0.68rem;
    }

    .music-container {
        grid-template-columns: 190px 1fr;
        gap: 25px;
    }

    .carousel {
        height: 380px;
    }
}

@media (max-width: 650px) {

    .section {
        padding: 85px 6%;
    }

    .header {
        min-height: 65px;
    }

    .menu-toggle {
        display: block;
    }

    .navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 7% 20px;
        background: rgba(5, 16, 37, 0.98);
        border-bottom: 1px solid rgba(232, 199, 120, 0.2);
    }

    .navigation.open {
        display: flex;
    }

    .navigation a {
        padding: 13px 0;
        font-size: 0.85rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .menu-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .cover h1 {
        font-size: 3.5rem;
    }

    .small-subtitle {
        font-size: 0.58rem;
        letter-spacing: 2px;
    }

    .hero {
        min-height: 650px;
    }

    .counter-grid {
        gap: 8px;
    }

    .counter-grid strong {
        font-size: 2rem;
    }

    .anniversary-counter {
        padding: 25px 10px;
    }

    .carousel {
        height: 340px;
        width: 100%;
    }

    .photo-card {
        width: 65%;
        left: 17.5%;
    }

    .photo-card.left {
        transform: translateX(-58%) scale(0.72) rotateY(10deg);
    }

    .photo-card.right {
        transform: translateX(58%) scale(0.72) rotateY(-10deg);
    }

    .photo-card.far-left,
    .photo-card.far-right {
        opacity: 0;
    }

    .gallery-wrapper {
        gap: 5px;
    }

    .gallery-arrow {
        width: 34px;
        height: 34px;
        font-size: 0.75rem;
    }

    .gallery-footer {
        padding: 0 8px;
        font-size: 0.65rem;
    }

    .music-container {
        grid-template-columns: 1fr;
        padding: 25px 18px;
        gap: 25px;
    }

    .album-cover {
        width: min(100%, 230px);
        margin: auto;
    }

    .music-details {
        text-align: center;
    }

    .music-details h3 {
        font-size: 1.9rem;
    }

    .story-content {
        padding: 35px 20px;
    }

    .reason-card {
        padding: 40px 20px;
    }

    .reason-card p {
        font-size: 1.5rem;
    }

    .letter-envelope,
    .letter-message {
        padding: 35px 20px;
    }
}


/* =========================
   MOVIMIENTO REDUCIDO
========================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}