/* JuanJurado · web portfolio
   Negro, blanco y gris claro con un único acento rojo. Una ficha redondeada que se transforma. */

@font-face { font-family: "Inter Tight"; src: url("assets/fonts/InterTight.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/InstrumentSerif.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --ink: #0B0B0C;
  --ink-2: #1B1B1E;
  --paper: #FFFFFF;
  --mist: #ECECEA;
  --red: #EE3A2D;
  --grey: #77777A;
  --grey-dark: #9A9A9E;
  --pad: clamp(20px, 3.4vw, 72px);
  --gap: clamp(10px, 1.1vw, 22px);
  --r: clamp(20px, 2.2vw, 40px);
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
i { font-family: var(--serif); font-style: italic; font-weight: 400; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }

/* ---------- Botones ---------- */
.pill { display: inline-flex; align-items: center; gap: .5em; padding: .78em 1.3em; border-radius: 999px; font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap; transition: transform .35s var(--ease), background .25s, color .25s; }
.pill:hover { transform: scale(1.05); }
.pill:active { transform: scale(.97); }
.pill--red { background: var(--red); color: #fff; }
.pill--big { font-size: clamp(18px, 1.5vw, 26px); padding: 1em 1.7em; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--pad); color: #fff; transition: color .3s, transform .45s var(--ease); pointer-events: none; }
.nav.is-away { transform: translateY(-110%); }
.nav > * { pointer-events: auto; }
.nav[data-theme="light"] { color: var(--ink); }
.nav__logo { font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.nav__logo i { font-size: 1.18em; letter-spacing: 0; }
.nav__links { display: flex; gap: clamp(16px, 2.2vw, 40px); font-size: 15px; font-weight: 500; }
.nav__links a { opacity: .7; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
.pill--nav { background: #fff; color: var(--ink); }
.nav[data-theme="light"] .pill--nav { background: var(--ink); color: #fff; }

/* ---------- Portada ---------- */
.hero { position: relative; height: 100svh; min-height: 600px; background: var(--ink); color: #F4F4F2; overflow: hidden; }
.hero__title { position: absolute; inset: 10.5svh 0 auto 0; text-align: center; font-size: 13.4vw; font-weight: 800; letter-spacing: -.055em; line-height: .9; white-space: nowrap; }
.hero__word { display: inline-block; will-change: transform; }
.hero__word--name { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--red); font-size: 1.16em; letter-spacing: -.02em; padding-right: .06em; }
.hero__avatar { position: absolute; left: 50%; bottom: 0; height: min(76svh, 60vw); aspect-ratio: 600 / 720; translate: -50% 0; will-change: transform; -webkit-mask-image: linear-gradient(to right, transparent 1%, #000 17%, #000 83%, transparent 99%); mask-image: linear-gradient(to right, transparent 1%, #000 17%, #000 83%, transparent 99%); }
.hero__avatar-in { position: absolute; inset: 0; transform-origin: 50% 100%; will-change: transform; }
.hero__avatar canvas, .hero__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__avatar canvas { opacity: 0; }
.hero__avatar.is-live canvas { opacity: 1; }
.hero__avatar.is-live img { opacity: 0; }
.hero__foot { position: absolute; inset: auto var(--pad) clamp(22px, 3.4vw, 56px) var(--pad); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hero__sub { max-width: 13.5em; font-size: clamp(19px, 1.85vw, 34px); line-height: 1.16; font-weight: 500; letter-spacing: -.02em; }
.hero__sub i { font-size: 1.12em; color: var(--red); }
.hero__side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chips li { border: 1px solid #3A3A3E; border-radius: 999px; padding: .5em 1em; font-size: 14px; color: #D0D0CC; }
.hero__hint { position: absolute; left: 50%; top: calc(10.5svh + 14.5vw); transform: translateX(22vw); font-size: 13px; color: var(--grey-dark); letter-spacing: .02em; }
.hero__hint::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 8px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.8); opacity: .3; } }

/* ---------- Fichas (secciones) ---------- */
.wrap--from-dark, .wrap--from-ink { background: var(--ink); }
.wrap--from-paper { background: var(--paper); }
.wrap--from-mist { background: var(--mist); }
.ficha { position: relative; padding: clamp(56px, 6.6vw, 124px) var(--pad) clamp(48px, 5.4vw, 100px); }
.ficha--paper { background: var(--paper); }
.ficha--mist { background: var(--mist); }
.ficha--ink { background: var(--ink); color: #F4F4F2; }

.head { margin-bottom: clamp(28px, 3.4vw, 64px); }
.head--split { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--pad); align-items: end; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .01em; color: var(--grey); margin-bottom: 18px; }
.ficha--ink .eyebrow { color: var(--grey-dark); }
.title { font-size: clamp(38px, 6.6vw, 132px); font-weight: 700; letter-spacing: -.045em; line-height: .96; max-width: 13em; }
.title i { color: var(--red); font-size: 1.13em; letter-spacing: -.01em; }
.lead { font-size: clamp(17px, 1.35vw, 24px); line-height: 1.4; color: #4A4A4E; max-width: 30em; margin-top: 22px; }
.head--split .lead { margin-top: 0; }
.ficha--ink .lead { color: #B9B9B6; }

/* Palabras con máscara */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .16em .07em .12em 0; margin: -.16em -.07em -.12em 0; }
.w > span { display: inline-block; }
.js .w > span { transform: translateY(112%); }
.js .is-visible .w > span { transform: none; transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 55ms); }
.js [data-reveal] { opacity: 0; transform: translateY(34px) scale(.985); }
.js [data-reveal].is-visible { opacity: 1; transform: none; transition: opacity .7s ease, transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }

/* ---------- Vídeo ---------- */
.reel { display: grid; grid-template-columns: 1.62fr 1fr 1fr 1fr; gap: var(--gap); }
.reel__row { display: contents; }
.reel__col { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.tile { position: relative; display: block; width: 100%; overflow: hidden; border-radius: var(--r); background: var(--ink-2); color: #fff; isolation: isolate; }
.tile--wide { flex: 1; min-height: 0; }
.tile--tall { aspect-ratio: 9 / 16; }
.tile > img, .tile > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.tile > video { opacity: 0; transition: opacity .35s; }
.tile.is-playing > video { opacity: 1; }
.tile:hover > img, .tile:hover > video { transform: scale(1.04); }
.tile__meta { position: absolute; inset: auto 0 0 0; z-index: 2; display: flex; flex-direction: column; gap: 2px; padding: 40px clamp(14px, 1.3vw, 24px) clamp(14px, 1.3vw, 22px); font-size: 13px; background: linear-gradient(to top, rgba(0, 0, 0, .62), transparent); }
.tile__meta b { font-size: clamp(16px, 1.25vw, 22px); font-weight: 650; letter-spacing: -.02em; }
.tile__meta span { opacity: .85; }
.tile__meta--ink { color: var(--ink); background: linear-gradient(to top, rgba(255, 255, 255, .8), transparent); }
.tile__play { position: absolute; z-index: 2; top: clamp(12px, 1.1vw, 20px); right: clamp(12px, 1.1vw, 20px); width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .92); transition: transform .4s var(--ease), background .25s; }
.tile__play::after { content: ""; position: absolute; left: 19px; top: 15px; border-left: 12px solid var(--ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.tile:hover .tile__play, .phone__screen:hover .tile__play { transform: scale(1.14); background: var(--red); }
.tile:hover .tile__play::after, .phone__screen:hover .tile__play::after { border-left-color: #fff; }

/* ---------- Landings ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--gap); }
.tab { display: inline-flex; align-items: baseline; gap: .55em; padding: .7em 1.2em; border-radius: 999px; background: rgba(11, 11, 12, .07); font-size: 15px; font-weight: 500; transition: background .3s, color .3s, transform .35s var(--ease); }
.tab b { font-weight: 700; }
.tab:hover { transform: translateY(-2px); }
.tab.is-on { background: var(--ink); color: #fff; }
.tab.is-on b { color: var(--red); }
.show__stage { display: grid; grid-template-columns: minmax(0, 1fr) clamp(180px, 17.5vw, 340px); gap: var(--gap); align-items: end; }
.browser { background: var(--paper); border-radius: var(--r); overflow: hidden; box-shadow: 0 30px 80px -40px rgba(11, 11, 12, .35); }
.browser__bar { display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 18px; border-bottom: 1px solid #E6E6E3; }
.browser__dots { display: flex; gap: 6px; }
.browser__dots i { width: 11px; height: 11px; border-radius: 50%; background: #D6D6D2; }
.browser__url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 14px; color: #55555A; background: #F3F3F1; border-radius: 999px; padding: 7px 16px; }
.browser__open { font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: #fff; transition: background .25s, transform .35s var(--ease); }
.browser__open:hover { background: var(--red); transform: scale(1.05); }
.browser__view { position: relative; aspect-ratio: 1440 / 880; overflow: hidden; background: #F3F3F1; }
.browser__view iframe { position: absolute; left: 0; top: 0; width: 1440px; height: 880px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .5)); pointer-events: none; transition: opacity .35s; }
.browser__view.is-swapping iframe { opacity: 0; }
.phone { display: flex; flex-direction: column; gap: 12px; }
.phone__screen { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: clamp(22px, 2.2vw, 40px); overflow: hidden; background: var(--ink); border: 7px solid var(--ink); transition: opacity .3s, transform .5s var(--ease); }
.phone__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone.is-empty .phone__screen { opacity: .12; pointer-events: none; transform: scale(.94); }
.phone__note { font-size: 14px; color: #55555A; line-height: 1.35; }

/* ---------- Proceso ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pad); padding-top: clamp(28px, 3vw, 56px); }
.steps__line { position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 3px; background: #2A2A2E; overflow: hidden; }
.steps__line i { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }
.step__n { display: block; font-size: clamp(120px, 19vw, 380px); font-weight: 800; letter-spacing: -.07em; line-height: .78; color: #2A2A2E; transition: color .5s, transform .8s var(--ease); margin-bottom: clamp(20px, 2.4vw, 44px); margin-left: -.04em; }
.step h3 { font-size: clamp(22px, 2.1vw, 40px); font-weight: 650; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 12px; }
.step p { font-size: clamp(16px, 1.2vw, 21px); color: #8E8E92; max-width: 22em; transition: color .5s; }
.step.is-on .step__n { color: #F4F4F2; }
.step:last-child.is-on .step__n { color: var(--red); }
.step.is-on p { color: #C9C9C5; }

/* ---------- Sobre mí ---------- */
.about { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--pad); align-items: center; }
.about__photo { position: relative; border-radius: var(--r); overflow: hidden; background: var(--mist); width: min(100%, calc(84vh * 1125 / 2000)); justify-self: center; }
.about__photo img { width: 100%; transition: transform 1.2s var(--ease); }
.about__photo:hover img { transform: scale(1.04); }
.about__photo figcaption { position: absolute; left: 16px; bottom: 16px; background: var(--paper); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.about__photo figcaption::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 8px; }
.about .title { font-size: clamp(36px, 5.2vw, 104px); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: clamp(28px, 3vw, 56px); padding-top: clamp(20px, 2vw, 36px); border-top: 1px solid #DEDEDA; }
.stats dt { font-size: clamp(40px, 5vw, 96px); font-weight: 750; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats dd { font-size: 14px; color: var(--grey); margin-top: 8px; }

/* ---------- Preguntas ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--pad); align-items: start; }
.faq .head { position: sticky; top: 110px; margin-bottom: 0; }
.faq .title { font-size: clamp(36px, 5vw, 100px); }
.faq details { background: var(--paper); border-radius: 26px; margin-bottom: 10px; transition: border-radius .3s; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: clamp(18px, 1.6vw, 28px) clamp(20px, 1.9vw, 32px); font-size: clamp(18px, 1.5vw, 26px); font-weight: 600; letter-spacing: -.02em; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--mist); display: grid; place-items: center; font-weight: 400; font-size: 22px; transition: transform .4s var(--ease), background .25s, color .25s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--red); color: #fff; }
.faq details p { padding: 0 clamp(20px, 1.9vw, 32px) clamp(20px, 1.8vw, 30px); color: #4A4A4E; font-size: clamp(16px, 1.15vw, 20px); max-width: 34em; }

/* ---------- Hablemos ---------- */
.cta { display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 0; }
.cta__title { white-space: nowrap; font-size: clamp(60px, 21vw, 420px); font-weight: 800; letter-spacing: -.06em; line-height: .9; }
.cta__title i { color: var(--red); letter-spacing: -.03em; }
.chat { width: min(100%, 620px); display: flex; flex-direction: column; gap: 12px; margin: clamp(28px, 3.4vw, 64px) 0; text-align: left; }
.chat__row { display: flex; align-items: flex-end; gap: 10px; justify-content: flex-end; }
.chat__face { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; order: 2; flex: none; background: #2A2A2E url("assets/img/avatar.webp?v=3") center / cover; }
.bubble { padding: 14px 20px; border-radius: 24px; font-size: clamp(17px, 1.3vw, 22px); line-height: 1.3; max-width: 80%; }
.bubble--in { align-self: flex-start; background: #232326; border-bottom-left-radius: 6px; }
.bubble--out { background: var(--red); color: #fff; border-bottom-right-radius: 6px; }
.bubble__dots { display: none; gap: 5px; padding: 6px 2px; }
.bubble__dots i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: dot 1s infinite; }
.bubble__dots i:nth-child(2) { animation-delay: .15s; }
.bubble__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-5px); opacity: .5; } }
.js .chat .bubble, .js .chat .chat__face { opacity: 0; transform: translateY(18px) scale(.9); transform-origin: 0 100%; }
.js .chat .bubble--out { transform-origin: 100% 100%; }
.js .chat.s1 .bubble--in, .js .chat.s2 .chat__face, .js .chat.s2 .bubble--out { opacity: 1; transform: none; transition: opacity .4s, transform .6s var(--ease); }
.js .chat.s2:not(.s3) .bubble__dots { display: inline-flex; }
.js .chat.s2:not(.s3) .bubble__txt { display: none; }
.cta__small { margin-top: 18px; font-size: 15px; color: var(--grey-dark); }
.foot { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: var(--pad); align-items: start; text-align: left; margin-top: clamp(48px, 6vw, 110px); padding: 24px 0 28px; border-top: 1px solid #2A2A2E; font-size: 13px; color: #8E8E92; }
.foot a { color: #F4F4F2; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Reproductor ---------- */
.player { position: fixed; inset: 0; z-index: 100; }
.player[hidden] { display: none; }
.player__bg { position: absolute; inset: 0; background: rgba(11, 11, 12, .94); opacity: 0; }
.player__frame { position: fixed; overflow: hidden; border-radius: var(--r); background: #000; }
.player__frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__close { position: fixed; top: 18px; right: var(--pad); z-index: 2; background: #fff; color: var(--ink); border-radius: 999px; padding: 10px 16px; font-size: 14px; font-weight: 600; }

/* ---------- Aviso legal ---------- */
.legal { background: var(--paper); min-height: 100svh; padding: clamp(96px, 10vw, 160px) var(--pad) 80px; }
.legal h1 { font-size: clamp(40px, 6vw, 110px); font-weight: 750; letter-spacing: -.045em; line-height: .96; margin-bottom: 40px; }
.legal h2 { font-size: 22px; letter-spacing: -.02em; margin: 34px 0 8px; }
.legal p, .legal li { max-width: 42em; color: #3A3A3E; margin-bottom: 10px; }
.legal ul { list-style: disc; padding-left: 1.2em; }
.legal mark { background: #FFE9A8; padding: 0 .25em; border-radius: 4px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav { padding: 14px var(--pad); }
  .nav__links { display: none; }
  .hero__title { inset: 74px 0 auto 0; font-size: 21vw; white-space: normal; line-height: .84; }
  .hero__word--name { display: block; font-size: 1.5em; line-height: .8; }
  .hero__avatar { height: min(118vw, calc(100svh - 224px - 36vw)); bottom: 150px; }
  .hero__foot { flex-direction: column; align-items: center; text-align: center; gap: 14px; inset: auto 0 0 0; padding: 90px var(--pad) 22px; background: linear-gradient(to top, var(--ink) 55%, transparent); }
  .hero__sub { font-size: 19px; max-width: 17em; }
  .hero__side { align-items: center; gap: 12px; }
  .chips { justify-content: center; }
  .chips li { font-size: 13px; }
  .hero__hint { display: none; }

  .ficha { padding: 40px var(--pad) 28px; }
  .cta { padding-top: 52px; }
  .head { margin-bottom: 24px; }
  .head--split { grid-template-columns: 1fr; gap: 16px; }
  .title, .about .title, .faq .title { font-size: 32px; letter-spacing: -.035em; line-height: 1; }
  .eyebrow { margin-bottom: 12px; font-size: 13px; }

  .reel { display: block; }
  .reel__col { gap: 10px; margin-bottom: 10px; }
  .tile--wide { flex: none; aspect-ratio: 16 / 9; }
  .reel__row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 6px; scrollbar-width: none; }
  .reel__row::-webkit-scrollbar { display: none; }
  .reel__row .tile { flex: none; width: 64vw; scroll-snap-align: center; }

  .tab { font-size: 14px; padding: .6em .95em; }
  .tab span { display: none; }
  .tab.is-on span { display: inline; }
  .show__stage { grid-template-columns: 1fr; }
  .browser__view { aspect-ratio: 390 / 600; }
  .browser__view iframe { width: 390px; height: 600px; }
  .browser__bar { height: 46px; padding: 0 12px; gap: 8px; }
  .browser__dots { display: none; }
  .browser__url { font-size: 13px; text-align: left; }
  .phone { flex-direction: row; align-items: center; }
  .phone__screen { width: 42%; }
  .phone.is-empty .phone__screen { display: none; }

  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps__line { inset: 0 auto 0 0; width: 3px; height: auto; }
  .steps__line i { transform-origin: 50% 0; transform: scaleY(0); }
  .steps { padding: 0 0 0 26px; }
  .step__n { font-size: 110px; margin-bottom: 14px; }

  .about { grid-template-columns: 1fr; gap: 28px; }
  .about__photo { max-width: 78%; }
  .stats dd { font-size: 13px; }
  .faq { grid-template-columns: 1fr; gap: 0; }
  .faq .head { position: static; margin-bottom: 28px; }
  .faq details { border-radius: 20px; }
  .cta__title { font-size: 17vw; }
  .foot { grid-template-columns: 1fr; gap: 12px; }
  .player__close { top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal], .js .w > span, .js .chat .bubble, .js .chat .chat__face { opacity: 1; transform: none; transition: none; }
  .hero__hint::before, .bubble__dots i { animation: none; }
}
