/* =================================================================
   STREAM DOTS AUDIOVISUAL — style.css
   Design system tokens (RPA-style mod-* architecture)
   ================================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Xavery";
  src: url("../assets/fonts/Xavery-Regular.woff2") format("woff2"),
       url("../assets/fonts/Xavery-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Xavery";
  src: url("../assets/fonts/Xavery-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

/* ---------- Animatable color props (per-section gama change, RPA-style) ---------- */
@property --accent {
  syntax: "<color>"; inherits: true; initial-value: #ff1e1e;
}
@property --bg {
  syntax: "<color>"; inherits: true; initial-value: #0a0a0a;
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette */
  --black: #0a0a0a;
  --surface: #1a1a1a;
  --gray: #444444;
  --white: #ffffff;
  --red: #ff1e1e;
  --blue: #00aeef;
  --green: #39b54a;
  --yellow: #ffd100;
  --orange: #ff6b00;

  /* Semantic — --accent and --bg are driven per section by JS and animate via @property */
  --bg: #0a0a0a;
  --fg: var(--white);
  --accent: #ff1e1e;
  --muted: #9a9a9a;
  --hairline: rgba(255, 255, 255, 0.12);

  /* Smooth gama transition */
  transition: --accent 0.7s ease, --bg 0.7s ease;

  /* Type */
  --font-display: "Xavery", "Montserrat", sans-serif;
  --font-body: "Montserrat", system-ui, sans-serif;

  /* Spacing scale (RPA-style pt/pb 5xl tokens) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;
  --space-5xl: clamp(5rem, 12vw, 12rem);

  /* Layout */
  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1600px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.8s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  font-size: clamp(15px, 1vw + 0.6rem, 18px);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--black); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Color gamas (RPA-style background sets) ---------- */
.gama-dark { background: var(--bg); color: var(--white); }
.gama-surface { background: var(--surface); color: var(--white); }

/* ---------- Utilities ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

/* =================================================================
   PRELOADER
   ================================================================= */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--black);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
}
.preloader__inner {
  display: flex; align-items: baseline; gap: 1.5rem;
}
.preloader__brand {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 5rem);
  letter-spacing: 0.04em;
}
.preloader__brand em { color: var(--accent); font-style: normal; }
.preloader__count {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  color: var(--muted);
}
.preloader__count i { font-style: normal; font-size: 0.5em; }
.preloader__bar {
  width: min(60vw, 400px); height: 2px; background: var(--hairline);
  overflow: hidden;
}
.preloader__bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--blue), var(--accent));
}
body.is-loaded .preloader { pointer-events: none; }

/* =================================================================
   HEADER
   ================================================================= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem, 2vw, 1.75rem) var(--pad-x);
  mix-blend-mode: difference;
}
.header__logo { display: flex; align-items: center; gap: 0.6rem; }
.header__logo img { width: 38px; height: 38px; }
.header__logo span {
  font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.04em;
}
.header__logo em { color: var(--accent); font-style: normal; }
.header__burger {
  width: 48px; height: 48px; display: grid; place-content: center; gap: 6px;
}
.header__burger span {
  display: block; width: 28px; height: 2px; background: var(--white);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
body.nav-open .header__burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
body.nav-open .header__burger span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* =================================================================
   NAV OVERLAY
   ================================================================= */
.nav-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: var(--black);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad-x);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease);
  pointer-events: none;
}
body.nav-open .nav-overlay { clip-path: inset(0 0 0% 0); pointer-events: auto; }
.nav-overlay__list { display: flex; flex-direction: column; gap: 0.2rem; }
.nav-overlay__list a {
  position: relative; display: inline-flex; align-items: baseline; gap: 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 7rem);
  line-height: 1.02; letter-spacing: 0.02em;
  transition: color 0.3s, padding-left 0.4s var(--ease);
  width: fit-content;
}
.nav-overlay__list a i {
  font-style: normal; font-size: 0.8rem; color: var(--muted);
  font-family: var(--font-body); letter-spacing: 0.1em;
}
.nav-overlay__list a:hover { color: var(--accent); padding-left: 1.5rem; }
.nav-overlay__foot {
  display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: var(--space-xl);
  font-size: 0.85rem; letter-spacing: 0.05em; color: var(--muted);
}
.nav-overlay__foot a:hover { color: var(--white); }

/* =================================================================
   HERO / mod-cabecera
   ================================================================= */
.mod-cabecera {
  position: relative; min-height: 100svh;
  display: grid; align-items: center;
  padding: var(--pad-x);
  overflow: hidden;
}
.mod-cabecera__media {
  position: absolute; top: 50%; left: 50%;
  width: min(70vw, 900px); aspect-ratio: 16 / 11;
  transform: translate(-50%, -50%);
  /* RPA-style diagonal clip */
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  overflow: hidden;
}
.mod-cabecera__media img { width: 100%; height: 100%; object-fit: cover; }
.mod-cabecera__media .hero-img { position: absolute; inset: 0; opacity: 0; }
.mod-cabecera__media .hero-img.is-active { opacity: 1; }
/* Hero headline: words pinned to the corners so the center image stays clean */
.mod-cabecera__title {
  position: absolute;
  inset: clamp(5.5rem, 13vh, 8.5rem) var(--pad-x) clamp(3.5rem, 8vh, 5rem);
  z-index: 3;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 6rem);
  line-height: 0.92; letter-spacing: 0.01em;
  mix-blend-mode: exclusion;
  pointer-events: none;
}
.mod-cabecera__title .line { position: absolute; display: block; }
.mod-cabecera__title .line--tl { top: 0; left: 0; }
.mod-cabecera__title .line--ml { top: 46%; left: 0; }
.mod-cabecera__title .line--br { bottom: 0; right: 0; }
.mod-cabecera__title .line--accent { color: var(--accent); mix-blend-mode: normal; }

.mod-cabecera__scroll {
  position: absolute; bottom: 2rem; left: var(--pad-x); z-index: 4;
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.mod-cabecera__scroll svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.6; }
.mod-cabecera__scroll svg path { animation: scrollArrow 1.8s var(--ease) infinite; }
@keyframes scrollArrow { 0%,100%{ transform: translateY(0); opacity:1 } 50%{ transform: translateY(4px); opacity:.4 } }

/* =================================================================
   STATEMENT / mod-text--big
   ================================================================= */
.mod-text--big {
  padding: var(--space-5xl) var(--pad-x);
  max-width: var(--maxw); margin: 0 auto;
}
.mod-text--big p {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.6rem, 4.5vw, 4rem);
  line-height: 1.15; letter-spacing: 0.005em;
  max-width: 20ch;
}
.mod-text--big em { color: var(--accent); font-style: normal; }
.mod-text--big .word { display: inline-block; }

/* =================================================================
   VIDEO / mod-video--expand
   ================================================================= */
.mod-video--expand {
  padding: 0 var(--pad-x);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.mod-video__frame {
  position: relative; width: 64%; margin: 0 auto;
  aspect-ratio: 16 / 9; overflow: hidden;
  will-change: width;
}
.mod-video__frame img,
.mod-video__media { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
/* Al reproducir se oculta el botón y aparecen los controles nativos */
.mod-video__frame.is-playing .mod-video__play { opacity: 0; pointer-events: none; }
.mod-video__play {
  position: absolute; inset: 0; margin: auto;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(10,10,10,0.55); backdrop-filter: blur(6px);
  border: 1.5px solid var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: transform 0.4s var(--ease), background 0.3s;
}
.mod-video__play:hover { transform: scale(1.08); background: var(--accent); color: var(--black); }
.mod-video__play svg { width: 34px; height: 34px; fill: currentColor; }
.mod-video__play span { font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; }

/* =================================================================
   SERVICIOS / mod-servicios--anima  (horizontal pinned scroll)
   ================================================================= */
.mod-servicios--anima { padding: 0; }
.serv-pin { position: relative; height: 100vh; overflow: hidden; }
.serv-head {
  position: absolute; top: clamp(5.5rem, 13vh, 9rem); left: var(--pad-x); z-index: 3;
  pointer-events: none;
}
.serv-head h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.5rem); line-height: 0.95;
}
.serv-progress {
  display: block; margin-top: 1rem;
  font-family: var(--font-display); font-size: 1rem; color: var(--muted); letter-spacing: 0.1em;
}
.serv-progress i { color: var(--accent); font-style: normal; }

.serv-track { display: flex; height: 100%; will-change: transform; }
.serv-panel {
  position: relative; overflow: hidden;
  flex: 0 0 100vw; height: 100%;
  display: grid; align-content: center; gap: 1.2rem;
  padding: 0 var(--pad-x);
  grid-template-columns: min(640px, 60vw);
  justify-content: start;
}
/* Imagen de fondo del panel (atenuada) + degradado para legibilidad */
.serv-panel__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; opacity: 0.5;
}
.serv-panel::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(8,8,8,0.9) 0%, rgba(8,8,8,0.55) 42%, rgba(8,8,8,0.2) 100%);
}
.serv-panel > :not(.serv-panel__bg) { position: relative; z-index: 2; }
.serv-panel__num {
  font-family: var(--font-display); font-size: 1.4rem; color: var(--accent);
}
.serv-panel__icon { width: 64px; height: 64px; color: var(--accent); }
.serv-panel__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 6.5rem); line-height: 0.92;
}
.serv-panel__desc { color: var(--muted); font-size: 1.05rem; max-width: 46ch; }

/* =================================================================
   PROYECTOS / mod-proyectos  (wall typography + floating scatter)
   ================================================================= */
.mod-proyectos {
  position: relative; overflow: hidden;
  padding: var(--space-5xl) var(--pad-x);
}
/* ---- Wall: tiled brand typography background ---- */
.mod-proyectos__wall {
  position: absolute; inset: -8% 0; z-index: 0;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 0.05em;
  pointer-events: none; user-select: none; overflow: hidden;
  will-change: transform;
}
.wall-line {
  display: flex; flex: none; white-space: nowrap;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3rem, 7vw, 7rem); line-height: 1.08; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.055); /* gris oscuro tenue */
  will-change: transform;
}
.wall-line span { padding-right: 0.6em; }
.wall-line { animation: wallScroll 30s linear infinite; }
.wall-line--rev { animation: wallScrollRev 36s linear infinite; }
@keyframes wallScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes wallScrollRev { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---- Head ---- */
.mod-proyectos__head { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto var(--space-2xl); }
.mod-proyectos__head h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.5rem, 9vw, 7rem); line-height: 0.9;
}
.mod-proyectos__intro { margin-top: 1.5rem; max-width: 46ch; color: var(--muted); font-size: 1.05rem; }

/* ---- Floating scatter ---- */
.mod-proyectos__scatter {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2.5vw, 2.5rem);
  max-width: var(--maxw); margin: 0 auto;
  align-items: start;
}
.proj { position: relative; display: block; will-change: transform; }
.proj__media { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; }
.proj__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.6s;
  filter: grayscale(0.35) brightness(0.88);
}
.proj:hover .proj__media img { transform: scale(1.06); filter: grayscale(0) brightness(1); }
/* open, diagrammatic placement + staggered vertical offsets */
.proj--f1 { grid-column: 1 / 6; }
.proj--f2 { grid-column: 7 / 13; margin-top: 16vh; }
.proj--f2 .proj__media { aspect-ratio: 3 / 4; }
.proj--f3 { grid-column: 2 / 8; margin-top: 6vh; }
.proj--f3 .proj__media { aspect-ratio: 16 / 10; }
.proj--f4 { grid-column: 9 / 13; margin-top: -4vh; }
.proj--f4 .proj__media { aspect-ratio: 1 / 1; }
.proj--f5 { grid-column: 3 / 8; margin-top: 4vh; }
.proj--f5 .proj__media { aspect-ratio: 5 / 4; }
.proj__meta {
  position: absolute; left: 0; bottom: 0; width: 100%;
  padding: 1.5rem; display: flex; flex-direction: column; gap: 0.2rem;
  background: linear-gradient(to top, rgba(10,10,10,0.85), transparent);
  transform: translateY(0.5rem); opacity: 0; transition: 0.5s var(--ease);
}
.proj:hover .proj__meta { transform: translateY(0); opacity: 1; }
.proj__meta h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; }
.proj__meta span { font-size: 0.8rem; letter-spacing: 0.1em; color: var(--accent); text-transform: uppercase; }

/* =================================================================
   NOSOTROS
   ================================================================= */
.mod-nosotros { padding: var(--space-5xl) var(--pad-x); }
.mod-nosotros__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-xl); align-items: end;
}
.mod-nosotros h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 5rem); line-height: 0.98;
}
.mod-nosotros__body p { color: var(--muted); font-size: 1.1rem; max-width: 40ch; }
.mod-nosotros__compromiso { margin-top: var(--space-lg); display: grid; gap: 0.7rem; }
.mod-nosotros__compromiso li {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 1.05rem; letter-spacing: 0.01em;
}
.mod-nosotros__compromiso li::before {
  content: "✔"; color: var(--accent); font-size: 0.9rem;
  width: 1.4em; height: 1.4em; display: grid; place-content: center;
  border: 1px solid var(--accent); border-radius: 50%; flex: none;
}

/* =================================================================
   CLIENTES / mod-clientes--carrusel
   ================================================================= */
.mod-clientes { padding: var(--space-2xl) 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.mod-clientes .swiper-slide { width: auto; }
.client-logo {
  font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--gray); letter-spacing: 0.05em; padding: 0 2.5rem;
  transition: color 0.3s;
}
.client-logo:hover { color: var(--white); }

/* =================================================================
   CONTACTO
   ================================================================= */
.mod-contacto {
  padding: var(--space-5xl) var(--pad-x);
  max-width: var(--maxw); margin: 0 auto;
}
.mod-cta__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.5rem, 9vw, 7rem); line-height: 0.92; margin-bottom: var(--space-xl);
}
.mod-cta__title .line { display: block; overflow: hidden; }
.mod-cta__title .line--accent { color: var(--accent); }

.mod-contacto__grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-xl); align-items: start;
}

/* Form */
.form { display: grid; gap: 1.4rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.form label {
  display: grid; gap: 0.5rem;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.form input, .form select, .form textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--white);
  background: transparent; border: none; border-bottom: 1px solid var(--hairline);
  padding: 0.7rem 0; letter-spacing: normal; text-transform: none;
  transition: border-color 0.3s;
}
.form select option { background: var(--surface); color: var(--white); }
.form textarea { resize: vertical; }
.form input::placeholder, .form textarea::placeholder { color: #6b6b6b; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form__note { font-size: 0.72rem; letter-spacing: 0.02em; text-transform: none; color: #6b6b6b; }

.btn-primary {
  justify-self: start; margin-top: 0.5rem;
  font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.04em;
  background: var(--accent); color: var(--black);
  padding: 0.9rem 2.2rem; border-radius: 2px;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.btn-primary:hover { transform: translateY(-3px); background: var(--white); }

/* Aside / canales directos */
.mod-contacto__aside { display: grid; gap: 1.5rem; align-content: start; }
.btn-wa {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-display); font-size: 1.05rem;
  background: #25d366; color: #04210f; padding: 0.9rem 1.6rem; border-radius: 2px;
  width: fit-content; transition: transform 0.3s var(--ease);
}
.btn-wa:hover { transform: translateY(-3px); }
.btn-wa svg { width: 22px; height: 22px; }
.contacto-mail {
  font-size: clamp(1.1rem, 2vw, 1.5rem); width: fit-content;
  border-bottom: 2px solid var(--accent); padding-bottom: 0.2rem; transition: color 0.3s;
}
.contacto-mail:hover { color: var(--accent); }
.mod-contacto__social { display: flex; flex-wrap: wrap; gap: 1.2rem; color: var(--muted); font-size: 0.9rem; letter-spacing: 0.05em; }
.mod-contacto__social a:hover { color: var(--white); }

/* =================================================================
   FOOTER (reveal: el contenido sube y descubre el bloque)
   ================================================================= */
/* main es opaco y se sitúa por encima del footer fijo */
.main { position: relative; z-index: 1; background: var(--bg); }

.footer {
  position: relative; z-index: 0;
  background: var(--surface);
  padding: var(--space-2xl) var(--pad-x) var(--space-lg);
  overflow: hidden;
}
/* Desktop: footer fijo a pantalla completa; main deja 100vh para revelarlo */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .main { margin-bottom: 100vh; }
  .footer {
    position: fixed; left: 0; right: 0; bottom: 0;
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding-top: var(--space-xl); padding-bottom: var(--space-xl);
  }
  .footer__big { margin-bottom: var(--space-lg); }
}
.footer__big {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(4rem, 22vw, 20rem); line-height: 0.8;
  color: transparent; -webkit-text-stroke: 1px var(--hairline);
  text-align: center; pointer-events: none; user-select: none;
  margin-bottom: var(--space-xl);
}
.footer__big em { color: transparent; -webkit-text-stroke: 1px var(--accent); font-style: normal; }
.footer__cols {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem;
  max-width: var(--maxw); margin: 0 auto;
}
.footer__label { font-family: var(--font-display); font-size: 1.2rem; }
.footer__cols p { color: var(--muted); }
.footer__links { display: flex; flex-direction: column; gap: 0.4rem; }
.footer__links a:hover { color: var(--accent); }
.footer__legal { display: flex; flex-direction: column; gap: 0.4rem; color: var(--muted); font-size: 0.85rem; text-align: right; }

/* =================================================================
   REVEAL ANIMATION BASE (JS adds .is-in)
   ================================================================= */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
.word, .char { will-change: transform, opacity; }

/* ---------- Masked line reveals (SplitText) ---------- */
.reveal-lines .split-line { overflow: hidden; }
.reveal-lines .split-line > div { will-change: transform; }

/* ---------- Diagonal clip-path wipe (RPA-style) ---------- */
.clip-reveal { clip-path: polygon(60% 0, 60% 0, 40% 100%, 40% 100%); }
.js-ready .clip-reveal { will-change: clip-path; }
/* No-JS / reduced-motion fallback: show fully */
.no-js .clip-reveal, .reduce-motion .clip-reveal { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 10000;
  pointer-events: none; mix-blend-mode: difference;
  will-change: transform;
}
.cursor::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.35s var(--ease), background-color 0.3s;
}
.cursor.is-hover::before { transform: translate(-50%, -50%) scale(3); }
.cursor.is-video::before { transform: translate(-50%, -50%) scale(6); }
body.has-cursor, body.has-cursor a, body.has-cursor button,
body.has-cursor .expand-cursor, body.has-cursor input,
body.has-cursor select, body.has-cursor textarea, body.has-cursor label { cursor: none; }
@media (pointer: coarse) { .cursor { display: none; } }

/* =================================================================
   RESPONSIVE
   ================================================================= */
/* Servicios: modo vertical (sin pin horizontal) en móviles Y en cualquier
   dispositivo táctil (iPad incluido, en cualquier orientación/ancho).
   Coincide con la detección de táctil del JS, que también desactiva el pin. */
@media (max-width: 900px), (pointer: coarse) {
  .serv-pin { height: auto; overflow: visible; padding: var(--space-2xl) 0; }
  .serv-head { position: static; padding: 0 var(--pad-x); margin-bottom: var(--space-lg); }
  .serv-track { flex-direction: column; height: auto; transform: none !important; }
  .serv-panel {
    flex: 0 0 auto; height: auto; min-height: 60vh;
    grid-template-columns: 1fr; border-top: 1px solid var(--hairline); padding-top: var(--space-lg); padding-bottom: var(--space-lg);
  }
}

@media (max-width: 900px) {
  .mod-cabecera__media { width: 86vw; }
  .mod-proyectos__scatter { grid-template-columns: 1fr; gap: var(--space-md); }
  .proj { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .proj__media, .proj--f2 .proj__media, .proj--f3 .proj__media,
  .proj--f4 .proj__media, .proj--f5 .proj__media { aspect-ratio: 4 / 3; }
  .wall-line { font-size: 18vw; }
  .mod-nosotros__grid { grid-template-columns: 1fr; gap: var(--space-lg); align-items: start; }
  .footer__cols { flex-direction: column; }
  .footer__legal { text-align: left; }
  .mod-contacto__grid { grid-template-columns: 1fr; gap: var(--space-lg); }
}
@media (max-width: 560px) {
  .mod-video__frame { width: 100%; }
  .mod-nosotros__stats { gap: var(--space-md); }
  .header__logo span { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .mod-cabecera__eq span { animation: none; height: 30px; }
}
