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

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
    overflow: hidden;
    background: #ece8e1;
    font-family: Georgia, serif;
}

.invitacion {
    width: 100%;
    min-height: 100vh;
}

.sobre {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.apertura-sobre {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 0;
    background: transparent;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.apertura-sobre:focus-visible {
    box-shadow: inset 0 0 0 3px #a87542;
}

.sobre-arte {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1;
    transform: scale(1);
    transition:
        opacity 0.52s ease 0.42s,
        transform 1.08s cubic-bezier(0.2, 0.76, 0.24, 1),
        filter 0.52s ease 0.42s;
}

.sobre.abierto .apertura-sobre {
    pointer-events: none;
}

.sobre.abierto .sobre-arte {
    opacity: 0;
    transform: scale(1.045);
    filter: blur(2px);
}

.carta {
    position: fixed;
    top: 16px;
    left: 50%;
    width: min(410px, calc(100vw - 36px));
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    background: #ffffff;
    border-radius: 14px;
    box-shadow:
        0 24px 70px rgba(54, 42, 30, 0.28),
        0 4px 18px rgba(54, 42, 30, 0.15);
    z-index: 30;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 38vh) scale(0.16);
    transform-origin: center center;
    transition:
        transform 0.95s cubic-bezier(0.2, 0.76, 0.24, 1),
        opacity 0.28s ease,
        visibility 0s linear 1s;
}

.sobre.abierto .carta {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
    transition:
        transform 0.95s cubic-bezier(0.2, 0.76, 0.24, 1) 0.48s,
        opacity 0.28s ease 0.48s,
        visibility 0s linear 0.48s;
}

.contenido-tarjeta {
    position: relative;
    padding-bottom: clamp(160px, 22vh, 240px);
    background:
        radial-gradient(circle at 50% 0%, #eeeae5 0%, #e6e0da 88%);
}

.contenido-tarjeta img {
    display: block;
    width: 100%;
    height: auto;
}

.ubicacion-link {
    position: absolute;
    top: 44%;
    left: 6%;
    width: 88%;
    height: 20%;
    border-radius: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(174, 127, 80, 0.18);
}

.ubicacion-link:focus-visible {
    outline: 3px solid #ae7f50;
    outline-offset: -3px;
}

.solo-lectores {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.control-musica {
    position: fixed;
    top: 28px;
    right: max(28px, calc(50vw - 193px));
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 50%;
    background: rgba(161, 109, 65, 0.90);
    color: #fff8ed;
    font-family: Georgia, serif;
    font-size: 21px;
    line-height: 1;
    box-shadow:
        0 5px 18px rgba(75, 45, 25, 0.26),
        inset 0 1px 2px rgba(255, 235, 207, 0.34);
    z-index: 45;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.78);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0s linear 0.25s;
}

.control-musica::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 24px;
    border-radius: 2px;
    background: #fff8ed;
    transform: rotate(-45deg) scaleY(0);
    transition: transform 0.2s ease;
}

.control-musica.pausada::after {
    transform: rotate(-45deg) scaleY(1);
}

.control-musica:hover {
    background: rgba(145, 91, 50, 0.96);
}

.control-musica:focus-visible {
    outline: 3px solid #fff8ed;
    outline-offset: 3px;
}

.invitacion-abierta .control-musica {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition-delay: 1.15s, 1.15s, 1.15s;
}

@media (max-width: 520px) {
    .control-musica {
        top: 26px;
        right: 28px;
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sobre-arte,
    .carta,
    .control-musica {
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}
