/* ─────────────────────────────────────────────────────────────
   case.css — plantilla compartida para los casos de Branding Work
   Cada caso define en su <style> sus colores:
   --paper (fondo de módulos), --dark (módulos oscuros),
   --accent (títulos del texto), --story-font (fuente del texto)
   ───────────────────────────────────────────────────────────── */
:root {
    --ink: #1a1a1a;
    --muted: #6f6f6b;
    --bg: #ffffff;
    --edge: 32px;
    --gap: 8px;
    --paper: #f2f2f0;
    --dark: #0a0a0a;
    --accent: #1a1a1a;
    --story-font: 'Inter', sans-serif;
}



* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Lora', serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; }

/* ── Navbar (igual al home) ─────────────────────────────── */
.navbar-backdrop {
    position: fixed; inset: 0 0 auto 0; height: 110px; z-index: 99; pointer-events: none;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 80px;
    mix-blend-mode: difference;
}

.nav-logo { height: 36px; width: auto; }
.nav-links { display: flex; gap: 40px; }
.nav-links a { color: #fff; font-size: 15px; transition: opacity .3s; }
.nav-links a:hover { opacity: .6; }
.nav-links a.is-active { font-weight: 700; }

/* ── Intro ──────────────────────────────────────────────── */
.intro {
    padding: 190px var(--edge) 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    align-items: end;
}

.crumb {
    display: block;
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 28px;
    padding-left: 15px;
}

.crumb a { color: var(--ink); border-bottom: 1px solid transparent; transition: border-color .25s; }
.crumb a:hover { border-color: currentColor; }

.title {
    padding-left: 12px;
    font-size: min(140px, 9vw);
    font-weight: 400;
    line-height: .86;
    letter-spacing: -0.03em;
    color: #1e1e1e;
}

/* Letra secundaria: etiqueta pequeña, no compite con el título */
.title .script,
.credits h2 .script {
    display: block;
    margin-top: 18px;
    font-family: 'Beth Ellen', cursive;
    font-size: clamp(15px, 1.25vw, 20px);
    line-height: 1.6;
    letter-spacing: 0;
    color: var(--muted);
}

.lead {
    font-size: clamp(18px, 1.5vw, 22px);
    line-height: 1.45;
    max-width: 560px;
}

.meta {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 32px;
    max-width: 560px;
    font-size: 15px;
}

.meta dt { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.meta dd a { border-bottom: 1px solid currentColor; }
.meta dd a:hover { color: var(--accent); }

/* Entrada al cargar */
.load { opacity: 0; transform: translateY(18px); animation: rise 1s cubic-bezier(.2, .7, .2, 1) forwards; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .25s; } .d3 { animation-delay: .4s; } .d4 { animation-delay: .55s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── Módulos (la presentación) ──────────────────────────── */
.chapter { padding: 0 var(--edge); }
.chapter + .chapter { margin-top: var(--gap); }

.mod {
    position: relative;
    overflow: hidden;
    background: var(--paper);
    margin-top: var(--gap);
}

.mod.dark { background: var(--dark); }

.mod img, .mod video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* proporciones de la presentación */
.r-wide { aspect-ratio: 2592 / 1632; }
.r-band { aspect-ratio: 2592 / 880; }
.r-tall { aspect-ratio: 1200 / 1512; }
.r-video { aspect-ratio: 1024 / 650; }

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    margin-top: var(--gap);
}

.row .mod { margin-top: 0; }

/* Vimeo: llena el cuadro como fondo, sin controles */
.vimeo iframe {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    border: 0;
    pointer-events: none;
}

/* Revelado: la imagen sube y se asienta */
.mod.reveal {
    clip-path: inset(12% 0 0 0);
    transition: clip-path 1.2s cubic-bezier(.2, .7, .2, 1);
}

.mod.reveal > img, .mod.reveal > video, .mod.reveal > iframe {
    transform: scale(1.08);
    transition: transform 1.6s cubic-bezier(.2, .7, .2, 1);
}

.mod.reveal.in { clip-path: inset(0 0 0 0); }
.mod.reveal.in > img, .mod.reveal.in > video, .mod.reveal.in > iframe { transform: scale(1); }

/* ── Texto del caso (Contexto / Propuesta / Sistema) ───── */
.story {
    background: var(--paper);
    margin-top: var(--gap);
    padding: clamp(80px, 11vw, 170px) clamp(24px, 12vw, 220px);
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 56px 40px;
    font-family: var(--story-font);
}

.story h2 {
    font-family: var(--story-font);
    font-weight: 600;
    font-size: clamp(22px, 1.9vw, 30px);
    color: var(--accent);
    letter-spacing: -0.01em;
}

.story p {
    font-size: clamp(17px, 1.45vw, 22px);
    line-height: 1.5;
    font-weight: 400;
    color: var(--dark);
    max-width: 900px;
}

.story .big {
    font-size: clamp(24px, 2.4vw, 38px);
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: -0.015em;
}

.story .big mark { background: none; color: var(--accent); }

.story > * {
    opacity: 0; transform: translateX(5vw);
    transition: opacity .9s ease, transform 1s cubic-bezier(.2, .7, .2, 1);
}

.story.in > * { opacity: 1; transform: none; }
.story.in > *:nth-child(2) { transition-delay: .06s; }
.story.in > *:nth-child(3) { transition-delay: .12s; }
.story.in > *:nth-child(4) { transition-delay: .18s; }
.story.in > *:nth-child(5) { transition-delay: .24s; }
.story.in > *:nth-child(6) { transition-delay: .3s; }

/* ── Índice de capítulos con asterisco ─────────────────── */
.index {
    position: fixed;
    left: 32px;
    bottom: 32px;
    z-index: 90;
    list-style: none;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: .02em;
    mix-blend-mode: difference;
    color: #fff;
    opacity: 0;
    transition: opacity .5s ease;
}

.index.show { opacity: 1; }

.index li { display: flex; align-items: center; gap: 8px; height: 22px; }
.index a { opacity: .45; transition: opacity .3s; }
.index li.active a { opacity: 1; }

.index .ast {
    width: 12px; height: 12px;
    opacity: 0;
    transform: rotate(-180deg) scale(.4);
    transition: opacity .4s, transform .7s cubic-bezier(.2, .7, .2, 1);
}

.index li.active .ast { opacity: 1; transform: rotate(0) scale(1); }

/* ── Créditos ──────────────────────────────────────────── */
.credits {
    padding: 140px var(--edge) 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
}

.credits h2 {
    padding-left: 12px;
    font-size: min(100px, 6.5vw);
    font-weight: 400;
    line-height: .9;
    letter-spacing: -0.02em;
}


.credit-list { font-size: 17px; line-height: 1.6; }
.credit-list p + p { margin-top: 18px; }
.credit-list b { font-weight: 600; }
.credit-list .tag { font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: -.01em; }
.credit-list a { border-bottom: 1px solid currentColor; }
.credit-list a:hover { color: var(--accent); }

/* ── Siguiente caso ────────────────────────────────────── */
.next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    padding: 60px var(--edge) var(--edge);
    align-items: end;
}

.next-label { padding-left: 15px; }
.next-label span { display: block; font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.next-label strong { font-weight: 400; font-size: min(90px, 6vw); line-height: .9; letter-spacing: -0.02em; }
.next-label em { display: block; margin-top: 18px; font-size: 15px; }
.next-label em a { border-bottom: 1px solid currentColor; }

.next-card { position: relative; display: block; aspect-ratio: 828 / 585; overflow: hidden; }
.next-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.next-card:hover img { transform: scale(1.03); }

.next-card .label {
    position: absolute; left: 40px; bottom: 31px;
    width: min(339px, calc(100% - 80px)); height: 104px; padding: 0 26px 0 20px;
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border-radius: 0 0 5px 5px; font-size: 14px;
}

.next-card .label b { display: block; font-weight: 700; }
.next-card .label img { width: 22px; height: 22px; transition: transform .3s; }
.next-card:hover .label img { transform: translate(3px, -3px); }

.reveal-text { opacity: 0; transform: translateY(20px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal-text.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .load, .reveal-text, .story > * { opacity: 1 !important; transform: none !important; animation: none !important; }
    .mod.reveal { clip-path: none !important; }
    .mod.reveal > * { transform: none !important; }
}

/* ── Tablet ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .navbar { padding: 24px 32px; }
    .intro { grid-template-columns: 1fr; gap: 48px; padding-top: 150px; }
    .title { font-size: 13vw; }
    .story { grid-template-columns: 1fr; gap: 14px; }
    .story h2 { margin-top: 36px; }
    .story h2:first-child { margin-top: 0; }
    .index { display: none; }
}

/* ── Móvil ───────────────────────────────────────────── */
@media (max-width: 680px) {
    :root { --edge: 9px; --gap: 7px; }
    .navbar { padding: 22px; }
    .nav-links { gap: 16px; }
    .nav-links a { font-size: 13px; }
    .nav-logo { height: 26px; }
    .intro { padding: 130px 16px 48px; gap: 36px; }
    .crumb, .title { padding-left: 0; }
    .title { font-size: 19vw; }
    .meta { grid-template-columns: 1fr 1fr; gap: 18px 20px; font-size: 14px; }
    .row { grid-template-columns: 1fr; }
    .story { padding: 64px 22px; }
    .credits { grid-template-columns: 1fr; gap: 36px; padding: 90px 16px 40px; }
    .credits h2 { font-size: 15vw; padding-left: 0; }
    .credit-list { font-size: 16px; }
    .next { grid-template-columns: 1fr; gap: 24px; padding: 40px var(--edge) var(--edge); }
    .next-label { padding-left: 7px; }
    .next-label strong { font-size: 14vw; }
    .next-card .label { left: 15px; bottom: 15px; width: min(231px, calc(100% - 30px)); height: 66px; font-size: 12px; padding: 0 16px 0 20px; }
}

/* Módulo con la proporción natural de la imagen */
.mod.auto img, .mod.auto video { height: auto; }

/* Filas de 3 y 5 columnas */
.row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.row.cols-5 { grid-template-columns: repeat(5, 1fr); }
.r-square { aspect-ratio: 1 / 1; }

@media (max-width: 680px) {
    .row.cols-3 { grid-template-columns: 1fr; }
    .row.cols-5 { grid-template-columns: 1fr 1fr; }
    .row.cols-5 > :last-child { grid-column: span 2; aspect-ratio: 2 / 1; }
}

/* En pantallas táctiles el video de Vimeo acepta toque
   (por si el teléfono bloquea la reproducción automática) */
@media (hover: none) {
    .vimeo iframe { pointer-events: auto; }
}
