@import url('/fonts/geist/geist.css');

/* Dev Liquid — portafolio de desarrollador. Geist (titulares en 800–900, mayúsculas, interletraje apretado), blanco, negro y un amarillo eléctrico.
   El hero lleva la máscara líquida: script.js dibuja un <canvas> sobre la foto en blanco y negro. Los efectos solo corren fuera del editor
   (html.is-ed = editor: todo plano y editable). */

:root {
  --acc: #ffff00;
  --ink: #0a0a0a;
  --paper: #ffffff;
  --mute: #5b5b5b;
  --line: #e4e4e4;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body, button, input, select, textarea { font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 18px; line-height: 1.5; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h5, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--acc); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { left: 8px; }

/* Titulares */
.h-xl, .h-lg, .work-name, .serv-t, .stat-n, .contact-name, .hero-name, .pill-logo, .pill-menu nav a {
  font-weight: 800; text-transform: uppercase; letter-spacing: -.045em; line-height: .92;
}
.h-xl { font-size: clamp(32px, 10vw, 150px); overflow-wrap: anywhere; }
.h-lg { font-size: clamp(32px, 6.6vw, 104px); overflow-wrap: anywhere; }
.label { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--mute); margin-bottom: 14px; }
.lead { font-size: 20px; line-height: 1.5; color: var(--mute); max-width: 560px; }
.fit { display: inline-block; white-space: nowrap; }

/* Botones */
.btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border: 1px solid currentColor; border-radius: 8px; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .01em; overflow: hidden;
  transition: color .3s ease, transform .3s var(--ease); }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--fill, var(--ink)); transform: translateY(101%); transition: transform .35s var(--ease); }
.btn:hover, .btn:focus-visible { color: var(--hover-ink, var(--paper)); }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn-line { color: var(--ink); --fill: var(--ink); --hover-ink: var(--paper); }
.btn-acc { color: var(--ink); background: var(--acc); border-color: var(--acc); --fill: var(--paper); --hover-ink: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 18px; }
.btn-t { display: block; }

/* ─── Cabecera: píldora fija ─── */
.pill { position: fixed; z-index: 50; top: 24px; --tm-nav-gap: 24px; left: 50%; transform: translateX(-50%); width: min(300px, calc(100% - 40px)); color: #fff; border-radius: 8px; overflow: hidden;
  background: rgba(24, 24, 24, .52); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  transition: background .3s ease; }
.pill.is-open { background: rgba(24, 24, 24, .72); }
.pill-bar { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 12px 0 21px; }
.pill-logo { font-size: 13px; letter-spacing: .01em; line-height: 1; font-weight: 700; }
.pill-toggle { width: 44px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer; display: grid; grid-template-columns: repeat(2, 5px); gap: 3px; place-content: center; }
.pill-toggle i { width: 5px; height: 5px; background: currentColor; border-radius: 1px; transition: transform .35s var(--ease); }
.pill.is-open .pill-toggle i:nth-child(1) { transform: translate(2px, 2px); }
.pill.is-open .pill-toggle i:nth-child(2) { transform: translate(-2px, 2px); }
.pill.is-open .pill-toggle i:nth-child(3) { transform: translate(2px, -2px); }
.pill.is-open .pill-toggle i:nth-child(4) { transform: translate(-2px, -2px); }
.pill-menu { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.pill.is-open .pill-menu { grid-template-rows: 1fr; }
.pill-menu > * { min-height: 0; overflow: hidden; }
.pill-menu nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 21px 0; }
.pill-menu nav a { display: block; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; font-weight: 600; padding: 3px 0; min-height: 44px; display: flex; align-items: center; }
.pill-menu nav a:hover { color: var(--acc); }
.pill-foot { display: flex; flex-direction: column; gap: 12px; padding: 18px 21px 21px; }
.pill-foot .btn { align-self: flex-start; }
.pill-status { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3dff7a; flex: none; box-shadow: 0 0 0 0 rgba(61, 255, 122, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(61, 255, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 255, 122, 0); } }
.pill .btn-acc { --fill: #fff; }

/* ─── Hero ─── */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; background: #8f8f8f; overflow: clip; display: flex; align-items: flex-end; }
.hero-media { position: absolute; left: 0; right: 0; top: -5%; height: 110%; will-change: transform; overflow: clip; }
.hero-base, .hero-front { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero-fig { margin: 0; }
.hero-live { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.liquid-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; background: transparent; }
/* La foto de color no se ve nunca como foto: en la web publicada solo vive dentro del canvas (textura) y en el editor se cambia desde el
   cuadro «Fotos de la portada». Se queda en el DOM, cargada, pero invisible (no display:none: debe cargar para usarla de textura). */
.hero-fig { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.hero-front { position: static; width: 1px; height: 1px; }
.hero-copy { position: relative; z-index: 4; width: 100%; padding: 0 20px 20px; text-align: center; will-change: transform; }
.hero-tags { margin-bottom: 14px; }
.hero-role { font-size: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.3; color: var(--acc); }
.hero-place { font-size: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.3; color: #fff; }
.hero-h { font-size: 0; line-height: 0; }
.hero-name { color: var(--acc); font-weight: 900; line-height: .8; font-size: 14.6vw; letter-spacing: -.05em; padding-bottom: .02em; }
.hero-role, .hero-place { text-shadow: 0 1px 14px rgba(0, 0, 0, .25); }

/* ─── Secciones ─── */
.sec { padding: 120px 20px; }
.sec-head { margin-bottom: 56px; }
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); gap: 60px 20px; }
.work { display: flex; flex-direction: column; gap: 22px; }
.work-ph { overflow: hidden; aspect-ratio: 1.23; background: #111; }
.work-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work:hover .work-ph img { transform: scale(1.04); }
.work-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.work-name { font-size: 26px; letter-spacing: -.02em; font-weight: 700; line-height: 1.1; }
.work-desc { color: var(--mute); max-width: 420px; }
.work-stack { font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: 0; }

.about-sec { background: #f3f3f3; }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 60px; align-items: center; max-width: 1400px; margin: 0 auto; }
.about-ph { overflow: hidden; aspect-ratio: .86; }
.about-ph img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.about-txt .lead { margin-top: 28px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(96px, 100%), 1fr)); gap: 16px 24px; margin-top: 56px; max-width: 640px; }
.stat { border-top: 2px solid var(--ink); padding-top: 14px; }
.stat-n { font-size: clamp(44px, 5.4vw, 80px); letter-spacing: -.05em; }
.stat-l { font-size: 14px; font-weight: 500; text-transform: uppercase; color: var(--mute); margin-top: 4px; }

.serv-sec .sec-head { max-width: 1100px; }
.servs { border-top: 1px solid var(--ink); counter-reset: sv; display: grid; grid-template-columns: 1fr; }
.serv { counter-increment: sv; display: grid; grid-template-columns: 90px minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--ink); }
.serv::before { content: counter(sv, decimal-leading-zero); font-size: 14px; font-weight: 600; color: var(--mute); }
.serv-t { font-size: clamp(26px, 3.4vw, 48px); letter-spacing: -.035em; line-height: 1; }
.serv-d { color: var(--mute); max-width: 520px; }

.contact { background: var(--ink); color: #fff; padding: 120px 20px 60px; }
.contact-in { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 30px; }
.contact-h { width: 100%; font-size: 0; line-height: 0; }
.contact-name { color: var(--acc); font-weight: 900; line-height: .8; font-size: 18vw; letter-spacing: -.05em; padding-bottom: .02em; }
.label-l { color: rgba(255, 255, 255, .6); margin: 0; }
.lead-l { color: rgba(255, 255, 255, .75); text-align: center; margin: 0 auto; }

.foot { background: var(--ink); color: #fff; padding: 0 20px 28px; }
.foot-in { max-width: 1400px; margin: 0 auto; border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 40px; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 30px; }
.fcol { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.fcol-t { font-size: 13px; font-weight: 600; text-transform: uppercase; color: rgba(255, 255, 255, .55); margin-bottom: 8px; }
.fcol a { display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; font-weight: 500; }
.fcol a:hover { color: var(--acc); }
.foot-bot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 50px; font-size: 13px; font-weight: 600; text-transform: uppercase; color: rgba(255, 255, 255, .55); }

/* Aparecer al desplazarte (solo fuera del editor) */
.fx [data-rv] { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.fx [data-rv].rv-in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .sec { padding: 80px 20px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .about-ph { aspect-ratio: 1; max-height: 520px; }
  .serv { grid-template-columns: 44px minmax(0, 1fr); row-gap: 8px; }
  .serv-d { grid-column: 2; }
  .work-name { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx [data-rv] { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* Ícono de WhatsApp estándar del kit (el glifo original, relleno, del color del texto del botón).
   Para botones .btn de WhatsApp que no llevan ícono propio. Plantillas con ícono en el marcado: svg con este mismo path. */
.btn[data-whatsapp-btn]::after { content: ''; order: -1; flex: none; width: 1.55em; height: 1.55em; margin: -.1em 10px -.1em -2px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E") center / contain no-repeat; }
