/* solo: negro, blanco y el verde del punto. La película es el fondo; las pantallas reales, el producto. */
:root {
  --negro: #000;
  --blanco: #f5f5f7;
  --tinta: #1d1d1f;
  --gris: #86868b;
  --verde: #30d158;
  --verde-tinta: #00290f;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --margen: clamp(20px, 5vw, 72px);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: 80px;
  background: var(--negro);
}

body {
  background: var(--negro);
  color: var(--blanco);
  font-family: "General Sans", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--verde);
  outline-offset: 3px;
}

/* La película */
#film {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100lvh;
  background: var(--negro);
}

main,
.pie {
  position: relative;
  z-index: 1;
}

/* Barra de arriba: una cápsula de vidrio que se lee sobre cualquier toma */
.nav {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(100% - 28px, 860px);
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.55);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  transform: translateX(-50%);
}

.brand {
  position: relative;
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.brand i {
  position: absolute;
  top: 0.08em;
  right: -0.34em;
  width: 0.24em;
  height: 0.24em;
  border-radius: 50%;
  background: var(--verde);
}

.links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 0.9375rem;
  font-weight: 500;
}

.links a {
  color: #d2d2d7;
  transition: color 160ms ease;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  border-radius: 999px;
  background: var(--verde);
  color: var(--verde-tinta);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 160ms var(--ease);
}

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

.pill-sm {
  padding: 10px 20px;
  font-size: 0.9375rem;
}

.pill-lg {
  padding: 20px 38px;
  font-size: 1.25rem;
}

.pill-borde {
  background: none;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.4);
  color: var(--blanco);
}

.pill-tinta {
  background: var(--verde-tinta);
  color: #fff;
}

.enlace {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.wa-fijo {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  background: var(--verde);
  color: var(--verde-tinta);
  font-size: 0.9375rem;
  font-weight: 600;
  box-shadow: 0 14px 40px -10px rgb(0 0 0 / 0.6);
  user-select: none;
  -webkit-user-select: none;
  transition: transform 160ms var(--ease);
}

.wa-fijo:active {
  transform: scale(0.97);
}

.wa-fijo svg {
  width: 24px;
  height: 24px;
  fill: var(--verde-tinta);
}

/* Capítulos: el texto se queda fijo mientras la película avanza */
.capitulo {
  position: relative;
  height: var(--alto);
}

.fijo {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  width: min(50%, 720px);
  height: 100svh;
  padding: 100px 0 90px var(--margen);
}

.titulo {
  font-size: clamp(3rem, 6.4vw, 6.4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.98;
  text-wrap: balance;
}

.palabra {
  display: inline-block;
  white-space: nowrap;
}

.sub {
  max-width: 34em;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 500;
  line-height: 1.4;
  text-wrap: pretty;
}

.grande-sub {
  color: #d2d2d7;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 8px;
}

/* En la primera toma el cuarto es claro: el texto va oscuro hasta que se apaga la luz */
[data-claro] {
  color: var(--tinta);
  transition: color 240ms ease;
}

.a-oscuras [data-claro] {
  color: var(--blanco);
}

.capitulo-verde .fijo {
  width: 100%;
  align-items: center;
  text-align: center;
  color: var(--verde-tinta);
}

/* Trabajos: pista horizontal */
.trabajos {
  position: relative;
}

/* El vidrio va en el marco, no en la sección: un filtro en el padre rompería el fijado de la galería */
.pista-marco {
  height: 100svh;
  overflow: hidden;
  background: rgb(0 0 0 / 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.pista {
  display: flex;
  align-items: center;
  gap: clamp(40px, 7vw, 120px);
  width: max-content;
  height: 100%;
  padding: 90px var(--margen) 80px;
  will-change: transform;
}

.obra {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  flex: none;
}

.obra-titulo {
  display: block;
  width: min(84vw, 680px);
}

.obra-titulo h2 {
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.obra-titulo p {
  margin-top: 22px;
  color: #d2d2d7;
  font-size: 1.25rem;
  font-weight: 500;
}

.flecha {
  display: block;
  width: 72px;
  height: 18px;
  margin-top: 34px;
  border-radius: 9px;
  background: var(--verde);
}

.cel {
  flex: none;
  height: min(72svh, 680px);
  aspect-ratio: 9 / 19.5;
  padding: 9px;
  border-radius: 44px;
  background: #111;
  box-shadow: inset 0 0 0 2px #3a3a3c, 0 40px 90px -20px rgb(48 209 88 / 0.35);
}

.pantalla {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 36px;
  background: #000;
}

.pantalla video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.obra-texto {
  flex: none;
  width: min(74vw, 360px);
}

.obra h3 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.obra-texto p {
  margin: 14px 0 22px;
  color: #d2d2d7;
}

.compu {
  flex: none;
  width: min(62vw, 860px);
  overflow: hidden;
  border-radius: 20px;
  background: #1c1c1e;
  box-shadow: inset 0 0 0 2px #3a3a3c, 0 40px 90px -20px rgb(48 209 88 / 0.35);
  padding: 10px;
}

.compu img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.ilustra {
  flex: none;
  display: block;
  height: min(72svh, 680px);
  width: auto;
  border-radius: 28px;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent);
  mask-image: radial-gradient(closest-side, #000 72%, transparent);
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: none;
  width: min(74vw, 460px);
}

.chat p {
  padding: 16px 22px;
  border-radius: 26px 26px 26px 6px;
  background: #fff;
  color: var(--tinta);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
}

.chat p:nth-child(even) {
  align-self: flex-end;
  border-radius: 26px 26px 6px 26px;
  background: var(--verde);
  color: var(--verde-tinta);
}

.obra-tuya {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  width: min(84vw, 560px);
  height: min(72svh, 620px);
  padding: 44px;
  border-radius: 44px;
  background: var(--verde);
  color: var(--verde-tinta);
}

.obra-tuya p {
  font-size: 1.25rem;
  font-weight: 500;
}

.punto-grande {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--verde-tinta);
}

/* Secciones sólidas */
.solida {
  position: relative;
  padding: clamp(80px, 11vw, 160px) var(--margen);
}

.negra {
  background: var(--negro);
  color: var(--blanco);
}

.blanca {
  background: var(--blanco);
  color: var(--tinta);
}

.verde {
  background: var(--verde);
  color: var(--verde-tinta);
}

.titulo-seccion {
  max-width: 14em;
  font-size: clamp(2.5rem, 5.4vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  text-wrap: balance;
}

.reel-sec {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 7vw, 110px);
}

.reel-copia {
  max-width: 520px;
}

.reel-copia p {
  margin-top: 18px;
  color: #d2d2d7;
  font-size: 1.25rem;
}

.reel {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 34px;
  background: #111;
}

.reel video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-sonido {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.6);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  touch-action: manipulation;
}

.servicios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(40px, 6vw, 72px);
}

.serv {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 32px;
  border-radius: 28px;
  background: #fff;
}

.serv h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.serv p {
  flex: 1;
  color: #515154;
}

.serv-grande {
  grid-column: 1 / -1;
  background: var(--negro);
  color: var(--blanco);
}

.serv-grande h3 {
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.serv-grande p {
  max-width: 42em;
  color: #d2d2d7;
  font-size: 1.1875rem;
}

.pasos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: clamp(40px, 6vw, 72px);
  list-style: none;
  counter-reset: paso;
}

.pasos li {
  counter-increment: paso;
  padding-top: 22px;
  border-top: 3px solid var(--verde);
}

.pasos li::before {
  content: counter(paso);
  display: block;
  margin-bottom: 14px;
  color: var(--verde);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.pasos b {
  display: block;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.pasos p {
  margin-top: 10px;
  color: #d2d2d7;
}

.cita {
  max-width: 24em;
  margin-top: clamp(60px, 8vw, 110px);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.cita span {
  display: block;
  margin-top: 18px;
  color: var(--gris);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.45;
}

.faq {
  max-width: 820px;
  margin-top: clamp(32px, 5vw, 56px);
}

.faq details {
  border-bottom: 1px solid #d2d2d7;
}

.faq summary {
  padding: 22px 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details p {
  padding-bottom: 22px;
  color: #515154;
}

.final {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  text-align: center;
}

.brand-grande {
  font-size: clamp(5rem, 13vw, 11rem);
}

.brand-grande i {
  background: var(--verde-tinta);
}

.final h2 {
  max-width: 15em;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.04;
  text-wrap: balance;
}

.pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 36px var(--margen) calc(90px + env(safe-area-inset-bottom));
  background: var(--negro);
  color: var(--gris);
  font-size: 0.9375rem;
}

.pie .brand {
  color: var(--blanco);
}

/* El punto sigue al ratón con un resorte, solo donde hay ratón */
#cursor {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .links a:hover {
    color: #fff;
  }
  .pill:hover,
  .wa-fijo:hover {
    transform: scale(1.03);
  }
  #cursor {
    position: fixed;
    top: -11px;
    left: -11px;
    z-index: 30;
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 30%, #7dff9f, var(--verde) 55%);
    box-shadow: 0 0 26px rgb(48 209 88 / 0.7);
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms ease;
  }
  #cursor.visible {
    opacity: 1;
  }
}

/* Celular: el texto va abajo, sobre un velo, y la toma vertical ocupa todo */
@media (max-aspect-ratio: 1/1), (max-width: 820px) {
  .links {
    display: none;
  }
  .nav .pill {
    margin-left: auto;
  }
  .fijo {
    justify-content: flex-end;
    width: 100%;
    padding: 90px var(--margen) calc(92px + env(safe-area-inset-bottom));
    gap: 14px;
  }
  .fijo::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    height: 62%;
    background: linear-gradient(to top, rgb(0 0 0 / 0.86), rgb(0 0 0 / 0.62) 55%, rgb(0 0 0 / 0));
    pointer-events: none;
  }
  .capitulo-verde .fijo {
    justify-content: center;
  }
  .capitulo-verde .fijo::before {
    display: none;
  }
  .titulo {
    font-size: clamp(2.75rem, 13vw, 4.5rem);
  }
  [data-claro] {
    color: var(--blanco);
  }
  .obra {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .cel,
  .ilustra {
    height: 54svh;
  }
  .compu {
    width: 86vw;
  }
  .obra-texto {
    width: min(84vw, 380px);
  }
  .obra-texto p {
    margin: 8px 0 14px;
    font-size: 0.9375rem;
  }
  .obra h3 {
    font-size: 1.75rem;
  }
  .chat {
    width: 84vw;
  }
  .wa-fijo span {
    display: none;
  }
  .wa-fijo {
    padding: 15px;
  }
  .servicios {
    grid-template-columns: 1fr;
  }
  .pasos {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pista {
    will-change: auto;
  }
  #cursor {
    display: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .nav {
    background: #000;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .pista-marco {
    background: #000;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Sobre el pueblo y las luces hay mucho detalle: una sombra suave mantiene el texto legible */
[data-tramo="3"] .titulo,
[data-tramo="3"] .sub,
[data-tramo="4"] .titulo {
  text-shadow: 0 2px 28px rgb(0 0 0 / 0.85), 0 0 8px rgb(0 0 0 / 0.5);
}
