/* Taiga — FILO v3. Blanco y negro; el filo está en los detalles.
   Bisel de 16px (el ángulo de la T) en botones y marcos. El color lo pone el portfolio.
   Scrolltelling con GSAP (assets/vendor); sin JS o con reduced-motion, todo es estático y legible. */

:root {
  --blanco: #FFFFFF;
  --negro: #0A0A0A;
  --hairline: #E4E4E4;
  --gris: #5C5C5C;
  --bisel: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  --pad: clamp(1.2rem, 4vw, 4rem);
  --view-h: 400px; /* alto visible del marco de navegador en mobile */
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--blanco);
  color: var(--negro);
  font-family: Archivo, system-ui, sans-serif;
  font-size: 1.02rem;
  line-height: 1.65;
  overflow-x: clip;
}

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

img { display: block; max-width: 100%; }

h1, h2, .cta-title, .panel-info h3 {
  font-stretch: 125%;
  font-weight: 900;
  text-transform: uppercase;
  line-height: .94;
  letter-spacing: -.015em;
}

.mono {
  font-family: "Space Mono", monospace;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ---- Header: vidrio esmerilado, legible sobre cualquier fondo ---- */

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem var(--pad);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(10,10,10,.08);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top {
    background: rgba(255,255,255,.68);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
  }
}
.top a { color: var(--negro); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.brand { font-stretch: 125%; font-weight: 900; font-size: 1.15rem; letter-spacing: .12em; }
.top-link { font-family: "Space Mono", monospace; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.top-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- Hero ---- */

.hero {
  padding: clamp(7rem, 16vh, 10rem) var(--pad) clamp(3rem, 6vw, 5rem);
  max-width: 90rem; margin-inline: auto;
}

h1 { font-size: clamp(2.5rem, 10.5vw, 7.2rem); max-width: 14ch; }
/* palabras envueltas por JS para la entrada a cuchilla */
h1 .hw { display: inline-block; overflow: hidden; vertical-align: bottom; }
h1 .hwi { display: inline-block; }

.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  margin-top: clamp(1.8rem, 4vw, 3rem);
}
.hero-sub { max-width: 32rem; color: var(--gris); font-size: clamp(1rem, 2.4vw, 1.15rem); }
/* La T del logo: multiply borra el fondo blanco del JPG sobre la página blanca */
.hero-mark { width: clamp(96px, 20vw, 260px); height: auto; mix-blend-mode: multiply; filter: brightness(1.12) contrast(1.12); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: .9rem 2.1rem; margin-top: 2.2rem;
  background: var(--negro); color: var(--blanco);
  text-decoration: none; font-weight: 500; letter-spacing: .02em;
  clip-path: var(--bisel);
}
.btn:hover { background: #2A2A2A; }

/* ---- La prueba: "Probalo con tu nombre" ---- */

.tuyo {
  display: grid; gap: 2.6rem;
  align-items: center;
  border-top: 1px solid var(--negro);
}
@media (min-width: 900px) { .tuyo { grid-template-columns: 1fr 1.05fr; gap: clamp(2.5rem, 6vw, 6rem); } }

.tuyo h2 { margin-top: 1rem; }
.tuyo .sec-sub { margin-top: .9rem; }

/* bisel + borde completo: capa negra de fondo (marco) + capa blanca 1px adentro */
.name-field {
  display: block; width: 100%; max-width: 26rem;
  margin-top: 1.8rem;
  background: var(--negro);
  clip-path: var(--bisel);
  padding: 1px;
}
.name-input {
  display: block; width: 100%;
  padding: .95rem 1.1rem; min-height: 50px;
  font: inherit; font-size: 1.15rem;
  color: var(--negro); background: var(--blanco);
  border: 0; border-radius: 0;
  clip-path: var(--bisel);
}
.name-input:focus { outline: 2px solid var(--negro); outline-offset: 2px; }
.name-input::placeholder { color: #9A9A9A; }

.tuyo .btn { margin-top: 1.4rem; }
.tuyo-note { color: var(--gris); margin-top: 1rem; }

/* mini-navegador: personalidad propia (serif/crema), distinta a la de Taiga.
   bisel + borde completo: capa negra de fondo (marco) + capa blanca 1px adentro */
.browser {
  background: var(--negro);
  clip-path: var(--bisel);
  padding: 1px;
}
.browser-inner {
  background: var(--blanco);
  clip-path: var(--bisel);
  overflow: hidden;
}
.browser-bar, .frame-bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--negro);
  background: var(--blanco);
}
.b-dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--negro); flex: none; }
.b-url { color: var(--gris); margin-left: .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-url b { color: var(--negro); font-weight: 700; }

.browser-body {
  background: #F3EEE4;
  padding: clamp(2.2rem, 6vw, 3.8rem) clamp(1.4rem, 4vw, 2.6rem);
  min-height: 280px;
  display: flex; flex-direction: column; justify-content: center;
}
.mini-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 6vw, 2.9rem);
  line-height: 1.05; color: #2B2721;
  overflow-wrap: anywhere;
}
.browser.typing .mini-name::after { content: "|"; margin-left: 2px; color: #A08A5F; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mini-tag { margin-top: .7rem; color: #7A6E58; font-size: .98rem; }
.mini-cta {
  align-self: flex-start;
  margin-top: 1.6rem; padding: .55rem 1.3rem;
  background: #2B2721; color: #F3EEE4;
  border-radius: 999px; font-size: .9rem;
}

/* ---- Marquee de nichos (motor en JS) ---- */

.strip {
  border-top: 1px solid var(--negro); border-bottom: 1px solid var(--negro);
  overflow: hidden; white-space: nowrap;
  padding-block: .65rem;
}
.strip-track { display: inline-flex; will-change: transform; }
.strip-item {
  font-family: "Space Mono", monospace; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .1em;
  flex: none;
}

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

section { padding: clamp(4rem, 9vw, 6.5rem) var(--pad); max-width: 90rem; margin-inline: auto; }

.sec-head {
  position: relative; padding-top: 1.1rem;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
/* la línea que se traza — el filo pasando */
.sec-head::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .9s cubic-bezier(.2,.6,.2,1) .15s;
}
.sec-head.in::before { transform: scaleX(1); }

h2 { font-size: clamp(1.9rem, 6vw, 3.4rem); }
.sec-meta { color: var(--gris); }
.sec-sub { color: var(--gris); max-width: 36rem; margin-top: 1.2rem; }

/* ---- Trabajos: paneles con recorrido ---- */

.works { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.works-stage { max-width: 90rem; margin-inline: auto; }

.panel-wrap { padding: 0 var(--pad); }

.panel {
  display: grid; gap: 1.6rem;
  padding-block: clamp(2.2rem, 5vw, 3rem);
  border-top: 1px solid var(--hairline);
}

.panel-num { color: var(--gris); }
.panel-info h3 { font-size: clamp(1.9rem, 5.5vw, 3.6rem); margin-top: .5rem; max-width: 12ch; }
.panel-meta { color: var(--gris); margin-top: .7rem; }
.panel-link {
  display: inline-flex; align-items: center; min-height: 44px;
  margin-top: 1rem;
  color: var(--negro); font-weight: 500;
  text-decoration: underline; text-underline-offset: 5px;
}
.panel-link:hover { text-decoration-thickness: 2px; }

/* bisel + borde completo: capa negra de fondo (marco) + capa blanca 1px adentro */
.frame {
  background: var(--negro);
  clip-path: var(--bisel);
  padding: 1px;
}
.frame-inner {
  background: var(--blanco);
  clip-path: var(--bisel);
  overflow: hidden;
}
.frame-view { height: var(--view-h); overflow: hidden; }
.frame-view img { width: 100%; height: auto; will-change: transform; }

/* mobile: la captura se recorre sola */
@media (max-width: 899.98px) and (prefers-reduced-motion: no-preference) {
  .frame-view .pan { animation: autopan 20s ease-in-out infinite alternate; }
}
@keyframes autopan {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-100% + var(--view-h))); }
}

/* desktop: panel fijado (sticky) mientras el recorrido lo maneja GSAP */
@media (min-width: 900px) {
  .panel-wrap { height: 190vh; }
  .panel {
    position: sticky; top: 0;
    height: 100svh; align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 5vw, 5rem);
    padding-block: 0;
  }
  .frame-view { height: min(66vh, 620px); }
}

/* ---- Manifiesto (bloque negro) ---- */

.manifesto {
  background: var(--negro); color: var(--blanco);
  max-width: none;
}
.manifesto > * { max-width: 82rem; margin-inline: auto; }
.manifesto .sec-meta { color: #8F8F8F; margin-bottom: 2.2rem; }
.mani-item { border-top: 1px solid rgba(255,255,255,.25); padding-block: 2rem; }
.mani-item:last-child { padding-bottom: .5rem; }
.mani-item h3 {
  font-stretch: 125%; font-weight: 700;
  font-size: clamp(1.45rem, 4.6vw, 2.5rem); line-height: 1.1;
  max-width: 24ch;
}
.mani-item h3 .mword { display: inline-block; }
.mani-item p { color: #A9A9A9; max-width: 34rem; margin-top: .8rem; }

/* ---- Método ---- */

.steps {
  list-style: none; padding: 0; margin-top: 2.4rem;
  display: grid; gap: 2rem 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .steps { grid-template-columns: 1fr 1fr; } }
.steps li { border-top: 1px solid var(--negro); padding-top: 1.1rem; }
.step-num { color: var(--gris); display: block; margin-bottom: .5rem; }
.steps h3 { font-stretch: 125%; font-weight: 700; font-size: 1.25rem; }
.steps p { color: var(--gris); margin-top: .4rem; max-width: 30rem; }

/* ---- Precio: tabla de especificaciones ---- */

.price-table { margin-top: 2.4rem; border-bottom: 1px solid var(--negro); }

.price-row {
  display: grid; gap: .6rem 3rem;
  border-top: 1px solid var(--negro);
  padding-block: 1.9rem;
}
@media (min-width: 760px) {
  .price-row { grid-template-columns: 17rem 1fr; align-items: first baseline; }
}
.price-num { display: flex; align-items: baseline; gap: .55rem; white-space: nowrap; }
.price-num .cur { color: var(--gris); }
.price-num .n {
  font-stretch: 125%; font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 3.6rem); line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.price-num .per { color: var(--gris); }
.price-info h3 { font-stretch: 125%; font-weight: 700; font-size: 1.15rem; }
.price-info p { color: var(--gris); max-width: 34rem; margin-top: .35rem; }
.price-note { color: var(--gris); margin-top: 1.4rem; }

/* ---- Estudio ---- */

.studio .sec-meta { margin-bottom: 1.6rem; }
.studio-text {
  font-size: clamp(1.3rem, 3.4vw, 2rem); line-height: 1.35;
  font-weight: 500; max-width: 46rem;
}

/* ---- Footer CTA ---- */

.cta {
  background: var(--negro); color: var(--blanco);
  text-align: center;
  padding: clamp(4.5rem, 10vw, 7.5rem) var(--pad) 2.5rem;
  overflow: hidden;
}
.cta-title { font-size: clamp(2.3rem, 9.5vw, 8.5rem); }
.btn-invert {
  background: var(--blanco); color: var(--negro);
  margin-top: 2.4rem;
  will-change: transform;
}
.btn-invert:hover { background: #E8E8E8; }
.cta-phone { margin-top: 1.6rem; }
.cta-phone a { color: #9C9C9C; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.cta-phone a:hover { text-decoration: underline; }
.fine { color: #6F6F6F; margin-top: 3.5rem; }

/* ---- WhatsApp flotante ----
   bisel + borde completo: capa negra de fondo (marco) + capa blanca 1px adentro,
   así la arista cortada también tiene línea (antes quedaba "abierta"). */

.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 54px; height: 54px;
  background: var(--negro);
  clip-path: var(--bisel);
  padding: 1px;
  opacity: 0; pointer-events: none; translate: 0 8px;
  transition: opacity .3s ease, translate .3s ease;
}
.wa-float.show { opacity: 1; pointer-events: auto; translate: 0 0; }
.wa-float-inner {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: var(--blanco); color: var(--negro);
  clip-path: var(--bisel);
  transition: background .2s ease;
}
.wa-float:hover .wa-float-inner { background: #F0F0F0; }

/* ---- Reveals (mínimos, por IntersectionObserver) ---- */

.reveal { opacity: 0; translate: 0 10px; transition: opacity .55s ease, translate .55s ease; }
.reveal.in { opacity: 1; translate: 0 0; }

/* ---- Reduced motion: página completa, quieta ---- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: none; transition: none; }
  .sec-head::before { transform: none; transition: none; }
  .browser.typing .mini-name::after { animation: none; }
  .wa-float { transition: none; translate: none; }
}
