/* ============================================================
   TOKENS — Sistema de diseño (no modificar).
   ============================================================ */
:root {
  --card: #fdfdfd;
  --ring: #000000;
  --input: #ebebeb;
  --muted: #f5f5f5;
  --accent: #e2ebff;
  --border: #e7e7ee;
  --radius: 1.4rem;
  --chart-1: #4ac885;
  --chart-2: #7033ff;
  --chart-3: #fd822b;
  --chart-4: #3276e4;
  --chart-5: #747474;
  --popover: #fcfcfc;
  --primary: #7033ff;
  --sidebar: #f5f8fb;
  --spacing: 0.27rem;
  --font-mono: IBM Plex Mono, monospace;
  --font-sans: Plus Jakarta Sans, sans-serif;
  --secondary: #edf0f4;
  --background: #fdfdfd;
  --font-serif: Lora, serif;
  --foreground: #000000;
  --destructive: #e54b4f;
  --shadow-blur: 3px;
  --shadow-color: hsl(0 0% 0%);
  --sidebar-ring: #000000;
  --shadow-spread: 0px;
  --letter-spacing: -0.025em;
  --shadow-opacity: 0.16;
  --sidebar-accent: #ebebeb;
  --sidebar-border: #ebebeb;
  --card-foreground: #000000;
  --shadow-offset-x: 0px;
  --shadow-offset-y: 2px;
  --sidebar-primary: #000000;
  --muted-foreground: #525252;
  --accent-foreground: #1e69dc;
  --popover-foreground: #000000;
  --primary-foreground: #ffffff;
  --sidebar-foreground: #000000;
  --secondary-foreground: #080808;
  --destructive-foreground: #ffffff;
  --sidebar-accent-foreground: #000000;
  --sidebar-primary-foreground: #ffffff;
}

.dark {
  --card: #222327;
  --ring: #8c5cff;
  --input: #33353a;
  --muted: #2a2c33;
  --accent: #1e293b;
  --border: #33353a;
  --radius: 1.4rem;
  --chart-1: #4ade80;
  --chart-2: #8c5cff;
  --chart-3: #fca5a5;
  --chart-4: #5993f4;
  --chart-5: #a0a0a0;
  --popover: #222327;
  --primary: #8c5cff;
  --sidebar: #161618;
  --spacing: 0.27rem;
  --font-mono: IBM Plex Mono, monospace;
  --font-sans: Plus Jakarta Sans, sans-serif;
  --secondary: #2a2c33;
  --background: #1a1b1e;
  --font-serif: Lora, serif;
  --foreground: #f0f0f0;
  --destructive: #f87171;
  --shadow-blur: 3px;
  --shadow-color: hsl(0 0% 0%);
  --sidebar-ring: #8c5cff;
  --shadow-spread: 0px;
  --letter-spacing: -0.025em;
  --shadow-opacity: 0.16;
  --sidebar-accent: #2a2c33;
  --sidebar-border: #33353a;
  --card-foreground: #f0f0f0;
  --shadow-offset-x: 0px;
  --shadow-offset-y: 2px;
  --sidebar-primary: #8c5cff;
  --muted-foreground: #a0a0a0;
  --accent-foreground: #79c0ff;
  --popover-foreground: #f0f0f0;
  --primary-foreground: #ffffff;
  --sidebar-foreground: #f0f0f0;
  --secondary-foreground: #f0f0f0;
  --destructive-foreground: #ffffff;
  --sidebar-accent-foreground: #8c5cff;
  --sidebar-primary-foreground: #ffffff;
}

/* ============================================================
   RESET + BASE
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  /* Fondo off-white de marca */
  --bg-hero: #FAF7FF;
  --ink: #0a0a0a;                 /* texto casi negro */
  --plum: var(--primary);        /* plum de marca */
  --lavender: #C4B5FD;           /* acento lavanda */

  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-hero);
  line-height: 1.5;
  letter-spacing: var(--letter-spacing);
  overflow-x: hidden;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Foco visible accesible en todos los interactivos */
:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================
   HERO (contenedor a pantalla completa)
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 2.4vw, 2.2rem) clamp(1.25rem, 5vw, 4.5rem);
  overflow-x: clip;
}

/* Halo lavanda muy sutil en la esquina superior derecha */
.hero::before {
  content: "";
  position: absolute;
  top: -22%;
  right: -12%;
  width: 55vw;
  height: 55vw;
  max-width: 820px;
  max-height: 820px;
  background: radial-gradient(circle at center, rgba(196, 181, 253, 0.42), rgba(196, 181, 253, 0) 68%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   CAPAS DE FONDO (profundidad, de atrás a delante)
   ============================================================ */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Malla de puntos casi imperceptible, desvanecida hacia los bordes */
.bg-grid {
  position: absolute;
  inset: -2px;
  background-image: radial-gradient(rgba(10, 10, 10, 0.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 58% 42%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 68% at 58% 42%, #000 50%, transparent 100%);
}

/* Orbes orgánicos borrosos flotando muy leve */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  will-change: transform;
}
.bg-orb--1 {
  width: 440px; height: 440px; top: -90px; right: 6%;
  background: radial-gradient(circle at 32% 32%, rgba(196, 181, 253, 0.55), transparent 70%);
  animation: orbFloat1 19s ease-in-out infinite;
}
.bg-orb--2 {
  width: 340px; height: 340px; bottom: 8%; left: -70px;
  background: radial-gradient(circle at 40% 40%, rgba(109, 40, 217, 0.20), transparent 70%);
  animation: orbFloat2 23s ease-in-out infinite;
}
.bg-orb--3 {
  width: 260px; height: 260px; top: 42%; left: 40%;
  background: radial-gradient(circle at 50% 50%, rgba(196, 181, 253, 0.30), transparent 70%);
  animation: orbFloat3 27s ease-in-out infinite;
}
@keyframes orbFloat1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-26px, 22px); } }
@keyframes orbFloat2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(28px, -20px); } }
@keyframes orbFloat3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-18px, -24px); } }

/* Spotlight plum/lavanda que sigue al cursor */
.bg-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(109, 40, 217, 0.10), rgba(196, 181, 253, 0.07) 40%, transparent 70%);
  transform: translate3d(var(--sx, 50vw), var(--sy, 40vh), 0) translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}
body.pointer-active .bg-spotlight { opacity: 1; }

/* Grano de película muy fino sobre todo el hero */
.bg-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.22;
  mix-blend-mode: multiply;
}

/* ============================================================
   MARCA DE AGUA TIPOGRÁFICA GIGANTE (JEG)
   Misma fuente que el titular (Plus Jakarta Sans 800), en outline.
   Ocupa el alto de la mitad derecha; la J arranca cerca del nav y
   la G se recorta por el borde derecho. La foto va delante (z-index mayor).
   ============================================================ */
.hero__type {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;           /* recorta J (arriba) y G (derecha) contra el hero */
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;  /* ancla el grupo a la derecha para recortar la G */
  padding-right: clamp(0rem, 1vw, 1.5rem);
}

.hero__type-word {
  display: flex;
  align-items: center;
  /* desplaza el grupo para que la E quede tras la cabeza y la G salga por el borde */
  transform: translate(calc(5% + var(--px, 0px)), calc(-2% + var(--py, 0px)));
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: min(90vh, 47vw);
  line-height: 0.82;
  letter-spacing: -0.05em;
  white-space: nowrap;
  will-change: transform;
}

.hero__type-word i {
  font-style: normal;
  color: transparent;
  /* E central (tras la cara): trazo muy tenue para no competir con el rostro */
  -webkit-text-stroke: 1.3px rgba(109, 40, 217, 0.11);
}

/* J y G (zonas que no tocan la cara): trazo un pelín más visible */
.hero__type-word i:first-child,
.hero__type-word i:last-child {
  -webkit-text-stroke-color: rgba(109, 40, 217, 0.2);
}

/* Etiqueta editorial discreta (coordenadas de Barcelona) que ocupa el aire superior derecho */
.hero__coords {
  position: absolute;
  top: clamp(4.6rem, 12vh, 7rem);
  right: clamp(1.25rem, 5vw, 4.5rem);
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--muted-foreground);
  opacity: 0.7;
  pointer-events: none;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  justify-self: start;
}

.brand__logo {
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.6rem;
  color: var(--primary-foreground);
  background: var(--ink);
  border-radius: 0.7rem;
  line-height: 1;
}

.brand__name {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  gap: clamp(1.1rem, 2.2vw, 2.2rem);
  justify-self: center;
}

.nav__link {
  position: relative;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted-foreground);
  padding: 0.35rem 0;
  transition: color 0.25s ease;
}

.nav__link.is-active { color: var(--ink); }

/* Subrayado animado premium */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s cubic-bezier(0.16, 0.84, 0.44, 1);
}

.nav__link:hover { color: var(--ink); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.nav__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  justify-self: end;
}

/* Chips genéricos */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  background: rgba(253, 253, 253, 0.7);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  white-space: nowrap;
}

.chip--place { color: var(--ink); }

.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chart-1);
  box-shadow: 0 0 0 0 rgba(74, 200, 133, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 200, 133, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(74, 200, 133, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 200, 133, 0); }
}

.clock {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 5.6ch;
  text-align: right;
}

/* ============================================================
   CUERPO DEL HERO
   ============================================================ */
.hero__inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 3rem);
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  flex: 1 1 auto;
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: clamp(1rem, 2vw, 1.6rem);
}

.eyebrow__mark {
  width: 26px;
  height: 1.5px;
  background: var(--plum);
}

/* Titular gigante */
.headline {
  font-weight: 800;
  /* Escala editorial acotada por alto de viewport para no romper el above-the-fold */
  font-size: clamp(2.6rem, min(7.4vw, 10.2vh), 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: clamp(1.2rem, 2.2vw, 1.9rem);
}

/* Palabra destacada — detalle editorial en Lora itálica plum */
.headline em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--plum);
  letter-spacing: -0.015em;
}

/* Subtítulo */
.subtitle {
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted-foreground);
  max-width: 33ch;
  letter-spacing: -0.01em;
  margin-bottom: clamp(1.8rem, 3vw, 2.6rem);
}

/* ---------- CTAs ---------- */
.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.28s ease, background-color 0.28s ease,
              border-color 0.28s ease, color 0.28s ease;
}

.btn--primary {
  background: var(--ink);
  color: var(--primary-foreground);
  box-shadow: 0 10px 28px -12px rgba(10, 10, 10, 0.45);
}

.btn--primary:hover {
  background: #1c1c22;
  box-shadow: 0 18px 40px -14px rgba(10, 10, 10, 0.55);
}

.btn__icon { transition: transform 0.28s cubic-bezier(0.16, 0.84, 0.44, 1); }
.btn--primary:hover .btn__icon { transform: translateX(4px); }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn--secondary:hover {
  border-color: var(--ink);
  background: rgba(112, 51, 255, 0.05);
}

/* ---------- Stack / skills ---------- */
.skills {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.skills__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.skills__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip--skill {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted-foreground);
  padding: 0.35rem 0.75rem;
  background: transparent;
  border-color: var(--border);
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.chip--skill:hover {
  color: var(--plum);
  border-color: var(--lavender);
  background: rgba(196, 181, 253, 0.14);
}

/* ============================================================
   RETRATO
   ============================================================ */
.portrait {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: min(42vw, 560px);
  align-self: flex-end;
  margin-left: clamp(-6rem, -4vw, -2rem); /* interlock sutil con el titular */
  /* Ancla el borde inferior del recorte EXACTAMENTE en la línea del ticker:
     cancela el padding inferior de .hero__inner (el retrato se apoya en la línea). */
  margin-bottom: clamp(-2.5rem, -3vw, -1.5rem);
  /* "Falsa pared": recorta SOLO el borde inferior (los lados y la parte superior
     quedan libres, con cabeza y sombras visibles). La foto queda cortada limpiamente
     en la línea y el ticker (z-index mayor) pasa por delante. */
  clip-path: inset(-100vh -100vw 0 -100vw);
}

/* Aura de luz plum→lavanda, concentrada tras la cabeza para separar
   el jersey negro del fondo en la esquina inferior derecha */
.portrait__aura {
  position: absolute;
  left: 50%;
  top: 34%;
  width: 86%;
  height: 86%;
  transform: translate(calc(-50% + var(--px, 0px)), calc(-50% + var(--py, 0px)));
  background: radial-gradient(circle at 52% 48%, rgba(109, 40, 217, 0.36), rgba(196, 181, 253, 0.16) 40%, transparent 60%);
  filter: blur(30px);
  z-index: 1;
  will-change: transform;
}

/* Resplandor lavanda tras el retrato (base al suelo) */
.portrait__glow {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  width: 84%;
  height: 78%;
  background: radial-gradient(ellipse at center, rgba(196, 181, 253, 0.5), rgba(196, 181, 253, 0) 70%);
  filter: blur(10px);
  z-index: 1;
}

.portrait__img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  /* Sangrado inferior: la base de la imagen rebasa la línea de recorte, de modo que
     el parallax vertical nunca despega la base ni deja un hueco sobre el ticker. */
  margin-bottom: -1.6rem;
  filter: drop-shadow(0 30px 45px rgba(10, 10, 10, 0.18));
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--px, 0px), var(--py, 0px), 0);
  /* Pivota en la base: la foto se inclina/mueve quedando siempre "de pie" sobre la línea. */
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
  will-change: transform;
}

/* ============================================================
   TICKER INFERIOR (marquee en bucle infinito)
   ============================================================ */
.ticker {
  position: relative;
  z-index: 4;
  margin-top: auto;
  padding-top: clamp(1rem, 2vw, 1.6rem);
  border-top: 1px solid var(--border);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: tickerScroll 34s linear infinite;
}

.ticker:hover .ticker__track { animation-play-state: paused; }

.ticker__group {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  padding-right: clamp(1.4rem, 3vw, 2.6rem);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.ticker__dot { color: var(--plum); font-size: 0.7rem; }

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   ANIMACIONES DE ENTRADA
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.16, 0.84, 0.44, 1),
              transform 0.9s cubic-bezier(0.16, 0.84, 0.44, 1);
  transition-delay: calc(var(--rev, 0) * 90ms);
}

.portrait[data-reveal] { transform: translateY(34px) scale(0.985); }

body.is-ready [data-reveal] {
  opacity: 1;
  transform: none;
}

/* Failsafe: garantiza visibilidad aunque el motor de animación esté pausado */
body.reveal-done [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet / desktop pequeño: reducimos el retrato */
@media (max-width: 1080px) {
  .portrait { width: min(40vw, 440px); margin-left: -2rem; }
  .hero__content { max-width: 560px; }
}

/* Móvil / tablet vertical: apilamos, el titular sigue imponiendo */
@media (max-width: 820px) {
  .hero { padding-bottom: 0; }

  /* Nav compacta: ocultamos enlaces centrales, mantenemos marca + reloj */
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }

  .hero__inner {
    flex-direction: column;
    align-items: flex-start;
    /* Reparte el espacio: contenido arriba y retrato abajo, apoyado en el ticker */
    justify-content: space-between;
    gap: 0;
    padding-top: clamp(2rem, 8vw, 3.5rem);
    padding-bottom: 0;
  }

  .hero__content {
    max-width: 100%;
    order: 1;
  }

  .headline { font-size: clamp(2.9rem, 12.5vw, 5rem); }
  .subtitle { max-width: 40ch; }

  .portrait {
    order: 2;
    align-self: center;
    width: min(78vw, 380px);
    margin: clamp(1.5rem, 5vw, 2.5rem) 0 0;
  }

  .hero__type-word { font-size: min(52vh, 92vw); transform: translate(calc(4% + var(--px, 0px)), var(--py, 0px)); }
  .hero__coords { display: none; }
}

@media (max-width: 480px) {
  .ctas { width: 100%; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .nav__meta { gap: 0.5rem; }
  .chip--place { padding: 0.35rem 0.65rem; }
}

/* Respeto por reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ════════════════════════════════════════════════════════════
   ABOUT · "Sobre mí" — Capítulo 02
   Mismo ADN que el hero (tokens, fuentes, nav, ticker, fondo),
   con carácter propio: dashboard editorial vivo.
   Todo lo de abajo es ADITIVO: no altera el hero.
   ════════════════════════════════════════════════════════════ */

/* ---------- Contenedor de página ---------- */
.about {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 2.4vw, 2.2rem) clamp(1.25rem, 5vw, 4.5rem);
  overflow-x: clip;
}

/* Halo lavanda esquina superior derecha (idéntico al hero, coherencia) */
.about::before {
  content: "";
  position: absolute;
  top: -22%;
  right: -12%;
  width: 55vw;
  height: 55vw;
  max-width: 820px;
  max-height: 820px;
  background: radial-gradient(circle at center, rgba(196, 181, 253, 0.42), rgba(196, 181, 253, 0) 68%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

/* Fondo fijo al viewport: las capas del hero acompañan al scroll sin repintar de más.
   Reutiliza .bg-grid / .bg-orb / .bg-spotlight / .bg-noise del hero. */
.about__bg {
  position: absolute;   /* contenido dentro de la sección (antes fixed) para scroll continuo */
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ---------- Main ---------- */
.about__main {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.2rem) 0 clamp(2rem, 4vw, 3rem);
}

/* ============================================================
   MASTHEAD editorial partido (escala tipo HAUS, mi paleta)
   ============================================================ */
.masthead {
  margin-bottom: clamp(2.2rem, 5vw, 4rem);
}

.masthead__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: clamp(0.8rem, 2vw, 1.4rem);
}

/* Titular gigante: ELIAS a la izquierda, GOMEZ a la derecha, ® al centro */
.masthead__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 clamp(0.5rem, 2vw, 1.5rem);
  font-weight: 800;
  font-size: clamp(3.4rem, 15.5vw, 13rem);
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

/* Cada palabra vive dentro de un recorte para el "wow": se revela con máscara */
.mh-line {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.06em; /* aire para descendentes al recortar */
}

.mh-word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.05s cubic-bezier(0.16, 0.84, 0.44, 1);
}
.mh-word--ink  { color: var(--ink); }
.mh-word--plum { color: var(--plum); }

/* Segunda palabra entra un pelín después que la primera */
.masthead__title .mh-line:last-of-type .mh-word { transition-delay: 0.12s; }

body.is-ready .mh-word { transform: translateY(0); }

/* Marca registrada central en lavanda */
.mh-reg {
  align-self: flex-start;
  font-size: clamp(1rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--lavender);
  line-height: 1;
  margin-top: 0.3em;
  opacity: 0;
  transition: opacity 0.8s ease 0.5s;
}
body.is-ready .mh-reg { opacity: 1; }

.masthead__lead {
  margin-top: clamp(1rem, 2.4vw, 1.8rem);
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.5;
  color: var(--muted-foreground);
  letter-spacing: -0.01em;
}
.masthead__lead em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--plum);
}

/* ============================================================
   BENTO GRID — dashboard editorial vivo
   ============================================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: clamp(0.8rem, 1.4vw, 1.2rem);
  grid-template-areas:
    "photo  bio    bio     now"
    "photo  stack  stack   clock"
    "stats  stats  process cta";
  perspective: 1200px; /* profundidad para el tilt 3D de las casillas */
}

.cell--photo   { grid-area: photo; }
.cell--bio     { grid-area: bio; }
.cell--now     { grid-area: now; }
.cell--stack   { grid-area: stack; }
.cell--clock   { grid-area: clock; }
.cell--stats   { grid-area: stats; }
.cell--process { grid-area: process; }
.cell--cta     { grid-area: cta; }

/* ---------- Casilla base ---------- */
.bento__cell {
  position: relative;
  border: 1px solid var(--border);
  background: rgba(253, 253, 253, 0.72);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 1.8vw, 1.6rem);
  box-shadow: 0 12px 30px -22px rgba(10, 10, 10, 0.35);
  transform-style: preserve-3d;
  /* --rx/--ry los fija el JS (tilt); --lift lo activa :hover */
  transform:
    perspective(900px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translate3d(0, var(--lift, 0px), 0);
  transition:
    transform 0.4s cubic-bezier(0.16, 0.84, 0.44, 1),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  will-change: transform;
}

/* Tinte plum que sigue al cursor dentro de la casilla */
.bento__cell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--gx, 50%) var(--gy, 50%),
              rgba(112, 51, 255, 0.10), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.bento__cell:hover {
  --lift: -6px;
  border-color: var(--lavender);
  box-shadow: 0 26px 60px -26px rgba(112, 51, 255, 0.32);
}
.bento__cell:hover::before { opacity: 1; }

/* El contenido flota por delante del tinte y gana profundidad bajo el tilt */
.cell__body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transform: translateZ(26px);
}

/* Kicker común de casilla (mono, discreto) */
.cell__k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* ---------- Casilla FOTO ---------- */
.cell--photo { padding: 0; overflow: hidden; }

.cell-photo {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  transform-style: preserve-3d;
}

.cell-photo__aura {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 90%;
  height: 80%;
  transform: translate(-50%, -50%) translateZ(10px);
  background: radial-gradient(circle at 50% 45%, rgba(109, 40, 217, 0.30), rgba(196, 181, 253, 0.14) 45%, transparent 62%);
  filter: blur(26px);
  z-index: 0;
}

.cell-photo__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  z-index: 1;
  transform: translateZ(30px) scale(1.04);
}

.cell-photo__tag {
  position: absolute;
  left: clamp(0.8rem, 1.4vw, 1.1rem);
  bottom: clamp(0.8rem, 1.4vw, 1.1rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(253, 253, 253, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
  transform: translateZ(55px);
  box-shadow: 0 10px 24px -14px rgba(10, 10, 10, 0.4);
}
.cell-photo__role {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum);
}

/* ---------- Casilla BIO ---------- */
.cell-bio__text {
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.55;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cell-bio__text em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--plum);
}
.cell-bio__text--muted { color: var(--muted-foreground); font-size: 0.98rem; }

/* ---------- Casilla AHORA MISMO ---------- */
.cell-now__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.cell-now__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--chart-1);
  box-shadow: 0 0 0 0 rgba(74, 200, 133, 0.5);
  animation: pulse 2.4s ease-out infinite;
}
.cell-now__detail {
  margin-top: auto;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}
.cell-now__detail strong { color: var(--plum); font-weight: 700; }

/* ---------- Casilla STACK ---------- */
.cell-stack__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.2rem;
}
/* (usa .chip.chip--skill del hero — hover reactivo heredado) */

/* ---------- Casilla RELOJ / BARCELONA ---------- */
.cell-clock__place {
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.cell-clock__time {
  margin-top: 0.35rem;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 500;
  color: var(--plum);
  min-width: auto;
  text-align: left;
}
.cell-clock__coords {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
}

/* ---------- Casilla ESTADÍSTICAS ---------- */
.cell-stats {
  flex-direction: row;
  gap: clamp(1rem, 3vw, 2.4rem);
  align-items: center;
  transform: translateZ(26px);
}
.stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat__num {
  font-weight: 800;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--plum);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--muted-foreground);
  max-width: 14ch;
}

/* ---------- Casilla PROCESO ---------- */
.cell-process__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.2rem;
  counter-reset: none;
}
.cell-process__list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink);
}
.cell-process__n {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--plum);
  flex: 0 0 auto;
}

/* ---------- Casilla CTA ---------- */
.cell-cta {
  justify-content: center;
  align-items: flex-start;
  gap: 0.9rem;
}
.cell-cta__text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
/* Botón magnético: desplazamiento fijado por JS vía --mx/--my */
.cell-cta__btn {
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: box-shadow 0.28s ease, background-color 0.28s ease;
}

/* ============================================================
   REVEAL escalonado de las casillas al hacer scroll
   ============================================================ */
[data-reveal-cell] {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition:
    opacity 0.8s cubic-bezier(0.16, 0.84, 0.44, 1),
    transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.bento__cell.is-in {
  opacity: 1;
  transform:
    perspective(900px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translate3d(0, var(--lift, 0px), 0);
}

/* ============================================================
   RESPONSIVE — ABOUT
   ============================================================ */

/* Tablet: bento a 2 columnas, reorganizado */
@media (max-width: 900px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "photo  bio"
      "photo  stack"
      "now    clock"
      "stats  stats"
      "process cta";
  }
}

/* Móvil: una sola columna; el tilt de ratón se desactiva desde JS */
@media (max-width: 620px) {
  .about { padding-left: clamp(1rem, 5vw, 1.5rem); padding-right: clamp(1rem, 5vw, 1.5rem); }

  /* Nav compacta (igual que el hero) */
  .about .nav { grid-template-columns: 1fr auto; }
  .about .nav__links { display: none; }

  .bento {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "bio"
      "now"
      "stack"
      "clock"
      "stats"
      "process"
      "cta";
  }
  .cell-photo { min-height: 380px; }
  .cell-stats { flex-wrap: wrap; }
  .masthead__title { font-size: clamp(3rem, 20vw, 6rem); }
}

/* Reduced-motion: sin tilt ni máscara; todo visible y quieto */
@media (prefers-reduced-motion: reduce) {
  .mh-word { transform: none; transition: none; }
  .mh-reg { opacity: 1; transition: none; }
  [data-reveal-cell] { opacity: 1; transform: none; transition: none; }
  .bento__cell { transform: none; }
  .cell__body, .cell-stats,
  .cell-photo__img, .cell-photo__tag, .cell-photo__aura { transform: none; }
  .cell-photo__img { transform: scale(1.04); }
}

/* ════════════════════════════════════════════════════════════
   FUSIÓN JEG-WEB · Scroll vertical continuo + header fijo con encogido
   Solo COMPORTAMIENTO: no altera el diseño visual de hero ni about.
   ════════════════════════════════════════════════════════════ */

:root { --header-h: 88px; }   /* alto expandido del header; el JS lo mide exacto */

/* ---------- Scroll invisible (sigue funcionando con normalidad) ---------- */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Anclas: el destino queda por debajo del header fijo (scroll suave nativo) */
html { scroll-padding-top: calc(var(--header-h) + 0.75rem); }

/* ---------- Header global fijo (shrinking sticky header) ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: clamp(1.25rem, 2.4vw, 2.2rem) clamp(1.25rem, 5vw, 4.5rem);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    padding 0.38s cubic-bezier(0.16, 0.84, 0.44, 1),
    background 0.38s ease,
    box-shadow 0.38s ease,
    border-color 0.38s ease,
    -webkit-backdrop-filter 0.38s ease,
    backdrop-filter 0.38s ease;
}

/* Estado compacto al scrollear: glassmorphism + sombra + encogido */
.site-header.is-scrolled {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background: rgba(250, 247, 255, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: rgba(10, 10, 10, 0.07);
  box-shadow: 0 12px 34px -16px rgba(10, 10, 10, 0.30);
}

/* La nav queda neutra dentro del header (anula el pill anterior);
   ahora el fondo/relleno lo aporta .site-header. */
.nav {
  position: relative;
  top: auto;
  z-index: 1;
  padding: 0;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  width: 100%;
  max-width: 1440px;
}

/* Logo y enlaces encogen suavemente en estado compacto */
.brand__logo,
.brand__name,
.nav__link {
  transition: font-size 0.38s cubic-bezier(0.16, 0.84, 0.44, 1),
              padding 0.38s ease, color 0.25s ease;
}
.site-header.is-scrolled .brand__logo { font-size: 0.74rem; padding: 0.42rem 0.52rem; }
.site-header.is-scrolled .brand__name { font-size: 0.9rem; }
.site-header.is-scrolled .nav__link  { font-size: 0.88rem; }

/* ---------- Reserva del espacio del header dentro del hero ----------
   El hero mantiene su composición de una pantalla: el header ocupa la
   banda superior que antes ocupaba la nav dentro del hero. */
.hero { padding-top: var(--header-h); }

/* Respeto por prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .site-header,
  .brand__logo, .brand__name, .nav__link { transition: none; }
  html { scroll-behavior: auto; }
}

/* ════════════════════════════════════════════════════════════
   SERVICIOS · Capítulo 04 — precisión editorial sobre oscuro.
   Acordeón numerado, líneas finas, mucho aire. Misma marca
   (fuentes + plum/lavanda), ritmo estructurado y arquitectónico.
   Aditivo: hereda tokens .dark, no toca hero/about/proyectos.
   ════════════════════════════════════════════════════════════ */
.services {
  position: relative;
  isolation: isolate;
  background: var(--background);
  color: var(--foreground);
  padding: clamp(4.5rem, 14vh, 10rem) clamp(1.25rem, 5vw, 4.5rem);
  overflow: clip;
}

/* ---------- Fondo ---------- */
.services__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* Detalle "wow": número del servicio activo en marca de agua gigante */
.services__watermark {
  position: absolute;
  right: clamp(-2rem, -2vw, 0rem);
  bottom: clamp(-4rem, -6vh, -2rem);
  font-weight: 800;
  font-size: clamp(16rem, 46vw, 44rem);
  line-height: 0.7;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(140, 92, 255, 0.14);
  user-select: none;
  transition: opacity 0.5s ease;
}

/* Spotlight plum siguiendo el cursor */
.services__spotlight {
  position: absolute;
  top: 0; left: 0;
  width: 680px; height: 680px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
              rgba(140, 92, 255, 0.16), rgba(196, 181, 253, 0.06) 44%, transparent 70%);
  transform: translate3d(var(--sx, 50vw), var(--sy, 40vh), 0) translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}
body.pointer-active .services__spotlight { opacity: 1; }
.services .bg-noise { opacity: 0.12; mix-blend-mode: overlay; }

.services__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ---------- Encabezado (titular a la derecha, como la referencia) ---------- */
.services__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
  margin-bottom: clamp(3rem, 8vh, 6rem);
}
.services__head-left { max-width: 46ch; }

.services__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: clamp(1rem, 2.4vw, 1.6rem);
}
.services__lead {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  line-height: 1.5;
  color: var(--muted-foreground);
  letter-spacing: -0.01em;
}
.services__lead em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--primary);
}
.services__title {
  justify-self: end;
  text-align: right;
  font-weight: 800;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--foreground);
}

/* ---------- Reveal escalonado (línea por línea) ---------- */
[data-sv-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 0.84, 0.44, 1),
    transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1);
  transition-delay: calc(var(--sv, 0) * 80ms);
}
.services.is-in [data-sv-reveal] { opacity: 1; transform: none; }

/* ============================================================
   ACORDEÓN — líneas finas, numeración, precisión
   ============================================================ */
.accordion { border-top: 1px solid var(--border); }
.acc { position: relative; border-bottom: 1px solid var(--border); }

/* Línea de barrido plum que recorre la fila al hacer hover (izq→der) */
.acc::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.16, 0.84, 0.44, 1);
}
@media (hover: hover) {
  .acc:hover::after { transform: scaleX(1); }
}

.acc__heading { margin: 0; }
.acc__trigger {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.6rem);
  width: 100%;
  padding: clamp(1.4rem, 3.4vh, 2.4rem) 0.25rem;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--foreground);
  font-family: inherit;
}
.acc__trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 6px;
}

.acc__num {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.35s ease, font-weight 0.35s ease;
}
.acc__name {
  font-weight: 700;
  font-size: clamp(1.35rem, 3.4vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--foreground);
  transition: color 0.35s ease, transform 0.45s cubic-bezier(0.16,0.84,0.44,1);
}
@media (hover: hover) {
  .acc:hover .acc__name { transform: translateX(10px); }
  .acc:hover .acc__num { color: var(--foreground); font-weight: 700; }
}

/* Icono +/– que gira al abrir */
.acc__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  transition: transform 0.5s cubic-bezier(0.16,0.84,0.44,1),
              color 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}
.acc[data-open] .acc__icon {
  transform: rotate(135deg);
  color: var(--primary);
  border-color: rgba(140, 92, 255, 0.5);
  background: rgba(140, 92, 255, 0.10);
}

/* Número y título teñidos de plum al abrir */
.acc[data-open] .acc__num { color: var(--primary); font-weight: 700; }
.acc[data-open] .acc__name { color: var(--primary); }

/* Panel: animación de altura suave (JS fija max-height) */
.acc__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.16, 0.84, 0.44, 1),
              opacity 0.5s ease;
  opacity: 0;
}
.acc[data-open] .acc__panel { opacity: 1; }

.acc__panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(1.4rem, 4vw, 4rem);
  padding: 0 clamp(0rem, 6vw, 5rem) clamp(1.8rem, 4vh, 2.6rem) clamp(0rem, 6vw, 4.5rem);
}
.acc__desc {
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: var(--muted-foreground);
  max-width: 52ch;
}
.acc__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; align-content: start; }
.acc__list li {
  position: relative;
  padding-left: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--foreground);
}
.acc__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border: 1px solid var(--primary);
  transform: rotate(45deg);
}

/* ---------- CTA final ---------- */
.services__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  margin-top: clamp(3.5rem, 9vh, 6.5rem);
}
.services__cta-btn {
  transform: translate(var(--mx, 0px), var(--my, 0px));
  padding: clamp(1rem, 1.6vw, 1.3rem) clamp(1.8rem, 3vw, 2.6rem);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}
.services .btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 16px 40px -14px rgba(140, 92, 255, 0.6);
  transition: box-shadow 0.28s ease, background-color 0.28s ease;
}
.services .btn--primary:hover {
  background: #9d72ff;
  box-shadow: 0 22px 54px -16px rgba(140, 92, 255, 0.78);
}
.services__cta-note {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--muted-foreground);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .services { padding-left: clamp(1rem, 5vw, 1.5rem); padding-right: clamp(1rem, 5vw, 1.5rem); }
  .services__head { grid-template-columns: 1fr; }
  .services__title { justify-self: start; text-align: left; }
  .acc__trigger { grid-template-columns: auto 1fr auto; gap: 1rem; }
  .acc__icon { width: 40px; height: 40px; }
  .acc__panel-inner { grid-template-columns: 1fr; padding-left: 2.4rem; padding-right: 0; }
}

/* ---------- Reduced-motion (servicios) ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-sv-reveal] { opacity: 1; transform: none; transition: none; }
  .acc__panel { transition: none; }
  .acc__name, .acc__icon, .acc::after { transition: none; }
}

/* ════════════════════════════════════════════════════════════
   PLANES Y PRECIOS · Capítulo 05 — conversión.
   Profundidad y luz: tarjetas de cristal (glassmorphism) flotando
   sobre auras plum/lavanda que respiran. Misma marca, nueva textura.
   Aditivo: hereda tokens .dark, no toca secciones anteriores.
   ════════════════════════════════════════════════════════════ */
.pricing {
  position: relative;
  isolation: isolate;
  background: var(--background);
  color: var(--foreground);
  padding: clamp(4.5rem, 14vh, 10rem) clamp(1.25rem, 5vw, 4.5rem);
  overflow: clip;
}

/* ---------- Fondo: auras difusas que respiran ---------- */
.pricing__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pricing__aura {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.pricing__aura--1 {
  width: 620px; height: 620px; top: -6%; left: 12%;
  background: radial-gradient(circle at 40% 40%, rgba(140, 92, 255, 0.30), transparent 70%);
  animation: priceBreathe1 18s ease-in-out infinite;
}
.pricing__aura--2 {
  width: 560px; height: 560px; bottom: -4%; right: 8%;
  background: radial-gradient(circle at 50% 50%, rgba(196, 181, 253, 0.20), transparent 70%);
  animation: priceBreathe2 22s ease-in-out infinite;
}
@keyframes priceBreathe1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4%, 5%, 0) scale(1.12); }
}
@keyframes priceBreathe2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50% { transform: translate3d(-5%, -4%, 0) scale(0.94); }
}

/* Spotlight plum siguiendo el cursor */
.pricing__spotlight {
  position: absolute;
  top: 0; left: 0;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
              rgba(140, 92, 255, 0.14), rgba(196, 181, 253, 0.05) 44%, transparent 70%);
  transform: translate3d(var(--sx, 50vw), var(--sy, 40vh), 0) translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}
body.pointer-active .pricing__spotlight { opacity: 1; }
.pricing .bg-noise { opacity: 0.12; mix-blend-mode: overlay; }

.pricing__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ---------- Encabezado ---------- */
.pricing__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(3rem, 8vh, 5.5rem);
}
.pricing__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: clamp(1rem, 2.4vw, 1.6rem);
}
.pricing__title {
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--foreground);
  margin-bottom: clamp(0.9rem, 2vw, 1.4rem);
}
.pricing__lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted-foreground);
  max-width: 52ch;
  margin: 0 auto;
}
.pricing__lead em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--primary);
}

/* ---------- Reveal escalonado ---------- */
[data-pr-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 0.84, 0.44, 1),
    transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1);
  transition-delay: calc(var(--pr, 0) * 85ms);
}
.pricing.is-in [data-pr-reveal] { opacity: 1; transform: none; }

/* ============================================================
   REJILLA DE TARJETAS DE CRISTAL
   ============================================================ */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.2vw, 1.8rem);
  align-items: stretch;
  perspective: 1600px;   /* profundidad para el tilt 3D */
}

.pcard {
  position: relative;
  border-radius: clamp(1.1rem, 1.6vw, 1.5rem);
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.16, 0.84, 0.44, 1);
  will-change: transform;
}

/* Cuerpo de cristal esmerilado */
.pcard__body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 2.2vw, 1.6rem);
  padding: clamp(1.6rem, 2.6vw, 2.2rem);
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 30px 70px -30px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Glow que aparece bajo la tarjeta al hover (borde de luz plum) */
.pcard__glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(140, 92, 255, 0.7), rgba(196, 181, 253, 0.3), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}
@media (hover: hover) {
  .pcard:hover .pcard__glow { opacity: 1; }
  .pcard:hover .pcard__body {
    border-color: rgba(140, 92, 255, 0.4);
    box-shadow:
      0 40px 90px -30px rgba(0, 0, 0, 0.78),
      0 20px 60px -30px rgba(140, 92, 255, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
}

/* Tarjeta destacada: glow permanente (alineada con las demás) */
.pcard--featured { transform: none; }
.pcard--featured .pcard__body {
  background: rgba(140, 92, 255, 0.10);
  border-color: rgba(140, 92, 255, 0.4);
  box-shadow:
    0 44px 100px -34px rgba(0, 0, 0, 0.8),
    0 24px 70px -30px rgba(140, 92, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.pcard--featured .pcard__glow { opacity: 0.7; }

/* Borde de luz que recorre la tarjeta destacada (detalle "wow") */
.pcard__beam {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--beam, 0deg),
    transparent 0deg,
    rgba(196, 181, 253, 0.1) 40deg,
    var(--primary) 70deg,
    rgba(196, 181, 253, 0.9) 85deg,
    var(--primary) 100deg,
    transparent 150deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Contenido de tarjeta ---------- */
.pcard__top { display: flex; flex-direction: column; gap: 0.55rem; }
.pcard__tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.pcard__tag--hot {
  color: #fff;
  background: var(--primary);
  border-color: transparent;
  box-shadow: 0 8px 24px -8px rgba(140, 92, 255, 0.7);
}
.pcard__name {
  font-weight: 800;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--foreground);
}
.pcard__for {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted-foreground);
  min-height: 2.4em;
}
.pcard__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.pcard__from {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.pcard__amount {
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.03em;
  color: var(--foreground);
}
.pcard--featured .pcard__amount { color: var(--primary); }

.pcard__feats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
  flex: 1;
}
.pcard__feats li {
  position: relative;
  padding-left: 1.7rem;
  font-size: 0.96rem;
  line-height: 1.45;
  color: var(--foreground);
}
.pcard__feats li strong { font-weight: 700; }
.pcard__feats li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.15em;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(140, 92, 255, 0.16);
  border: 1px solid rgba(140, 92, 255, 0.4);
}
.pcard__feats li::after {
  content: "";
  position: absolute;
  left: 6px; top: 0.5em;
  width: 5px; height: 8px;
  border: solid var(--primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* CTA de tarjeta */
.pcard__cta {
  justify-content: center;
  width: 100%;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  padding: 0.95rem 1.4rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--foreground);
  transition: background-color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.pcard__cta:hover {
  border-color: var(--primary);
  background: rgba(140, 92, 255, 0.14);
}
.pricing .btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: transparent;
  box-shadow: 0 16px 40px -14px rgba(140, 92, 255, 0.6);
}
.pricing .btn--primary:hover {
  background: #9d72ff;
  box-shadow: 0 22px 54px -16px rgba(140, 92, 255, 0.78);
}

/* ============================================================
   BARRA DE MANTENIMIENTO (no es un 4º plan)
   ============================================================ */
.maint {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(1.4rem, 4vw, 3.5rem);
  margin-top: clamp(2rem, 5vh, 3.5rem);
  padding: clamp(1.6rem, 3vw, 2.2rem) clamp(1.6rem, 3.5vw, 2.8rem);
  border-radius: clamp(1rem, 1.4vw, 1.3rem);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
}
.maint__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}
.maint__title {
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  letter-spacing: -0.025em;
  color: var(--foreground);
  margin: 0.4rem 0 0.5rem;
}
.maint__price {
  font-size: 1.05rem;
  color: var(--muted-foreground);
}
.maint__price strong { color: var(--foreground); font-weight: 800; font-size: 1.2em; }
.maint__feats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem 1.4rem;
}
.maint__feats li {
  position: relative;
  padding-left: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--foreground);
}
.maint__feats li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 8px; height: 8px;
  border: 1px solid var(--primary);
  transform: rotate(45deg);
}

/* ============================================================
   BLOQUE DE CONFIANZA (mono, discreto)
   ============================================================ */
.trust {
  list-style: none;
  padding: 0;
  margin: clamp(2rem, 5vh, 3rem) 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}
.trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
}
.trust__mark {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE — PRECIOS
   ============================================================ */
@media (max-width: 960px) {
  .pricing__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .pcard--featured { transform: none; order: -1; }  /* destacada primero en móvil */
  .maint { grid-template-columns: 1fr; }
  .maint__feats { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .pricing { padding-left: clamp(1rem, 5vw, 1.5rem); padding-right: clamp(1rem, 5vw, 1.5rem); }
}

/* ============================================================
   Reduced-motion — PRECIOS
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  [data-pr-reveal] { opacity: 1; transform: none; transition: none; }
  .pricing__aura { animation: none; }
  .pcard, .pcard__body { transition: none; }
  .pcard__beam { display: none; }
}

/* ════════════════════════════════════════════════════════════
   PROYECTOS · "Trabajo seleccionado" — Capítulo 03
   GALERÍA OSCURA. Activa los tokens .dark de mi sistema; misma
   marca (Jakarta/Mono/Lora, plum/lavanda), nuevo ritmo cinematográfico.
   Efecto protagonista: CONTAINER SCROLL 3D (el marco se endereza).
   Todo es ADITIVO: no toca hero ni about.
   ════════════════════════════════════════════════════════════ */

/* ---------- Contenedor de sección (fondo de sala de exposición) ---------- */
.projects {
  position: relative;
  isolation: isolate;               /* z-index local, no interfiere con el resto */
  background: var(--background);     /* #1a1b1e en modo .dark */
  color: var(--foreground);
  padding: clamp(4rem, 12vh, 9rem) clamp(1.25rem, 5vw, 4.5rem) 0;
  overflow: clip;
}

/* ════════════════════════════════════════════════════════════
   COSTURA CINEMATOGRÁFICA claro (about) → oscuro (galería)
   El telón de oscuridad se despliega al scrollear: --seam (0→1) lo
   fija el JS con lerp. Borde en ONDA orgánica (máscara SVG), aura plum
   en la frontera y malla + grano cruzando el límite. Nada de gris liso.
   ════════════════════════════════════════════════════════════ */
.projects__seam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(260px, 42vh, 480px);
  z-index: 1;                 /* sobre el fondo/orbes, bajo el contenido */
  pointer-events: none;
  overflow: hidden;
}

/* La luz del about que aún asoma en la banda. Se funde a oscuro en su
   base para que el borde inferior de la banda case con la galería, y
   deriva ligeramente hacia arriba (parallax) según entra el telón. */
.seam__base {
  position: absolute;
  inset: -1px 0;
  background: linear-gradient(180deg,
    var(--bg-hero) 0%,
    var(--bg-hero) 48%,
    #26262c 78%,
    var(--background) 100%);
  transform: translateY(calc(var(--seam, 0) * -34px));
  will-change: transform;
}

/* Telón oscuro: baja para cubrir la luz. Su borde inferior es una ONDA
   (máscara SVG) que viaja como frente de oscuridad. Lleva el aura plum
   pegada a ese frente para que la frontera se sienta viva. */
.seam__curtain {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(130% 58% at 50% 100%,
      rgba(140, 92, 255, 0.42), rgba(140, 92, 255, 0.10) 46%, transparent 66%),
    var(--background);
  /* Onda orgánica: bloque sólido arriba + onda blanca abajo (unión) */
  -webkit-mask:
    linear-gradient(rgba(0,0,0,1), rgba(0,0,0,1)) top / 100% calc(100% - 99px) no-repeat,
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201440%20100'%20preserveAspectRatio='none'%3E%3Cpath%20fill='%23fff'%20d='M0,100%20L0,45%20C180,12%20360,12%20540,38%20C760,70%20900,8%201080,30%20C1260,52%201350,60%201440,40%20L1440,100%20Z'/%3E%3C/svg%3E") bottom / 100% 100px no-repeat;
  mask:
    linear-gradient(rgba(0,0,0,1), rgba(0,0,0,1)) top / 100% calc(100% - 99px) no-repeat,
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201440%20100'%20preserveAspectRatio='none'%3E%3Cpath%20fill='%23fff'%20d='M0,100%20L0,45%20C180,12%20360,12%20540,38%20C760,70%20900,8%201080,30%20C1260,52%201350,60%201440,40%20L1440,100%20Z'/%3E%3C/svg%3E") bottom / 100% 100px no-repeat;
  transform: translateY(calc((var(--seam, 0) - 1) * 100%));
  will-change: transform;
}

/* Malla de puntos plum cruzando la frontera (visible sobre luz y sombra) */
.seam__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(140, 92, 255, 0.22) 1px, transparent 1.7px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  opacity: 0.7;
}

/* Grano cruzando el límite (mismo film del hero) */
.seam__grain {
  position: absolute;
  inset: 0;
  opacity: 0.10;
  mix-blend-mode: overlay;
}

/* ---------- Capas de fondo oscuras ---------- */
.projects__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Malla de puntos tenue (versión clara sobre oscuro) */
.projects__grid {
  position: absolute;
  inset: -2px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.4px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 45%, transparent 100%);
}

/* Orbes plum brillando en la oscuridad */
.projects__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.projects__orb--1 {
  width: 520px; height: 520px; top: 6%; right: -6%;
  background: radial-gradient(circle at 40% 40%, rgba(140, 92, 255, 0.34), transparent 70%);
  animation: orbFloat1 22s ease-in-out infinite;
}
.projects__orb--2 {
  width: 440px; height: 440px; bottom: 4%; left: -8%;
  background: radial-gradient(circle at 50% 50%, rgba(196, 181, 253, 0.16), transparent 70%);
  animation: orbFloat2 26s ease-in-out infinite;
}

/* Spotlight plum que sigue al cursor — aura brillante sobre fondo oscuro */
.projects__spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
              rgba(140, 92, 255, 0.20), rgba(196, 181, 253, 0.08) 42%, transparent 70%);
  transform: translate3d(var(--sx, 50vw), var(--sy, 40vh), 0) translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}
body.pointer-active .projects__spotlight { opacity: 1; }

/* El grano hereda .bg-noise; sobre oscuro lo suavizamos */
.projects .bg-noise { opacity: 0.14; mix-blend-mode: overlay; }

/* ---------- Contenido ---------- */
.projects__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ============================================================
   Encabezado potente de sección
   ============================================================ */
.projects__head {
  margin-bottom: clamp(3rem, 9vh, 7rem);
  max-width: 900px;
}

.projects__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: clamp(0.8rem, 2vw, 1.4rem);
}

.projects__title {
  font-weight: 800;
  font-size: clamp(3.4rem, 13vw, 11rem);
  line-height: 0.86;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--foreground);
}

.projects__lead {
  margin-top: clamp(1rem, 2.4vw, 1.8rem);
  max-width: 44ch;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.5;
  color: var(--muted-foreground);
  letter-spacing: -0.01em;
}
.projects__lead em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--primary);
}

/* Máscara de revelado del título (misma técnica que el masthead del about) */
.pj-line {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.pj-word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.05s cubic-bezier(0.16, 0.84, 0.44, 1);
}
.is-in .pj-word { transform: translateY(0); }

/* ============================================================
   Reveal escalonado de los bloques de texto
   ============================================================ */
[data-pj-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.85s cubic-bezier(0.16, 0.84, 0.44, 1),
    transform 0.85s cubic-bezier(0.16, 0.84, 0.44, 1);
  transition-delay: calc(var(--pj, 0) * 90ms);
}
.is-in [data-pj-reveal] { opacity: 1; transform: none; }

/* ============================================================
   CASO DE PROYECTO — mucho aire, aire cinematográfico
   ============================================================ */
.pcase {
  position: relative;
  padding: clamp(3rem, 10vh, 8rem) 0;
}
.pcase + .pcase { border-top: 1px solid var(--border); }

/* Número gigante en marca de agua: el "wow" propio de esta sección.
   Trazo plum tenue (como el JEG del hero) para que respire sin saturar. */
.pcase__watermark {
  position: absolute;
  top: clamp(0.5rem, 3vh, 2.5rem);
  right: -1vw;
  z-index: 0;
  font-weight: 800;
  font-size: clamp(11rem, 34vw, 30rem);
  line-height: 0.7;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(140, 92, 255, 0.18);
  pointer-events: none;
  user-select: none;
}
.pcase--alt .pcase__watermark { right: auto; left: -1vw; }

/* Bloque de meta (índice, título, descripción, stack, CTA) */
.pcase__meta {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin-bottom: clamp(2.2rem, 5vh, 4rem);
}
.pcase--alt .pcase__meta { margin-left: auto; text-align: left; }

.pcase__index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: clamp(0.8rem, 1.6vw, 1.2rem);
}

.pcase__title {
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--foreground);
  margin-bottom: clamp(1rem, 2vw, 1.6rem);
}

.pcase__desc {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted-foreground);
  max-width: 42ch;
  letter-spacing: -0.01em;
  margin-bottom: clamp(1.2rem, 2.4vw, 1.8rem);
}

.pcase__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(1.4rem, 2.8vw, 2rem);
}
/* Chips sobre oscuro: heredan .chip.chip--skill; ajustamos superficie/hover */
.projects .chip--skill {
  color: var(--muted-foreground);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}
.projects .chip--skill:hover {
  color: var(--foreground);
  border-color: var(--primary);
  background: rgba(140, 92, 255, 0.14);
}

/* CTA sobre oscuro: superficie plum de marca (modo .dark) */
.projects .btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 14px 34px -14px rgba(140, 92, 255, 0.6);
}
.projects .btn--primary:hover {
  background: #9d72ff;
  box-shadow: 0 20px 48px -16px rgba(140, 92, 255, 0.75);
}
.pcase__cta {
  transform: translate(var(--mx, 0px), var(--my, 0px));  /* imán (JS) */
  transition: box-shadow 0.28s ease, background-color 0.28s ease;
}

/* ============================================================
   CONTAINER SCROLL 3D — el marco arranca inclinado y se endereza
   --p (0→1) lo fija el JS según el progreso de scroll.
   ============================================================ */
.pcase__scroll { position: relative; }

.pcase__stage {
  position: relative;
  z-index: 1;
  perspective: 1400px;   /* profundidad de la escena 3D */
}

.pcase__card {
  --pj-tilt: 22deg;      /* inclinación inicial (móvil la reduce) */
  transform-style: preserve-3d;
  transform-origin: center 20%;
  /* En reposo (--p:1) el marco está recto; a --p:0 arranca inclinado atrás */
  transform:
    translateY(calc((1 - var(--p, 1)) * 44px))
    rotateX(calc((1 - var(--p, 1)) * var(--pj-tilt)))
    scale(calc(0.94 + var(--p, 1) * 0.06));
  will-change: transform;
}

/* Marco tipo navegador (chrome + captura) */
.pcase__browser {
  position: relative;
  border-radius: clamp(0.9rem, 1.4vw, 1.3rem);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.pcase__chrome {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.pcase__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.pcase__dot:first-child { background: rgba(248, 113, 113, 0.55); }
.pcase__dot:nth-child(2) { background: rgba(250, 204, 102, 0.55); }
.pcase__dot:nth-child(3) { background: rgba(74, 222, 128, 0.55); }
.pcase__url {
  margin-left: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}

.pcase__shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Hover premium sobre el marco */
.pcase__browser {
  transition: box-shadow 0.45s ease, border-color 0.45s ease;
}
.pcase__stage:hover .pcase__browser {
  border-color: rgba(140, 92, 255, 0.5);
  box-shadow:
    0 50px 110px -30px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(140, 92, 255, 0.25) inset,
    0 24px 70px -30px rgba(140, 92, 255, 0.5);
}

/* Ticker sobre oscuro: los tokens .dark ya recolorean borde y texto */
.projects .ticker {
  margin-top: clamp(3rem, 8vh, 6rem);
  border-top-color: var(--border);
}

/* ============================================================
   RESPONSIVE — PROYECTOS
   ============================================================ */
@media (max-width: 820px) {
  .projects { padding-left: clamp(1rem, 5vw, 1.5rem); padding-right: clamp(1rem, 5vw, 1.5rem); }
  .pcase__card { --pj-tilt: 10deg; }   /* menos rotación en móvil: no marea */
  .pcase__meta, .pcase--alt .pcase__meta { max-width: 100%; margin-left: 0; }
  .pcase__watermark { font-size: clamp(8rem, 42vw, 16rem); top: 0; }
}

/* ============================================================
   Reduced-motion — todo visible, sin recorridos 3D ni máscaras
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .pj-word { transform: none; transition: none; }
  [data-pj-reveal] { opacity: 1; transform: none; transition: none; }
  .pcase__card { transform: none; }
  .projects__orb { animation: none; }
  /* Costura estática pero con textura: la onda queda fijada a media banda
     mostrando el borde orgánico + aura plum, sin vincularse al scroll. */
  .projects__seam { --seam: 0.62; }
}

/* ════════════════════════════════════════════════════════════
   CONTACTO · Capítulo 06 — "volver a la luz"
   Sección CLARA (off-white) tras precios oscuros. Costura inversa
   oscuro→claro, formulario conversacional y firma manuscrita.
   Aditivo: no toca ninguna sección anterior. Sin magnetismo.
   ════════════════════════════════════════════════════════════ */

/* Utilidad accesible: oculto visualmente, presente para lectores/teclado */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.contact {
  position: relative;
  isolation: isolate;
  background: var(--bg-hero);
  color: var(--ink);
  padding: clamp(9rem, 20vh, 15rem) clamp(1.5rem, 5vw, 4rem) clamp(4rem, 8vh, 7rem);
  overflow: hidden;
}

/* ---------- Costura inversa oscuro→claro ---------- */
.contact__seam {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(260px, 42vh, 480px);
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
/* La oscuridad de precios que aún asoma; se funde a off-white en su base */
.seam-up__base {
  position: absolute;
  inset: -1px 0;
  background: linear-gradient(180deg,
    #1a1b1e 0%,
    #1d1e23 34%,
    #2c2440 60%,
    #6a52a8 82%,
    var(--bg-hero) 100%);
  transform: translateY(calc(var(--seam, 0) * -34px));
  will-change: transform;
}
/* Telón de LUZ que desciende sobre la oscuridad; borde inferior en onda
   orgánica (misma máscara SVG del proyecto) con aura plum pegada al frente. */
.seam-up__curtain {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(130% 58% at 50% 100%,
      rgba(140, 92, 255, 0.42), rgba(196, 181, 253, 0.16) 46%, transparent 66%),
    var(--bg-hero);
  -webkit-mask:
    linear-gradient(rgba(0,0,0,1), rgba(0,0,0,1)) top / 100% calc(100% - 99px) no-repeat,
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201440%20100'%20preserveAspectRatio='none'%3E%3Cpath%20fill='%23fff'%20d='M0,100%20L0,45%20C180,12%20360,12%20540,38%20C760,70%20900,8%201080,30%20C1260,52%201350,60%201440,40%20L1440,100%20Z'/%3E%3C/svg%3E") bottom / 100% 100px no-repeat;
  mask:
    linear-gradient(rgba(0,0,0,1), rgba(0,0,0,1)) top / 100% calc(100% - 99px) no-repeat,
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201440%20100'%20preserveAspectRatio='none'%3E%3Cpath%20fill='%23fff'%20d='M0,100%20L0,45%20C180,12%20360,12%20540,38%20C760,70%20900,8%201080,30%20C1260,52%201350,60%201440,40%20L1440,100%20Z'/%3E%3C/svg%3E") bottom / 100% 100px no-repeat;
  transform: translateY(calc((var(--seam, 0) - 1) * 100%));
  will-change: transform;
}
/* Malla de puntos plum cruzando la frontera */
.seam-up__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(140, 92, 255, 0.24) 1px, transparent 1.7px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  opacity: 0.6;
}
.seam-up__grain { position: absolute; inset: 0; opacity: 0.10; mix-blend-mode: overlay; }

/* ---------- Fondo claro: malla + aura plum que respira ---------- */
.contact__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.contact__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(10, 10, 10, 0.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 55%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 55%, #000 45%, transparent 100%);
}
.contact__aura {
  position: absolute;
  left: 50%; top: 58%;
  width: min(80vw, 900px); height: min(80vw, 900px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
              rgba(140, 92, 255, 0.20), rgba(196, 181, 253, 0.10) 42%, transparent 68%);
  filter: blur(20px);
  animation: contactBreathe 12s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes contactBreathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.75; }
  50%      { transform: translate(-50%, -50%) scale(1.14); opacity: 1; }
}
/* Destello del aura al enviar con éxito (la sección "respira") */
.contact.is-success .contact__aura { animation: contactFlash 1.6s cubic-bezier(0.16,0.84,0.44,1); }
@keyframes contactFlash {
  0%   { transform: translate(-50%, -50%) scale(1);    opacity: 0.75; }
  30%  { transform: translate(-50%, -50%) scale(1.35); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.1);  opacity: 0.85; }
}
.contact .bg-noise { opacity: 0.08; mix-blend-mode: multiply; }

.contact__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

/* ---------- Encabezado ---------- */
.contact__head { max-width: 900px; margin-bottom: clamp(2.6rem, 6vh, 4.5rem); }
.contact__title {
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-top: 0.4rem;
}
.contact__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--plum);
  letter-spacing: -0.015em;
}
.contact__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--muted-foreground);
  max-width: 46ch;
  margin-top: clamp(1rem, 2vw, 1.5rem);
}
.contact__lead em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--plum);
}

/* ---------- Reveal escalonado ---------- */
[data-ct-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 0.84, 0.44, 1),
    transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1);
  transition-delay: calc(var(--ct, 0) * 85ms);
}
.contact.is-in [data-ct-reveal] { opacity: 1; transform: none; }

/* ---------- Layout: formulario + columna secundaria ---------- */
.contact__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

/* ============================================================
   FORMULARIO CONVERSACIONAL
   ============================================================ */
.cform { min-width: 0; }
.cform__sentence {
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.9rem);
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cseg { color: var(--ink); }
.cseg--block { display: inline; }

/* Campo integrado en la frase: input con línea inferior (no caja) */
.field {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  vertical-align: baseline;
  max-width: 100%;
}
.field__input {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: inherit;
  letter-spacing: inherit;
  line-height: 1.3;
  color: var(--plum);
  background: transparent;
  border: 0;
  padding: 0 0.15em 0.06em;
  margin: 0 0.1em;
  outline: none;
  min-width: 3ch;
  max-width: 100%;
  transition: color 0.3s ease;
}
.field__input::placeholder { color: rgba(10, 10, 10, 0.28); font-weight: 500; }
.field__input:focus::placeholder { color: rgba(112, 51, 255, 0.35); }

/* La línea inferior que se ilumina en plum al enfocar */
.field__line {
  position: absolute;
  left: 0.1em; right: 0.1em; bottom: 0;
  height: 2px;
  background: rgba(10, 10, 10, 0.18);
  overflow: hidden;
}
.field__line::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 0.84, 0.44, 1);
}
.field:focus-within .field__line::after { transform: scaleX(1); }
/* El campo se ensancha suavemente al enfocar */
.field:focus-within .field__input { color: var(--plum); }
.field.is-filled .field__line { background: rgba(112, 51, 255, 0.35); }

/* Selector inline (tipo de proyecto) */
.field--select { align-items: center; }
.field__select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 1.3em;
  color: var(--plum);
}
.field__select option { color: #111; font-size: 1rem; }
.field__select:invalid { color: rgba(10, 10, 10, 0.28); font-weight: 500; }
.field__caret {
  position: absolute;
  right: 0.15em; bottom: 0.28em;
  color: var(--plum);
  pointer-events: none;
  opacity: 0.75;
  display: inline-flex;
}

/* Campo mensaje: crece en altura al escribir */
.field--msg { display: block; margin-top: 0.2em; max-width: 100%; }
.field__area {
  display: block;
  width: 100%;
  min-width: 0;
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  min-height: 1.4em;
  margin: 0;
  padding: 0 0.1em 0.15em;
}
.field--msg .field__line { left: 0; right: 0; }

/* Campo en error (validación clara) */
.field.is-error .field__line { background: rgba(229, 75, 79, 0.5); }
.field.is-error .field__line::after { background: var(--destructive); transform: scaleX(1); }

/* Mensaje de error legible */
.cform__error {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--destructive);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Acciones ---------- */
.cform__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: clamp(2.2rem, 5vw, 3.4rem);
}
/* Botón de envío: sobrio, se rellena de plum de izquierda a derecha */
.cbtn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 1.05rem 2.4rem;
  min-width: 210px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.35s ease, border-color 0.35s ease;
}
.cbtn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 0.84, 0.44, 1);
}
@media (hover: hover) {
  .cbtn:hover { color: #fff; border-color: var(--plum); }
  .cbtn:hover::before { transform: scaleX(1); }
}
.cbtn:focus-visible { color: #fff; border-color: var(--plum); }
.cbtn:focus-visible::before { transform: scaleX(1); }

/* Estado de carga: oculta el texto y muestra un spinner elegante */
.cbtn__spinner {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  opacity: 0;
  animation: cbtnSpin 0.7s linear infinite;
}
@keyframes cbtnSpin { to { transform: rotate(360deg); } }
.cbtn.is-loading { color: #fff; border-color: var(--plum); pointer-events: none; }
.cbtn.is-loading::before { transform: scaleX(1); }
.cbtn.is-loading .cbtn__label { opacity: 0; }
.cbtn.is-loading .cbtn__spinner { opacity: 1; }

.cform__hint {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted-foreground);
  letter-spacing: 0.02em;
}

/* ---------- Estado de éxito ---------- */
.cform__success {
  grid-column: 1 / 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  padding: clamp(2rem, 4vw, 3rem) 0;
  animation: successRise 0.9s cubic-bezier(0.16, 0.84, 0.44, 1);
}
/* Solo aparece al enviar con éxito (el atributo hidden manda) */
.cform__success[hidden] { display: none; }
@keyframes successRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
.cform__check {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  color: #fff;
  background: var(--plum);
  box-shadow: 0 18px 44px -16px rgba(112, 51, 255, 0.6);
}
.cform__check-path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawCheck 0.6s 0.25s cubic-bezier(0.16, 0.84, 0.44, 1) forwards;
}
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.cform__success-msg {
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

/* ---------- Firma manuscrita (detalle "wow") ---------- */
.signature {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--plum);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  display: inline-block;
  position: relative;
  padding-bottom: 0.12em;
  white-space: nowrap;
}
.signature::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--plum), rgba(112, 51, 255, 0.2));
  transform: scaleX(0);
  transform-origin: left;
}
/* Reveal de trazo: la firma se "dibuja" de izquierda a derecha */
.signature.is-drawing { animation: sigDraw 0.85s cubic-bezier(0.16, 0.84, 0.44, 1); }
.signature.is-drawing::after { animation: sigUnderline 0.85s 0.1s cubic-bezier(0.16, 0.84, 0.44, 1) forwards; }
@keyframes sigDraw {
  from { clip-path: inset(0 100% 0 0); opacity: 0.25; }
  to   { clip-path: inset(0 0 0 0);    opacity: 1; }
}
@keyframes sigUnderline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.signature--success { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.signature--success::after { transform: scaleX(1); }

/* ============================================================
   COLUMNA SECUNDARIA (aside)
   ============================================================ */
.cside {
  display: flex;
  flex-direction: column;
  gap: clamp(1.6rem, 3vw, 2.2rem);
  padding-top: 0.6rem;
}
.cside__block { display: flex; flex-direction: column; gap: 0.5rem; }
.cside__k {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.cside__sign {
  padding: 1.2rem 1.4rem;
  border-radius: 1rem;
  background: rgba(112, 51, 255, 0.05);
  border: 1px solid rgba(112, 51, 255, 0.14);
}
.cside__email {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink);
  align-self: flex-start;
}
.cside__city {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.cside__time { font-size: 0.95rem; color: var(--muted-foreground); display: flex; gap: 0.4rem; align-items: baseline; flex-wrap: wrap; }
.cside__time time { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.cside__tz { font-size: 0.8rem; }
.cside__avail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--ink);
}
.cside__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: availPulse 2.4s ease-out infinite;
}
@keyframes availPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.cside__trust {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted-foreground);
  max-width: 30ch;
}

/* Tarjeta delimitada del aside ("Qué pasa después") */
.cside__card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.4rem, 2.4vw, 1.8rem);
  border-radius: 1.1rem;
  background: rgba(112, 51, 255, 0.045);
  border: 1px solid rgba(112, 51, 255, 0.16);
}
.cside__card .cside__k { margin-bottom: 0.1rem; }
.cside__card .cside__trust {
  margin-top: 0.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(112, 51, 255, 0.14);
}
.link-draw { position: relative; }
.link-draw::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 0.84, 0.44, 1);
}
@media (hover: hover) {
  .link-draw:hover::after { transform: scaleX(1); }
}
.link-draw:focus-visible::after { transform: scaleX(1); }

/* ---------- Responsive — CONTACTO ---------- */
@media (max-width: 900px) {
  .contact__layout { grid-template-columns: 1fr; gap: clamp(2.4rem, 6vw, 3.4rem); }
  .cside {
    border-top: 1px solid var(--border);
    padding-top: clamp(1.8rem, 5vw, 2.4rem);
  }
}
@media (max-width: 560px) {
  .contact__title { font-size: clamp(2.4rem, 12vw, 3.4rem); }
  .cform__sentence { font-size: clamp(1.4rem, 6.4vw, 1.9rem); line-height: 1.6; }
  .field__input { min-width: 4ch; }
  .cbtn { width: 100%; }
  .cform__actions { gap: 0.9rem; }
}

/* ---------- Reduced-motion — CONTACTO ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-ct-reveal] { opacity: 1; transform: none; transition: none; }
  .contact__seam { --seam: 0.62; }
  .contact__aura { animation: none; }
  .contact.is-success .contact__aura { animation: none; }
  .signature.is-drawing { animation: none; }
  .signature.is-drawing::after { animation: none; transform: scaleX(1); }
  .cform__check-path { animation: none; stroke-dashoffset: 0; }
  .cbtn__spinner { animation: none; }
  .cside__dot { animation: none; }
}

/* ════════════════════════════════════════════════════════════
   FOOTER · minimalista y tipográfico
   ════════════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  isolation: isolate;
  background: var(--bg-hero);
  color: var(--ink);
  overflow: hidden;
  padding: clamp(2.4rem, 5vh, 3.4rem) clamp(1.5rem, 5vw, 4rem) clamp(1.4rem, 3vh, 2rem);
  border-top: 1px solid var(--border);
}
/* JEG en outline al fondo — contenido dentro del footer, sin cortarse */
.footer__watermark {
  position: absolute;
  top: 0; bottom: 0;
  right: clamp(0.5rem, 2vw, 2.5rem);
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: clamp(3.5rem, 12vw, 8rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(112, 51, 255, 0.13);
  z-index: 0;
  pointer-events: none;
  white-space: nowrap;
}
.footer__inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; }

/* Banda principal: marca · nav · email, todo en una línea distribuida */
.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.4rem clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(1.4rem, 3vh, 2rem);
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}
.footer__logo {
  font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--ink);
}
.footer__brandtext { display: flex; flex-direction: column; gap: 0.1rem; }
.footer__name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.footer__role {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  text-transform: uppercase;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
}
.footer__nav a {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted-foreground);
  transition: color 0.3s ease;
}
.footer__nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 0.84, 0.44, 1);
}
@media (hover: hover) { .footer__nav a:hover { color: var(--ink); } .footer__nav a:hover::after { transform: scaleX(1); } }
.footer__nav a:focus-visible { color: var(--ink); }

.footer__email {
  font-weight: 700;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.footer__totop {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--plum);
}
.footer__totop svg { transition: transform 0.3s cubic-bezier(0.16, 0.84, 0.44, 1); }
@media (hover: hover) { .footer__totop:hover svg { transform: translateY(-4px); } }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-top: clamp(1.2rem, 2.4vh, 1.6rem);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--muted-foreground);
}

/* Utilidad: tipografía mono compartida */
.mono { font-family: var(--font-mono); }

@media (max-width: 720px) {
  .footer__row { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .footer__bottom { flex-direction: row; }
}

/* ════════════════════════════════════════════════════════════
   CONTACTO · ajustes de revisión (teléfono opcional, acciones
   compactas, pasos del aside) + PRECIOS (precio anterior tachado)
   ════════════════════════════════════════════════════════════ */

/* Campo de contacto con ancho FIJO: el recuadro no cambia de tamaño
   aunque la sugerencia (placeholder) vaya rotando entre email y teléfono. */
.field--fixed { max-width: 100%; }
.field--fixed .field__input {
  width: clamp(9ch, 42vw, 15ch);
  min-width: 0;
}
@media (max-width: 560px) {
  .field--fixed .field__input { width: 100%; }
}
/* Transición suave del placeholder rotativo */
.field--fixed .field__input::placeholder { transition: opacity 0.35s ease; }
.field--fixed .field__input.is-swapping::placeholder { opacity: 0; }

/* Acciones más compactas y alineadas al borde izquierdo de la frase */
.cform__actions {
  margin-top: clamp(1.6rem, 3.2vw, 2.2rem);
  gap: 0.9rem 1.1rem;
  align-items: center;
}
.cbtn { min-width: 0; padding: 0.9rem 2rem; }
.cform__hint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.cform__hint-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex: none;
}

/* Bloque "Qué pasa después" en el aside (da cuerpo a la sección) */
.cside__steplist {
  display: grid;
  gap: 0.65rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.cside__steplist li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 0.94rem;
  line-height: 1.45;
  color: var(--ink);
}
.cside__stepn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--plum);
  letter-spacing: 0.04em;
}

/* PRECIOS · precio anterior tachado (sensación de descuento) */
.pcard__was {
  display: inline-block;
  margin-left: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--muted-foreground);
  text-decoration: line-through;
  text-decoration-color: rgba(140, 92, 255, 0.75);
  text-decoration-thickness: 1.5px;
  vertical-align: 0.15em;
}
@media (max-width: 380px) {
  .pcard__was { display: block; margin-left: 0; margin-top: 0.3rem; }
}
