/* ==========================================================================
   XPE Studio — landing page
   Design system + componentes. Ver docs/specs/02-design-system.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color — paleta de assets/img/palette.pdf */
  --c-teal:   #00bfbf;
  --c-blue:   #0055aa;
  --c-violet: #64529d;
  --c-orange: #f26730;
  --c-red:    #ef4135;

  /* Superficies */
  --bg:        #05060d;
  --bg-2:      #080b16;
  --surface:   rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border:    rgba(255, 255, 255, 0.09);
  --border-2:  rgba(255, 255, 255, 0.16);

  /* Texto */
  --text:  #e9edf7;
  --muted: #9aa4bd;
  --faint: #6b7590;

  /* Gradientes */
  --grad-accent: linear-gradient(120deg, #00bfbf 0%, #4a8fd4 45%, #7c6ad8 100%);
  --grad-warm:   linear-gradient(120deg, #f26730 0%, #ef4135 100%);
  --grad-line:   linear-gradient(120deg, rgba(0,191,191,.55), rgba(124,106,216,.45));

  /* Tipografía */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --maxw: 1200px;
  --shell-pad: 24px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Sombras */
  --shadow-1: 0 18px 40px rgba(0, 0, 0, .38);
  --shadow-2: 0 28px 70px rgba(0, 0, 0, .5);
  --glow-teal: 0 0 60px rgba(0, 191, 191, .18);

  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   2. Reset y base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  /* textura de rejilla muy sutil en todo el sitio */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
strong { color: #fff; font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--c-teal);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(0, 191, 191, .3); color: #fff; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--c-teal);
  color: #04121a;
  font-weight: 600;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(72px, 10vw, 132px);
}
.section--alt { background: linear-gradient(180deg, transparent, rgba(8, 11, 22, .9) 12%, rgba(8, 11, 22, .9) 88%, transparent); }
.section--contact { padding-block: clamp(80px, 12vw, 160px); }

.section__head {
  max-width: 68ch;
  margin: 0 auto clamp(44px, 6vw, 72px);
  text-align: center;
}
.section__title {
  font-size: clamp(1.85rem, 3.8vw, 3.05rem);
  font-weight: 700;
  margin-bottom: 18px;
}
.section__lead {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 62ch;
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-teal);
  margin: 0 0 18px;
}
.eyebrow::after {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin: 14px auto 0;
  background: var(--grad-line);
  border-radius: 2px;
}

.grid { display: grid; gap: 26px; }
.grid--products { grid-template-columns: 1fr; }
.grid--team { grid-template-columns: 1fr; gap: 30px; }

/* --------------------------------------------------------------------------
   4. Botones, chips y badges
   -------------------------------------------------------------------------- */
.btn {
  --btn-pad: 14px 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--btn-pad);
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s cubic-bezier(.22,.8,.3,1), box-shadow .25s, background-color .25s, border-color .25s, color .25s;
}
.btn--sm { --btn-pad: 11px 20px; font-size: .87rem; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--grad-accent);
  color: #04121a;
  box-shadow: 0 12px 30px rgba(0, 150, 170, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn--primary:hover { box-shadow: 0 18px 42px rgba(0, 160, 180, .38), inset 0 1px 0 rgba(255, 255, 255, .45); }

.btn--ghost {
  background: rgba(255, 255, 255, .04);
  border-color: var(--border-2);
  color: var(--text);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .28); }
.btn.is-disabled, .btn[aria-disabled="true"] {
  cursor: default;
  opacity: .55;
  pointer-events: none;
  transform: none !important;
}

.chip {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
}

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  border: 1px solid transparent;
}
.badge--available { background: rgba(0, 191, 191, .17); border-color: rgba(0, 191, 191, .42); color: #55e9e9; }
.badge--dev      { background: rgba(242, 103, 48, .18); border-color: rgba(242, 103, 48, .42); color: #ffa877; }
.badge--soon     { background: rgba(100, 82, 157, .38); border-color: rgba(150, 134, 214, .5); color: #cbc0f2; }
.badge--pipeline { background: rgba(10, 14, 28, .72); border-color: var(--border-2); color: var(--muted); }

.badge--available::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-teal);
  box-shadow: 0 0 0 0 rgba(0, 191, 191, .6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 191, 191, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(0, 191, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 191, 191, 0); }
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(5, 6, 13, .78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 118px; height: auto; opacity: .92; transition: opacity .25s; }
.brand:hover img { opacity: 1; }

.nav__list { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
  transition: color .25s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.22,.8,.3,1);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); }

.site-header__actions { display: flex; align-items: center; gap: 12px; }

.lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04);
}
.lang__btn {
  position: relative;
  z-index: 1;
  width: 40px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--faint);
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  transition: color .3s;
}
.lang__btn.is-active { color: #04121a; }
.lang__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 40px;
  height: calc(100% - 6px);
  border-radius: 999px;
  background: var(--grad-accent);
  transition: transform .38s cubic-bezier(.22,.8,.3,1);
}
.lang[data-lang="es"] .lang__thumb { transform: translateX(40px); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 20px;
  height: 1.8px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .3s, opacity .25s, top .3s;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle.is-open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 96px;
  overflow: hidden;
}
.hero__stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero__blobs { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}
.blob--teal   { width: 520px; height: 520px; top: -8%;  left: -10%; background: rgba(0, 191, 191, .30); animation: drift-a 22s ease-in-out infinite alternate; }
.blob--violet { width: 560px; height: 560px; bottom: -18%; right: -12%; background: rgba(100, 82, 157, .40); animation: drift-b 26s ease-in-out infinite alternate; }
.blob--blue   { width: 420px; height: 420px; top: 42%; left: 38%; background: rgba(0, 85, 170, .30); animation: drift-c 19s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(70px, 50px, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-60px, -40px, 0) scale(1.08); } }
@keyframes drift-c { to { transform: translate3d(45px, -60px, 0) scale(1.16); } }

.hero__spotlight {
  position: absolute;
  z-index: 0;
  width: 760px;
  height: 760px;
  left: 0;
  top: 0;
  margin: -380px 0 0 -380px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(0, 191, 191, .13) 0%, transparent 62%);
  transition: opacity .4s;
}
.hero__spotlight.is-on { opacity: 1; }

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* El logo vive directamente sobre el fondo oscuro: el wordmark "studio" se
   recolorea a claro en assets/img/logo-color-on-dark.png, así que no hace
   falta encerrarlo en una placa blanca. Detrás, un halo de color que lo
   despega del fondo. */
.hero__emblem {
  position: relative;
  width: min(500px, 80vw);
  margin-bottom: 46px;
}
.hero__emblem img { position: relative; width: 100%; height: auto; }
.hero__emblem-glow {
  position: absolute;
  inset: -16% -8%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 45%, rgba(0, 191, 191, .38) 0%, transparent 58%),
    radial-gradient(circle at 66% 58%, rgba(100, 82, 157, .34) 0%, transparent 62%),
    radial-gradient(circle at 48% 72%, rgba(242, 103, 48, .22) 0%, transparent 60%);
  filter: blur(52px);
  animation: emblem-breathe 7s ease-in-out infinite alternate;
}
@keyframes emblem-breathe { to { opacity: .66; transform: scale(1.07); } }

.hero__title {
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  font-weight: 700;
  max-width: 16ch;
  margin-bottom: 24px;
}
.hero__title strong {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.hero__subtitle {
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  margin-bottom: 38px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 62px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 30px;
  width: 100%;
  max-width: 720px;
}
.stats__item {
  flex: 1 1 160px;
  padding: 4px 22px;
  text-align: center;
  position: relative;
}
.stats__item + .stats__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  height: 76%;
  width: 1px;
  background: var(--border);
}
.stats__value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.stats__label {
  margin: 6px 0 0;
  color: var(--faint);
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero__scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: color .25s;
}
.hero__scroll:hover { color: var(--text); }
.hero__scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, transparent, var(--c-teal));
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-teal);
  animation: scroll-line 2.1s ease-in-out infinite;
}
@keyframes scroll-line {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* --------------------------------------------------------------------------
   7. Strip de tags
   -------------------------------------------------------------------------- */
.strip {
  position: relative;
  z-index: 1;
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, .015);
  overflow: hidden;
}
.strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  padding-block: 16px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: clamp(.7rem, 1.4vw, .82rem);
  font-weight: 600;
  letter-spacing: .28em;
  color: var(--faint);
  text-transform: uppercase;
}
.strip__inner i { color: rgba(0, 191, 191, .5); font-style: normal; }

/* --------------------------------------------------------------------------
   8. Productos
   -------------------------------------------------------------------------- */
.product {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.22,.8,.3,1), border-color .4s, box-shadow .4s;
}
.product:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 191, 191, .38);
  box-shadow: var(--shadow-2), 0 0 0 1px rgba(0, 191, 191, .1), var(--glow-teal);
}
.product__art {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0e1c;
  border-bottom: 1px solid var(--border);
}
.product__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.22,.8,.3,1);
}
.product:hover .product__art img { transform: scale(1.045); }

.product__body { padding: 26px 26px 6px; flex: 1; }
.product__title {
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.product__genres {
  margin: 0 0 14px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-teal);
}
.product__desc { color: var(--muted); font-size: .96rem; margin: 0; }
.product__foot { padding: 20px 26px 26px; }
.product__foot--split {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.product__foot--split .btn { flex: 1 1 auto; }

.product--more .product__art { border-bottom: 0; }
.product--more .product__body { padding-top: 30px; }

/* --------------------------------------------------------------------------
   9. Estudio
   -------------------------------------------------------------------------- */
.studio { display: grid; gap: 44px; }
.studio__copy p { color: var(--muted); font-size: 1.04rem; }
.studio__copy strong { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.studio__panel {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015));
  overflow: hidden;
  min-height: 340px;
  display: grid;
  place-items: center;
}
.panel__glow {
  position: absolute;
  inset: -55%;
  background: conic-gradient(from 200deg at 50% 50%,
    rgba(0, 191, 191, .62) 0deg,
    rgba(100, 82, 157, .55) 110deg,
    rgba(0, 85, 170, .48) 200deg,
    rgba(242, 103, 48, .34) 280deg,
    rgba(0, 191, 191, .62) 360deg);
  filter: blur(68px);
  opacity: .62;
  animation: spin 26s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.panel__content {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 30px;
}
.panel__content::before {
  content: "";
  position: absolute;
  inset: -10% -6%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, .09), transparent 68%);
}
.panel__label {
  font-family: var(--font-display);
  font-size: .74rem;
  letter-spacing: .3em;
  color: var(--muted);
}
.panel__title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 6.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .06em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.panel__caption { color: var(--faint); font-size: .88rem; letter-spacing: .06em; }

/* --------------------------------------------------------------------------
   10. Equipo
   -------------------------------------------------------------------------- */
.person {
  text-align: center;
  padding: 38px 24px 34px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .4s cubic-bezier(.22,.8,.3,1), border-color .4s, background-color .4s;
}
.person:hover {
  transform: translateY(-5px);
  border-color: var(--border-2);
  background: var(--surface-2);
}
.person__avatar {
  width: 118px;
  height: 118px;
  margin: 0 auto 22px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}
.person__avatar img { width: 100%; height: 100%; object-fit: cover; }
.person__name { font-size: 1.3rem; font-weight: 600; margin-bottom: 6px; }
.person__role {
  margin: 0 0 14px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-teal);
}
.person__desc { color: var(--muted); font-size: .94rem; margin: 0; }

/* --------------------------------------------------------------------------
   11. Contacto
   -------------------------------------------------------------------------- */
.contact { max-width: 720px; margin: 0 auto; text-align: center; }
.contact .section__lead { margin-bottom: 38px; }
.contact__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.contact__email {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--muted);
  word-break: break-all;
}
.social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 46px;
}
.social__link {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: transform .3s, color .3s, border-color .3s, background-color .3s;
}
.social__link:hover {
  transform: translateY(-3px);
  color: var(--text);
  border-color: rgba(0, 191, 191, .45);
  background: rgba(0, 191, 191, .1);
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: rgba(4, 5, 11, .85);
  padding-block: 46px;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.site-footer__brand { display: flex; align-items: center; gap: 16px; }
.site-footer__brand img { width: 96px; height: auto; opacity: .75; }
.site-footer__brand p { margin: 0; color: var(--faint); font-size: .86rem; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer__nav a { color: var(--muted); font-size: .9rem; transition: color .25s; }
.site-footer__nav a:hover { color: var(--c-teal); }
.site-footer__legal {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  color: var(--faint);
  font-size: .82rem;
}
.site-footer__made {
  padding-left: 16px;
  border-left: 1px solid var(--border);
  color: var(--muted);
}
.site-footer__domain {
  padding-left: 16px;
  border-left: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--c-teal);
}

/* --------------------------------------------------------------------------
   13. Constelación de capacidades
   -------------------------------------------------------------------------- */
.caps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
  isolation: isolate;
}
.caps__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cap {
  position: relative;
  z-index: 1;
  padding: 24px 22px 26px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(7, 10, 21, .86);
  transition: transform .35s cubic-bezier(.22,.8,.3,1), border-color .35s, background-color .35s;
}
.cap:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 191, 191, .45);
  background: rgba(10, 16, 30, .92);
}
.cap__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: rgba(0, 191, 191, .09);
  color: var(--c-teal);
  transition: border-color .35s, background-color .35s;
}
.cap:hover .cap__icon { border-color: rgba(0, 191, 191, .5); background: rgba(0, 191, 191, .16); }
.cap__icon svg { width: 22px; height: 22px; }
.cap__title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.cap__desc { margin: 0; color: var(--muted); font-size: .92rem; }

/* --------------------------------------------------------------------------
   14. Cursor propio
   -------------------------------------------------------------------------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  transition: opacity .3s;
}
.cursor.is-on { opacity: 1; }
.cursor__dot {
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--c-teal);
  box-shadow: 0 0 14px rgba(0, 191, 191, .9);
}
.cursor::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 1px solid rgba(0, 191, 191, .45);
  transition: width .3s cubic-bezier(.22,.8,.3,1), height .3s cubic-bezier(.22,.8,.3,1),
              margin .3s cubic-bezier(.22,.8,.3,1), border-color .3s, opacity .3s;
}
.cursor.is-active::before {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-color: rgba(0, 191, 191, .85);
}
.cursor.is-down::before { width: 26px; height: 26px; margin: -13px 0 0 -13px; }

/* --------------------------------------------------------------------------
   15. Microinteracciones: titulares partidos y botones magnéticos
   -------------------------------------------------------------------------- */
.split .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(.42em) rotate(1.6deg);
  transition: opacity .62s cubic-bezier(.22,.8,.3,1), transform .62s cubic-bezier(.22,.8,.3,1);
}
.split.is-visible .w { opacity: 1; transform: none; }

.magnetic { transition: transform .35s cubic-bezier(.22,.8,.3,1), box-shadow .25s, background-color .25s, border-color .25s, color .25s; }

/* --------------------------------------------------------------------------
   16. Reveal on scroll
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s cubic-bezier(.22,.8,.3,1), transform .6s cubic-bezier(.22,.8,.3,1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   17. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .grid--products { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid--products { grid-template-columns: repeat(3, 1fr); }
  .grid--team { grid-template-columns: repeat(3, 1fr); }
  .studio { grid-template-columns: 1.15fr .85fr; align-items: center; }

  .product--more {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
  }
  .product--more .product__art { grid-row: 1 / 3; height: 100%; aspect-ratio: auto; min-height: 210px; }
  .product--more .product__body { padding: 30px 32px 4px; }
  .product--more .product__foot { padding: 4px 32px 30px; }
}

@media (max-width: 900px) {
  .header-cta { display: none; }
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    padding: 22px var(--shell-pad) 30px;
    background: rgba(5, 6, 13, .96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    /* visibility cambia de golpe al abrir y se retrasa al cerrar */
    transition: opacity .28s, transform .28s, visibility 0s linear .28s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity .28s, transform .28s, visibility 0s;
  }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link { display: block; padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .nav__link::after { display: none; }
}

@media (max-width: 767px) {
  :root { --shell-pad: 18px; }
  .grid--products { grid-template-columns: 1fr; }
  .grid--team { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--header-h) + 22px); padding-bottom: 86px; }
  .hero__emblem { width: min(330px, 76vw); margin-bottom: 34px; }
  .hero__emblem-glow { inset: -14% -8%; filter: blur(38px); }
  .hero__actions .btn { width: 100%; }
  .stats { flex-direction: column; gap: 22px; }
  .stats__item + .stats__item::before {
    left: 12%;
    right: 12%;
    top: -11px;
    width: auto;
    height: 1px;
  }
  .strip__inner { gap: 12px 18px; letter-spacing: .2em; }
  .site-footer__inner { flex-direction: column; text-align: center; }
  .site-footer__brand { flex-direction: column; gap: 12px; text-align: center; }
  .site-footer__legal { flex-direction: column; gap: 8px; }
  .site-footer__made { padding-left: 0; border-left: 0; }
  .site-footer__domain { padding-left: 0; border-left: 0; }
}

/* --------------------------------------------------------------------------
   18. Accesibilidad — movimiento reducido
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .split .w { opacity: 1; transform: none; }
  .hero__stars { display: none; }
  .cursor { display: none; }
  .caps__canvas { display: none; }
}
