/* Bolsillo · estilos. Una web de producto clara: blanco, tarjetas grises, móviles con marco negro y un cierre
   oscuro. La letra y el negro son los de webnou.com (Outfit). */

@font-face {
  font-family: 'Outfit';
  src: url('/fonts/outfit-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #121212;
  --muted: #7b7b7b;
  --card: #f2f2f2;
  --line: #e2e2e2;
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

svg[class^='i-'] {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Lenis: el scroll lo lleva la librería */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

/* ---------------------------------------------------------------- Barra flotante */
.pillbar {
  position: fixed;
  left: 50%;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 4px 4px 4px 12px;
  border-radius: 11px;
  background: rgb(40 40 40 / 0.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  color: #fff;
  transform: translateX(-50%);
}

.pill-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pill-brand svg {
  width: 11px;
  height: 11px;
}

.pill-actions {
  display: flex;
  gap: 3px;
}

.pill-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgb(255 255 255 / 0.2);
  transition: background-color 0.2s;
}

.pill-icon:hover {
  background: rgb(255 255 255 / 0.36);
}

.pill-icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- Escena */
.story {
  position: relative;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.hero {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  padding: max(84px, 10vh) 20px 0;
  text-align: center;
  will-change: transform, opacity;
}

.hero-title {
  font-size: clamp(34px, 4.6vw, 66px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.hero-text {
  max-width: 36ch;
  margin: 14px auto 0;
  font-size: clamp(14px, 1.15vw, 17px);
  color: var(--muted);
}

.phones {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.phones .phone {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
  animation: rise 1.1s var(--ease-out) both;
}

/* Al cargar, los móviles suben en orden: el del centro primero y los de fuera al final */
.phones .phone:nth-child(2),
.phones .phone:nth-child(3) {
  animation-delay: 0.08s;
}

.phones .phone:nth-child(4),
.phones .phone:nth-child(5) {
  animation-delay: 0.16s;
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 80px;
  }
}

/* Tarjetas grises a los lados del móvil fijo: los textos pasan por dentro (js/app.js) */
.pcard {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  border-radius: 22px;
  background: var(--card);
  overflow: hidden;
  opacity: 0;
  will-change: transform, opacity;
}

.track {
  position: absolute;
  inset: 0 0 auto;
  will-change: transform;
}

.block {
  height: var(--hc, 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 2.4vw, 34px);
}

.block-eyebrow {
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.block-title {
  font-size: clamp(30px, 3.3vw, 48px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.block-text {
  max-width: 40ch;
  margin-top: 12px;
  font-size: clamp(13.5px, 1.05vw, 15.5px);
  color: #666;
}

.block-feats {
  display: none;
}

.block-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
}

.block-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.block-links a:hover {
  border-color: currentColor;
}

.feats {
  list-style: none;
}

.feats li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(14px, 1.08vw, 16px);
  font-weight: 500;
  line-height: 1.3;
}

.feat-n {
  padding-top: 2px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- Móvil */
.phone {
  --pw: 300px;
  --bz: calc(var(--pw) * 0.032);
  position: relative;
  width: var(--pw);
  height: calc(var(--pw) * 2.09);
  padding: var(--bz);
  border-radius: calc(var(--pw) * 0.165);
  background: #121212;
  box-shadow:
    inset 0 0 0 calc(var(--pw) * 0.006) #3b3b3b,
    0 calc(var(--pw) * 0.06) calc(var(--pw) * 0.16) rgb(0 0 0 / 0.16),
    0 calc(var(--pw) * 0.01) calc(var(--pw) * 0.03) rgb(0 0 0 / 0.12);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--pw) * 0.135);
  overflow: hidden;
  background: #fff;
  isolation: isolate;
}

.phone-pages {
  position: absolute;
  inset: 0;
}

.phone-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--top, #fff);
  transform-origin: 50% 30%;
  will-change: transform;
}

/* La pantalla que queda debajo se oscurece un poco mientras la tapa la siguiente */
.phone-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: calc(var(--shade, 0) * 0.35);
  pointer-events: none;
}

.phone-page.is-moving {
  overflow: hidden;
  border-radius: calc(var(--pw) * 0.07) calc(var(--pw) * 0.07) 0 0;
  box-shadow: 0 calc(var(--pw) * -0.04) calc(var(--pw) * 0.1) rgb(0 0 0 / 0.22);
}

.phone-status {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--pw) * 0.1128);
  padding: calc(var(--pw) * 0.012) calc(var(--pw) * 0.085) 0 calc(var(--pw) * 0.11);
  color: #000;
  font-size: calc(var(--pw) * 0.043);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.phone-page.is-dark .phone-status {
  color: #fff;
}

.status-icons {
  width: calc(var(--pw) * 0.17);
  height: auto;
}

.phone-page img {
  display: block;
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: top;
}

.phone-island {
  position: absolute;
  left: 50%;
  top: calc(var(--pw) * 0.024);
  z-index: 2;
  width: calc(var(--pw) * 0.3);
  height: calc(var(--pw) * 0.084);
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

/* ---------------------------------------------------------------- Cierre */
.closing {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  overflow: hidden;
  background: #0d0d0d;
  color: #f4f4f4;
  text-align: center;
}

.closing-inner {
  padding: 18vh 20px 0;
}

.closing-title {
  font-size: clamp(40px, 6vw, 86px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.closing-text {
  max-width: 44ch;
  margin: 20px auto 0;
  font-size: clamp(14.5px, 1.2vw, 17px);
  color: #a1a1a1;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  margin-top: 28px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  transition:
    transform 0.25s var(--ease-out),
    background-color 0.2s;
}

.button:active {
  transform: scale(0.97);
}

.button-light {
  background: #fff;
  color: #111;
}

.button-light:hover {
  background: #e9e9e9;
}

.button-line {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.closing-phone {
  display: flex;
  justify-content: center;
  height: calc(min(300px, 62vw) * 1.05);
  margin-top: 9vh;
  overflow: hidden;
}

.closing-phone .phone {
  --pw: min(300px, 62vw);
  flex: none;
  box-shadow: inset 0 0 0 calc(var(--pw) * 0.006) #3b3b3b;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 22px max(20px, 5vw) calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid #242424;
  font-size: 13px;
  color: #8a8a8a;
  text-align: left;
}

.foot a {
  color: #d6d6d6;
  transition: color 0.2s;
}

.foot a:hover {
  color: #fff;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------------------------------------------------------------- Error */
.error {
  position: absolute;
  left: 50%;
  top: 55%;
  z-index: 4;
  width: min(420px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 22px;
  background: var(--card);
  text-align: center;
  transform: translate(-50%, -50%);
}

.error p {
  font-size: 18px;
  font-weight: 500;
}

.error-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------------------------------------------------------------- Pantallas estrechas */
@media (max-width: 760px) {
  .block-feats {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    list-style: none;
    font-size: 13px;
    font-weight: 500;
  }

  .block-feats li::before {
    content: '·';
    margin-right: 6px;
    color: var(--muted);
  }

  .block-title {
    font-size: 28px;
  }

  .block-eyebrow {
    margin-bottom: 8px;
  }

  .block-links {
    margin-top: 12px;
  }
}

/* ---------------------------------------------------------------- Sin movimiento: bloques quietos */
.motion-none *,
.motion-none *::before,
.motion-none *::after {
  transition-duration: 0s !important;
  animation-duration: 0s !important;
  animation-delay: 0s !important;
}

.motion-none .stage {
  position: relative;
}

.rows {
  display: grid;
  gap: 28px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2vw;
  height: min(86vh, 760px);
}

.row .card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
}

.row .block {
  height: 100%;
}

.row-phone {
  --pw: calc(min(86vh, 760px) / 2.09);
  align-self: center;
}

@media (max-width: 760px) {
  .row {
    grid-template-columns: 1fr;
    height: auto;
  }

  .row-phone {
    --pw: min(62vw, 300px);
    order: -1;
    margin: 0 auto;
  }

  .row .card-side {
    display: none;
  }

  .row .block {
    height: auto;
  }
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 14px;
  border-radius: 12px;
  background: var(--card);
  font-size: 14px;
}

/* ---------------------------------------------------------------- 404 */
.lost {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
}

.lost svg {
  width: 26px;
  height: 26px;
}

.lost h1 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.lost p {
  max-width: 34ch;
  color: var(--muted);
}

.lost .button {
  margin-top: 6px;
}
