/* =========================================================
   FICHA TÉCNICA — complementa style.css (mismos tokens,
   tipografía Inter y jerarquías del sitio principal)
   ========================================================= */

.ficha-page { --ease: cubic-bezier(0.23, 1, 0.32, 1); --rule: rgba(26, 30, 44, 0.15); }
html:has(.ficha-page) { scroll-behavior: smooth; }

/* --- INTRO --- */
.ft-intro {
    min-height: 72vh; padding: 160px 10% 80px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.ft-intro .ficha-main-title { margin: 0 0 30px; }
/* Mismo estilo que el cuerpo del home (.review-content p) */
.ft-lead {
    max-width: 700px; font-size: 16px; font-weight: 300; line-height: 1.8;
    letter-spacing: 0.5px; color: var(--gray);
}
.ft-lead.ft-fade.active { opacity: 0.9; }

/* Índice: una fila de 7 columnas iguales, número sobre nombre (eco de .ft-num/.ft-title) */
.ft-index {
    margin-top: 70px; width: 100%; max-width: 1040px;
    display: grid; grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid var(--rule); padding-top: 28px;
}
.ft-index a {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-size: 10px; font-weight: 400; letter-spacing: 3px; text-indent: 3px; text-transform: uppercase;
    text-decoration: none; color: var(--navy); opacity: 0.6; transition: opacity 0.4s;
}
.ft-index a span { font-size: 9px; font-weight: 300; letter-spacing: 3px; color: var(--gray); }
.ft-index a:hover { opacity: 1; }

/* --- IMAGEN A SANGRE --- */
.ft-bleed { width: 100%; height: 85vh; overflow: hidden; position: relative; background: #000; }
.ft-bleed img { width: 100%; height: 115%; object-fit: cover; filter: grayscale(100%); will-change: transform; transition: filter 1.2s var(--ease); }
.ft-bleed:hover img { filter: grayscale(0%); }
.ft-bleed figcaption { position: absolute; left: 10%; bottom: 30px; color: #F7F7F2; }

/* --- CAPÍTULOS --- */
.ft-chapter {
    display: grid; grid-template-columns: 240px 1fr; gap: 60px;
    padding: 140px 10% 60px; max-width: 1400px; margin: 0 auto;
}
.ft-head { position: sticky; top: 130px; align-self: start; }
.ft-num { display: block; font-size: 11px; font-weight: 300; letter-spacing: 4px; color: var(--gray); margin-bottom: 14px; }
.ft-title {
    font-size: 18px; font-weight: 300; text-transform: uppercase; letter-spacing: 5px; line-height: 1.4; color: var(--navy);
}
.ft-head::after { content: ""; display: block; width: 40px; height: 1px; background: currentColor; opacity: 0.3; margin-top: 24px; }

/* Lista (mismo lenguaje que .ficha-row del modal) */
.ft-list { margin-bottom: 70px; }
.ft-sub {
    display: block; font-size: 10px; font-weight: 500; letter-spacing: 4px; text-transform: uppercase;
    color: var(--navy); padding: 40px 0 14px;
}
.ft-sub:first-child { padding-top: 0; }
.ft-item {
    display: flex; align-items: baseline; gap: 40px;
    border-top: 1px solid var(--rule); padding: 22px 0;
}
.ft-name { flex: 0 0 280px; font-size: 14px; font-weight: 400; letter-spacing: 0.5px; color: var(--navy); }
.ft-spec { flex: 1; font-size: 13px; font-weight: 300; line-height: 1.7; letter-spacing: 0.3px; color: var(--gray); }

/* --- FIGURAS --- */
.ft-fig { margin: 0 0 60px; }
.ft-fig > img, .ft-cymbal img { display: block; width: 100%; }
.ft-fig { overflow: hidden; }
.ft-fig img {
    aspect-ratio: 4 / 3; height: auto; object-fit: cover;
    filter: grayscale(100%); transition: filter 0.8s var(--ease), transform 0.8s var(--ease);
}
.ft-fig:hover img { filter: grayscale(0%); transform: scale(1.04); }
.ft-fig--tall img { aspect-ratio: 3 / 4; }
.ft-fig--wide img { aspect-ratio: 16 / 8; }
.ft-fig--square img { aspect-ratio: 1; }
.ft-fig--solo { max-width: 640px; }

/* Fotos de producto sobre fondo blanco: se funden con el marfil */
/* Fotos de producto: fondo en el marfil de la paleta YOIN (#F7F7F2), también en modo oscuro */
.ft-fig--product img { object-fit: contain; padding: 8%; background: #F7F7F2; }

figcaption, .ft-note {
    display: block; margin-top: 14px; font-size: 9px; font-weight: 400;
    letter-spacing: 3px; text-transform: uppercase; color: var(--gray); opacity: 0.75;
}
.ft-fig figcaption { background: var(--bg); padding-top: 14px; margin-top: 0; }

/* Galerías asimétricas (eco de las diagonales del home) */
.ft-gallery { display: grid; gap: 30px; align-items: start; }
.ft-gallery--duo { grid-template-columns: 1.15fr 0.85fr; }
.ft-gallery--trio { grid-template-columns: repeat(3, 1fr); }
.ft-gallery--rev { direction: rtl; }
.ft-gallery--rev > * { direction: ltr; }
.ft-fig--offset { margin-top: 90px; }

/* --- PLATILLOS: escala proporcional al diámetro --- */
.ft-cymbals {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 40px 3%; padding: 30px 0 10px;
}
.ft-cymbal { margin: 0; text-align: center; flex: 0 0 calc(var(--in) * 2.1%); min-width: 110px; }
.ft-cymbal img {
    aspect-ratio: 1; object-fit: contain; will-change: transform;
    filter: grayscale(100%) drop-shadow(0 18px 24px rgba(26, 30, 44, 0.18));
    transition: filter 0.8s var(--ease);
}
.ft-cymbal:hover img { filter: grayscale(0%) drop-shadow(0 22px 30px rgba(26, 30, 44, 0.22)); }
.ft-cymbal:nth-child(even) { margin-top: 80px; }
.ft-note { text-align: center; margin-top: 30px; }

/* --- APARICIÓN AL HACER SCROLL --- */
.ft-fade, .ft-reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.ft-fade.active, .ft-reveal.active { opacity: 1; transform: none; }
.ft-fade:nth-child(2) { transition-delay: 0.12s; }
.ft-fade:nth-child(3) { transition-delay: 0.24s; }
.ft-fade:nth-child(4) { transition-delay: 0.36s; }

/* Cortina: la imagen se descubre de abajo hacia arriba */
/* (el clip va en la imagen: si se aplica al elemento observado, IntersectionObserver no lo detecta) */
.ft-fig.ft-reveal img, .ft-bleed.ft-reveal img {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.4s var(--ease), filter 0.8s var(--ease), transform 0.8s var(--ease);
}
.ft-fig.ft-reveal.active img, .ft-bleed.ft-reveal.active img { clip-path: inset(0 0 0 0); }
.ft-bleed.ft-reveal.active img { transition: clip-path 1.4s var(--ease), filter 1.2s var(--ease); }
.ft-cymbal.ft-reveal { transform: translateY(60px) scale(0.92); }
.ft-cymbal.ft-reveal.active { transform: none; }

.ft-item { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.ft-list.active .ft-item { opacity: 1; transform: none; }

/* --- CIERRE --- */
.ft-outro { padding: 120px 10% 140px; text-align: center; }
.ft-back {
    display: inline-block; font-size: 13px; letter-spacing: 5px; text-transform: uppercase; text-decoration: none;
    color: var(--navy); border-bottom: 1px solid currentColor; padding-bottom: 8px; transition: opacity 0.3s;
}
.ft-back:hover { opacity: 0.6; }
.ft-credits { max-width: 640px; margin: 70px auto 0; font-size: 10px; font-weight: 300; line-height: 1.9; letter-spacing: 0.5px; color: var(--gray); opacity: 0.6; }
.ft-credits a { color: inherit; }

/* Enlace a la ficha desde el modal de Equipamiento (index) */
.ficha-cta-row { justify-content: center; border-top: 1px solid rgba(26, 30, 44, 0.15); padding-top: 50px; }
.ficha-cta {
    display: inline-block; font-size: 12px; font-weight: 400; letter-spacing: 5px; text-indent: 5px; text-transform: uppercase;
    text-decoration: none; color: var(--navy); border-bottom: 1px solid currentColor; padding-bottom: 8px; transition: opacity 0.3s;
}
.ficha-cta:hover { opacity: 0.6; }

/* --- MODO OSCURO --- */
@media (prefers-color-scheme: dark) {
    .ficha-page { --rule: rgba(247, 247, 242, 0.2); }
    .ft-cymbal img { filter: grayscale(100%) drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45)); }
    .ficha-cta-row { border-top-color: rgba(247, 247, 242, 0.2); }
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    /* Índice como lista vertical: número + nombre alineados */
    .ft-index {
        grid-template-columns: auto; width: auto; max-width: none; margin-top: 50px;
        padding-top: 22px; row-gap: 16px;
    }
    .ft-index a { flex-direction: row; align-items: baseline; gap: 22px; text-indent: 0; }
    .ft-index a span { flex: 0 0 18px; }
    .ft-chapter { grid-template-columns: 1fr; gap: 40px; padding: 100px 8% 40px; }
    .ft-head { position: static; }
    .ft-item { flex-direction: column; gap: 4px; padding: 18px 0; }
    .ft-name { flex: none; }
    .ft-gallery--trio { grid-template-columns: 1fr 1fr; }
    .ft-gallery--trio > :nth-child(3) { grid-column: 1 / -1; }
    .ft-fig--offset { margin-top: 50px; }
}
@media (max-width: 768px) {
    .ft-intro { padding: 130px 8% 60px; min-height: 0; }
    .ft-bleed { height: 60vh; }
    .ft-gallery--duo, .ft-gallery--trio { grid-template-columns: 1fr; gap: 0; }
    .ft-gallery--trio > :nth-child(3) { grid-column: auto; }
    .ft-fig--offset { margin-top: 0; }
    .ft-fig { margin-bottom: 40px; }
    .ft-fig img, .ft-bleed img, .ft-cymbal img { filter: grayscale(0%); }
    .ft-cymbals { gap: 30px 5%; }
    .ft-cymbal { flex-basis: calc(var(--in) * 2.25%); min-width: 80px; }
    .ft-cymbal:nth-child(even) { margin-top: 0; }
    .ft-lead { font-size: 15px; }
}

/* Enlace del modal de Equipamiento en móvil: una sola línea, centrado */
@media (max-width: 768px) {
    .ficha-cta-row { align-items: center; }
    .ficha-cta { font-size: 10px; letter-spacing: 3px; text-indent: 3px; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
    .ft-fade, .ft-reveal, .ft-item { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
}
