:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #6e6e6e;
  --line: #e6e6e6;
  --pad: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --brand: "Unbounded", var(--sans);
  /* "only light" evita que el modo oscuro del navegador invierta los colores */
  color-scheme: only light;
}

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

/* La página nunca se desplaza de lado (clip no rompe el position: sticky de la intro) */
html, body { overflow-x: clip; }

html { background: #fff; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--bg); }

a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h3, .statement p, .contact__title { text-wrap: balance; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Cubo TW3 (3D de verdad, visto en isométrico) ---------- */

.cube {
  --s: 26px;
  position: relative;
  display: inline-block;
  flex: none;
  width: calc(var(--s) * 1.4142);
  height: calc(var(--s) * 1.633);
}

.cube__body {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  transform-style: preserve-3d;
  transform: rotateX(-35.264deg) rotateY(45deg);
}

.cube__face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.cube__face svg { display: block; width: 100%; height: 100%; }

.cube__face--top { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.cube__face--left { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.cube__face--front { transform: translateZ(calc(var(--s) / 2)); }
.cube__face--right { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.cube__face--back { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }

/* ---------- Logo del encabezado: cubo + STUDIO ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.logo__word {
  display: inline-block;
  overflow: hidden;
  margin-right: -.42em;
  font-family: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .42em;
  line-height: 1.4;
  text-transform: uppercase;
}

.logo__word span { display: block; }

/* STUDIO sale de detrás del cubo mientras este gira */
.js .logo__word span {
  transform: translateX(-110%);
  transition: transform .9s var(--ease-out) .5s;
}

.js .logo.is-in .logo__word span { transform: none; }

.logo.is-spinning .cube__body { animation: spin 1.2s cubic-bezier(.65, 0, .35, 1); }

@keyframes spin {
  from { transform: rotateX(-35.264deg) rotateY(45deg); }
  to { transform: rotateX(-35.264deg) rotateY(405deg); }
}

/* ---------- Intro: fondo blanco con TW3 Studio en el centro ---------- */

/* El alto extra es el recorrido del scroll: mientras dura, el cuarto queda fijo y la cámara avanza */
.intro { position: relative; height: 380vh; }

.intro__stage {
  position: sticky;
  top: 0;
  /* dvh sigue el alto real de la pantalla cuando el celular esconde o muestra su barra */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  perspective: 1000px;
  perspective-origin: 50% 46%;
  background: var(--bg);
}

/* Cada capa flota a una profundidad distinta; script.js la mueve con el scroll y el mouse */
.layer {
  position: absolute;
  left: 50%;
  top: 50%;
  white-space: nowrap;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform, opacity, filter;
}

/* Hasta que script.js las ubique, las capas no se ven (evita que todo aparezca un instante en el centro) */
.js .layer { opacity: 0; }

.aparece { animation: aparece 1.6s var(--ease-out) both; animation-delay: var(--d, .2s); }

@keyframes aparece { from { opacity: 0; transform: translateY(22px); filter: blur(10px); } }

/* El nombre y sus textos se acomodan en "em" alrededor del nombre, así quedan igual en cualquier pantalla */
.intro__brand { position: relative; font-size: clamp(46px, 9.4vw, 170px); }

/* Letra delgada y redondeada, blanca con relieve: brillo arriba, sombra abajo y una sombra suave en la pared */
.intro__title {
  margin: 0;
  font-family: "Quicksand", var(--sans);
  font-size: 1em;
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1;
}

/* Tw3 en gris carbón con relieve: es lo que más resalta del nombre */
.intro__tw3 {
  color: #2e3237;
  text-shadow:
    0 -1px 0 rgba(255, 255, 255, .6),
    0 1px 0 #24282c,
    0 2px 0 #1d2023,
    0 3px 1px #16181b,
    0 8px 8px rgba(0, 0, 0, .13),
    0 16px 26px rgba(0, 0, 0, .16);
}

/* Studio en los colores de la marca: bloque crema con letras naranjas */
.intro__studio {
  display: inline-block;
  padding: .02em .14em .1em;
  color: #ff4d1f;
  background: #f2ede4;
  box-shadow: 0 .04em 0 #e2dcd0, 0 10px 18px rgba(0, 0, 0, .06);
}

/* El cubo va arriba a la izquierda del nombre, donde la referencia tiene su marquita */
.cube--intro {
  --s: .2em;
  position: absolute;
  left: .06em;
  top: -.34em;
}

.cube--intro .cube__body { animation: idle-spin 14s linear infinite; }

@keyframes idle-spin {
  from { transform: rotateX(-35.264deg) rotateY(45deg); }
  to { transform: rotateX(-35.264deg) rotateY(405deg); }
}

/* Titular centrado encima del nombre */
.ft-head {
  position: absolute;
  bottom: calc(100% + .3em);
  left: 52%;
  margin: 0;
  translate: -50% 0;
  font-size: max(17px, .23em);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .92;
  text-align: center;
  color: var(--ink);
}

/* Escalonado debajo del nombre, empezando bajo la primera letra */
.ft-stagger {
  position: absolute;
  top: calc(100% + .14em);
  left: .35em;
  margin: 0;
}

.ft-stagger span:nth-child(2) { margin-left: 2.4em; }
.ft-stagger span:nth-child(3) { margin-left: .7em; }

/* Etiquetas a la derecha, un poco más abajo del nombre */
.ft-tags {
  position: absolute;
  top: calc(100% - .02em);
  right: .4em;
  margin: 0;
}

.ft-tags span:nth-child(2) { margin-left: 2.6em; }
.ft-tags span:nth-child(3) { margin-left: .7em; }

/* Textos pequeños en etiquetas amarillas, escalonadas y pisándose un poco */
.ft-amarillo {
  font-size: max(13px, .15em);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.1;
  color: var(--ink);
}

.ft-amarillo span { position: relative; display: table; padding: .04em .28em .08em; background: #f4e600; }
.ft-amarillo span + span { margin-top: -.14em; }

@media (max-width: 760px) {
  .intro__brand { font-size: 15vw; }
  .ft-head { font-size: max(15px, .23em); }
  .ft-amarillo { font-size: max(11px, .15em); }
}

.ft-service { white-space: normal; }

.ft-service b {
  display: block;
  max-width: 11ch;
  font-size: clamp(30px, 5.6vw, 84px);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: .95;
  color: var(--ink);
}

.ft-service span { display: block; max-width: 28ch; margin-top: 12px; font-size: clamp(13px, 1.2vw, 16px); color: var(--muted); }

.intro__hint {
  position: absolute;
  left: 50%;
  bottom: 5vh;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: -.01em;
  color: var(--muted);
}

/* ---------- Fondo de la intro: red de IA ---------- */

.intro__fondo { position: absolute; inset: 0; pointer-events: none; }
.intro__red { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Encabezado ---------- */

/* Va después de la intro, así que no se ve mientras la gente desliza la pantalla inicial */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(16px, 2.2vw, 28px) var(--pad);
}


.nav-link {
  font-size: 15px;
  text-decoration: none;
  padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: opacity 1s var(--ease-out) .5s, background-size .4s var(--ease-out);
}

.nav-link:hover { background-size: 100% 1px; }

.js .site-header:not(.is-in) .nav-link { opacity: 0; }

/* ---------- Animación de entrada de los bloques ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--d, 0s);
}

.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Portada ---------- */

.hero { padding: clamp(40px, 6vw, 96px) var(--pad) 0; }

.eyebrow,
.section__head,
.status {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  margin-top: .35em;
  font-size: clamp(44px, 9vw, 150px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .92;
}

.hero__title .line {
  display: block;
  overflow: hidden;
  padding: .08em 0 .12em;
  margin: -.08em 0 -.12em;
}

.hero__title .line > span { display: block; }

.js .hero__title .line > span {
  transform: translateY(130%);
  transition: transform 1.2s var(--ease-out);
}

.js .hero__title.is-in .line > span { transform: none; }
.js .hero__title.is-in .line:nth-child(2) > span { transition-delay: .08s; }

.hero__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.hero__foot p {
  max-width: 40ch;
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink { 50% { opacity: .2; } }

/* ---------- Secciones ---------- */

.section { padding: clamp(96px, 12vw, 180px) var(--pad) 0; }

.section__head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}

.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 48px;
  align-items: baseline;
  padding: clamp(24px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--line);
}

.service h3 {
  font-size: clamp(26px, 3.2vw, 48px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.service p {
  max-width: 44ch;
  font-size: clamp(16px, 1.2vw, 18px);
  color: var(--muted);
}

.statement { padding: clamp(110px, 16vw, 240px) var(--pad) 0; }

.statement p {
  max-width: 14em;
  font-size: clamp(34px, 6.4vw, 104px);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: 1.04;
}

/* "Vendemos tiempo." en bloque negro con letras blancas, como las caras del cubo.
   El bloque se pinta de izquierda a derecha y va descubriendo las letras */
.statement mark {
  display: inline-block;
  padding: .04em .12em .1em;
  line-height: 1;
  color: var(--bg);
  background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 0 / 100% 100%;
  transition: background-size .9s var(--ease) .45s;
}

.js .statement p:not(.is-in) mark { background-size: 0 100%; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 4vw, 56px);
  padding-top: clamp(32px, 4vw, 56px);
}

.step h3 {
  margin-bottom: 10px;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -.03em;
}

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

.contact__title {
  max-width: 13em;
  padding-top: clamp(32px, 4vw, 56px);
  font-size: clamp(34px, 5.6vw, 88px);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: 1;
}

.contact__sub {
  margin-top: 20px;
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--muted);
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  margin-top: clamp(36px, 5vw, 64px);
  padding-bottom: .12em;
  border-bottom: 1.5px solid currentColor;
  font-size: clamp(22px, 3vw, 40px);
  letter-spacing: -.03em;
  text-decoration: none;
}

.contact__link span { transition: transform .4s var(--ease-out); }
.contact__link:hover span { transform: translateX(.25em); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(96px, 12vw, 160px);
  padding: 24px var(--pad) 28px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Celular ---------- */

@media (max-width: 760px) {
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 24px; }
  .service { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; gap: 6px; }
}

/* ---------- Menos movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro { height: auto; }
  .intro__stage { position: relative; }
  .intro *, .logo *, .status i { animation: none !important; }
  .statement mark { transition: none; }
  .js .logo__word span,
  .js .site-header .nav-link,
  .js [data-reveal],
  .js .hero__title .line > span { opacity: 1; transform: none; transition: none; }
}
