/* Portfolio de Francisco Arca. Estilos. */

@import url('tokens.css');

/* ---------- 1. FUENTE ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('../assets/fonts/archivo-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* ---------- 2. RESET + BASE ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  font-variation-settings: 'wdth' 100, 'wght' 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 { font-weight: 400; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-variation-settings: 'wdth' 125, 'wght' 850; line-height: 1.02; }
h2 { font-variation-settings: 'wdth' 122, 'wght' 820; line-height: 1.05; }
h3 { font-variation-settings: 'wdth' 112, 'wght' 720; line-height: 1.15; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); }
.eyebrow {
  font-variation-settings: 'wdth' 100, 'wght' 620;
  font-size: var(--t-small); color: var(--muted); letter-spacing: 0.01em; margin-bottom: 1.4rem;
}
.accent { color: var(--accent); }
.tabnum { font-variant-numeric: tabular-nums; }

/* ---------- 3. NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding-inline: var(--gutter);
  background: color-mix(in oklch, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(1px)) { .nav { background: var(--surface-2); } }
.nav .logo { display: inline-flex; align-items: center; min-height: 44px; font-variation-settings: 'wdth' 118, 'wght' 800; font-size: 1.18rem; letter-spacing: -0.03em; white-space: nowrap; }
.nav .logo .dot { color: var(--accent); }
@media (max-width: 620px) {
  .nav .logo { font-size: 1.02rem; }
  .nav-links a:not(.nav-cta) { display: none; }
}
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem); }
.nav-links a:not(.nav-cta) { color: var(--muted); font-size: 0.95rem; transition: color var(--dur-fast) var(--ease); }
.nav-links a:not(.nav-cta):hover { color: var(--ink); }
.nav-cta {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0.5rem 1.15rem; border-radius: var(--r-pill);
  background: var(--accent-fill); color: var(--accent-ink);
  font-size: 0.9rem; font-variation-settings: 'wdth' 105, 'wght' 640;
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}
.nav-cta:hover { filter: brightness(1.08); }
.nav-cta:active { transform: scale(0.97); }

/* ---------- 4. BOTONES ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: var(--r-pill);
  font-size: 1rem; font-variation-settings: 'wdth' 105, 'wght' 640; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn-primary { background: var(--accent-fill); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { border: 1px solid var(--border); color: var(--ink); }
.btn-secondary:hover { border-color: var(--accent); }
.btn:active { transform: scale(0.98); }
.btn-lg { padding: 1.05rem 2rem; font-size: 1.1rem; }

/* enlace con flecha */
.arrow-link {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px;
  color: var(--accent); font-variation-settings: 'wdth' 108, 'wght' 660;
}
.arrow-link .arw { transition: transform var(--dur-fast) var(--ease); }
.arrow-link:hover .arw { transform: translateX(4px); }

/* ---------- 5. HERO ---------- */
.hero { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem); }
@media (min-width: 900px) {
  /* llena la pantalla debajo del nav y centra el contenido verticalmente */
  .hero {
    min-height: calc(100dvh - 68px);
    display: flex; flex-direction: column; justify-content: center;
    padding-block: clamp(1.5rem, 3vw, 2.5rem);
  }
}
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) { .hero-grid { grid-template-columns: 7fr 5fr; } }
.hero h1 { font-size: var(--t-display); margin-bottom: 1.4rem; font-variation-settings: 'wdth' 113, 'wght' 840; }
.hero .lead {
  color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 48ch; margin-bottom: 2rem; line-height: 1.55;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* visual firma del hero: panel de evidencia (métricas Italy) */
.hero-visual { position: relative; }
.evidence-panel {
  margin: 0;
  /* hero en una columna (<900px): el panel no se estira a todo el ancho */
  max-width: 540px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 30px 80px oklch(0 0 0 / 0.5);
}
.ep-label { color: var(--muted); font-size: var(--t-small); margin-bottom: 1.1rem; }
.ep-value { margin: 0; }
.ep-value b {
  display: block;
  font-variation-settings: 'wdth' 112, 'wght' 800;
  font-size: clamp(3rem, 5.2vw, 3.8rem);
  line-height: 1; letter-spacing: -0.02em;
  color: var(--data);
}
.ep-unit { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 0.4rem; }
.ep-chart { display: block; width: 100%; height: auto; margin-top: 1.4rem; }
.ep-base { stroke: var(--border); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
/* barras verticales de luz: gradiente que baja de amber (punta) a casi nada (piso) */
.ep-bars { opacity: 0.8; }
.ep-bars line { stroke: url(#ep-bars-grad); stroke-width: 1.3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ep-bg-0 { stop-color: var(--data); stop-opacity: 0.9; }
.ep-bg-1 { stop-color: var(--data); stop-opacity: 0.05; }
/* partículas del piso */
.ep-dots circle { fill: var(--data); }
/* reflejo tenue en el piso */
.ep-reflection { opacity: 0.16; filter: blur(0.8px); }
.ep-line-ghost { stroke: var(--data); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* línea de crecimiento con halo suave (glow contenido, no neón) */
.ep-line { stroke: var(--data); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ep-dot { fill: var(--data); stroke: var(--surface); stroke-width: 2; }
.ep-mini {
  display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; justify-content: space-between;
  margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border);
}
.ep-m b {
  display: block;
  font-variation-settings: 'wdth' 112, 'wght' 800;
  font-size: 1.05rem; line-height: 1.2; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.ep-m span { display: block; color: var(--muted); font-size: 0.78rem; line-height: 1.35; margin-top: 0.15rem; }
@media (max-width: 479px) {
  /* el panel es angosto: cada mini-métrica pasa a fila número + label */
  .ep-mini { display: grid; gap: 0.6rem; }
  .ep-m { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; }
  .ep-m span { margin-top: 0; }
}

/* stats band */
.stats { display: flex; flex-wrap: wrap; gap: clamp(1.8rem, 6vw, 4rem); margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.stat b {
  display: block; font-variation-settings: 'wdth' 118, 'wght' 830;
  font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.stat.is-result b { color: var(--data); }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* ---------- 6. MARCAS (marquee) ---------- */
.brands { border-block: 1px solid var(--border); padding-block: 1.6rem; overflow: hidden; }
.marquee { display: flex; width: max-content; gap: 0; animation: marquee 40s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee .item {
  display: inline-flex; align-items: center; padding-inline: clamp(1.3rem, 3vw, 2.6rem);
  font-variation-settings: 'wdth' 108, 'wght' 640; font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--muted); letter-spacing: -0.01em; white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.marquee .item:hover { color: var(--ink); }
.marquee .item::after { content: '✳'; color: var(--accent); font-size: 0.7em; margin-left: clamp(1.3rem, 3vw, 2.6rem); opacity: 0.55; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 7. CASOS DESTACADOS ---------- */
.cases { display: grid; gap: clamp(3rem, 7vw, 6rem); }
.case-feature { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 900px) {
  .case-feature.italy { grid-template-columns: 8fr 4fr; }
  .case-feature.bali  { grid-template-columns: 5fr 7fr; }
  .case-feature.bali .cf-media { order: 2; }
}
.cf-media { position: relative; overflow: hidden; border-radius: var(--r-media); display: block; }
.cf-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.case-feature.italy .cf-media { aspect-ratio: 16 / 11; }
.case-feature.bali  .cf-media { aspect-ratio: 4 / 3; background: var(--surface); }
.case-feature:hover .cf-media img { transform: scale(1.03); }
.cf-kicker { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.8rem; }
.cf-body h3 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 0.9rem; }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: var(--t-h2); }
.section-head p { color: var(--muted); max-width: 48ch; margin-top: 0.7rem; }
.cf-body p { color: var(--muted); max-width: 42ch; margin-bottom: 1.4rem; }
.cf-result { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 1.6rem; }
.cf-result b { font-variation-settings: 'wdth' 115, 'wght' 820; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--data); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.cf-result span { color: var(--muted); font-size: 0.9rem; }

/* ---------- 8. OBRA (galería masonry) ---------- */
.gallery-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.gallery-head h2 { font-size: var(--t-h2); }
.gallery-head p { color: var(--muted); max-width: 40ch; }
.masonry { columns: 1; column-gap: clamp(0.8rem, 1.5vw, 1.2rem); }
@media (min-width: 560px) { .masonry { columns: 2; } }
@media (min-width: 900px) { .masonry { columns: 3; } }
@media (min-width: 1200px) { .masonry { columns: 4; } }
.tile {
  break-inside: avoid; margin-bottom: clamp(0.8rem, 1.5vw, 1.2rem);
  display: block; position: relative; overflow: hidden; border-radius: var(--r-media);
  background: var(--surface); cursor: zoom-in; width: 100%;
}
.tile img { width: 100%; height: auto; transition: transform var(--dur-med) var(--ease), opacity var(--dur-med) var(--ease); }
.tile:hover img { transform: scale(1.04); }
.tile figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem 0.9rem 0.7rem;
  font-size: 0.82rem; color: var(--ink);
  background: linear-gradient(to top, oklch(0 0 0 / 0.75), transparent);
  opacity: 0; transition: opacity var(--dur-fast) var(--ease);
}
.tile:hover figcaption, .tile:focus-visible figcaption { opacity: 1; }

/* lightbox */
.lightbox { border: none; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: oklch(0.05 0 0 / 0.9); backdrop-filter: blur(6px); }
.lightbox-inner { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; padding: clamp(1rem, 4vw, 3rem); }
.lightbox img { max-width: min(94vw, 1024px); max-height: 84vh; width: auto; border-radius: var(--r-media); box-shadow: 0 30px 90px oklch(0 0 0 / 0.6); }
.lightbox figcaption { color: var(--muted); font-size: 0.9rem; text-align: center; max-width: 60ch; }
.lightbox-close {
  position: fixed; top: 1rem; right: 1rem; z-index: var(--z-lightbox);
  width: 44px; height: 44px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink);
  font-size: 1.3rem; cursor: pointer; display: grid; place-items: center;
}
.lightbox-close:hover { border-color: var(--accent); }

/* ---------- 8b. CREATIVOS DE PERFORMANCE (e-commerce multi-mercado) ---------- */
.perf-hero { display: grid; gap: clamp(0.8rem, 1.5vw, 1.2rem); grid-template-columns: 1fr; }
@media (min-width: 560px) { .perf-hero { grid-template-columns: repeat(3, 1fr); } }
.perf-hero .tile { margin-bottom: 0; }

.perf-markets { margin-top: clamp(3rem, 6vw, 5rem); }
.pm-head { max-width: 54ch; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.pm-head h3 { font-size: var(--t-h3); margin-bottom: 0.6rem; }
.pm-head p { color: var(--muted); }

.market-row { display: grid; gap: clamp(0.8rem, 1.5vw, 1.2rem); grid-template-columns: 1fr; }
@media (min-width: 560px) { .market-row { grid-template-columns: repeat(3, 1fr); } }
.market-fig { display: flex; flex-direction: column; cursor: zoom-in; }
.mf-media { overflow: hidden; border-radius: var(--r-media); background: var(--surface); }
.mf-media img { width: 100%; height: auto; display: block; transition: transform var(--dur-med) var(--ease); }
.market-fig:hover .mf-media img, .market-fig:focus-visible .mf-media img { transform: scale(1.03); }
.market-fig figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; padding: 0.85rem 0.1rem 0.2rem; }
.mf-lang { color: var(--ink); font-variation-settings: 'wdth' 108, 'wght' 680; font-size: 0.98rem; }
.mf-note { color: var(--muted); font-size: 0.8rem; }

/* ---------- 9. SISTEMA (secuencia numerada — única del sitio) ---------- */
.system-head { max-width: 52ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.system-head h2 { font-size: var(--t-h2); margin-bottom: 1rem; }
.system-head p { color: var(--muted); }
.steps { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 3vw, 2.2rem); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { border-top: 2px solid var(--accent); padding-top: 1.3rem; }
.step .num { font-variation-settings: 'wdth' 120, 'wght' 830; font-size: 1.1rem; color: var(--accent); }
.step h3 { font-size: 1.4rem; margin: 0.5rem 0 0.6rem; }
.step p { color: var(--muted); font-size: 0.98rem; }
.step .step-media { margin-top: 1.3rem; border-radius: var(--r-media); overflow: hidden; aspect-ratio: 1 / 1; background: var(--surface); }
.step .step-media img { width: 100%; height: 100%; object-fit: cover; }
.capabilities { margin-top: clamp(2.5rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.capabilities .lbl { color: var(--muted); font-size: 0.9rem; margin-right: 0.4rem; }
.pill { border: 1px solid var(--border); border-radius: var(--r-pill); padding: 0.4rem 0.95rem; font-size: 0.88rem; color: var(--ink); }

/* ---------- 10. SOBRE MÍ ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 768px) { .about-grid { grid-template-columns: 5fr 7fr; } }
.about-photo { border-radius: var(--r-media); overflow: hidden; aspect-ratio: 3 / 4; background: var(--surface); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { font-size: var(--t-h2); margin-bottom: 1.4rem; }
.about-text p { color: var(--muted); margin-bottom: 1.1rem; max-width: 60ch; }
.about-text strong { color: var(--ink); font-variation-settings: 'wdth' 100, 'wght' 620; }
.tools { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.8rem; }

/* ---------- 10b. CV ---------- */
.cv-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 768px) {
  .cv-grid { grid-template-columns: 7fr 5fr; }
  .cv-text { order: 1; }
  .cv-preview { order: 2; justify-self: center; }
}
.cv-preview {
  display: block; width: 100%; max-width: 340px;
  border-radius: var(--r-panel); overflow: hidden;
  border: 1px solid var(--border); background: #fff;
  box-shadow: 0 24px 60px oklch(0 0 0 / 0.5);
}
.cv-preview img { width: 100%; height: auto; display: block; transition: transform var(--dur-med) var(--ease); }
.cv-preview:hover img { transform: scale(1.02); }
.cv-text h2 { font-size: var(--t-h2); margin-bottom: 1.2rem; }
.cv-text p { color: var(--muted); max-width: 46ch; }
.cv-actions { margin-top: 1.8rem; }
@media (prefers-reduced-motion: reduce) { .cv-preview img { transition: none; } }

/* ---------- 11. CONTACTO ---------- */
.contact { text-align: center; }
.contact .kick { color: var(--muted); margin-bottom: 1.2rem; font-size: clamp(1.05rem, 2vw, 1.35rem); font-variation-settings: 'wdth' 106, 'wght' 560; letter-spacing: 0; }
.contact-email {
  display: inline-block; font-variation-settings: 'wdth' 118, 'wght' 780;
  font-size: clamp(1rem, 5.4vw, 4rem); letter-spacing: -0.03em; line-height: 1.05;
  margin-bottom: 1.6rem; white-space: nowrap; max-width: 100%;
  transition: color var(--dur-fast) var(--ease);
}
.contact-email:hover { color: var(--accent); }
.contact .avail { color: var(--muted); max-width: 46ch; margin: 0 auto 2rem; }
.socials { display: flex; justify-content: center; gap: 0.8rem; }
.socials a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.6rem; color: var(--muted); transition: color var(--dur-fast) var(--ease); }
.socials a:hover { color: var(--accent); }

/* ---------- 12. FOOTER ---------- */
.footer { border-top: 1px solid var(--border); padding-block: 2.4rem; }
.footer .container { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; justify-content: space-between; align-items: center; }
.footer p, .footer a { color: var(--muted); font-size: 0.88rem; }
.footer a:hover { color: var(--ink); }
.footer-links { display: flex; align-items: center; gap: 0.4rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.5rem; }

/* ---------- 13. PÁGINAS DE CASO ---------- */
.case-hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem); }
.back-link { color: var(--muted); font-size: 0.9rem; display: inline-flex; align-items: center; min-height: 44px; gap: 0.4rem; margin-bottom: 1.4rem; }
.back-link:hover { color: var(--accent); }
.case-hero h1 { font-size: clamp(2.5rem, 7vw, 5rem); margin-bottom: 1rem; }
.case-hero .role { color: var(--muted); font-size: 1.05rem; }
.case-stats { margin-top: clamp(1.8rem, 4vw, 2.5rem); }
.case-stats .stat b { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.case-hero-media { margin-top: clamp(2rem, 5vw, 3.5rem); border-radius: var(--r-media); overflow: hidden; }
.case-hero-media img { width: 100%; height: 100%; object-fit: cover; }
/* la foto hero vertical no debe ocupar dos pantallas en desktop */
@media (min-width: 768px) { .case-hero-media:not(.logo-stage) { aspect-ratio: 16 / 9; } }
.case-hero-media.logo-stage { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--surface); padding: clamp(2rem, 6vw, 5rem); }
.case-hero-media.logo-stage img { width: min(60%, 460px); }

.case-block { padding-block: clamp(3rem, 6vw, 5rem); }
.case-block h2 { font-size: var(--t-h2); margin-bottom: 1rem; }
.case-block .block-intro { color: var(--muted); max-width: 60ch; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.prose { display: grid; gap: 1.2rem; max-width: 60ch; }
.prose p { color: var(--muted); }
.prose strong { color: var(--ink); font-variation-settings: 'wdth' 100, 'wght' 600; }

/* tira horizontal scroll-snap */
.strip { display: flex; gap: clamp(0.8rem, 1.5vw, 1.2rem); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: thin; }
.strip::-webkit-scrollbar { height: 8px; }
.strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--r-pill); }
.strip > figure { flex: 0 0 auto; scroll-snap-align: start; width: clamp(220px, 40vw, 320px); }
.strip > figure img { border-radius: var(--r-media); width: 100%; }
.strip > figure figcaption { color: var(--muted); font-size: 0.82rem; margin-top: 0.6rem; }
/* strip del manual de marca: páginas más grandes, con hairline y zoom */
.strip.manual > figure { width: clamp(280px, 74vw, 460px); cursor: zoom-in; }
.strip.manual > figure img { border: 1px solid var(--border); transition: transform var(--dur-med) var(--ease); }
.strip.manual > figure:hover img { transform: scale(1.02); }
@media (prefers-reduced-motion: reduce) { .strip.manual > figure img { transition: none; } }

/* grid uniforme de piezas (flyers, mockups, logos) */
/* minmax 170: los 6 flyers cierran en 6 / 3 columnas, sin huérfanos */
.piece-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: clamp(0.8rem, 1.5vw, 1.2rem); }
/* en mobile, 2 columnas fijas (auto-fill caería a 1 tira gigante) */
@media (max-width: 479px) { .piece-grid:not(.wide) { grid-template-columns: repeat(2, 1fr); } }
.piece-grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.piece-grid figure { border-radius: var(--r-media); overflow: hidden; background: var(--surface); }
.piece-grid img { width: 100%; }
/* mockups de fuentes 1:1 / 4:3 / 3:2: se unifican en 4:3 con recorte centrado */
.piece-grid.wide figure { aspect-ratio: 4 / 3; }
.piece-grid.wide img { width: 100%; height: 100%; object-fit: cover; }
/* minmax 160: las 4 variantes de logo entran en una fila también en tablet */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: clamp(0.8rem, 1.5vw, 1.2rem); }
.logo-grid figure { position: relative; background: var(--surface); border-radius: var(--r-media); aspect-ratio: 3 / 2; }
/* absoluta para que la variante cuadrada no estire su celda */
.logo-grid img { position: absolute; inset: 1.8rem; width: calc(100% - 3.6rem); height: calc(100% - 3.6rem); object-fit: contain; }

/* banda de evidencia */
.evidence { background: var(--surface); border-block: 1px solid var(--border); }
.evidence .metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.metric b { display: block; font-variation-settings: 'wdth' 118, 'wght' 840; font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--data); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric span { color: var(--muted); font-size: 0.9rem; display: block; margin-top: 0.4rem; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: clamp(0.8rem, 2vw, 1.4rem); align-items: start; }
.shots figure { border: 1px solid var(--border); border-radius: var(--r-media); overflow: hidden; background: var(--bg); }
.shots img { width: 100%; }
.shots figcaption { color: var(--muted); font-size: 0.82rem; padding: 0.6rem 0.7rem; }

.case-next { text-align: center; border-top: 1px solid var(--border); }
.case-next h2 { font-size: var(--t-h2); margin-bottom: 1.6rem; }
.case-next .btns { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }

/* ---------- 14. MOTION (reveal on load / scroll) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.js .reveal[data-delay="1"].in { transition-delay: 80ms; }
.js .reveal[data-delay="2"].in { transition-delay: 160ms; }
.js .reveal[data-delay="3"].in { transition-delay: 240ms; }

/* hero: reveal por línea con clip-path */
.hero-line { display: block; }
.js .hero-line { clip-path: inset(0 0 110% 0); opacity: 0; }
.js .hero .lead, .js .hero-cta, .js .hero-visual { opacity: 0; transform: translateY(16px); }
.js .hero.ready .hero-line { animation: lineIn var(--dur-slow) var(--ease) forwards; }
.js .hero.ready .hero-line:nth-child(2) { animation-delay: 90ms; }
.js .hero.ready .lead { animation: fadeUp var(--dur-slow) var(--ease) 0.24s forwards; }
.js .hero.ready .hero-cta { animation: fadeUp var(--dur-slow) var(--ease) 0.34s forwards; }
.js .hero.ready .hero-visual { animation: fadeUp var(--dur-slow) var(--ease) 0.2s forwards; }
@keyframes lineIn { to { clip-path: inset(0 0 -12% 0); opacity: 1; } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .hero-line, .js .hero .lead, .js .hero-cta, .js .hero-visual {
    opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; transition: none !important;
  }
  .marquee { animation: none; }
  .tile img, .cf-media img, .mf-media img, .arrow-link .arw { transition: none; }
}
