/* Yael Alvizuri · portafolio. Una sola hoja de estilos con tokens. */


:root {
  /* color */
  --bg: #000000;
  --surface: #0a0d10;
  --surface-2: #12171c;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #ffffff;
  --muted: #a9b1b8;
  --accent: #00ccff;
  --accent-ink: #001219;
  --blue-glow: rgba(0, 204, 255, 0.14);
  --violet-glow: rgba(0, 204, 255, 0.08);
  --accent-hover: #4de0ff;
  --text-2: #cdd3d9;
  --text-3: #b7bfc7;
  --danger: #c62d33;
  --bar-off: #6b7884;
  --line-control: rgba(255, 255, 255, 0.55);

  /* espaciado, base 4 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

  /* escala tipográfica */
  --t-xs: 0.875rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  --t-2xl: clamp(2rem, 1.2rem + 3.4vw, 3.5rem);
  --t-3xl: clamp(2.5rem, 1.2rem + 5vw, 4.5rem);

  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: var(--t-md);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: var(--s3) var(--s4); border-radius: var(--radius-sm); font-weight: 500;
}
.skip:focus { top: var(--s4); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 64px; }
.brand, .btn { white-space: nowrap; }
.brand { min-height: 44px; display: inline-flex; align-items: center; gap: var(--s3); font-weight: 500; text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 50%; }
.nav { display: flex; align-items: center; gap: var(--s6); }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); font-size: var(--t-sm); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav .btn { color: var(--accent-ink); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: var(--s3) var(--s6);
  border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-size: var(--t-sm); font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-control); }
.btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--text); }
.btn--sm { min-height: 44px; padding: var(--s2) var(--s5); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 8vw, 96px) clamp(32px, 6vw, 64px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: var(--t-3xl); }
.hero .lead { margin-top: var(--s6); font-size: var(--t-lg); color: var(--muted); max-width: 34em; }
.hero .actions { margin-top: var(--s8); }
.signature { margin-top: var(--s10); padding-top: var(--s5); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); font-size: var(--t-sm); color: var(--muted); }
.signature strong { color: var(--text); font-weight: 500; }
.hero-photo { position: relative; }
.float-stat {
  position: absolute; left: clamp(-56px, -4vw, -16px); bottom: 12%;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: var(--s4) var(--s5); box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}
.float-stat b { display: block; font-size: var(--t-xl); line-height: 1.1; }
.float-stat span { font-size: var(--t-xs); color: var(--muted); }

/* ---------- logos ---------- */
.logos { padding-block: var(--s8); border-block: 1px solid var(--line); }
.logos p { text-align: center; font-size: var(--t-sm); color: var(--muted); }
.logos ul { list-style: none; padding: 0; margin: var(--s6) 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s6) clamp(28px, 5vw, 56px); }
.logos img { height: 30px; width: auto; max-width: 140px; object-fit: contain; opacity: 0.85; }
.logos li.wide img { height: 34px; max-width: 200px; }

/* ---------- secciones ---------- */
.section { padding-block: clamp(56px, 9vw, 112px); }
.section-head { max-width: 40em; margin-bottom: var(--s12); }
.section-head h2 { font-size: var(--t-2xl); }
.section-head p { margin-top: var(--s4); color: var(--muted); font-size: var(--t-lg); }

.arrow { display: inline-block; transition: transform 0.15s; color: var(--accent); }

/* cómo trabajo */
.practice { list-style: none; padding: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 80px); }
.practice li { padding-block: var(--s6); border-bottom: 1px solid var(--line); }
.practice strong { display: block; font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.01em; }
.practice span { display: block; margin-top: var(--s2); color: var(--muted); font-size: var(--t-sm); }

/* ---------- cierre / contacto ---------- */
.closing { border-top: 1px solid var(--line); padding-block: clamp(56px, 9vw, 112px); position: relative; }
.closing h2 { font-size: var(--t-2xl); max-width: 16em; }
.figures { list-style: none; padding: 0; margin: var(--s12) 0; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.figures li { padding: var(--s8) var(--s6); }
.figures li + li { border-left: 1px solid var(--line); }
.figures b { display: block; font-size: var(--t-xl); line-height: 1.1; }
.figures span { display: block; margin-top: var(--s2); font-size: var(--t-sm); color: var(--muted); }
.contact-links { list-style: none; padding: 0; margin: 0 0 var(--s10); display: flex; flex-wrap: wrap; gap: var(--s3) var(--s8); }
.contact-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 6px; }
.contact-links a:hover { text-decoration-color: var(--accent); color: var(--accent); }

/* ---------- caso ---------- */
.case-hero { padding-block: clamp(40px, 7vw, 80px) clamp(24px, 4vw, 40px); }
.crumb { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-sm); color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--text); }
.case-hero .case-meta { display: flex; align-items: center; gap: var(--s4); margin-top: var(--s8); color: var(--muted); font-size: var(--t-sm); }
.case-hero .case-meta img { height: 28px; width: auto; }
.case-hero h1 { font-size: var(--t-3xl); margin-top: var(--s4); }
.case-hero .tagline { margin-top: var(--s6); font-size: var(--t-lg); max-width: 30em; }

.case-body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; padding-block: var(--s8) var(--s16); }
.facts { border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 7.5em 1fr; gap: var(--s6); padding-block: var(--s5); border-bottom: 1px solid var(--line); }
.facts dt { color: var(--accent); font-size: var(--t-sm); font-weight: 500; }
.facts dd { color: var(--text); font-size: var(--t-sm); line-height: 1.65; }
.facts dd p + p { margin-top: var(--s2); }
.facts strong { font-weight: 500; }

.visual { margin: 0; }
.visual--shot { margin-inline: 0; }
.visual--shot img { width: 100%; }
@media (min-width: 900px) { .visual--shot { margin-right: calc(-1 * max(var(--gutter), (100vw - var(--wrap)) / 2)); } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); }
.panel h2 { font-size: var(--t-sm); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.big { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s3) var(--s4); margin-top: var(--s5); font-size: var(--t-3xl); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.big .to { color: var(--muted); font-weight: 400; font-size: 0.6em; }
.big .unit { font-size: var(--t-lg); font-weight: 400; letter-spacing: 0; color: var(--muted); }
.panel .sub { margin-top: var(--s5); color: var(--muted); }
.bars { margin-top: var(--s8); display: grid; gap: var(--s5); }
.bar-row { display: grid; gap: var(--s2); font-size: var(--t-sm); color: var(--muted); }
.bar-row .top { display: flex; justify-content: space-between; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--bar-off); }
.bar-row.after .bar i { background: var(--accent); }
.chips { list-style: none; padding: 0; margin: var(--s8) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips li { border: 1px solid var(--line-strong); border-radius: 999px; padding: var(--s1) var(--s4); font-size: var(--t-xs); color: var(--muted); }
.chips li.on { border-color: var(--accent); color: var(--text); }
.note { margin-top: var(--s5); font-size: var(--t-xs); color: var(--muted); }

.results { list-style: none; padding: 0; margin: var(--s8) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-block: 1px solid var(--line); }
.results li { padding: var(--s6) var(--s5) var(--s6) 0; }
.results li + li { padding-left: var(--s5); border-left: 1px solid var(--line); }
.results b { display: block; font-size: var(--t-xl); line-height: 1.1; }
.results span { display: block; margin-top: var(--s2); font-size: var(--t-sm); color: var(--muted); }
.results--lead { margin-top: var(--s6); }

.more { padding-block: 0 var(--s16); }
.more h2 { font-size: var(--t-xl); margin-bottom: var(--s6); max-width: 22em; }
.table-wrap { border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
caption { text-align: left; padding-bottom: var(--s4); color: var(--muted); }
th, td { text-align: left; vertical-align: top; padding: var(--s5) var(--s6) var(--s5) 0; border-bottom: 1px solid var(--line); }
th { font-weight: 500; color: var(--muted); }
td:last-child { color: var(--text); }
.two-notes { margin-top: var(--s8); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); font-size: var(--t-sm); color: var(--muted); }
.two-notes strong { color: var(--text); font-weight: 500; }
.two-notes > p { padding-left: var(--s4); border-left: 2px solid var(--accent); }

.pager { border-top: 1px solid var(--line); }
.pager .wrap { display: grid; grid-template-columns: 1fr 1fr; }
.pager a { display: block; padding-block: var(--s8); text-decoration: none; }
.pager a:last-child { text-align: right; }
.pager small { display: block; color: var(--muted); font-size: var(--t-sm); }
.pager b { font-size: var(--t-lg); font-weight: 500; }
.pager a:hover b { color: var(--accent); }

/* ---------- sobre mí ---------- */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; padding-block: clamp(40px, 7vw, 80px); }
.about img { width: 100%; aspect-ratio: 6/5; object-fit: cover; border-radius: 24px; border: 1px solid var(--line); }
.about h1 { font-size: var(--t-2xl); }
.about .prose p { margin-top: var(--s5); color: var(--text-2); font-family: var(--font-read); line-height: 1.7; }
.about .prose p:first-child { margin-top: var(--s6); }
.about .prose strong { color: var(--text); font-weight: 500; }
.cv { padding-bottom: clamp(48px, 8vw, 96px); display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 80px); }
.cv h2 { font-size: var(--t-xl); margin-bottom: var(--s5); }
.timeline { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 1fr auto; gap: var(--s2) var(--s4); padding-block: var(--s4); border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.timeline b { font-weight: 500; }
.timeline span { color: var(--muted); }
.timeline .years { text-align: right; white-space: nowrap; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s8); color: var(--muted); font-size: var(--t-sm); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .case-body, .about, .cv { grid-template-columns: 1fr; }
  .hero-photo { max-width: 520px; }
  .float-stat { left: var(--s4); }
  .practice { grid-template-columns: 1fr; }
  .visual--shot { margin-inline: calc(-1 * var(--gutter)); }
  .cv > div + div { margin-top: var(--s10); }
}
@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .nav { gap: var(--s4); }
  .nav a.nav-about { display: inline; }
  .figures { grid-template-columns: 1fr; }
  .figures li + li { border-left: 0; border-top: 1px solid var(--line); }
  .facts > div { grid-template-columns: 1fr; gap: var(--s1); }
  .results { grid-template-columns: 1fr; }
  .results li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .two-notes { grid-template-columns: 1fr; }
  .logos img { height: 26px; }
  /* tabla de decisiones apilada */
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -9999px; }
  tr { padding-block: var(--s4); border-bottom: 1px solid var(--line); }
  td, th { border: 0; padding: var(--s2) 0; }
  td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: var(--t-xs); margin-bottom: var(--s1); }
  .pager b { font-size: var(--t-md); }
}

@media (max-width: 480px) {
  .nav a.nav-about { display: none; }
}
.site-footer nav { display: flex; gap: var(--s6); }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }

/* =====================================================================
   Estilo tipo "Lumina": animaciones, tarjetas, cierre con brillo, pie
   ===================================================================== */

/* entrada del hero */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.92) translateY(10px); } to { opacity: 1; transform: none; } }
.hero h1, .hero .lead, .hero .actions, .hero .signature { animation: rise 0.7s cubic-bezier(.2,.7,.2,1) both; }
.hero .lead { animation-delay: 0.1s; }
.hero .actions { animation-delay: 0.2s; }
.hero .signature { animation-delay: 0.3s; }
.hero-photo { animation: pop 0.8s cubic-bezier(.2,.7,.2,1) 0.15s both; }
.float-stat { animation: bob 5s ease-in-out 1s 3; }
.float-tag { animation: bob 6s ease-in-out 2s 3; }

/* aparecer al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* foto del hero con marco luminoso y tarjetas flotantes */
.float-stat, .float-tag { background: rgba(12, 16, 20, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line-strong); }
.float-stat b, .float-tag b { color: var(--accent); }
.float-tag { position: absolute; right: clamp(-24px, -2vw, -8px); top: 10%; border-radius: var(--radius); padding: var(--s3) var(--s5); box-shadow: 0 16px 40px rgba(0,0,0,0.5); }
.float-tag b { display: block; font-size: var(--t-lg); line-height: 1.2; }
.float-tag span { font-size: var(--t-xs); color: var(--muted); }

/* botones con brillo */
.btn { transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.btn--ghost:hover { box-shadow: none; }

/* franja de logos */
.logos { background: rgba(255,255,255,0.02); }
.logos img { transition: opacity 0.2s, transform 0.2s; }


/* cómo trabajo: tarjetas con icono y hover */
.practice { grid-template-columns: repeat(3, 1fr); gap: var(--s5); border-top: 0; }
.practice li { position: relative; padding: var(--s6); border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.practice strong { font-size: var(--t-md); }

/* cierre con brillo azul y cifras en tarjetas */
.closing { text-align: center; overflow: hidden; }
.closing h2 { margin-inline: auto; }
.figures { border: 0; gap: var(--s5); margin-block: var(--s12); }
.figures b { color: var(--accent); font-size: var(--t-2xl); }
.contact-links { justify-content: center; }
.closing .actions { justify-content: center; }

/* páginas de caso */
.panel { border-color: var(--line); }
.big span:not(.to):not(.unit) { color: var(--accent); }
.results b { color: var(--accent); }
.visual--shot img { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.pager a { transition: background 0.25s; }
.pager a:hover { background: linear-gradient(90deg, rgba(0,204,255,0.06), transparent); }
.pager a:last-child:hover { background: linear-gradient(270deg, rgba(0,204,255,0.06), transparent); }
.timeline li { transition: padding-left 0.2s; }
.timeline li:hover { padding-left: var(--s2); }

.site-footer { padding-block: var(--s16) var(--s8); background: rgba(255,255,255,0.015); }

@media (max-width: 900px) {
  .practice { grid-template-columns: 1fr 1fr; }
  .float-tag { right: var(--s2); }
}
@media (max-width: 640px) {
  .practice { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero .lead, .hero .actions, .hero .signature, .hero-photo, .float-stat, .float-tag { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
}

html { overflow-x: clip; }

/* =====================================================================
   Más visual: tarjetas de casos con imagen, medios grandes, galerías
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* casos en portada */
.work { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s5); }
.work-card--3 { grid-column: span 3; }
.work-card--2 { grid-column: span 2; }
.work-card a { position: relative; display: block; height: 100%; overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: transform 0.35s cubic-bezier(.2,.7,.2,1), border-color 0.3s, box-shadow 0.3s; }
.work-media { aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.work-card--2 .work-media { aspect-ratio: 4 / 5; }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; transition: transform 0.7s cubic-bezier(.2,.7,.2,1); }
.work-info { position: absolute; inset: auto 0 0 0; padding: var(--s6); display: grid; gap: var(--s2); background: linear-gradient(0deg, rgba(0,0,0,0.94) 25%, rgba(0,0,0,0.78) 65%, transparent); }
.work-info h3 { font-size: var(--t-xl); }
.work-card--2 .work-info h3 { font-size: var(--t-lg); }
.chip { justify-self: start; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px var(--s3); font-size: var(--t-xs); color: var(--text-2); background: rgba(0,0,0,0.65); }
.work-metric { font-size: var(--t-sm); color: var(--muted); }
.work-metric b { color: var(--accent); font-size: var(--t-lg); font-weight: 700; margin-right: var(--s1); }
.work-info .arrow { position: absolute; right: var(--s6); bottom: var(--s6); font-size: var(--t-lg); }
.work-card a:hover .arrow { transform: translateX(6px); }
.metric-visual { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: var(--s6); padding: var(--s8) var(--s8) 96px; background: radial-gradient(80% 80% at 30% 20%, rgba(0,204,255,0.2), transparent 70%), #05090c; }
.metric-visual .big { margin: 0; font-size: clamp(3rem, 2rem + 4vw, 5rem); }
.metric-visual .big span:not(.to) { color: var(--accent); }
.metric-visual .bars { margin: 0; }
.metric-visual .bar { height: 12px; }

/* sobre mí en portada */
.teaser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
border: 0; }
.teaser h2 { font-size: var(--t-2xl); }
.teaser .results { margin-block: var(--s8); }

/* páginas de caso: medio grande arriba */
.case-media { margin: var(--s4) 0 var(--s8); }
.case-media img { width: 100%; max-height: 640px; object-fit: cover; object-position: 65% 50%; border-radius: 28px; border: 1px solid var(--line); background: #000; }
.case-media--panel { max-width: 760px; }
.case-hero { padding-bottom: var(--s4); }
.results--lead { margin-top: 0; }
.facts--grid { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 6vw, 80px); margin-block: var(--s6) var(--s16); border-top: 0; }
.facts--grid > div { grid-template-columns: 1fr; gap: var(--s2); border-top: 1px solid var(--line); border-bottom: 0; padding-block: var(--s6); }
.facts--grid > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.facts--grid dd { font-size: var(--t-md); }

/* galería de pantallas */
.gallery { padding-bottom: var(--s16); }
.gallery h2 { font-size: var(--t-xl); margin-bottom: var(--s2); }
.gallery .muted { font-size: var(--t-sm); margin-bottom: var(--s6); }
.phones { display: flex; gap: var(--s6); overflow-x: auto; padding: var(--s6) max(var(--gutter), calc((100vw - var(--wrap)) / 2)) var(--s8); scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(0,204,255,0.5) transparent; }
.phone { flex: 0 0 auto; margin: 0; scroll-snap-align: start; }
.phone-screen { width: 250px; border-radius: 32px; border: 7px solid #1a2127; background: #fff; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,204,255,0.25); transition: transform 0.3s, box-shadow 0.3s; }
.phone:hover .phone-screen { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,204,255,0.7), 0 0 40px rgba(0,204,255,0.25); }
.phone--scroll .phone-screen { height: 520px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; cursor: grab; }
.phone--scroll .phone-screen::-webkit-scrollbar { display: none; }
.phone img { width: 100%; height: auto; display: block; }

@media (max-width: 900px) {
  .work { grid-template-columns: 1fr 1fr; }
  .work-card--3, .work-card--2 { grid-column: span 2; }
  .work-card--2 .work-media { aspect-ratio: 4 / 3; }
  .teaser-grid { grid-template-columns: 1fr; }
  .facts--grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .work { grid-template-columns: 1fr; }
  .work-card--3, .work-card--2 { grid-column: auto; }
  .phone-screen { width: 220px; }
  .phone--scroll .phone-screen { height: 460px; }
  .metric-visual { padding: var(--s6) var(--s6) 110px; }
}

/* desplegable "Ver el proceso completo" */
.process { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.process summary { cursor: pointer; padding-block: var(--s5); font-size: var(--t-md); font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: var(--s4); }
.process summary::-webkit-details-marker { display: none; }
.process summary::after { content: "+"; color: var(--accent); font-size: var(--t-lg); line-height: 1; transition: transform 0.25s cubic-bezier(.2,.7,.2,1); }
.process[open] summary::after { transform: rotate(45deg); }
.process summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.process-body { padding-bottom: var(--s6); color: var(--muted); font-size: var(--t-sm); max-width: 65ch; }
.process-body li + li { margin-top: var(--s3); }
.process-body strong { color: var(--text); font-weight: 500; }

/* historia del caso */
.story { padding-block: var(--s8) var(--s16); }
.story-sec { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: var(--s8); padding-block: var(--s8); border-top: 1px solid var(--line); }
.story-sec h2 { font-size: var(--t-lg); font-weight: 500; line-height: 1.25; text-wrap: balance; }
.story-body { max-width: 68ch; color: var(--muted); font-size: var(--t-md); line-height: 1.7; }
.story-body > * + * { margin-top: var(--s4); }
.story-body strong { color: var(--text); font-weight: 500; }
.story-body ul { list-style: none; padding: 0; }
.story-body li { position: relative; padding-left: var(--s5); }
.story-body li + li { margin-top: var(--s3); }
.story-body li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.story-body blockquote { margin: 0; padding: var(--s3) var(--s5); background: var(--surface); border-radius: var(--radius-sm); color: var(--text); font-size: var(--t-sm); }
.story-body a { color: var(--accent); text-underline-offset: 3px; }
@media (max-width: 720px) { .story-sec { grid-template-columns: 1fr; gap: var(--s3); } }

/* ilustraciones dentro de la historia */
.panel h3 { font-size: var(--t-sm); font-weight: 500; color: var(--muted); }
.panel--inline { margin-block: var(--s4); padding: clamp(20px, 3vw, 28px); }
.panel--inline .big { font-size: var(--t-2xl); }
.panel--inline .bars { margin-top: var(--s5); }
.fig { margin-block: var(--s4); }
.fig img { width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }
.fig figcaption, .figma figcaption { margin-top: var(--s2); font-size: var(--t-xs); color: var(--muted); }
.fig--tall img { max-width: 360px; }
.figs { display: grid; gap: var(--s4); margin-block: var(--s4); }
.figs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.figs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figs .fig { margin: 0; }
.figma { margin-block: var(--s4); }
.figma-frame { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.figma-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.story-body .chips--flow { margin: var(--s4) 0; }
.story-body .chips--flow li { color: var(--text); }
.story-body .table-wrap { margin-block: var(--s4); }
.phases { list-style: none; padding: 0; margin: var(--s4) 0; display: grid; gap: var(--s3); counter-reset: fase; }
.phases li { display: grid; grid-template-columns: 7.5em 1fr; gap: var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.phases b { color: var(--accent); font-weight: 500; font-size: var(--t-sm); }
.phases span { font-size: var(--t-sm); }
@media (max-width: 720px) {
  .figs--2, .figs--3 { grid-template-columns: 1fr; }
  .figma-frame { aspect-ratio: 4 / 5; }
  .phases li { grid-template-columns: 1fr; gap: var(--s1); }
}
.story-body .phases li { padding-left: 0; }
.story-body .phases li::before { display: none; }
.story-body .phases li + li { margin-top: 0; }

/* fichas, donas, pasos y líneas de tiempo */
.stat-tiles { list-style: none; padding: 0; margin: var(--s4) 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s3); }
.stat-tiles li { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.story-body .stat-tiles li::before { display: none; }
.story-body .stat-tiles li { padding-left: var(--s4); margin: 0; }
.stat-tiles b { display: block; font-size: var(--t-xl); line-height: 1.1; color: var(--accent); font-weight: 700; }
.stat-tiles span { display: block; margin-top: var(--s2); font-size: var(--t-xs); color: var(--muted); line-height: 1.45; }
.donut-wrap { display: flex; align-items: center; gap: var(--s6); margin-top: var(--s5); flex-wrap: wrap; }
.donut { width: 9.5rem; height: 9.5rem; flex: none; color: var(--text); }
.donut-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); font-size: var(--t-sm); color: var(--text); }
.story-body .donut-legend li { padding-left: 0; margin: 0; }
.story-body .donut-legend li::before { display: none; }
.donut-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); margin-right: var(--s2); }
.donut-legend .dot.on { background: var(--accent); border-color: var(--accent); }
.steps { list-style: none; padding: 0; margin: var(--s4) 0 var(--s2); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.story-body .steps li { padding: var(--s2) var(--s4); margin: 0; border: 1px solid var(--accent); border-radius: 999px; color: var(--text); font-size: var(--t-sm); }
.story-body .steps li::before { display: none; }
.story-body .steps li + li { margin-top: 0; }
.steps li:not(:last-child)::after { content: "→"; margin-left: var(--s3); color: var(--muted); }
.tline { list-style: none; padding: 0; margin: var(--s4) 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s3); counter-reset: none; }
.story-body .tline li { padding: var(--s4) 0 0; margin: 0; border-top: 2px solid var(--line-strong); position: relative; }
.story-body .tline li::before { display: block; content: ""; position: absolute; left: 0; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.story-body .tline li + li { margin-top: 0; }
.tline b { display: block; color: var(--text); font-size: var(--t-sm); font-weight: 500; }
.tline span { display: block; margin-top: var(--s1); font-size: var(--t-xs); color: var(--muted); line-height: 1.45; }
@media (max-width: 720px) {
  .tline { grid-auto-flow: row; grid-auto-columns: auto; gap: var(--s4); }
  .story-body .tline li { border-top: 0; border-left: 2px solid var(--line-strong); padding: 0 0 0 var(--s5); }
  .story-body .tline li::before { left: -6px; top: 4px; }
}
.story-body .chips--flow li { padding: var(--s1) var(--s4); margin: 0; }
.story-body .chips--flow li::before { display: none; }
.story-body .chips--flow li + li { margin-top: 0; }
.figs { align-items: start; }
.case-hero h1 { font-size: clamp(1.9rem, 8.4vw, var(--t-3xl)); overflow-wrap: break-word; }
.story-body .steps li:not(:last-child)::after { content: "→"; margin-left: var(--s3); color: var(--muted); }

/* ajustes de ui-ux-pro-max: barra apilada, imágenes ampliables, áreas táctiles, textos largos */
.stack { display: flex; height: 40px; margin-top: var(--s5); border-radius: var(--radius-sm); overflow: hidden; font-size: var(--t-sm); font-weight: 500; }
.stack span { display: flex; align-items: center; padding-inline: var(--s3); min-width: 3.25rem; white-space: nowrap; }
.stack-on { background: var(--accent); color: var(--accent-ink); }
.stack-off { background: var(--surface-2); color: var(--text); }
.stack-legend { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s2); font-size: var(--t-sm); color: var(--text); }
.story-body .stack-legend li { padding-left: 0; margin: 0; }
.story-body .stack-legend li::before { display: none; }
.stack-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); margin-right: var(--s2); }
.stack-legend .dot.on { background: var(--accent); border-color: var(--accent); }
.fig a { display: block; cursor: zoom-in; border-radius: var(--radius-sm); transition: opacity 0.2s ease, transform 0.2s ease; }
.fig a:hover { opacity: 0.92; transform: translateY(-2px); }
.figma figcaption a { display: inline-block; padding-block: var(--s3); }
.story-body { overflow-wrap: break-word; }
.story-body a { padding-block: var(--s1); }

/* ===== tipografía: Schibsted Grotesk (títulos y lectura) + Source Serif 4 cursiva (voz) ===== */
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/schibsted-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url("assets/fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }
:root { --font-read: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; --font-voice: "Source Serif 4", Georgia, "Times New Roman", serif; }
.story-body, .facts dd, .facts dt, .table-wrap td, .stat-tiles span, .tline span, .phases span, .note, .fig figcaption, .figma figcaption { font-family: var(--font-read); }
.story-body { font-size: 1.0625rem; line-height: 1.75; letter-spacing: -0.003em; }
.story-body strong { font-weight: 600; }
.story-sec h2 { text-wrap: balance; line-height: 1.25; }

/* acento con intención: el cian queda para cifras, enlaces y una frase clave por capítulo */
.story-body li::before { background: var(--line-strong); }
.facts dt { color: var(--muted); }
.story-body blockquote:not(.pull) { font-family: var(--font-voice); font-style: italic; font-size: 1.25rem; line-height: 1.4; background: transparent; padding: var(--s2) 0 var(--s2) var(--s5); color: var(--text); border-radius: 0; }
.story-body .pull { margin: var(--s6) 0; padding: 0; background: transparent; font-family: var(--font-voice); font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 1.05rem + 1.8vw, 2.25rem); line-height: 1.3; color: var(--text); text-wrap: balance; }
.story-body .pull p { margin: 0; }
.story-body .pull::before { content: "“"; display: block; font-size: 4.5rem; line-height: 0.6; height: 2rem; color: var(--accent); }
.story-body .pull--plain::before { content: none; }
.story-body .pull cite { display: block; margin-top: var(--s3); font-family: var(--font-read); font-style: normal; font-size: var(--t-xs); color: var(--muted); letter-spacing: 0.01em; }

/* índice de capítulos */
.toc { position: sticky; top: 65px; z-index: 40; background: rgba(0, 0, 0, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.toc ul { list-style: none; margin: 0; padding: var(--s2) 0; display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; }
.toc ul::-webkit-scrollbar { display: none; }
.toc a { display: inline-block; padding: var(--s2) var(--s4); border-radius: 999px; white-space: nowrap; text-decoration: none; color: var(--muted); font-size: var(--t-sm); min-height: 44px; line-height: 28px; transition: color 0.2s ease, background 0.2s ease; }
.toc a:hover { color: var(--text); background: var(--surface-2); }
.toc a[aria-current="true"] { color: var(--accent-ink); background: var(--accent); }
.story-sec { scroll-margin-top: 150px; }

/* Figma: se carga al hacer clic */
.figma-frame { position: relative; }
.figma-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.figma-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-height: 48px; padding: var(--s3) var(--s6); border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 500 var(--t-sm) "Schibsted Grotesk", system-ui, sans-serif; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.figma-load:hover { background: var(--accent-hover); }
.phones--single { justify-content: center; }

/* ===== fluidez: curvas suaves, más aire y movimiento ligado al scroll (mejora progresiva) ===== */
:root { --ease-out: cubic-bezier(.28, .11, .32, 1); }
html { scroll-padding-top: 88px; }
html:has(.toc) { scroll-padding-top: 150px; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2 { letter-spacing: -0.028em; }
.hero h1 { letter-spacing: -0.035em; line-height: 1.04; }
.section { padding-block: clamp(72px, 11vw, 144px); }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.story-sec { padding-block: clamp(40px, 6vw, 64px); }

/* aparición: un poco más lenta y con una curva más larga */
.js .reveal { transform: translateY(32px); transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out); }

/* tarjetas y botones con respuesta más suave */
.work-card a { border-radius: 28px; border-color: rgba(255, 255, 255, 0.08); transition: transform 0.6s var(--ease-out), border-color 0.4s ease, box-shadow 0.6s var(--ease-out); }
.work-card a:hover { transform: translateY(-4px); }
.work-media img { transition: transform 0.9s var(--ease-out); }
.btn { transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out); }
.btn:active { transform: scale(0.97); transition-duration: 0.12s; }

@media (prefers-reduced-motion: no-preference) {
  /* entrada de los encabezados de cada caso */
  @keyframes rise2 { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  .case-hero .wrap > * { animation: rise2 0.9s var(--ease-out) both; }
  .case-hero .wrap > *:nth-child(2) { animation-delay: 0.06s; }
  .case-hero .wrap > *:nth-child(3) { animation-delay: 0.12s; }
  .case-hero .wrap > *:nth-child(4) { animation-delay: 0.18s; }

  @supports (animation-timeline: view()) {
    /* las imágenes "se asientan" al entrar en pantalla */
    @keyframes settle { from { transform: scale(1.1); } to { transform: scale(1); } }
    .work-media img, .case-media img { animation: settle linear backwards; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    /* la foto del hero se desplaza un poco más lento que la página */
    @keyframes drift { to { transform: translateY(26px); } }
    .hero-photo img { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 70vh; }
    /* el encabezado gana cuerpo al bajar */
    @keyframes navin { from { background: rgba(0, 0, 0, 0); border-bottom-color: transparent; } to { background: rgba(0, 0, 0, 0.82); border-bottom-color: var(--line); } }
    .site-header { animation: navin linear both; animation-timeline: scroll(root); animation-range: 0 90px; }
  }
}

/* mejoras numeradas junto a su captura */
.story-body .mej-title { margin: var(--s10) 0 var(--s3); font-size: var(--t-lg); font-weight: 500; line-height: 1.25; color: var(--text); font-family: "Schibsted Grotesk", system-ui, sans-serif; }
.story-body .mej-title:first-of-type { margin-top: var(--s6); }
.story-body ol.mejoras { list-style: none; padding: 0; margin: var(--s4) 0 var(--s6); display: grid; gap: var(--s4); }
.story-body ol.mejoras li { position: relative; padding-left: 3.25rem; margin: 0; min-height: 2.25rem; }
.story-body ol.mejoras li::before { content: counter(list-item); position: absolute; left: 0; top: 0; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--danger); color: #fff; font: 600 var(--t-sm) "Schibsted Grotesk", sans-serif; }
.work-media picture { display: block; height: 100%; }
.case-media img { object-position: 65% 50%; }

/* ===== arquitectura: menú en celular y pie mínimo ===== */
.nav-toggle { display: none; }
.footer-simple { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s8); padding-block: var(--s8); }
.footer-simple nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); }
.footer-simple nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: var(--t-sm); }
.footer-simple nav a:hover { color: var(--text); }
.footer-simple .copy { color: var(--muted); font-size: var(--t-xs); }
@media (max-width: 640px) {
  .js .nav-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s5); border: 1px solid var(--line-control); border-radius: 999px; background: transparent; color: var(--text); font: 500 var(--t-sm) "Schibsted Grotesk", system-ui, sans-serif; cursor: pointer; }
  .js .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: var(--s3) var(--gutter) var(--s6); background: #050608; border-bottom: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
  .js .nav.open { display: flex; }
  .js .nav a:not(.btn), .js .nav a.nav-about { display: block; padding: var(--s4) 0; font-size: var(--t-md); border-bottom: 1px solid var(--line); }
  .js .nav .btn { margin-top: var(--s4); }
  .site-header .wrap { position: static; }
}

/* imágenes que se amplían dentro de la página */
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; cursor: zoom-in; border-radius: var(--radius-sm); transition: opacity 0.25s ease, transform 0.4s var(--ease-out); }
.zoom:hover { opacity: 0.92; transform: translateY(-2px); }
.fig--tall .zoom { max-width: 360px; }
dialog.lightbox { border: 0; padding: 0; margin: 0; width: 100%; height: 100%; max-width: 100vw; max-height: 100vh; background: transparent; color: #fff; overflow: hidden; }
dialog.lightbox[open] { display: grid; place-items: center; padding: clamp(16px, 4vw, 48px); }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
dialog.lightbox img { max-width: min(100%, 1600px); max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 12px; background: #fff; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7); cursor: default; }
.lb-close { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(20, 24, 28, 0.9); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background 0.2s ease, transform 0.3s var(--ease-out); }
.lb-close:hover { background: var(--accent); color: var(--accent-ink); transform: scale(1.06); }
body:has(dialog[open]) { overflow: hidden; }

/* ===== carruseles deslizables (scroll-snap) ===== */
.story-sec:has(.slider) { grid-template-columns: 1fr; gap: var(--s5); }
.story-sec:has(.slider) .story-body { max-width: none; }
.story-sec:has(.slider) .story-body > p { max-width: 68ch; }
.slider { position: relative; margin-block: var(--s6); }
.slides { list-style: none; margin: 0; padding: var(--s2) 0 var(--s4); display: flex; gap: var(--s5); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.slides::-webkit-scrollbar { display: none; }
.slides:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.story-body .slides > .slide, .slides > .slide { flex: 0 0 min(90%, 1000px); scroll-snap-align: start; margin: 0; padding: 0; min-width: 0; }
.story-body .slides > .slide::before { display: none; }
.story-body .slides > .slide + .slide { margin-top: 0; }
.slider--media .slides > .slide { flex-basis: min(80%, 560px); }
.slide-card { height: 100%; display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(16px, 3vw, 32px); background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 28px; }
.slide-card .fig { margin: 0; }
.slide-text .mej-title { margin: 0 0 var(--s4); }
.slide-text .mejoras { margin: 0; }
.slider-ui { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-top: var(--s3); }
.dots { display: flex; align-items: center; gap: 16px; }
.dots button { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.5); cursor: pointer; transition: width 0.5s var(--ease-out), background 0.3s ease; }
.dots button::after { content: ""; position: absolute; inset: -18px -12px; }
.dots button[aria-current="true"] { width: 28px; background: var(--text); }
.arrows { display: flex; gap: var(--s2); }
.arrows button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 3px; transition: background 0.25s ease, opacity 0.25s ease, transform 0.3s var(--ease-out); }
.arrows button:hover:not([aria-disabled="true"]) { background: var(--text); color: #000; }
.arrows button:active:not([aria-disabled="true"]) { transform: scale(0.94); }
.arrows button[aria-disabled="true"] { opacity: 0.5; cursor: default; }
@media (max-width: 900px) {
  .slide-card { grid-template-columns: 1fr; }
  .story-body .slides > .slide { flex-basis: 88%; }
}
/* portada: "Seis cosas que hago" como carril horizontal en celular */
@media (max-width: 720px) {
  .practice { display: flex; gap: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: var(--s3); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .practice::-webkit-scrollbar { display: none; }
  .practice > li { flex: 0 0 82%; scroll-snap-align: start; }
}
.slide-card { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.slide-card > *, .slide-media, .slide-media .fig, .slide-media .zoom { min-width: 0; }
.slide-media .zoom img, .slide .fig img { width: 100%; height: auto; }
@media (max-width: 900px) { .slide-card { grid-template-columns: minmax(0, 1fr); } }

/* ===== visor con zoom ===== */
dialog.lightbox img { touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform; cursor: zoom-in; transform-origin: center center; }
dialog.lightbox.zoomed img { cursor: grab; }
dialog.lightbox.zoomed img:active { cursor: grabbing; }
.lb-bar { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 999px; background: rgba(28, 30, 34, 0.78); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5); }
.lb-bar button { min-width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: #fff; font: 500 22px/1 "Schibsted Grotesk", sans-serif; cursor: pointer; transition: background 0.2s ease; }
.lb-bar button:hover { background: rgba(255, 255, 255, 0.14); }
.lb-bar .lb-pct { font-size: var(--t-sm); min-width: 64px; font-variant-numeric: tabular-nums; }

/* ===== más sensación Apple, sin que se note: navegación flotante, tipografía y capas ===== */
:root { color-scheme: dark; --t-3xl: clamp(2.6rem, 1.1rem + 5.4vw, 5.25rem); --t-2xl: clamp(2.1rem, 1.2rem + 3.6vw, 3.75rem); }
::selection { background: var(--accent); color: var(--accent-ink); }
html { scrollbar-color: #2a3037 #050608; scrollbar-width: thin; }

/* índice de capítulos como píldora de cristal flotante */
.toc { background: transparent; border: 0; padding-block: var(--s3); pointer-events: none; }
.toc .wrap { display: flex; justify-content: center; }
.toc ul { pointer-events: auto; max-width: 100%; padding: 6px; gap: 2px; background: rgba(22, 24, 28, 0.72); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 999px; backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }

/* piezas visuales: más redondeo y profundidad suave */
.case-media img { border-radius: 32px; border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55); }
.panel { border-radius: 28px; }
.stat-tiles li { border-radius: 20px; }
.fig img { box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45); border-color: rgba(255, 255, 255, 0.08); }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* el texto del hero se atenúa suavemente al bajar */
    @keyframes heroout { to { opacity: 0.6; transform: translateY(-24px) scale(0.985); } }
    .hero .wrap > div:first-child { animation: heroout linear both; animation-timeline: scroll(root); animation-range: 0 55vh; }
    /* las tarjetas de casos "aterrizan" al entrar */
    @keyframes land { from { opacity: 0; transform: translateY(44px) scale(0.965); } to { opacity: 1; transform: none; } }
    .work-card { animation: land linear backwards; animation-timeline: view(); animation-range: entry 0% entry 42%; }
  }
}

/* ===== lectura más cómoda ===== */
html[data-size="1"] { font-size: 112.5%; }
html[data-size="2"] { font-size: 125%; }
/* texto corrido más claro que el gris de apoyo; los títulos y los términos clave siguen en blanco */
.story-body { color: var(--text-2); }
.story-body strong { color: #fff; }
.story-body > p:first-child { font-size: 1.1875rem; color: #f2f4f6; line-height: 1.65; }
.story-body > p + p, .story-body > p + ul, .story-body > ul + p { margin-top: var(--s5); }
.story-body li + li { margin-top: var(--s4); }
/* nada de apoyo por debajo de 15 px */
.note, .fig figcaption, .figma figcaption, .stat-tiles span, .tline span, .phases span, .pull cite, .donut-legend, .stack-legend { font-size: 0.9375rem; line-height: 1.5; }
.fig figcaption, .figma figcaption, .note { color: var(--text-3); }
.stat-tiles span, .tline span { color: var(--text-3); }
.pull cite { color: var(--text-3); }
.facts dd, .table-wrap td { font-size: 1rem; }
/* botón Aa del índice */
.toc-tools { margin-left: auto; padding-left: 4px; display: flex; align-items: center; }
.toc .aa { min-width: 44px; height: 44px; padding: 0 var(--s3); border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 15px/1 "Schibsted Grotesk", sans-serif; cursor: pointer; transition: background 0.2s ease, color 0.2s ease; }
.toc .aa:hover { background: var(--surface-2); color: var(--text); }
.toc .aa[data-level="1"] { color: var(--text); font-size: 17px; }
.toc .aa[data-level="2"] { color: var(--accent); font-size: 20px; }
.toc-tools { position: sticky; right: 0; background: rgba(28, 30, 34, 0.96); border-radius: 999px; box-shadow: -14px 0 14px -6px rgba(22, 24, 28, 0.96); }
.case-meta .read { white-space: nowrap; color: var(--muted); }
.case-meta .read::before { content: "·"; margin-right: var(--s2); }

/* ===== ajustes de la auditoría ===== */
.section--flush { padding-top: 0; }
.actions--top { margin-top: var(--s8); }
.nav-cv { display: none; }
.figma-msg { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: var(--s6); text-align: center; color: var(--text-2); font-size: var(--t-sm); pointer-events: none; }
.figma-msg a { pointer-events: auto; color: var(--accent); }
.toc ul { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); }

@media (max-width: 640px) {
  .js .nav-cv { display: inline-flex; margin-left: auto; }
  .js .nav .btn { display: none; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .work-card--2 { grid-column: span 1; }
  .work-card--2:last-child { grid-column: span 2; }
  .logos ul { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; }
}
@media (max-width: 900px) { .hero-photo { margin-inline: auto; } }
@media (max-width: 640px) {
  .site-header .wrap { gap: var(--s2); }
  .js .nav-cv { padding-inline: var(--s4); }
  .js .nav-toggle { padding-inline: var(--s4); }
}
@media (max-width: 420px) {
  .site-header .brand img { display: none; }
}

/* tiempo de lectura como cápsula bajo el nombre del proyecto */
.read-pill { display: inline-flex; align-items: center; margin-top: var(--s4); padding: var(--s1) var(--s4); border: 1px solid var(--line-control); border-radius: 999px; font-size: var(--t-sm); color: var(--text-2); white-space: nowrap; }
.read-pill + .tagline { margin-top: var(--s5); }

/* encabezado de caso: sin logo, lectura sencilla y con cursivas */
.case-hero .case-meta { margin-top: var(--s6); gap: var(--s3); font-size: var(--t-sm); }
.case-hero .case-meta span + span::before { content: "·"; margin-right: var(--s3); }
.case-desc { margin-top: var(--s2); font-family: var(--font-voice); font-style: italic; font-weight: 400; font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem); line-height: 1.3; color: var(--text-2); max-width: 30em; text-wrap: balance; }
.case-hero .tagline { font-family: var(--font-voice); font-style: italic; font-weight: 400; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); line-height: 1.3; color: var(--text); max-width: 26em; text-wrap: balance; }

/* =====================================================================
   Pasada de diseño: sobrio, con mucho aire y sin adornos de plantilla.
   Mismo negro y mismo cian; se quitan brillos, cuadrículas, tarjetas
   flotantes y tarjetas con icono. Schibsted Grotesk para títulos y lectura.
   ===================================================================== */
:root {
  --t-3xl: clamp(2.75rem, 1rem + 6.4vw, 5.75rem);
  --t-2xl: clamp(2.25rem, 1.2rem + 3.8vw, 4rem);
}
body { font-family: var(--font-read); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; }
.js .reveal { transform: translateY(14px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }

/* encabezado */
.site-header { background: rgba(0, 0, 0, 0.72); }
.brand { font-weight: 600; letter-spacing: -0.01em; }

/* botones: sin resplandor ni salto */
.btn, .btn:hover, .btn:active { box-shadow: none; transform: none; }
.btn { font-weight: 500; letter-spacing: -0.005em; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* hero centrado, con el texto como protagonista */
.hero { padding-block: clamp(72px, 12vw, 168px) clamp(56px, 8vw, 112px); text-align: center; }
.hero .wrap { display: block; }
.hero .wrap > div:first-child { animation: none; }
.hero h1 { font-size: var(--t-3xl); line-height: 1.03; letter-spacing: -0.04em; max-width: 13em; margin-inline: auto; text-wrap: balance; }
.hero .lead { margin: var(--s6) auto 0; max-width: 31em; font-size: var(--t-lg); color: var(--text-2); }
.hero .actions { justify-content: center; margin-top: var(--s8); }
.signature { justify-content: center; align-items: center; border-top: 0; padding-top: 0; margin-top: var(--s12); gap: var(--s2) var(--s5); color: var(--text-3); }
.signature img { width: 40px; height: 40px; border-radius: 50%; }
.signature strong { color: var(--text); font-weight: 600; }

/* franja de logos: discreta */
.logos { background: none; border-color: var(--line); }
.logos p { color: var(--text-3); }
.logos img { opacity: 0.7; transition: opacity 0.3s ease; }
.logos img:hover { opacity: 1; transform: none; }

/* casos: texto arriba, pantallas abajo */
.work { gap: var(--s4); }
.work-card a, .work-card a:hover { display: flex; flex-direction: column; background: #000; border: 1px solid var(--line); border-radius: 28px; box-shadow: none; transform: none; }
.work-card a:hover { border-color: rgba(255, 255, 255, 0.28); }
.work-card { animation: none; }
.work-info { position: static; display: block; padding: var(--s8) var(--s8) var(--s4); background: none; }
.work-card--2 .work-info { padding: var(--s6) var(--s6) var(--s3); }
.work-info h3 { font-size: var(--t-xl); margin: 0; }
.work-card--2 .work-info h3 { font-size: var(--t-lg); }
.work-metric { margin-top: var(--s2); font-size: var(--t-md); color: var(--text-2); }
.work-metric b { font-size: inherit; margin-right: var(--s1); }
.work-foot { display: flex; align-items: center; gap: var(--s4); margin-top: var(--s4); }
.chip { border: 0; padding: 0; background: none; color: var(--text-3); font-size: var(--t-sm); }
.see-more { color: var(--accent); font-size: var(--t-sm); font-weight: 500; }
.work-card a:hover .see-more { text-decoration: underline; text-underline-offset: 4px; }
.work-media { flex: 1; background: #000; }
.work-media img { transition: transform 1.1s var(--ease-out); }
.metric-visual { background: #000; padding: var(--s6) var(--s8) var(--s8); }

/* seis cosas: lista tipográfica, sin iconos ni tarjetas */
.practice, .practice li { border-radius: 0; background: none; }
.practice { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s16); border-top: 1px solid var(--line); }
.practice li { display: block; padding: var(--s8) 0; border: 0; border-bottom: 1px solid var(--line); box-shadow: none; }
.practice strong { font-size: var(--t-xl); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.practice span { margin-top: var(--s3); font-size: var(--t-md); max-width: 30em; color: var(--text-3); }

/* sobre mí en portada */
.teaser-grid img, .about img { border: 0; border-radius: 28px; box-shadow: none; }

/* cierre sin resplandor; cifras sin cajas */
.closing { background: none; border-top: 1px solid var(--line); }
.figures { gap: 0; border-block: 1px solid var(--line); }
.figures li, .figures li + li { border: 0; background: none; border-radius: 0; box-shadow: none; padding: var(--s8) var(--s6); transform: none; }
.figures li + li { border-left: 1px solid var(--line); }
.figures b { font-size: var(--t-2xl); font-weight: 600; letter-spacing: -0.035em; }

/* páginas de caso */
.case-hero h1 { font-size: clamp(2.5rem, 1rem + 6.4vw, var(--t-3xl)); letter-spacing: -0.04em; }
.case-media img { border: 0; border-radius: 28px; box-shadow: none; }
.panel { border-color: var(--line); box-shadow: none; }
.bar-row.after .bar i { box-shadow: none; }
.phone-screen, .phone:hover .phone-screen { box-shadow: 0 0 0 1px var(--line); transform: none; }
.fig img { box-shadow: none; }
.visual--shot:hover img { transform: none; }
.figma-load:hover { box-shadow: none; }
.pager a:hover, .pager a:last-child:hover { background: var(--surface); }

/* el caso en tres líneas */
.snap { border-block: 1px solid var(--line); padding-block: var(--s8); margin-block: var(--s6) var(--s8); }
.snap dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s10); margin: 0; }
.snap dt { color: var(--text-3); font-size: var(--t-sm); font-weight: 500; }
.snap dd { margin: var(--s2) 0 0; font-size: var(--t-lg); line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }

@media (max-width: 900px) {
  .practice { grid-template-columns: 1fr; gap: 0; }
  .work-info { padding: var(--s6) var(--s6) var(--s3); }
  .snap dl { grid-template-columns: 1fr; gap: var(--s6); }
}
@media (max-width: 720px) {
  .practice { display: block; overflow: visible; margin-inline: 0; padding-inline: 0; scroll-snap-type: none; }
  .practice > li { flex: none; }
}
@media (max-width: 640px) {
  .figures li + li { border-left: 0; border-top: 1px solid var(--line); }
  .hero { padding-block: var(--s16) var(--s12); }
}

/* tipografía de títulos e interfaz: Schibsted Grotesk también en la lectura larga */
:root { --font-display: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; }
body, h1, h2, h3, .btn, .nav a, .brand, .toc a, .toc .aa, .chip, .see-more, .figma-load, .nav-toggle, .read-pill { font-family: var(--font-display); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.028em; }
.hero h1, .case-hero h1 { font-weight: 600; letter-spacing: -0.035em; }
.hero .lead, .snap dd, .work-metric, .practice span, .about .prose p, .results span, .figures span, .contact-links a { font-family: var(--font-read); }
.figures b, .results b, .big, .work-info h3, .practice strong { font-family: var(--font-display); font-weight: 600; }
