/* =============================================================================
   La Ratonera Digital — main.css
   Sistema de diseño. Sin frameworks, sin dependencias.
   Marca: morado #7C2AF9 · lima #AAD41A · tinta #09090B · blanco.

   Estrategia de color: fondo claro dominante, y el color concentrado donde
   trabaja — tarjetas, fichas, nodos, acentos. Tres tonos de marca que rotan.
   ========================================================================== */

/* ---------- Fuentes autohospedadas ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo Black";
  src: url("../fonts/archivo-black-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* AlfaRN (tipografía corporativa de titulares).
   Suelta AlfaRN-Regular.woff2 en /assets/fonts/ y se activa sola.
   Mientras no exista, el navegador cae en Archivo Black sin romper nada. */
@font-face {
  font-family: "AlfaRN";
  src: url("../fonts/AlfaRN-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #09090b;
  --ink-soft: #26262c;
  --muted: #56565f;
  --faint: #8a8a94;
  --paper: #ffffff;
  --mist: #f6f6f9;
  --line: #e7e7ee;

  --purple: #7c2af9;
  --purple-deep: #5713bd;
  --purple-wash: #f2eaff;

  --lime: #aad41a;
  --lime-deep: #46590a;
  --lime-wash: #f0f7d8;

  --ink-wash: #ebebef;

  --wa: #1faa53;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "AlfaRN", "Archivo Black", "Inter", system-ui, sans-serif;

  --container: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-soft: 0 1px 2px rgba(9, 9, 11, 0.04), 0 10px 32px rgba(9, 9, 11, 0.07);
  --shadow-lift: 0 2px 4px rgba(9, 9, 11, 0.05), 0 20px 48px rgba(9, 9, 11, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Sistema de tonos --------------------------------------------------
   Cada tarjeta o bloque adopta un tono de marca. Rotan para dar ritmo cromático
   sin inventar colores fuera de la identidad.
   -------------------------------------------------------------------------- */
.tone-purple {
  --tone: var(--purple);
  --tone-deep: var(--purple-deep);
  --tone-wash: var(--purple-wash);
  --tone-on: #ffffff;
}
.tone-lime {
  --tone: var(--lime);
  --tone-deep: var(--lime-deep);
  --tone-wash: var(--lime-wash);
  --tone-on: var(--ink);
}
.tone-ink {
  --tone: var(--ink);
  --tone-deep: #000000;
  --tone-wash: var(--ink-wash);
  --tone-on: #ffffff;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
::selection {
  background: var(--lime);
  color: var(--ink);
}
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}
[id] {
  scroll-margin-top: 100px;
}

/* ---------- Utilidades ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- Tipografía ---------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display-xl {
  font-size: clamp(2.4rem, 6vw, 4.3rem);
}
.display-lg {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
}
.display-md {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--lime);
}
.lead {
  font-size: clamp(1.08rem, 1.7vw, 1.22rem);
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}
.mark-lime {
  background: linear-gradient(transparent 60%, rgba(170, 212, 26, 0.6) 60%);
  padding-inline: 0.1em;
}
.mark-purple {
  color: var(--purple);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 620;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn svg {
  flex: none;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 6px 20px rgba(124, 42, 249, 0.28);
}
.btn-primary:hover {
  background: var(--purple-deep);
  box-shadow: 0 8px 26px rgba(124, 42, 249, 0.4);
}
.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: var(--paper);
}
.btn-ghost:hover {
  border-color: var(--ink);
}
.btn-whatsapp {
  background: var(--wa);
  color: #fff;
  font-size: 1.06rem;
  padding: 1rem 1.9rem;
  box-shadow: 0 6px 20px rgba(31, 170, 83, 0.3);
}
.btn-whatsapp:hover {
  background: #178a43;
}
.btn-on-dark.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-on-dark.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.btn-arrow {
  transition: transform 0.2s var(--ease);
}
@media (hover: hover) {
  .btn:hover .btn-arrow {
    transform: translateX(4px);
  }
}
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 640;
  color: var(--purple);
  text-decoration: none;
}
.link-more::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}
@media (hover: hover) {
  .link-more:hover::after {
    transform: translateX(4px);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 84px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s var(--ease);
}
.brand img {
  width: auto;
  height: 48px;
}
@media (hover: hover) {
  .brand:hover {
    transform: translateX(3px);
  }
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.main-nav a {
  text-decoration: none;
  font-weight: 560;
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease);
}
.main-nav a:hover {
  color: var(--purple);
}
.main-nav a[aria-current="page"] {
  color: var(--purple);
  border-bottom-color: var(--lime);
}
.nav-cta {
  margin-left: 0.4rem;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.84rem;
  font-weight: 640;
  color: var(--faint);
}
.lang-switch a {
  text-decoration: none;
  color: var(--faint);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}
.lang-switch a:hover {
  color: var(--purple);
  background: var(--purple-wash);
}
.lang-switch [aria-current="true"] {
  color: var(--ink);
  background: var(--mist);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg {
  width: 26px;
  height: 26px;
}
.nav-toggle .icon-close {
  display: none;
}
.nav-open .nav-toggle .icon-open {
  display: none;
}
.nav-open .nav-toggle .icon-close {
  display: block;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: inline-flex;
  }
  .main-nav {
    position: fixed;
    inset: 84px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem var(--gutter) 1.4rem;
    box-shadow: var(--shadow-soft);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease),
      visibility 0.25s;
  }
  .nav-open .main-nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav a {
    padding: 0.9rem 0.25rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .main-nav a[aria-current="page"] {
    border-bottom-color: var(--line);
  }
  .nav-cta {
    margin: 1rem 0 0;
    justify-content: center;
  }
  .main-nav .lang-switch {
    margin-top: 1rem;
    justify-content: center;
  }
}

/* ---------- Secciones ---------- */
.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.section-mist {
  background: var(--mist);
}
.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.2rem, 5vw, 3.4rem);
}
.section-head h2 {
  margin-top: 0.9rem;
}
.section-head .lead {
  margin-top: 1rem;
}
/* Cabecera centrada: rompe la columna izquierda constante */
.section-head-center {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}
.section-head-center .eyebrow {
  justify-content: center;
}
.section-head-center .lead {
  margin-inline: auto;
  max-width: 56ch;
}
/* Cabecera partida: título izquierda, entradilla derecha */
.section-head-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.2rem, 4vw, 3.5rem);
  align-items: end;
  max-width: none;
}
.section-head-split .lead {
  margin-top: 0;
  padding-bottom: 0.4rem;
}
@media (max-width: 820px) {
  .section-head-split {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .section-head-split .lead {
    margin-top: 1rem;
  }
}

/* ---------- Hero: la madriguera ---------------------------------------------
   Un campo de puntos que reacciona. En escritorio sigue el cursor; en móvil
   late solo y responde al tacto. Lienzo <canvas>, dibujado en main.js. El texto
   va siempre por delante y es lo primero que se lee. Si no hay JS o el usuario
   pide menos movimiento, queda un hero limpio con su degradado: nunca un hueco.
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: clamp(460px, 72vh, 620px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(115% 90% at 88% 6%, rgba(124, 42, 249, 0.1), transparent 60%),
    radial-gradient(85% 75% at 0% 100%, rgba(170, 212, 26, 0.2), transparent 58%);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(2.5rem, 6vw, 4rem);
  max-width: 760px;
}
.hero-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 1.2rem 0 1.4rem;
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  font-weight: 560;
  color: var(--muted);
}
.hero-questions span {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.6s var(--ease) forwards;
}
.hero-questions span:nth-child(1) { animation-delay: 0.05s; }
.hero-questions span:nth-child(2) { animation-delay: 0.15s; }
.hero-questions span:nth-child(3) { animation-delay: 0.25s; }
.hero-questions span:nth-child(4) { animation-delay: 0.35s; }
.hero-questions span:nth-child(5) { animation-delay: 0.45s; }
.hero-questions span:nth-child(6) { animation-delay: 0.55s; }
.hero-questions .q-mark {
  color: var(--purple);
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  max-width: 15ch;
  position: relative;
  text-wrap: balance;
}
/* La palabra clave del claim, resaltada con el bloque lima */
.hero h1 .pop {
  position: relative;
  background-image: linear-gradient(var(--lime), var(--lime));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 0% 0.32em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: swipe 0.7s var(--ease) 0.7s forwards;
}
@keyframes swipe { to { background-size: 100% 0.32em; } }
.hero .lead {
  max-width: 540px;
  margin-top: 1.8rem;
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-canvas { display: none; }
}
/* En móvil / pantallas táctiles no hay efecto: hero limpio y quieto. */
@media (pointer: coarse), (max-width: 700px) {
  .hero-canvas { display: none; }
}

/* ---------- Franja de convicción: una conversación de verdad -----------------
   El mensaje es "escuchamos". Enseñarlo funciona mejor que decirlo: una
   conversación real, con las preguntas que hacemos antes de vender nada.
   -------------------------------------------------------------------------- */
.band {
  background: var(--purple);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.band::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -40%;
  width: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.band-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.band-claim {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  line-height: 1.16;
  text-wrap: balance;
}
.band-claim .mark-lime {
  background: linear-gradient(transparent 58%, rgba(170, 212, 26, 0.85) 58%);
  color: #fff;
}
.band-sub {
  margin-top: 1.2rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 38ch;
}

/* La conversación */
.chat {
  display: grid;
  gap: 0.7rem;
}
.bubble {
  position: relative;
  max-width: 82%;
  padding: 0.85rem 1.15rem;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.5;
  border-radius: 20px;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
}
.js .reveal.in .bubble,
.no-js .bubble {
  animation: pop 0.5s var(--ease) forwards;
}
.js .reveal.in .bubble:nth-child(1) { animation-delay: 0.05s; }
.js .reveal.in .bubble:nth-child(2) { animation-delay: 0.45s; }
.js .reveal.in .bubble:nth-child(3) { animation-delay: 0.9s; }
.js .reveal.in .bubble:nth-child(4) { animation-delay: 1.35s; }
@keyframes pop {
  to {
    opacity: 1;
    transform: none;
  }
}
/* Lo que dice el cliente */
.bubble-them {
  justify-self: start;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-bottom-left-radius: 6px;
  backdrop-filter: blur(4px);
}
/* Lo que contestamos nosotros */
.bubble-us {
  justify-self: end;
  background: var(--lime);
  color: var(--ink);
  font-weight: 560;
  border-bottom-right-radius: 6px;
}
.bubble-who {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.65;
}
.bubble-us .bubble-who {
  color: var(--lime-deep);
  opacity: 1;
}
@media (max-width: 900px) {
  .band-grid {
    grid-template-columns: 1fr;
  }
  .bubble {
    max-width: 88%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bubble {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Servicios: rejilla bento con color ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}
.bento-card {
  grid-column: span 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--tone-wash);
  border-radius: var(--radius-xl);
  padding: 1.8rem 1.7rem 1.6rem;
  text-decoration: none;
  isolation: isolate;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.bento-card::before {
  content: "";
  position: absolute;
  right: -30%;
  bottom: -60%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--tone);
  opacity: 0.1;
  z-index: -1;
  transition: transform 0.5s var(--ease), opacity 0.3s var(--ease);
}
.bento-card.is-wide {
  grid-column: span 3;
}
.bento-card h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  color: var(--ink);
}
.bento-card .bento-promise {
  margin-top: 0.6rem;
  font-weight: 620;
  color: var(--tone-deep);
}
.bento-card p {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.97rem;
  flex-grow: 1;
}
.bento-go {
  align-self: flex-start;
  margin-top: 1.4rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tone);
  color: var(--tone-on);
  transition: transform 0.3s var(--ease);
}
@media (hover: hover) and (min-width: 1024px) {
  .bento-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
  }
  .bento-card:hover::before {
    transform: scale(1.35);
    opacity: 0.16;
  }
  .bento-card:hover .bento-go {
    transform: rotate(-45deg) scale(1.08);
  }
}
@media (max-width: 980px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-card,
  .bento-card.is-wide {
    grid-column: span 1;
  }
}
@media (max-width: 620px) {
  .bento {
    grid-template-columns: 1fr;
  }
}

/* ---------- Método ---------- */
.method-steps {
  --node: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 3vw, 2.2rem);
  position: relative;
}
.method-steps::before {
  content: "";
  position: absolute;
  top: calc(var(--node) / 2 - 1.5px);
  left: calc(var(--node) / 2);
  right: 12%;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--lime));
  opacity: 0.4;
}
.method-step {
  position: relative;
  min-width: 0;
  padding-top: calc(var(--node) + 1.2rem);
}
.method-step .method-num {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  background: var(--tone);
  color: var(--tone-on);
  box-shadow: 0 0 0 6px var(--mist);
}
.method-step h3 {
  font-size: 1.22rem;
}
.method-step p {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.97rem;
}
@media (max-width: 780px) {
  .method-steps {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .method-steps::before {
    top: calc(var(--node) / 2);
    bottom: 8%;
    left: calc(var(--node) / 2 - 1.5px);
    right: auto;
    width: 3px;
    height: auto;
    background: linear-gradient(180deg, var(--purple), var(--lime));
  }
  .method-step {
    padding-top: 0;
    padding-left: calc(var(--node) + 1.2rem);
    min-height: var(--node);
  }
}

/* ---------- Por qué nosotros ---------- */
.why-quote {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.18;
  text-align: center;
  max-width: 20ch;
  margin-inline: auto;
  text-wrap: balance;
}
.why-quote em {
  font-style: normal;
  color: var(--purple);
}
.why-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
}
.why-point {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--tone);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
}
.why-point strong {
  display: block;
  font-weight: 700;
  font-size: 1.06rem;
}
.why-point span {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.96rem;
}
@media (max-width: 860px) {
  .why-points {
    grid-template-columns: 1fr;
  }
}

/* ---------- Tarjetas de proyecto (home) ------------------------------------
   Sin cifras gigantes: un titular que cualquiera entiende, y qué es el proyecto.
   -------------------------------------------------------------------------- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}
.case-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}
.case-top {
  background: var(--tone);
  color: var(--tone-on);
  padding: 1.05rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.case-kind {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.case-client {
  font-size: 0.79rem;
  opacity: 0.8;
  text-align: right;
}
.case-body {
  padding: 1.5rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.case-card h3 {
  font-family: var(--font-body);
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: 0;
}
.case-card p {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.96rem;
  flex-grow: 1;
}
.case-go {
  margin-top: 1.4rem;
  font-weight: 640;
  color: var(--tone-deep);
  font-size: 0.94rem;
}
.case-go::after {
  content: " →";
}
@media (hover: hover) and (min-width: 1024px) {
  .case-card:hover {
    border-color: var(--tone);
    box-shadow: var(--shadow-lift);
    transform: translateY(-5px);
  }
}
@media (max-width: 920px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Página de proyectos ---------- */
.cat-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  margin-bottom: 0.2rem;
}
.cat-head-first {
  margin-top: 0;
}
.cat-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  color: var(--tone-deep);
  white-space: nowrap;
}
.cat-dot {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--tone);
}
.cat-rule {
  flex-grow: 1;
  height: 2px;
  background: var(--tone);
  opacity: 0.25;
  border-radius: 2px;
}
@media (max-width: 620px) {
  .cat-head h2 {
    white-space: normal;
  }
}

.case-full {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: center; /* la ficha, centrada respecto al texto de la izquierda */
  padding-block: clamp(2.2rem, 4.5vw, 3.2rem);
  border-top: 1px solid var(--line);
}
.case-text {
  min-width: 0;
}
.case-full h3 {
  font-size: clamp(1.28rem, 2.2vw, 1.68rem);
}
.case-tagline {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: var(--tone-wash);
  color: var(--tone-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.case-text > p {
  margin-top: 1rem;
  color: var(--muted);
  text-wrap: pretty;
}
.case-outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.6rem;
}
.case-outcome {
  min-width: 0;
  border-left: 3px solid var(--tone);
  padding-left: 0.85rem;
}
.case-outcome b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--tone-deep);
  line-height: 1.15;
}
.case-outcome span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}
.case-facts {
  min-width: 0;
  background: var(--tone-wash);
  border-radius: var(--radius-xl);
  padding: 1.6rem 1.6rem 1.4rem;
}
.case-facts h4 {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tone-deep);
  margin-bottom: 1rem;
}
.case-facts dl {
  display: grid;
  gap: 0.75rem;
}
.case-facts dt {
  font-size: 0.79rem;
  font-weight: 650;
  color: var(--muted);
}
.case-facts dd {
  margin: 0.1rem 0 0;
  font-weight: 580;
  font-size: 0.96rem;
  color: var(--ink);
}
@media (max-width: 860px) {
  .case-full {
    grid-template-columns: 1fr;
  }
  .case-outcomes {
    grid-template-columns: 1fr 1fr;
  }
}

/* Nota de honestidad */
.honesty {
  border: 2px dashed var(--purple);
  background: var(--purple-wash);
  border-radius: var(--radius-xl);
  padding: 1.8rem 1.9rem;
}
.honesty h3 {
  font-size: 1.2rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--purple-deep);
}
.honesty p {
  margin-top: 0.7rem;
  color: var(--ink-soft);
  font-size: 0.99rem;
  max-width: 72ch;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 780px;
  margin-inline: auto;
  border-top: 2px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 0.2rem;
  font-weight: 640;
  font-size: 1.07rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--purple);
  transition: transform 0.25s var(--ease);
}
.faq-item[open] summary {
  color: var(--purple);
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item summary:hover {
  color: var(--purple);
}
.faq-item .faq-body {
  padding: 0 0.2rem 1.4rem;
  color: var(--muted);
  max-width: 66ch;
}

/* ---------- CTA final ---------- */
.cta-final {
  background: var(--ink);
  color: #fff;
  border-radius: clamp(0px, 3vw, 30px);
  margin-inline: auto;
  max-width: calc(var(--container) + 2 * var(--gutter));
  overflow: hidden;
  position: relative;
}
.cta-final::before {
  content: "";
  position: absolute;
  left: -12%;
  top: -45%;
  width: 48%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 42, 249, 0.55), transparent 65%);
  pointer-events: none;
}
.cta-final-inner {
  position: relative;
  z-index: 1;
  padding: clamp(3.2rem, 7vw, 5.2rem) var(--gutter);
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}
.cta-final h2 {
  color: #fff;
}
.cta-final .lead {
  color: rgba(255, 255, 255, 0.75);
  margin-top: 1.1rem;
}
.cta-final .hero-cta {
  justify-content: center;
}
.cta-mouse {
  position: absolute;
  right: -30px;
  bottom: -20px;
  width: clamp(200px, 28vw, 340px);
  opacity: 0.12;
  pointer-events: none;
}
.cta-email {
  margin-top: 1.4rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
}
.cta-email a {
  color: var(--lime);
  text-decoration-color: rgba(170, 212, 26, 0.4);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(4rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
  padding: clamp(2.8rem, 6vw, 4rem) 0 2rem;
  font-size: 0.96rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: clamp(1.6rem, 4vw, 3rem);
}
.footer-brand img {
  height: 64px;
  width: auto;
}
.footer-brand p {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 28ch;
}
.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.9rem;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.footer-col a {
  text-decoration: none;
  color: var(--ink-soft);
}
.footer-col a:hover {
  color: var(--purple);
}
.footer-col address {
  font-style: normal;
  color: var(--muted);
  line-height: 1.75;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.88rem;
}
.footer-bottom nav {
  display: flex;
  gap: 1.2rem;
}
.footer-bottom a {
  color: var(--faint);
  text-decoration: none;
}
.footer-bottom a:hover {
  color: var(--purple);
}
@media (max-width: 880px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 540px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Página de servicios (detalle) ---------- */
.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2.4rem, 5vw, 3.4rem);
  border-top: 1px solid var(--line);
}
.service-detail:last-of-type {
  border-bottom: 1px solid var(--line);
}
.service-text {
  min-width: 0;
}
.service-detail h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  color: var(--tone-deep);
}
.service-promise {
  margin-top: 0.9rem;
  font-size: 1.1rem;
  font-weight: 640;
}
.service-text > p {
  margin-top: 0.9rem;
  color: var(--muted);
  text-wrap: pretty;
}
.service-aside {
  min-width: 0;
  display: grid;
  gap: 1rem;
}
.service-fit {
  background: var(--tone-wash);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.6rem;
}
.service-fit h3 {
  font-size: 0.76rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tone-deep);
}
.service-fit ul {
  list-style: none;
  padding: 0;
  margin-top: 0.9rem;
  display: grid;
  gap: 0.6rem;
}
.service-fit li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.96rem;
}
.service-fit li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--tone);
}
.service-example {
  border: 1px solid var(--line);
  border-left: 4px solid var(--tone);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  font-size: 0.93rem;
  color: var(--muted);
}
.service-example b {
  color: var(--tone-deep);
}
@media (max-width: 860px) {
  .service-detail {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contacto ---------- */
.contact-hero {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
}
.contact-hero .hero-cta {
  justify-content: center;
}
.contact-alt {
  margin-top: 1.5rem;
  color: var(--muted);
}
.contact-alt a {
  color: var(--purple);
  font-weight: 620;
}
.contact-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.contact-step {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--tone);
  border-radius: var(--radius-xl);
  padding: 1.7rem 1.6rem;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tone);
  color: var(--tone-on);
  font-family: var(--font-display);
  font-size: 0.85rem;
}
.contact-step h3 {
  margin-top: 0.9rem;
  font-size: 1.14rem;
}
.contact-step p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.96rem;
}
@media (max-width: 780px) {
  .contact-steps {
    grid-template-columns: 1fr;
  }
}
/* ---------- El equipo: quién te va a contestar --------------------------------
   No un dato frío de "tiempo de respuesta": la cara de quien está al otro lado.
   -------------------------------------------------------------------------- */
.team {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}
.team-card {
  min-width: 0;
  position: relative;
  overflow: hidden;
  background: var(--tone-wash);
  border-radius: var(--radius-xl);
  padding: 2rem 1.7rem 1.8rem;
  text-align: center;
  isolation: isolate;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.team-card::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -30%;
  width: 130%;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--tone);
  opacity: 0.12;
  z-index: -1;
  transition: transform 0.5s var(--ease), opacity 0.35s var(--ease);
}
.team-photo {
  width: 132px;
  height: 132px;
  margin: 0 auto 1.1rem;
  display: grid;
  place-items: end center;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(9, 9, 11, 0.1);
  overflow: hidden;
}
.team-photo img {
  width: 108px;
  height: auto;
  transition: transform 0.4s var(--ease);
}
.team-card h3 {
  font-size: 1.5rem;
}
.team-role {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: var(--tone);
  color: var(--tone-on);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.team-card p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.96rem;
  text-wrap: pretty;
}
@media (hover: hover) and (min-width: 1024px) {
  .team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lift);
  }
  .team-card:hover::before {
    transform: scale(1.15);
    opacity: 0.2;
  }
  .team-card:hover .team-photo img {
    transform: scale(1.08) translateY(-2px);
  }
}
@media (max-width: 860px) {
  .team {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
  }
}

/* ---------- Prosa legal ---------- */
.prose {
  max-width: 720px;
}
.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}
.prose h2 {
  font-size: 1.35rem;
  margin-top: 2.4rem;
  color: var(--purple-deep);
}
.prose p,
.prose ul {
  margin-top: 1rem;
  color: var(--ink-soft);
}
.prose a {
  color: var(--purple);
}
.prose .updated {
  color: var(--faint);
  font-size: 0.9rem;
  margin-top: 0.8rem;
}

/* ---------- 404 ---------- */
.page-404 {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 1rem;
  padding-block: 4rem;
}
.page-404 img {
  width: 200px;
  margin-inline: auto;
}

/* ---------- Reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal,
  .hero-questions span {
    opacity: 1;
    transform: none;
  }
  .js .hilo path {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
}

/* ---------- Impresión ---------- */
@media print {
  .site-header,
  .site-footer,
  .cta-final,
  .nav-toggle {
    display: none;
  }
}

/* Heros de páginas internas (servicios, proyectos): el recorrido, más contenido. */

/* Heros de páginas internas: más contenidos, sin el campo de puntos. */
.hero-simple {
  min-height: 0;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
  display: block;
}
.hero-simple .hero-inner { max-width: 720px; }
