/* ============================================================
   IOXONO — Landing page
   Tema monocromo (blanco y negro, predominio del blanco)
   Estilos base + escenas para animaciones GSAP/ScrollTrigger
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f6;
  --fg: #0a0a0a;
  --muted: #6d6d72;
  --accent: #0a0a0a;
  --line: rgba(10, 10, 10, 0.12);
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

section { position: relative; }

/* ---------- Barra de progreso ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--fg);
  z-index: 100;
}

/* ---------- Navegación ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  z-index: 90;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), padding 0.4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.nav__brand {
  font-weight: 900;
  letter-spacing: 0.12em;
  font-size: 1.15rem;
  color: var(--fg);
}
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav__links a { color: var(--muted); font-size: 0.92rem; transition: color 0.25s; }
.nav__links a:hover { color: var(--fg); }
.nav__cta {
  color: #ffffff !important;
  background: var(--fg);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}
.nav__cta:hover { background: #333; }
@media (max-width: 640px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--fg); color: #ffffff; }
.btn--primary:hover { background: #333; }
.btn--ghost { border: 1px solid var(--line); color: var(--fg); }
.btn--ghost:hover { border-color: var(--fg); }
.btn--lg { padding: 1.1rem 2.2rem; font-size: 1.1rem; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem clamp(1rem, 5vw, 3rem) 4rem;
  overflow: hidden;
}
.hero__layer {
  position: absolute;
  inset: -20% -10%;
  z-index: 0;
  will-change: transform;
}
.hero__layer--back {
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(10, 10, 10, 0.06), transparent 60%),
    radial-gradient(50% 50% at 85% 30%, rgba(10, 10, 10, 0.05), transparent 60%);
}
.hero__layer--mid {
  background:
    radial-gradient(35% 35% at 70% 75%, rgba(10, 10, 10, 0.05), transparent 60%),
    radial-gradient(30% 30% at 25% 80%, rgba(10, 10, 10, 0.04), transparent 60%);
  filter: blur(20px);
}
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 45%, #000 30%, transparent 75%);
  opacity: 0.4;
}
.hero__content { position: relative; z-index: 2; max-width: 860px; }
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.hero__title {
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero__title .line { display: block; }
.hero__title em { font-style: italic; }
.hero__lead {
  margin: 1.8rem auto 2.4rem;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__scroll-line {
  width: 1px; height: 46px;
  background: linear-gradient(var(--fg), transparent);
  animation: scrollPulse 2s var(--ease) infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; }
  40% { transform: scaleY(1); transform-origin: top; }
  60% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
/* En pantallas de poca altura el contenido del hero llega abajo: ocultamos la pista de scroll para evitar solape */
@media (max-height: 860px) {
  .hero__scroll { display: none; }
}

/* ---------- SECCIÓN EXPAND (imagen que se agranda) ---------- */
.expand { height: 220vh; background: var(--bg); }
.expand__pin {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.expand__frame {
  position: relative;
  width: 42vw;
  height: 56vh;
  border-radius: 22px;
  overflow: hidden;
  will-change: width, height, border-radius;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.22);
}
@media (max-width: 768px) {
  .expand__frame { width: 84vw; height: 48vh; }
}
.expand__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.25);
  will-change: transform;
}
.expand__caption {
  position: absolute;
  left: 0; bottom: 0;
  padding: clamp(1.2rem, 4vw, 3rem);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  width: 100%;
  opacity: 0;
  will-change: opacity;
  color: #fff;
}
.expand__kicker {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
}
.expand__caption h2 {
  font-size: clamp(1.6rem, 4vw, 3rem);
  margin: 0.4rem 0 0.3rem;
  letter-spacing: -0.02em;
}
.expand__caption p { color: rgba(255, 255, 255, 0.7); }

/* ---------- MANIFIESTO ---------- */
.manifesto {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(6rem, 14vw, 12rem) clamp(1.2rem, 5vw, 3rem);
}
.manifesto__text {
  font-size: clamp(1.6rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.manifesto__text [data-word] {
  display: inline-block;
  opacity: 0.12;
  will-change: opacity;
}

/* ---------- Encabezado de sección ---------- */
.section-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 5vw, 3rem);
  margin-bottom: 3rem;
}
.section-head__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}
.section-head__title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ---------- SERVICIOS ---------- */
.services { padding: clamp(3rem, 8vw, 7rem) 0; }
.services__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 1.8rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  will-change: transform, opacity;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--fg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}
.card__num {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.card h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 0.95rem; margin-top: auto; }

/* ---------- GALERÍA horizontal ---------- */
.gallery { overflow: hidden; background: var(--bg-soft); }
.gallery__track {
  display: flex;
  gap: clamp(1rem, 3vw, 2.4rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.2rem, 5vw, 3rem);
  width: max-content;
  will-change: transform;
}
.gallery__intro { flex: 0 0 auto; width: 40vw; max-width: 420px; }
@media (max-width: 640px) {
  .gallery__intro { width: 72vw; }
}
.gallery__intro h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.gallery__intro p { color: var(--fg); margin-top: 1rem; letter-spacing: 0.1em; }
.gallery__item {
  flex: 0 0 auto;
  width: min(78vw, 360px);
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0b0d;
}
.gallery__item img {
  width: 100%;
  height: 62vh;
  max-height: 520px;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery__item:hover img { transform: scale(1.06); }
.gallery__meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.3rem 1.2rem 1.2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  color: #fff;
}
.gallery__meta h3 { font-size: 1.4rem; letter-spacing: -0.01em; }
.gallery__meta p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* ---------- Franja parallax (único bloque oscuro) ---------- */
.stripe {
  position: relative;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.stripe__bg {
  position: absolute;
  inset: -20% 0;
  background: url("../assets/img/stripe.svg") center/cover no-repeat;
  filter: grayscale(1);
  will-change: transform;
}
.stripe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.78);
}
.stripe__content { position: relative; z-index: 2; }
.stripe__number {
  font-size: clamp(4rem, 14vw, 10rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #ffffff;
}
.stripe__label { color: rgba(255, 255, 255, 0.65); font-size: clamp(1rem, 2vw, 1.3rem); }

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  padding: clamp(6rem, 14vw, 12rem) clamp(1.2rem, 5vw, 3rem);
}
.cta__title {
  font-size: clamp(2.4rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.cta__lead { color: var(--muted); margin: 1.4rem 0 2.4rem; font-size: clamp(1rem, 2vw, 1.25rem); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.6rem clamp(1.2rem, 5vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer__brand { font-weight: 800; letter-spacing: 0.12em; color: var(--fg); font-size: 1rem; }
.footer__desc { max-width: 560px; }
.footer__social { display: flex; gap: 0.8rem; margin: 0.6rem 0 0.4rem; flex-wrap: wrap; justify-content: center; }
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--fg);
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.footer__social a svg { width: 21px; height: 21px; }
.footer__social a:hover {
  background: var(--fg);
  color: #fff;
  border-color: var(--fg);
  transform: translateY(-3px);
}

/* ---------- Reveal base (por si JS no carga) ---------- */
[data-reveal] { will-change: transform, opacity; }

/* ---------- Accesibilidad: reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__scroll-line { animation: none; }
  [data-reveal], [data-word], .card { opacity: 1 !important; transform: none !important; }
}
