/* =========================================================
   Trabajos · portfolio con las webs moviéndose dentro
   ========================================================= */
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

.thero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.thero h1 { margin-top: 6px; max-width: 12em; }
.thero .sub { font-size: clamp(1.08rem, 1.6vw, 1.25rem); }
.thero__stats { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.thero__stats li {
  background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 8px 18px;
  font-weight: 600; box-shadow: 3px 3px 0 var(--ink);
}
.thero__stats b { font-weight: 800; }

/* ---------- Lista de trabajos ---------- */
.works { padding-top: clamp(56px, 8vw, 96px); }
.works .wrap { display: grid; gap: clamp(72px, 10vw, 128px); }
.work > * { min-width: 0; }
.work { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.work--flip .work__stage { order: 2; }

.work__stage { position: relative; padding: 0 56px 40px 0; }
.work--flip .work__stage { padding: 0 0 40px 56px; }
.work__stage::before {
  content: ""; position: absolute; inset: 12% 0 0 10%; border-radius: 32px; background: var(--y); z-index: -1;
}
.work--flip .work__stage::before { inset: 12% 10% 0 0; }

/* Ventana de navegador */
.browser {
  background: #fff; border: 2px solid var(--ink); border-radius: 16px; overflow: hidden;
  box-shadow: 8px 8px 0 var(--ink);
}
.browser__bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 2px solid var(--ink); background: var(--bg-soft);
}
.browser__bar span { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; }
.browser__bar span:first-child { background: var(--y); }
.browser__bar em {
  font-style: normal; font-size: .8rem; font-weight: 600; color: var(--muted); margin-left: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.browser__view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #f2f0ea; }

/* Móvil */
.mobile {
  position: absolute; right: 0; bottom: 0; width: 25%; min-width: 120px;
  background: var(--ink); border-radius: 26px; padding: 7px; box-shadow: 6px 6px 0 rgba(17,17,17,.25);
}
.work--flip .mobile { right: auto; left: 0; }
.mobile__view { aspect-ratio: 9 / 19.5; overflow: hidden; border-radius: 20px; background: #fff; position: relative; }

/* La captura completa se desliza dentro del marco */
[data-scroll] {
  width: 100%; height: auto; display: block; will-change: transform;
  transform: translate3d(0, 0, 0);
}
.work__stage { cursor: ns-resize; }

/* Texto */
.work__n { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1rem; color: var(--muted); margin-bottom: 10px; }
.work__badge { font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em; }
.work__badge--cliente { background: var(--ink); color: var(--y); }
.work__badge--propuesta { background: var(--y-soft); color: var(--ink); border: 1px solid #F3E3A0; }
.work h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: .2em; }
.work__place { font-weight: 600; color: var(--ink-2); margin-bottom: 14px; }
.work__txt > p:not(.work__n):not(.work__place) { color: var(--ink-2); }
.work__tags { list-style: none; padding: 0; margin: 4px 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.work__tags li { font-size: .88rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); }
.work .btn .ico { width: 1em; height: 1em; transition: transform .2s ease; }
.work .btn:hover .ico { transform: translateX(3px); }

.cta--short { text-align: center; }
.cta--short p { font-size: 1.15rem; }

@media (prefers-reduced-motion: reduce) {
  [data-scroll] { transform: none !important; }
  .work__stage { cursor: auto; }
  .browser__view, .mobile__view { overflow-y: auto; }
}

@media (max-width: 960px) {
  .work { grid-template-columns: 1fr; }
  .work--flip .work__stage { order: 0; }
  .work__stage, .work--flip .work__stage { padding: 0 40px 36px 0; }
  .work__stage::before, .work--flip .work__stage::before { inset: 12% 0 0 10%; }
  .work--flip .mobile { left: auto; right: 0; }
}
@media (max-width: 640px) {
  .work__stage, .work--flip .work__stage { padding: 0 24px 30px 0; }
  .mobile { width: 30%; min-width: 96px; border-radius: 18px; padding: 5px; }
  .mobile__view { border-radius: 14px; }
  .browser { box-shadow: 5px 5px 0 var(--ink); }
  .work .btn { width: 100%; }
}

/* ---------- Titular con móviles en abanico ---------- */
.thero { overflow: hidden; }
.thero__in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.thero__art { position: relative; height: 440px; }
.thero__art::before { content: ""; position: absolute; left: 50%; top: 52%; width: 400px; height: 400px; translate: -50% -50%; border-radius: 50%; background: var(--y); }
.fan { position: absolute; left: 50%; top: 50%; width: 170px; padding: 6px; background: var(--ink); border-radius: 26px; box-shadow: 6px 6px 0 rgba(17,17,17,.22); animation: fanfloat 6s ease-in-out infinite; }
.fan__screen { aspect-ratio: 9 / 19.5; overflow: hidden; border-radius: 20px; background: #fff; }
.fan__screen img { width: 100%; height: auto; display: block; }
.fan--1 { --r: -14deg; --x: -150%; --y: -46%; animation-delay: -2s; }
.fan--2 { --r: 12deg; --x: 50%; --y: -54%; animation-delay: -4s; }
.fan--3 { --r: -2deg; --x: -50%; --y: -50%; z-index: 2; width: 190px; }
.fan { transform: translate(var(--x), var(--y)) rotate(var(--r)); }
@keyframes fanfloat { 50% { transform: translate(var(--x), calc(var(--y) - 10px)) rotate(var(--r)); } }
.thero__sticker { position: absolute; right: 2%; bottom: 4%; z-index: 3; width: 112px; height: 112px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); display: grid; place-content: center; text-align: center; line-height: 1; rotate: 10deg; font-family: var(--font); }
.thero__sticker span { font-size: .8rem; font-weight: 600; }
.thero__sticker b { font-size: 1.55rem; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .fan { animation: none; } }
@media (max-width: 960px) { .thero__in { grid-template-columns: 1fr; } .thero__art { height: 360px; margin-top: 8px; } .thero__art::before { width: 320px; height: 320px; } .fan { width: 140px; } .fan--3 { width: 156px; } }
@media (max-width: 640px) { .thero__art { height: 300px; } .thero__art::before { width: 260px; height: 260px; } .fan { width: 112px; border-radius: 20px; padding: 5px; } .fan__screen { border-radius: 15px; } .fan--3 { width: 126px; } .fan--1 { --x: -140%; } .fan--2 { --x: 40%; } .thero__sticker { width: 86px; height: 86px; right: 0; } .thero__sticker b { font-size: 1.2rem; } }
