/* ==========================================================================
   Ricardo Rodríguez · Portafolio
   Mobile-first. Tokens → base → layout → componentes → secciones → motion
   ========================================================================== */

/* ---------- Tipografías (autoalojadas, subconjunto latino, licencia OFL) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/instrument-serif-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/instrument-serif-italic-latin.woff2") format("woff2");
}

:root {
  --bg: #050505;
  --bg-2: #0b0c0b;
  --text: #f2f2ee;
  --muted: #a6a8a3;            /* ≈ 8:1 sobre --bg */
  --faint: #6f726d;
  --accent: #00e676;           /* ≈ 12:1 sobre --bg */
  --accent-ink: #02140a;       /* texto sobre el acento */
  --accent-soft: rgba(0, 230, 118, 0.12);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.025);
  --glass-hi: rgba(255, 255, 255, 0.05);

  --ph-bg: rgba(255, 193, 7, 0.12);
  --ph-line: #ffc107;
  --ph-text: #ffd54f;

  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --gutter: 20px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --mx: 50vw;
  --my: 30vh;
}

@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 48px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #2b2f2b var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
input, textarea { caret-color: var(--accent); }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
em { font-style: italic; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Placeholder (dato pendiente) ---------- */
.ph {
  display: inline;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ph-text);
  background: var(--ph-bg);
  outline: 1px dashed var(--ph-line);
  outline-offset: 1px;
  border-radius: 4px;
  padding: 0.05em 0.35em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  word-break: break-word;
}

/* ---------- Fondo vivo ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(0, 230, 118, 0.07), transparent 60%),
    var(--bg);
}
.bg__glow {
  position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx) var(--my), rgba(0, 230, 118, 0.10), transparent 60%);
}
.bg__grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(360px circle at var(--mx) var(--my), #000 0%, transparent 70%);
          mask-image: radial-gradient(360px circle at var(--mx) var(--my), #000 0%, transparent 70%);
  opacity: 0.55;
}
.bg__grain {
  position: absolute; inset: -50%;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Táctil: brillo que deriva lentamente en vez de seguir al cursor */
@media (hover: none) {
  .bg__glow {
    inset: -20%;
    background: radial-gradient(520px circle at 50% 35%, rgba(0, 230, 118, 0.10), transparent 60%);
  }
  .bg__grid { opacity: 0.18; -webkit-mask-image: none; mask-image: none; }
}

/* ---------- Tipografía ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.kicker::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.h2 em, .hero__spec em { color: var(--accent); }
.h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ---------- Botones ---------- */
.btn {
  --b-bg: transparent;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--b-bg);
  font: 600 0.98rem/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .16s var(--ease), background-color .3s, border-color .3s, color .3s, box-shadow .35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn__icon {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .35s var(--ease);
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}

.btn--ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 0.9rem; }
.btn--lg { min-height: 56px; padding: 16px 28px; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---------- Vidrio + foco de luz en tarjetas ---------- */
.glass {
  position: relative;
  background: linear-gradient(180deg, var(--glass-hi), var(--glass));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
@media (min-width: 768px) and (hover: hover) {
  .glass {
    -webkit-backdrop-filter: blur(14px) saturate(120%);
            backdrop-filter: blur(14px) saturate(120%);
  }
}
.card-spot { transition: transform .5s var(--ease), border-color .4s; }
.card-spot::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: radial-gradient(320px circle at var(--cx, 50%) var(--cy, 0%), rgba(0, 230, 118, 0.55), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0; transition: opacity .4s;
}
.card-spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--cx, 50%) var(--cy, 0%), rgba(0, 230, 118, 0.06), transparent 60%);
  opacity: 0; transition: opacity .4s;
}
@media (hover: hover) {
  .card-spot:hover { transform: translateY(-4px); }
  .card-spot:hover::before, .card-spot:hover::after { opacity: 1; }
}

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .3s, border-color .3s, -webkit-backdrop-filter .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: rgba(5, 5, 5, 0.72);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; min-width: 44px;
  text-decoration: none; font-weight: 600; letter-spacing: -0.01em;
}
.brand__mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1;
}
.brand__name { display: none; }
@media (min-width: 480px) { .brand__name { display: inline; } }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section__head { margin-bottom: clamp(36px, 6vw, 64px); max-width: 820px; }

/* 1. Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-block: 120px 96px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem; color: var(--muted);
  margin-bottom: 28px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(0, 230, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}
.hero__title {
  display: flex; flex-direction: column;
  font-weight: 400;
}
.hero__name {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.hero__role {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 15vw, 10rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.hero__spec {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.6vw, 3rem);
  line-height: 1.1;
  color: var(--text);
}
.hero__lead {
  margin-top: 24px;
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
}
.hero__cta { margin-top: 36px; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0;
  display: grid; place-items: center;
  width: 44px; height: 44px;
}
.scroll-cue span {
  width: 22px; height: 34px; border: 1px solid var(--line-strong); border-radius: 12px; position: relative;
}
.scroll-cue span::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px; background: var(--accent);
  animation: wheel 2s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* 2. Cifras */
.stats { padding-block: 24px clamp(40px, 6vw, 72px); }
.stats__label {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.stats__label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.stats__label--agency { margin-top: 40px; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 900px) { .stats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 900px) { .stats__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat__pre { font-size: 0.45em; letter-spacing: 0; vertical-align: 0.35em; margin-right: 0.1em; color: var(--muted); }
.stats__facts { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 900px) { .stats__facts { grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; } }
.fact {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-weight: 500; line-height: 1.4;
}
.fact svg {
  flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 10px;
  background: var(--accent-soft);
  fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.stat {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 18px;
  min-width: 0;
}
@media (min-width: 768px) { .stat { padding: 32px 28px; } }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat__num--text { font-size: clamp(2rem, 6vw, 3.4rem); }
.stat__label { font-size: 0.92rem; color: var(--muted); line-height: 1.4; }

/* 3. Historia */
.story__inner { display: grid; gap: 28px; }
@media (min-width: 960px) {
  .story__inner { grid-template-columns: 1fr 1fr; gap: 72px; align-items: end; }
  .story .section__head { margin-bottom: 0; }
}
.story__body p { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--muted); }
.story__body p + p { margin-top: 18px; }
.story__body p:first-child::first-line { color: var(--text); }

/* 4. Pilares */
.pillars { display: grid; gap: 16px; }
@media (min-width: 900px) { .pillars { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.pillar { padding: 28px 24px 30px; overflow: hidden; }
@media (min-width: 768px) { .pillar { padding: 36px 32px 38px; } }
.pillar__num {
  position: absolute; top: 20px; right: 24px;
  font-family: var(--font-display); font-size: 1.1rem; color: var(--faint);
}
.pillar__icon {
  width: 44px; height: 44px; padding: 10px;
  border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--accent-soft);
  fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 24px;
}
.pillar .h3 { margin-bottom: 10px; font-size: 1.25rem; }
.pillar p { color: var(--muted); }

/* 5. Línea de tiempo */
ol.timeline { position: relative; display: grid; gap: 20px; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--accent), var(--line) 80%);
}
.timeline__item { position: relative; display: grid; gap: 10px; }
.timeline__item::before {
  content: ""; position: absolute; left: -28px; top: 6px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline__year {
  font-family: var(--font-display); font-size: 1.6rem; line-height: 1; color: var(--accent);
}
.timeline__year--now { color: var(--text); }
.timeline__month {
  display: block; margin-top: 6px;
  font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.timeline__photo {
  display: block; margin-top: 18px; max-width: 420px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color .3s, transform .5s var(--ease);
}
.timeline__photo img { width: 100%; height: auto; }
.timeline__card { padding: 22px 22px 24px; }
.timeline__card .h3 { margin-bottom: 6px; }
.timeline__card p { color: var(--muted); }
@media (min-width: 900px) {
  ol.timeline { padding-left: 0; gap: 28px; }
  .timeline::before { left: 160px; }
  .timeline__item { grid-template-columns: 136px 1fr; gap: 56px; align-items: start; }
  .timeline__item::before { left: 154px; top: 28px; }
  .timeline__year { text-align: right; font-size: 2.2rem; padding-top: 18px; }
  .timeline__card { padding: 28px 32px; }
}

/* 6. Trabajos */
.section__lead { margin-top: 18px; color: var(--muted); font-size: 1.08rem; max-width: 52ch; }
.work__tag { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

.filters {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  margin: -4px calc(var(--gutter) * -1) 28px;
  padding: 4px var(--gutter);
  scroll-padding-inline: var(--gutter);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}
.filters::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .filters { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; -webkit-mask-image: none; mask-image: none; }
}
.filter {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font: 500 0.92rem/1 var(--font-sans);
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.filter:active { transform: scale(0.97); }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filter__n { font-size: 0.78rem; opacity: 0.65; font-variant-numeric: tabular-nums; }

.filters__desc {
  max-width: 62ch;
  margin: -8px 0 28px;
  padding-left: 16px;
  border-left: 1px solid var(--accent);
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.55;
}
.filters__desc.is-shown { animation: descIn .5s var(--ease) both; }
@keyframes descIn { from { opacity: 0; transform: translateX(-6px); } }
.gallery { columns: 2; column-gap: 10px; }
@media (min-width: 768px) { .gallery { columns: 3; column-gap: 16px; } }
@media (min-width: 1100px) { .gallery { columns: 4; column-gap: 18px; } }
.clip { break-inside: avoid; display: block; margin-bottom: 18px; }
@media (min-width: 768px) { .clip { margin-bottom: 26px; } }
.clip.is-shown { animation: clipIn .35s var(--ease) both; }
@keyframes clipIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }

.clip__media {
  position: relative; display: block; width: 100%;
  padding: 0; margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden; isolation: isolate;
  background: #0d0f0d;
  color: inherit; font: inherit; text-decoration: none;
  cursor: pointer;
  transition: border-color .3s, box-shadow .4s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.clip__media video, .clip__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .8s var(--ease);
}
.clip__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 22%, transparent 75%, rgba(0, 0, 0, 0.45));
}
@media (hover: hover) {
  .clip__media:hover { border-color: rgba(0, 230, 118, 0.6); box-shadow: 0 18px 50px -24px rgba(0, 230, 118, 0.45); }
  .clip__media:hover video, .clip__media:hover img { transform: scale(1.035); }
  .clip__media:hover .clip__cue { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
}
.clip__badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  padding: 5px 8px; border-radius: 999px;
  background: rgba(5, 5, 5, 0.6);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 600 0.68rem/1 var(--font-sans); letter-spacing: 0.06em; color: var(--text);
}
.clip__cue {
  position: absolute; right: 10px; bottom: 10px; z-index: 1;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(5, 5, 5, 0.6);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--text);
  transition: background-color .3s, color .3s, border-color .3s;
}
.clip__cue svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.clip__slides { position: absolute; inset: 0; }
.clip__slides img { opacity: 0; transition: opacity .7s ease, transform .8s var(--ease); }
.clip__slides img.is-active { opacity: 1; }
.clip__media--ph {
  display: grid; place-items: center; padding: 12px; text-align: center; cursor: default;
  background: repeating-linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0 10px, transparent 10px 20px), #0d0f0d;
}
.clip__media--ph::after { display: none; }
.clip__media--ph .ph { font-size: 0.7rem; }
.clip__body { display: grid; gap: 4px; padding: 10px 2px 0; }
.clip__title { font-size: 0.95rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }

/* Reproductor */
.player {
  --ar: 1.7778;
  /* El ancho lo marca el video, no el título: así no sobran franjas negras */
  width: min(calc(100vw - 24px), calc((100dvh - 200px) * var(--ar)), 1100px);
  min-width: min(300px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0; margin: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0a0b0a; color: var(--text);
  overflow: auto;
}
.player::backdrop { background: rgba(0, 0, 0, 0.85); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.player[open] { animation: playerIn .45s var(--ease); }
@keyframes playerIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.player__frame {
  width: 100%;
  aspect-ratio: var(--ar);
  background: #000;
}
.player__frame video, .player__frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.viewer { position: relative; width: 100%; height: 100%; touch-action: pan-y; outline: none; }
.viewer img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
.viewer__nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 1;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(5, 5, 5, 0.65);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--text); cursor: pointer;
  transition: background-color .25s, color .25s;
}
.viewer__nav--prev { left: 10px; }
.viewer__nav--next { right: 10px; }
.viewer__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viewer__count {
  position: absolute; left: 50%; bottom: 12px; translate: -50% 0;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(5, 5, 5, 0.65); border: 1px solid var(--line-strong);
  font: 600 0.75rem/1 var(--font-sans); font-variant-numeric: tabular-nums;
}
.player__meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 14px 18px 16px;
}
.player__title { font-weight: 600; margin-top: 2px; }
.player__close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(5, 5, 5, 0.7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--text); cursor: pointer;
  transition: background-color .25s, color .25s, transform .3s var(--ease);
}
.player__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* 7. Casos de éxito */
.wins {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  margin: -12px 0 clamp(36px, 6vw, 56px);
}
.wins li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 10px;
  border: 1px solid rgba(0, 230, 118, 0.3);
  border-radius: 999px;
  background: var(--accent-soft);
  font-weight: 600;
}
.wins svg {
  width: 26px; height: 26px; padding: 5px; border-radius: 50%;
  background: var(--accent);
  fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}

.featured { display: grid; gap: 16px; }
@media (min-width: 900px) { .featured { gap: 20px; } }
.feat { display: grid; overflow: hidden; }
@media (min-width: 900px) {
  .feat { grid-template-columns: 1.35fr 1fr; align-items: center; }
  .feat:nth-child(even) .feat__shot { order: 2; }
}
.feat__shot, .case__shot {
  display: grid; place-items: center;
  background: #eef1f6;
  overflow: hidden;
}
.feat__shot { padding: clamp(10px, 2vw, 22px); height: 100%; }
.feat__shot img, .case__shot img {
  width: 100%; height: auto; border-radius: 8px;
  transition: transform .7s var(--ease);
}
.feat__body { padding: 24px 22px 28px; }
@media (min-width: 900px) { .feat__body { padding: 36px 40px; } }
.feat__metric {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 5rem);
  line-height: 0.95; letter-spacing: -0.02em;
  color: var(--accent);
}
.feat__label { margin: 6px 0 20px; color: var(--text); font-weight: 500; }
.feat__body .h3 { font-size: 1.2rem; }
.feat__sector { margin-top: 2px; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.feat__desc { margin-top: 12px; color: var(--muted); }

.cases__title {
  margin: clamp(48px, 8vw, 80px) 0 20px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 10px;
}
.cases__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cases { display: grid; gap: 14px; }
@media (min-width: 768px) { .cases { grid-template-columns: 1fr 1fr; gap: 18px; } }
.case { overflow: hidden; display: flex; flex-direction: column; }
.case__shot { position: relative; aspect-ratio: 16 / 7; }
.case__shot img {
  position: absolute; inset: 10px;
  width: calc(100% - 20px); height: calc(100% - 20px);
  object-fit: contain;
}
.case__body { display: grid; gap: 4px; padding: 16px 20px 20px; }
.case__name { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.case__work { color: var(--muted); font-size: 0.95rem; }

/* 8. Manifiesto */
.manifesto {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-block: 120px;
  border-block: 1px solid var(--line);
  background: radial-gradient(70% 50% at 50% 50%, rgba(0, 230, 118, 0.06), transparent 70%);
}
.manifesto__text {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 7.2rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
.manifesto__line { display: block; }
.manifesto__line + .manifesto__line { margin-top: 0.3em; }
.manifesto__line--accent { font-style: italic; color: var(--accent); }
.manifesto .w { transition: opacity .25s linear; }

/* Embudo de contenido */
ol.funnel { display: grid; gap: 14px; padding: 0; }
.funnel__row { display: grid; gap: 10px; }
.funnel__stage {
  --w: 100%;
  width: var(--w); margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 12px;
  padding: 22px 12% 24px;
  clip-path: polygon(0 0, 100% 0, 93% 100%, 7% 100%);
  text-align: center;
}
.funnel__row--1 .funnel__stage { --w: 100%; background: linear-gradient(180deg, #0f5132, #0b3d26); color: var(--text); }
.funnel__row--2 .funnel__stage { --w: 86%; background: linear-gradient(180deg, #13804a, #0f6b3c); color: #fff; }
.funnel__row--3 .funnel__stage { --w: 72%; background: linear-gradient(180deg, #19c46d, #00a855); color: var(--accent-ink); }
.funnel__stage--cta {
  --w: 34%;
  min-height: 92px; padding: 16px 10px 34px; align-items: center;
  background: var(--accent); color: var(--accent-ink);
  clip-path: polygon(18% 0, 82% 0, 82% 55%, 100% 55%, 50% 100%, 0 55%, 18% 55%);
}
.funnel__num {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.16); font-weight: 700; font-size: 0.95rem;
}
.funnel__row--3 .funnel__num { background: rgba(2, 20, 10, 0.18); }
.funnel__name { font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1; }
.funnel__stage--cta .funnel__name { font-family: var(--font-sans); font-weight: 700; font-size: 1.4rem; letter-spacing: 0.04em; }
.funnel__tag { flex-basis: 100%; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.funnel__detail { padding: 18px 20px; border-radius: var(--radius-sm); }
.funnel__detail ul { display: grid; gap: 8px; }
.funnel__detail li { color: var(--muted); font-size: 0.96rem; }
.funnel__detail strong { color: var(--text); font-weight: 600; }
.funnel__detail--cta { text-align: center; color: var(--muted); padding-top: 0; }
.funnel__goal {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding: 10px 12px;
  border-radius: 10px; background: var(--accent-soft); color: var(--text); font-weight: 500; font-size: 0.94rem;
}
.funnel__goal svg {
  flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 6px; background: var(--accent);
  fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
@media (min-width: 900px) {
  ol.funnel { gap: 12px; }
  .funnel__row { grid-template-columns: 1.15fr 1fr; align-items: stretch; gap: 32px; }
  .funnel__row:not(.funnel__row--cta) .funnel__stage { align-content: center; }
  .funnel__row--cta { align-items: center; }
  .funnel__detail--cta { text-align: left; padding: 18px 20px; }
}
.funnel__rule {
  margin-top: clamp(40px, 6vw, 64px); text-align: center;
  font-family: var(--font-display); font-size: clamp(1.8rem, 4.6vw, 3rem); line-height: 1.1;
}
.funnel__rule strong { font-weight: 400; color: var(--accent); }
.funnel__rule span[aria-hidden] { margin-inline: 0.25em; color: var(--muted); }
.funnel__ruleSub { max-width: 52ch; margin: 12px auto 0; text-align: center; color: var(--muted); }
.funnel__keys { display: grid; gap: 14px; margin-top: clamp(32px, 5vw, 48px); }
@media (min-width: 900px) { .funnel__keys { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.key { padding: 22px; }
.key p:last-child { color: var(--muted); }
.key__label {
  display: inline-block; margin-bottom: 10px; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.key__label--warn { background: rgba(255, 107, 107, 0.14); color: #ff8a8a; }

/* Roadmap de crecimiento */
ol.roadmap { position: relative; display: grid; gap: 20px; padding-left: 52px; }
.roadmap::before {
  content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px;
  background: linear-gradient(var(--accent), rgba(0, 230, 118, 0.15));
}
.phase { position: relative; }
.phase__node {
  position: absolute; left: -52px; top: 18px;
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  font-family: var(--font-display); font-size: 1.3rem; color: var(--accent);
}
.phase--3 .phase__node { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 30px rgba(0, 230, 118, 0.45); }
.phase__card { padding: 24px 22px 26px; height: 100%; }
.phase__kicker { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.phase__title { margin-top: 6px; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 3.2vw, 2.3rem); line-height: 1.05; }
.phase__sub { margin-top: 8px; font-size: 0.88rem; font-style: italic; color: var(--muted); }
.phase__list { display: grid; gap: 14px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.phase__list li { color: var(--muted); font-size: 0.96rem; line-height: 1.55; }
.phase__list strong { color: var(--text); font-weight: 600; }
@media (min-width: 1024px) {
  ol.roadmap { grid-template-columns: repeat(3, 1fr); align-items: end; gap: 20px; padding: 0 0 64px; }
  .roadmap::before {
    left: 0; right: 0; top: auto; bottom: 19px; width: auto; height: 2px;
    background: linear-gradient(90deg, rgba(0, 230, 118, 0.2), var(--accent));
  }
  .phase { display: flex; flex-direction: column; }
  .phase__node { position: absolute; left: 50%; top: auto; bottom: -64px; translate: -50% 0; }
  .phase--1 { padding-bottom: 0; }
  .phase--2 { padding-bottom: 48px; }
  .phase--3 { padding-bottom: 96px; }
  .phase::after {
    content: ""; position: absolute; left: 50%; bottom: -24px; width: 2px; height: 24px;
    background: rgba(0, 230, 118, 0.4);
  }
  .phase--2::after { height: 72px; }
  .phase--3::after { height: 120px; }
}

/* 9. Paquetes */
.packs { display: grid; gap: 16px; }
@media (min-width: 960px) { .packs { grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; } }
.pack { padding: 28px 24px; display: flex; flex-direction: column; }
@media (min-width: 768px) { .pack { padding: 36px 32px; } }
.pack--featured { border-color: rgba(0, 230, 118, 0.35); background: linear-gradient(180deg, rgba(0, 230, 118, 0.07), var(--glass) 55%); }
.pack__label { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.pack__name { font-family: var(--font-display); font-weight: 400; font-size: 2.1rem; line-height: 1.05; letter-spacing: -0.01em; }
.pack__for { margin: 14px 0 22px; color: var(--muted); font-size: 0.97rem; }
.pack__for strong { color: var(--text); font-weight: 600; }
.pack__list { display: grid; gap: 12px; margin-bottom: 28px; flex: 1; padding-top: 22px; border-top: 1px solid var(--line); }
.pack__list li { position: relative; padding-left: 28px; font-size: 0.97rem; }
.pack__list li::before {
  content: ""; position: absolute; left: 0; top: 0.32em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%2300e676' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.packs__note { margin-top: 28px; text-align: center; color: var(--muted); font-size: 1.05rem; }

/* 10. Contacto */
.contact__inner { display: grid; gap: 40px; }
@media (min-width: 1024px) { .contact__inner { grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; } }
.contact__lead { margin-top: 18px; color: var(--muted); font-size: 1.08rem; max-width: 46ch; }
.contact__links { display: grid; gap: 10px; margin-top: 32px; }
@media (min-width: 560px) { .contact__links { grid-template-columns: 1fr 1fr; } }
.contact-link {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color .3s, transform .35s var(--ease), background-color .3s;
  min-width: 0;
}
.contact-link > span { display: grid; min-width: 0; }
.contact-link svg {
  flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 10px;
  background: var(--accent-soft);
  fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.contact-link__v { font-weight: 500; overflow-wrap: anywhere; }
.contact-link__k { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.contact-link[data-placeholder] { cursor: not-allowed; }

.form { padding: 24px; display: grid; gap: 18px; }
@media (min-width: 768px) { .form { padding: 36px; } }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.9rem; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: 400 1rem/1.4 var(--font-sans);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .25s, box-shadow .25s, background-color .25s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23a6a8a3' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  padding-right: 40px;
}
.field select option { background: #111; color: var(--text); }
.field ::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.15);
  background: rgba(255, 255, 255, 0.05);
}
.field [aria-invalid="true"] { border-color: #ff6b6b; }
.form__status { min-height: 1.4em; font-size: 0.92rem; color: var(--muted); }
.form__status.is-error { color: #ff8a8a; }
.form__status.is-ok { color: var(--accent); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: 0.9rem; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }

/* ---------- Hover: solo con puntero real (en táctil quedaría «pegado» tras tocar) ---------- */
@media (hover: hover) {
  .btn:hover .btn__icon { transform: translateX(4px); }
  .btn--primary:hover { box-shadow: 0 10px 40px -10px rgba(0, 230, 118, 0.6); transform: translateY(-2px); }
  .btn--primary:hover::after { transform: translateX(120%); }
  .btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
  .timeline__photo:hover { border-color: rgba(0, 230, 118, 0.6); transform: translateY(-2px); }
  .filter:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
  .viewer__nav:hover { background: var(--accent); color: var(--accent-ink); }
  .player__close:hover { background: var(--accent); color: var(--accent-ink); transform: rotate(90deg); }
  .feat__shot:hover img, .case__shot:hover img { transform: scale(1.02); }
  .contact-link:not([data-placeholder]):hover { border-color: var(--accent); transform: translateY(-2px); }
  .footer a:hover { color: var(--accent); }
}

/* ---------- Revelado al hacer scroll (solo con JS) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .bg__glow { background: radial-gradient(700px circle at 50% 20%, rgba(0, 230, 118, 0.08), transparent 60%); }
  .bg__grid { display: none; }
}
