/* juancornejo.com — portafolio de apps.
   Negro y blanco, sin color de acento: el color lo ponen las capturas de cada app. */

@font-face {
  font-family: 'Archivo';
  src: url('assets/fonts/Archivo-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('assets/fonts/Archivo-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --black: #0A0A0A; --white: #FFFFFF;
  --ink: #111111; --ink2: #575757; --mute: #8E8E8E;
  --tile: #F4F4F4; --line: #E4E4E4;
  --d-ink2: #A6A6A6; --d-mute: #6F6F6F; --d-line: rgba(255, 255, 255, .1);
  --sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --maxw: 1200px; --gut: clamp(16px, 4vw, 40px);
  --r-xl: 32px; --r-lg: 22px; --r-sm: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--white); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: #fff; color: var(--black); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--r-sm); font-weight: 600; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; transition: transform .2s ease, background-color .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--light { background: var(--white); color: var(--black); }
.btn--ghost { background: transparent; color: var(--white); padding: 0 8px; }
.btn--ghost:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- barra superior ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(10, 10, 10, .84); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .06); color: var(--white); }
.nav__in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; }
.nav__links { display: flex; gap: 28px; margin: 0 auto; }
.nav__links a { color: rgba(255, 255, 255, .74); text-decoration: none; font-size: 14.5px; }
.nav__links a:hover { color: var(--white); }
.nav__end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav__links + .nav__end { margin-left: 0; }
.nav .btn { height: 38px; padding: 0 14px; font-size: 14px; }
.lang { display: none; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; padding: 2px; }
.js .lang { display: inline-flex; }
.lang button { height: 30px; min-width: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, .7); font-size: 13px; font-weight: 600; cursor: pointer; }
.lang button[aria-pressed="true"] { background: rgba(255, 255, 255, .14); color: var(--white); }

/* ---------- textos comunes ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); }
.eyebrow::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 1.6px solid currentColor; }
.h2 { margin-top: 16px; max-width: 20ch; font-weight: 600; font-size: clamp(32px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -.038em; }
.dim { color: var(--mute); }
.lead { margin-top: 18px; max-width: 58ch; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.6; color: var(--ink2); }

/* ---------- portada ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--black); color: var(--white); padding-top: clamp(52px, 8vw, 96px); }
.hero::before { content: ''; position: absolute; z-index: -1; left: 50%; top: -30%; width: 120%; height: 110%; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, .09), transparent 70%); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .7); }
.pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero h1 { margin: 22px auto 0; max-width: 13ch; text-align: center; font-weight: 600; font-size: clamp(42px, 7.4vw, 94px); line-height: .98; letter-spacing: -.048em; }
.hero__sub { margin: 24px auto 0; max-width: 60ch; text-align: center; color: var(--d-ink2); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; }
.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; margin-top: 32px; }

/* escenario: tres teléfonos, íconos flotando y dos tarjetas de datos */
.stage { position: relative; height: clamp(360px, 50vw, 600px); margin-top: clamp(44px, 6vw, 80px); }
.stage .phone { position: absolute; left: 50%; top: 0; }
.stage .phone--c { --pw: clamp(196px, 23vw, 296px); transform: translateX(-50%); z-index: 3; }
.stage .phone--l, .stage .phone--r { --pw: clamp(160px, 18.5vw, 240px); top: clamp(40px, 5vw, 64px); z-index: 2; }
.stage .phone--l { transform: translateX(calc(-50% - var(--pw) * 1.02)) rotate(-7deg); }
.stage .phone--r { transform: translateX(calc(-50% + var(--pw) * 1.02)) rotate(7deg); }
.stage::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; z-index: 4; background: linear-gradient(to bottom, rgba(10, 10, 10, 0), var(--black)); pointer-events: none; }
.float { position: absolute; z-index: 5; width: var(--s, 64px); height: var(--s, 64px); border-radius: 23%; box-shadow: 0 18px 34px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); animation: float 7s ease-in-out infinite; transform: rotate(var(--rot, 0deg)); }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-12px) rotate(var(--rot, 0deg)); }
}
.float--1 { --s: 76px; --rot: -10deg; left: 8%; top: 10%; }
.float--2 { --s: 60px; --rot: 8deg; left: 16%; top: 56%; animation-delay: -2s; }
.float--3 { --s: 66px; --rot: -6deg; right: 9%; top: 6%; animation-delay: -4s; }
.float--4 { --s: 58px; --rot: 12deg; right: 17%; top: 50%; animation-delay: -1s; }
.float--5 { --s: 52px; --rot: 6deg; left: 2.5%; top: 40%; animation-delay: -3s; }
.float--6 { --s: 54px; --rot: -12deg; right: 3%; top: 31%; animation-delay: -5s; }
.statcard { position: absolute; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: rgba(28, 28, 28, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .8); }
.statcard b { display: block; font-size: 19px; letter-spacing: -.02em; }
.statcard span { display: block; font-size: 12.5px; color: var(--d-ink2); }
.statcard .sc-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); }
.statcard svg { width: 19px; height: 19px; fill: none; stroke: var(--white); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.statcard--a { left: calc(50% - clamp(196px, 23vw, 296px) * 1.45); top: 66%; }
.statcard--b { left: calc(50% + clamp(196px, 23vw, 296px) * .62); top: 72%; }

/* ---------- el teléfono ---------- */
.phone { --pw: 240px; width: var(--pw); aspect-ratio: 737 / 1600; padding: calc(var(--pw) * .032); border-radius: calc(var(--pw) * .155); background: #050505; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 30px 50px -26px rgba(0, 0, 0, .5); }
.hero .phone, .proj--dark .phone { background: #1E1E1E; box-shadow: 0 0 0 1px rgba(255, 255, 255, .09), 0 30px 60px -24px rgba(0, 0, 0, .9); }
.phone__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * .125); background: #161616; }
.phone__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity .8s ease; }
.phone__screen img.on, html:not(.js) .phone__screen img:first-child { opacity: 1; }
.phone--android { border-radius: calc(var(--pw) * .1); }
.phone--android .phone__screen { border-radius: calc(var(--pw) * .07); }

/* ---------- índice de proyectos (banda gris) ---------- */
.band { background: var(--tile); padding: clamp(64px, 9vw, 112px) 0; }
.band__head { text-align: center; }
.band__head .h2 { margin-left: auto; margin-right: auto; }
/* Siete tarjetas: flex centrado, para que la última fila quede centrada y no con un hueco. */
.idx { --cols: 7; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 44px; }
.idx li { flex: 0 1 calc((100% - (var(--cols) - 1) * 12px) / var(--cols)); min-width: 0; }
.idx a { height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--white); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.idx a:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .35); }
.idx img { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.idx b { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.idx span span { display: block; margin-top: 2px; font-size: 13px; color: var(--ink2); line-height: 1.35; }

/* ---------- lo que construyo ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 44px; }
.tile { display: flex; flex-direction: column; gap: 10px; min-height: 236px; padding: 24px; border-radius: var(--r-lg); background: var(--tile); }
.tile .ico { width: 46px; height: 46px; margin-bottom: auto; display: grid; place-items: center; border-radius: 13px; background: var(--white); }
.tile svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile b { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.tile p { font-size: 15px; line-height: 1.55; color: var(--ink2); }

/* ---------- proyectos ---------- */
.projects { padding-bottom: clamp(72px, 10vw, 128px); }
.projects__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 48px; margin-bottom: 40px; }
.projects__note { max-width: 42ch; font-size: 14.5px; line-height: 1.55; color: var(--ink2); }
.proj-list { display: grid; gap: 20px; }
.proj { --pp: clamp(22px, 4.4vw, 64px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: center; padding: var(--pp); border-radius: var(--r-xl); background: var(--tile); overflow: hidden; scroll-margin-top: 84px; }
.proj > * { min-width: 0; }
.proj--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.proj--flip .proj__text { order: 2; }
.proj--dark { background: var(--black); color: var(--white); }
.proj__kicker { font-size: 14px; color: var(--ink2); }
.proj h3 { margin-top: 10px; font-weight: 600; font-size: clamp(36px, 4.4vw, 58px); line-height: 1; letter-spacing: -.042em; }
.proj__private { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 13px; color: var(--ink2); }
.proj__private svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.proj--dark .proj__private { color: var(--d-ink2); }
.proj__pitch { margin-top: 16px; font-size: 16.5px; line-height: 1.6; color: var(--ink2); }
.proj--dark .proj__kicker, .proj--dark .proj__pitch, .proj--dark .app p, .proj--dark .feats li { color: var(--d-ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-size: 13px; }
.chips li.live { background: var(--black); border-color: var(--black); color: var(--white); }
.chips li.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.proj--dark .chips li { background: transparent; border-color: var(--d-line); }
.proj--dark .chips li.live { background: var(--white); border-color: var(--white); color: var(--black); }
.apps { display: grid; gap: 16px; margin-top: 28px; }
.app { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: start; }
.app img { width: 48px; height: 48px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.proj--dark .app img { box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
.app b { display: block; font-size: 16px; font-weight: 600; }
.app small { display: block; margin-top: 1px; font-size: 13px; color: var(--ink2); }
.app p { margin-top: 3px; font-size: 14.5px; line-height: 1.5; color: var(--ink2); }
.proj--dark .app small { color: var(--d-ink2); }
.feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.proj--dark .feats { border-top-color: var(--d-line); }
.feats li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.45; color: var(--ink2); }
.feats svg { width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.proj__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; font-size: 14.5px; font-weight: 600; text-decoration: none; }
.proj__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.shots { display: flex; justify-content: center; align-items: flex-end; gap: clamp(12px, 2vw, 26px); }
.shot { display: flex; flex-direction: column; align-items: center; gap: 14px; }
/* El ancho de cada teléfono sale del espacio de su columna, no del de la ventana. */
.shot .phone { --pw: clamp(150px, 15vw, 220px); }
.shots--3 .shot .phone { --pw: clamp(120px, 11vw, 165px); }
@supports (width: 1cqw) {
  .shots { container-type: inline-size; }
  .shot .phone { --pw: min(236px, calc((100cqw - 26px) / 2)); }
  .shots--3 .shot .phone { --pw: min(210px, calc((100cqw - 52px) / 3)); }
}
.shots--3 .shot:nth-child(2) { margin-bottom: 28px; }
.shot figcaption { max-width: 22ch; text-align: center; font-size: 13px; line-height: 1.4; color: var(--ink2); }
.shot figcaption b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.proj--dark .shot figcaption { color: var(--d-ink2); }
.proj--dark .shot figcaption b { color: var(--white); }

/* ---------- cómo trabajo ---------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 44px; }
.step { display: flex; flex-direction: column; padding: 24px; border-radius: var(--r-lg); background: var(--tile); }
.step i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--mute); }
.step b { margin-top: 36px; font-size: 18px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.step p { margin-top: 10px; font-size: 14.5px; line-height: 1.55; color: var(--ink2); }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.stack li { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink2); }

/* ---------- contacto y pie ---------- */
.contact { position: relative; overflow: hidden; isolation: isolate; background: var(--black); color: var(--white); text-align: center; padding: clamp(88px, 12vw, 150px) 0 clamp(72px, 9vw, 110px); }
.contact::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .16) 1.1px, transparent 1.6px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(60% 55% at 50% 45%, #000, transparent 78%); mask-image: radial-gradient(60% 55% at 50% 45%, #000, transparent 78%); }
.contact .eyebrow { color: var(--d-ink2); }
.contact h2 { margin: 18px auto 0; max-width: 15ch; font-weight: 600; font-size: clamp(38px, 6.2vw, 78px); line-height: 1.02; letter-spacing: -.046em; }
.contact .dim { color: var(--d-mute); }
.contact p { margin: 22px auto 0; max-width: 52ch; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.6; color: var(--d-ink2); }
.contact .btn { margin-top: 34px; }
.contact__mail { display: inline-block; margin-top: 18px; font-size: 14.5px; color: var(--d-ink2); }
.foot { background: var(--black); color: var(--d-ink2); border-top: 1px solid var(--d-line); font-size: 13.5px; }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding-top: 26px; padding-bottom: 34px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--d-ink2); text-decoration: none; }
.foot a:hover { color: var(--white); }

/* ---------- aparición al hacer scroll ---------- */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- tamaños ---------- */
@media (max-width: 1100px) {
  .idx { --cols: 4; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj, .proj--flip { grid-template-columns: minmax(0, 1fr); }
  .proj--flip .proj__text { order: 0; }
  .shots { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--pp) * -1); padding: 6px var(--pp) 4px; scrollbar-width: none; }
  .shots::-webkit-scrollbar { display: none; }
  .shot { flex: 0 0 auto; scroll-snap-align: center; }
  .shot .phone, .shots--3 .shot .phone { --pw: min(58vw, 236px); }
  .shots--3 .shot:nth-child(2) { margin-bottom: 0; }
  .statcard--a { left: 3%; top: 70%; }
  .statcard--b { left: auto; right: 3%; top: 76%; }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__links + .nav__end { margin-left: auto; }
}
@media (max-width: 720px) {
  .idx { --cols: 2; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step b { margin-top: 18px; }
  .feats { grid-template-columns: minmax(0, 1fr); }
  .float--5, .float--6 { display: none; }
  .float--1 { --s: 56px; left: 3%; top: 4%; }
  .float--2 { --s: 46px; left: 4%; top: 46%; }
  .float--3 { --s: 50px; right: 3%; top: 2%; }
  .float--4 { --s: 44px; right: 5%; top: 44%; }
  /* En el celular las dos tarjetas van lado a lado, a media anchura y sin ícono. */
  .statcard { max-width: calc(50% - 18px); padding: 10px 12px; border-radius: 14px; }
  .statcard .sc-ico { display: none; }
  .statcard b { font-size: 15px; }
  .statcard span span { font-size: 11.5px; }
  .statcard--a { left: 12px; top: 74%; }
  .statcard--b { left: auto; right: 12px; top: 74%; }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { min-height: 0; }
  .tile .ico { margin-bottom: 14px; }
  .stage .phone--l { transform: translateX(calc(-50% - var(--pw) * .86)) rotate(-7deg); }
  .stage .phone--r { transform: translateX(calc(-50% + var(--pw) * .86)) rotate(7deg); }
}
@media (max-width: 420px) {
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .phone__screen img { transition: none; }
  .btn, .idx a { transition: none; }
}
