
/* =========================
   REVIEWSBYDREA.
   Visual identity
========================= */

:root {
    --background: #111111;
    --surface: #1c1c1c;
    --cream: #efe7d9;
    --gold: #b9a181;
    --muted: #a49e94;
    --border: #302e2b;

    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'DM Sans', Arial, sans-serif;
}

/* General */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--cream);
    font-family: var(--sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
    overflow: hidden;
}

::selection {
    background: var(--gold);
    color: var(--background);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 5px;
}

/* Header */

.header {
    max-width: 1440px;
    margin: auto;
    padding: 25px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: var(--serif);
    font-size: 25px;
    letter-spacing: -1px;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 12px;
}

.navigation a {
    color: var(--muted);
    transition: color 0.2s;
}

.navigation a:hover {
    color: var(--cream);
}

.sound-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--gold);
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 11px;
    transition: all 0.2s;
}

.sound-toggle:hover,
.sound-toggle[aria-pressed="true"] {
    border-color: var(--gold);
    color: var(--cream);
}

/* Hero */

.hero {
    text-align: center;
    padding: 100px 24px 90px;
}

.eyebrow {
    color: var(--gold);
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(60px, 9vw, 115px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -3px;
    margin: 26px 0;
}

.hero h1 em {
    font-weight: 400;
}

.hero p {
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 1px;
}

.hero-line {
    width: 45px;
    height: 1px;
    background: var(--gold);
    margin: 35px auto 22px;
}

.hero-caption {
    color: var(--gold);
    font-size: 9px;
    letter-spacing: 4px;
}

/* Journal */

.journal {
    max-width: 1200px;
    margin: auto;
    padding: 45px 6% 100px;
    border-top: 1px solid var(--border);
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
}

.section-heading h2 {
    font-family: var(--serif);
    font-size: 40px;
    font-weight: 400;
    letter-spacing: -1px;
}

#review-count {
    color: var(--muted);
    font-size: 12px;
}

.filters {
    display: flex;
    gap: 10px;
    margin: 24px 0 35px;
}

.filter {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 12px;
    transition: all 0.2s;
}

.filter:hover {
    border-color: var(--gold);
    color: var(--cream);
}

.filter.active {
    background: var(--cream);
    border-color: var(--cream);
    color: var(--background);
}

/* Review gallery */

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 35px 24px;
}

.review-card {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--cream);
    text-align: left;
}

.review-image {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: contain;
    background: var(--surface);
    border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}


.review-info {
    padding: 15px 0;
}

.review-info h3 {
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 400;
}

.review-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

.review-song {
    color: var(--gold);
    font-size: 11px;
    margin-top: 8px;
}

/* Review viewer */

.review-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(850px, 92vw);
    max-height: 90dvh;
    overflow-y: auto;
    padding: 35px;
    background: var(--surface);
    color: var(--cream);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.review-modal::backdrop {
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
}

.close-modal {
    position: sticky;
    top: 0;
    display: block;
    margin-left: auto;
    margin-bottom: 12px;
    width: 35px;
    height: 35px;
    background: var(--background);
    color: var(--cream);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 23px;
    z-index: 2;
}

.modal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 30px;
}

.modal-image {
    display: block;
    width: 100%;
    border-radius: 3px;
}

.modal-details h2 {
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 400;
}

.modal-details p {
    color: var(--muted);
    font-size: 14px;
    margin: 12px 0;
}

.soundtrack {
    border-top: 1px solid var(--border);
    margin-top: 25px;
    padding-top: 20px;
}

.soundtrack iframe {
    width: 100%;
    border: none;
    border-radius: 8px;
    margin-top: 15px;
}

.soundtrack audio {
    width: 100%;
    margin-top: 15px;
}

/* About */

.about {
    text-align: center;
    border-top: 1px solid var(--border);
    padding: 80px 24px;
}

.about h2 {
    font-family: var(--serif);
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 400;
    margin: 18px 0;
}

.about p {
    max-width: 470px;
    margin: auto;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.signature {
    display: block;
    font-family: var(--serif);
    font-style: italic;
    color: var(--gold);
    font-size: 22px;
    margin-top: 22px;
}

/* Footer */

.footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 25px 6%;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.5px;
}

/* Tablet */

@media (max-width: 850px) {
    .reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */

@media (max-width: 600px) {
    .header {
        padding: 20px 5%;
    }

    .logo {
        font-size: 20px;
    }

    .navigation {
        gap: 12px;
        font-size: 11px;
    }

    .sound-toggle {
        padding: 6px 9px;
        font-size: 10px;
    }

    .hero {
        padding: 75px 15px 65px;
    }

    .hero h1 {
        font-size: clamp(48px, 12vw, 70px);
        letter-spacing: -2px;
    }

    .eyebrow {
        font-size: 9px;
        letter-spacing: 3px;
    }

    .journal {
        padding: 30px 5% 60px;
    }

    .section-heading h2 {
        font-size: 32px;
    }

    .reviews-grid {
        gap: 20px 12px;
    }

    .review-info h3 {
        font-size: 19px;
    }

    .review-modal {
        padding: 20px;
    }

    .modal-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        transition: none !important;
    }
}


/* Apple Music soundtrack player */

.soundtrack .apple-player {
    display: block;
    width: 100%;
    height: 175px;
    border: none;
    border-radius: 12px;
    margin: 18px 0 12px;
    background: transparent;
}

/* Final visual refinements */

:root {
    color-scheme: dark;
}

.review-modal {
    scrollbar-width: thin;
    scrollbar-color: #514a40 #1c1c1c;
}

.review-modal::-webkit-scrollbar {
    width: 6px;
}

.review-modal::-webkit-scrollbar-track {
    background: #1c1c1c;
}

.review-modal::-webkit-scrollbar-thumb {
    background: #514a40;
    border-radius: 10px;
}

.soundtrack .apple-player {
    margin-top: 12px;
    margin-bottom: 8px;
}

@media (min-width: 601px) {
    .modal-image {
        max-height: 72dvh;
        object-fit: contain;
    }
}

/* =============================
   GALLERY SOUNDTRACKS
   ============================= */

.review-card {
    align-self: start;
    cursor: default;
}

.review-open {
    display: block;
    width: 100%;
    cursor: default;
}

.soundtrack-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(185, 161, 129, 0.18);
    border-radius: 8px;
    color: var(--gold, #b9a181);
    font-family: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease,
                border-color 0.2s ease;
}

.soundtrack-toggle:hover {
    background: rgba(185, 161, 129, 0.08);
    border-color: rgba(185, 161, 129, 0.4);
}

.track-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.track-arrow {
    flex-shrink: 0;
    font-size: 18px;
    transition: transform 0.25s ease;
}

.soundtrack-toggle[aria-expanded="true"] .track-arrow {
    transform: rotate(180deg);
}

.gallery-player {
    margin-top: 8px;
    animation: revealPlayer 0.3s ease both;
}

.gallery-player[hidden] {
    display: none;
}

/* Smooth Apple Music loading */

.player-wrapper {
    position: relative;
    width: 100%;
    height: 175px;
    margin: 12px 0 8px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.025);
}

.player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold, #b9a181);
    font-size: 11px;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

.player-wrapper .apple-player {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.player-wrapper.loaded .apple-player {
    opacity: 1;
}

.player-wrapper.loaded .player-loading {
    opacity: 0;
    pointer-events: none;
}

.music-link {
    display: inline-block;
    color: var(--gold, #b9a181);
    font-size: 12px;
    text-decoration: none;
}

.music-link:hover {
    text-decoration: underline;
}

@keyframes revealPlayer {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-player {
        animation: none;
    }

    .player-wrapper .apple-player,
    .player-loading,
    .track-arrow {
        transition: none;
    }
}

/* Soundtrack above the review */

.review-card {
    display: flex;
    flex-direction: column;
}

.review-card .soundtrack-toggle {
    order: -2;
    margin-top: 0;
    margin-bottom: 12px;
}

.review-card .gallery-player {
    order: -1;
    margin-top: 0;
    margin-bottom: 12px;
}

.review-card .review-open {
    order: 0;
}

/* Larger Apple Music player inside the modal */

.review-modal .player-wrapper {
    height: 175px;
}

.review-modal .player-wrapper .apple-player {
    height: 100%;
    margin: 0;
}

/* =============================
   JOURNAL NAVIGATION
   ============================= */

.journal-search {
    margin-bottom: 28px;
}

.journal-search input {
    width: 100%;
    padding: 13px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--cream);
    font-family: var(--sans);
    font-size: 13px;
    outline: none;
}

.journal-search input:focus {
    border-color: var(--gold);
}

.journal-search input::placeholder {
    color: var(--muted);
}

.journal-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-top: 35px;
}

.journal-navigation[hidden] {
    display: none;
}

.journal-navigation button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--cream);
    font-size: 20px;
    transition: all 0.2s;
}

.journal-navigation button:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.journal-navigation button:disabled {
    opacity: 0.25;
    cursor: default;
}

#page-indicator {
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 2px;
}

@media (max-width: 600px) {

    .reviews-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 340px;
        margin: auto;
        touch-action: pan-y;
    }

    .journal-search {
        margin-bottom: 10px;
    }

    .journal-search input {
        font-size: 16px;
    }

    .journal-navigation {
        margin-top: 10px;
    }

    .review-card:hover .review-image {
        transform: none;
        opacity: 1;
    }
}
/* =============================
   MOBILE REFINEMENT
   ============================= */

@media (max-width: 600px) {

    /* Cabecera y portada */

    .header {
        padding: 16px 5%;
    }

    .hero {
        padding: 38px 16px 35px;
    }

    .hero h1 {
        margin: 18px 0;
    }

    .hero-line {
        margin: 22px auto 15px;
    }

    /* Journal */

    .journal {
        padding: 24px 5% 35px;
    }

    .filters {
        margin: 10px 0;
    }

    .reviews-grid {
        gap: 12px;
    }

    .review-card {
        width: 100%;
        max-width: 290px;
        margin: 0 auto;
    }

    .review-image {
        width: 100%;
        height: auto;
        max-height: 390px;
        object-fit: contain;
        background: transparent;
    }

    .review-info {
    padding: 5px 0 0;
    text-align: center;
}

.review-meta {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
}

    .review-card .soundtrack-toggle {
        padding: 10px 12px;
        margin-bottom: 8px;
        min-height: 44px;
    }

    .review-card .gallery-player {
        margin-bottom: 8px;
    }

    /* Ventana de detalles */

    .review-modal {
        width: 94vw;
        max-height: 88dvh;
        padding: 16px;
    }

    .modal-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-details {
        grid-row: 1;
    }

    .modal-details h2 {
        font-size: 30px;
        margin: 6px 0;
    }

    .modal-details p {
        margin: 6px 0;
        font-size: 13px;
    }

    .modal-image {
        grid-row: 2;
        width: 100%;
        max-height: 380px;
        object-fit: contain;
        margin: 0 auto;
    }

    .close-modal {
        margin-bottom: 4px;
        width: 40px;
        height: 40px;
    }

    .soundtrack {
        margin-top: 14px;
        padding-top: 12px;
    }

    /* Sobre mí */

    .about {
        padding: 40px 6%;
    }

    .about h2 {
        font-size: 30px;
    }
}

/* Compact mobile reviews */

@media (max-width: 600px) {

    .review-card .review-image {
        width: min(100%, 250px);
        height: auto;
        aspect-ratio: 5 / 8;
        max-height: 400px;
        object-fit: cover;
        object-position: center;
        margin: 0 auto;
    }

    .journal-navigation button {
        width: 36px;
        height: 36px;
    }

}
/* =============================
   DYNAMIC REVIEW ARTWORK
   ============================= */

.review-artwork {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 9 / 16;
    background: #edeae1;
    color: #080808;
    border-radius: 3px;
    padding: 6% 10%;
    text-align: center;
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
}

.film-frame {
    position: relative;
    width: 88%;
    aspect-ratio: 732 / 950;
    background-image: url("images/film-frame.png");
    background-size: 147.54% 202.11%;
    background-position: 50% 17.01%;
    background-repeat: no-repeat;
    margin: 0 auto 12px;
    flex-shrink: 0;
}

.film-photo {
    position: absolute;
    top: calc(4.63% - 1px);
    left: calc(12.02% - 1px);
    width: calc(75.14% + 2px);
    height: calc(77.47% + 2px);
    object-fit: cover;
}

.artwork-title {
    font-family: 'Anton', sans-serif;
    font-size: 15cqw;
    font-weight: 400;
    line-height: 1.15;
    text-transform: uppercase;
    margin: 0 0 8px;
    flex-shrink: 0;
}

.artwork-genre {
    font-family: 'DM Sans', sans-serif;
    font-size: 6.5cqw;
    font-weight: 600;
    margin: 0 0 8px;
    flex-shrink: 0;
}

.artwork-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 5cqw;
    line-height: 1.35;
    font-weight: 400;
    margin: 0;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow-wrap: anywhere;
}

.artwork-stars {
    display: inline-flex;
    justify-content: center;
    gap: 3px;
    font-size: 12cqw;
    line-height: 1.2;
    color: #77736b;
    margin-top: 10px;
    flex-shrink: 0;
}

.artwork-star {
    position: relative;
    display: inline-block;
}

.artwork-star-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #080808;
}

/* Nuevas tarjetas en móvil */

@media (max-width: 600px) {

    .review-artwork {
        width: min(100%, 250px);
        margin: 0 auto;
        padding: 16px 10% 18px;
    }

}
/* Centrar información de las reseñas */

.review-card .review-info {
    width: 100%;
    text-align: center;
}

.review-card .review-meta {
    text-align: center;
}
/* Alinear reproductor y tarjeta */

.review-card .soundtrack-toggle,
.review-card .gallery-player {
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    .review-card .soundtrack-toggle,
    .review-card .gallery-player {
        max-width: 250px;
    }
}
/* Selector de idioma */

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 12px;
    white-space: nowrap;
}

.lang-button {
    background: transparent;
    border: none;
    padding: 3px;
    font: inherit;
    font-size: 11px;
    color: inherit;
    opacity: 0.45;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.lang-button.active,
.lang-button:hover {
    opacity: 1;
}

.language-switch span {
    font-size: 10px;
    opacity: 0.35;
}

@media (max-width: 600px) {
    .language-switch {
        margin-left: 4px;
        gap: 2px;
    }

    .lang-button {
        font-size: 10px;
        padding: 2px;
    }
}
/* =============================
   VER TODAS LAS RESEÑAS
   ============================= */

.view-all-container {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.view-all-button {
    background: transparent;
    border: 1px solid rgba(185, 161, 138, 0.4);
    border-radius: 30px;
    color: #b9a18a;
    padding: 11px 24px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-all-button:hover {
    background: #b9a18a;
    color: #111111;
    border-color: #b9a18a;
}

.view-all-button:focus-visible {
    outline: 2px solid #b9a18a;
    outline-offset: 4px;
}

.view-all-button[hidden],
.journal-navigation[hidden] {
    display: none !important;
}

.view-all-container:has(.view-all-button[hidden]) {
    display: none;
}

/* =============================
   ITUNES MINI PLAYER
   ============================= */

.review-card .gallery-player {
    order: -1;
    margin-top: 0;
    margin-bottom: 10px;
    animation: none;
}

.itunes-mini {
    width: 100%;
    padding: 9px 11px 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.itunes-track {
    display: flex;
    align-items: center;
    gap: 9px;
}

.itunes-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--cream);
    color: var(--background);
    font-size: 11px;
    line-height: 1;
    transition: background 0.2s ease;
}

.itunes-play:hover {
    background: var(--gold);
}

.itunes-play:disabled {
    opacity: 0.65;
    cursor: wait;
}

.itunes-info {
    flex: 1;
    min-width: 0;
}

.itunes-title {
    color: var(--cream);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.itunes-artist {
    color: var(--gold);
    font-size: 10px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.itunes-time {
    color: var(--muted);
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.itunes-progress {
    display: block;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 3px;
    margin: 10px 0 7px;
    background: #514a40;
    border-radius: 10px;
    cursor: pointer;
    touch-action: none;
}

.itunes-progress::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
}

.itunes-progress::-moz-range-thumb {
    width: 8px;
    height: 8px;
    border: none;
    background: var(--gold);
    border-radius: 50%;
}

.itunes-progress:disabled {
    opacity: 0.6;
    cursor: default;
}

.itunes-credits {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 9px;
    line-height: 1.4;
    color: var(--muted);
}

.itunes-link {
    color: var(--gold);
}

.itunes-link:hover {
    text-decoration: underline;
}

.itunes-message {
    color: var(--gold);
    font-size: 10px;
    margin-top: 5px;
    text-align: center;
}

.itunes-mini audio {
    display: none;
}

@media (max-width: 600px) {

    .itunes-mini {
        padding: 8px 10px 7px;
    }

    .review-card .gallery-player {
        margin-bottom: 8px;
    }
}
.artwork-title {
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
    text-align: center;
}
.itunes-play,
.itunes-link {
    font-family: Arial, sans-serif;
    font-variant-emoji: text;
}
/* Custom soundtrack icons */

.itunes-play svg {
    display: block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    pointer-events: none;
}

.itunes-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.itunes-link svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}