/* ==========================================================================
   Quinco · quincoagency.es
   Marca: Manual de marca de Quinco («Luz de tarde»).
   Estilo: página de galería, palabras enormes, esfera «Luz» con órbitas.
   ========================================================================== */

:root {
  /* Color de marca */
  --crema: #FBF6F1;
  --panel: #F4ECE3;
  --panel-2: #EFE5DA;
  --ciruela: #1E1530;
  --violeta: #5B3FE0;
  --violeta-hover: #4B31C9;
  --rosa: #FF3D9A;
  --azul: #4A8CFF;
  --naranja: #FF9A4D;
  --gris: #5D5850;
  --blanco: #FFFFFF;

  --rule: rgba(30, 21, 48, 0.14);
  --orbit: rgba(30, 21, 48, 0.24);

  /* Tipografía */
  --f-titulo: "Plus Jakarta Sans", Arial, sans-serif;
  --f-texto: "Atkinson Hyperlegible", Arial, sans-serif;

  --t-display: clamp(3rem, 7.15vw, 6.45rem);      /* ~103px a 1440 */
  --t-manifiesto: clamp(2.1rem, 4.6vw, 4.2rem);   /* ~66px */
  --t-h2: clamp(1.9rem, 3.6vw, 3.25rem);
  --t-h3: clamp(1.5rem, 1.9vw, 1.75rem);          /* 24-28px */
  --t-texto: 1.0625rem;                           /* 17px */
  --t-label: 0.9375rem;                           /* 15px */
  --t-micro: 0.75rem;

  /* Retícula */
  --gutter: clamp(16px, 1.35vw, 20px);
  --cols: 12;
  --max: 1440px;

  /* Forma */
  --r-media: 18px;
  --r-panel: 22px;
  --r-big: 32px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--crema);
  color: var(--ciruela);
  font-family: var(--f-texto);
  font-size: var(--t-texto);
  line-height: 1.5;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--f-titulo);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--violeta);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 2000;
  background: var(--ciruela);
  color: var(--crema);
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: var(--gutter); }

.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;
}

/* ---------- Retícula ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* ---------- Etiquetas pequeñas ---------- */

.eyebrow {
  font-family: var(--f-texto);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.eyebrow .num {
  font-size: var(--t-micro);
  color: var(--gris);
  letter-spacing: 0.04em;
}
.outline-label {
  display: inline-block;
  border: 1px solid var(--ciruela);
  border-radius: 7px;
  padding: 3px 7px;
  font-size: var(--t-micro);
  letter-spacing: 0.06em;
}

/* ---------- Botones (cápsulas) ---------- */

.btn {
  --h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--h);
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-family: var(--f-texto);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, transform 0.25s var(--ease-out), border-color 0.2s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn--primary { background: var(--violeta); color: var(--blanco); }
.btn--primary:hover { background: var(--violeta-hover); }

.btn--soft {
  background: var(--crema);
  color: var(--ciruela);
  border-color: var(--rule);
}
.btn--soft:hover { background: var(--panel); border-color: rgba(30, 21, 48, 0.28); }

.btn--big {
  --h: 76px;
  padding: 0 34px;
  font-family: var(--f-titulo);
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  letter-spacing: -0.01em;
}

/* Etiqueta que «rueda» al pasar el ratón */
.roll {
  display: inline-grid;
  overflow: hidden;
  height: 1.15em;
  line-height: 1.15;
}
.roll > span {
  grid-area: 1 / 1;
  transition: transform 0.45s var(--ease-out);
}
.roll > span + span { transform: translateY(110%); }
.btn:hover .roll > span:first-child { transform: translateY(-110%); }
.btn:hover .roll > span + span { transform: translateY(0); }

.arrow {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  transition: transform 0.3s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(3px); }

/* Enlace con subrayado que se dibuja */
.link {
  position: relative;
  text-decoration: none;
  padding-bottom: 3px;
  background:
    linear-gradient(currentColor, currentColor) left bottom / 0% 1px no-repeat,
    linear-gradient(var(--rule), var(--rule)) left bottom / 100% 1px no-repeat;
  transition: background-size 0.35s var(--ease-out);
}
.link:hover { background-size: 100% 1px, 100% 1px; }

/* ==========================================================================
   Esfera «Luz» y órbitas
   ========================================================================== */

.orb {
  position: absolute;
  width: var(--size, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
  z-index: 0;
  background: #F6EEF4;
  box-shadow:
    inset 0 -18px 40px rgba(30, 21, 48, 0.10),
    inset 0 10px 30px rgba(255, 255, 255, 0.55);
  will-change: transform;
}
/* capas de color difuminadas dentro de la silueta */
.orb::before {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(circle at 18% 22%, var(--azul) 0%, rgba(74, 140, 255, 0) 46%),
    radial-gradient(circle at 34% 58%, var(--violeta) 0%, rgba(91, 63, 224, 0) 40%),
    radial-gradient(circle at 62% 80%, var(--rosa) 0%, rgba(255, 61, 154, 0) 44%),
    radial-gradient(circle at 88% 92%, var(--naranja) 0%, rgba(255, 154, 77, 0) 46%),
    radial-gradient(circle at 82% 30%, #FFD9B8 0%, rgba(255, 217, 184, 0) 40%);
  filter: blur(calc(var(--size, 560px) * 0.07));
  animation: orb-drift 22s ease-in-out infinite alternate;
}
/* brillo blanco central y reflejo arriba a la derecha */
.orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 12%),
    radial-gradient(circle at 46% 52%, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0) 52%);
  mix-blend-mode: screen;
}

@keyframes orb-drift {
  0%   { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(28deg) scale(1.06); }
}

.orbit {
  position: absolute;
  width: var(--size, 1000px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed var(--orbit);
  pointer-events: none;
  z-index: 0;
  animation: orbit-turn 140s linear infinite;
}
.orbit--rev { animation-direction: reverse; animation-duration: 180s; }

@keyframes orbit-turn { to { transform: rotate(360deg); } }

/* Las órbitas pueden salirse por los lados sin crear scroll horizontal */
.hero, .section, .promise, .closing { overflow-x: clip; }

/* La esfera única: fija, detrás del contenido; main.js la coloca con transform */
.orb-global {
  position: fixed;
  left: 0;
  top: 0;
  --size: 600px;
  z-index: 0;
  transform-origin: 0 0;
  transform: translate3d(-9999px, 0, 0);
}
.no-orb .orb-global { display: none; }
.promise > .wrap { position: relative; z-index: 1; }

/* ---------- Intro: los cinco puntos se juntan y forman la esfera ---------- */
.intro-pending .nav,
.intro-pending .orb-global { opacity: 0; }
.nav { transition: opacity 0.6s ease, background-color 0.3s ease, box-shadow 0.3s ease; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  background: var(--crema);
  cursor: pointer;
}
.intro svg {
  width: clamp(96px, 11vw, 140px);
  height: auto;
  overflow: visible;
}
.intro circle {
  transform-box: fill-box;
  transform-origin: center;
}
.intro__skip {
  position: absolute;
  right: var(--gutter);
  bottom: var(--gutter);
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--gris);
  font: 700 0.875rem/1 var(--f-texto);
  cursor: pointer;
}
.intro__skip:hover { color: var(--ciruela); }

/* Contenedor de fondo por sección */
.scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.scene > * { position: absolute; }

/* ==========================================================================
   Navegación fija
   ========================================================================== */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
.nav.is-scrolled {
  background: rgba(251, 246, 241, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--rule);
}
.nav__logo {
  display: inline-flex;
  padding: 6px 0;
  text-decoration: none;
}
.nav__logo img { width: 138px; height: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--t-label);
  font-weight: 700;
}
.nav__links a:not(.btn) { padding: 12px 0; }

/* ==========================================================================
   1 · Portada
   ========================================================================== */

.hero {
  position: relative;
  min-height: max(100svh, 680px);
  padding-top: 110px;
  padding-bottom: 28px;
  display: flex;
  flex-direction: column;
}

.hero .scene .orbit:nth-of-type(1) { --size: min(68vw, 1000px); left: 50%; top: 50%; translate: -50% -52%; }
.hero .scene .orbit:nth-of-type(2) { --size: min(86vw, 1260px); left: 50%; top: 50%; translate: -44% -47%; }

.hero__title {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 1fr auto 1fr auto 1fr;
  column-gap: var(--gutter);
  font-size: var(--t-display);
  line-height: 1;
}
.hero__line { display: block; white-space: nowrap; }
.hero__line--1 { grid-column: 1 / span 8; grid-row: 2; }
.hero__line--2 { grid-column: 6 / -1; grid-row: 3; justify-self: end; align-self: center; }
.hero__line--3 { grid-column: 2 / span 8; grid-row: 4; }

.hero__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
}
.hero__lead {
  max-width: 30ch;
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.35;
}
.hero__cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-label);
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
}
.hero__cue .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ciruela);
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Entrada de la portada (una vez, al cargar) */
.js [data-enter] .hero__line,
.js [data-enter] .hero__foot,
.js [data-enter] .scene {
  opacity: 0;
}
.js [data-enter].is-in .hero__line {
  animation: rise 1s var(--ease-out) forwards;
}
.js [data-enter].is-in .hero__line--2 { animation-delay: 0.12s; }
.js [data-enter].is-in .hero__line--3 { animation-delay: 0.24s; }
.js [data-enter].is-in .scene { animation: fade 1.6s ease forwards; }
.js [data-enter].is-in .hero__foot { animation: fade 1s ease 0.5s forwards; }

@keyframes rise {
  from { opacity: 0; transform: translateY(0.35em); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade { to { opacity: 1; } }

/* ==========================================================================
   Secciones comunes
   ========================================================================== */

.section {
  position: relative;
  padding-block: clamp(96px, 10.5vw, 152px);
}
.section > .wrap { position: relative; z-index: 1; }

.rail { grid-column: 1 / span 2; }

/* ==========================================================================
   2 · Quiénes somos
   ========================================================================== */

.about .scene .orbit { --size: min(88vw, 1200px); right: -40vw; top: -18%; }

.about__statement {
  grid-column: 3 / span 9;
  font-size: var(--t-manifiesto);
  line-height: 1.04;
}
.about__statement .plus {
  font-weight: 500;
  color: var(--violeta);
}
.about__summary {
  grid-column: 3 / span 3;
  margin-top: clamp(48px, 6vw, 88px);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.4;
}
.about__body {
  grid-column: 7 / span 5;
  margin-top: clamp(48px, 6vw, 88px);
  font-size: 1.125rem;
  line-height: 1.55;
  display: grid;
  gap: 16px;
}
.about__body strong { font-weight: 700; }

/* Galería de personas (fotos de referencia) */
.people__label {
  margin-top: clamp(96px, 10vw, 152px);
}
.people {
  grid-column: 3 / -1;
  margin: clamp(96px, 10vw, 152px) 0 0;
  padding: 0 0 clamp(48px, 5vw, 80px);
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: start;
}
.people__tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--panel);
}
.people__tile:nth-child(even) { transform: translateY(clamp(32px, 4.5vw, 72px)); }
.people__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.6s var(--ease-out);
}
.people__tile:hover img { transform: scale(1.05); }
.people__tile::after {
  content: "";
  position: absolute;
  inset: 55% 0 0 0;
  background: linear-gradient(to top, rgba(30, 21, 48, 0.55), rgba(30, 21, 48, 0));
  pointer-events: none;
}
.people__name {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  color: var(--crema);
  font-weight: 700;
  font-size: var(--t-label);
}

/* ==========================================================================
   3 · Servicios
   ========================================================================== */

.services .scene .orbit { --size: min(70vw, 980px); right: -38vw; top: 22%; }

.services__head {
  grid-column: 1 / span 4;
  align-self: start;
  position: sticky;
  top: 120px;
  display: grid;
  gap: 28px;
}
.services__head h2 {
  font-size: var(--t-h2);
  line-height: 1.02;
}
.services__head p { color: var(--gris); max-width: 34ch; }

.services__list {
  grid-column: 5 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
  list-style: none;
  margin: 0;
  padding: 0;
}
.services__list > li:nth-child(2) { margin-top: clamp(64px, 9vw, 140px); }

.service {
  display: grid;
  gap: 26px;
}
.service__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-media);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 56px clamp(20px, 2.4vw, 34px) clamp(20px, 2.4vw, 34px);
}
.service__media--dark {
  color: var(--crema);
  background:
    radial-gradient(60% 60% at 100% 100%, rgba(255, 61, 154, 0.35) 0%, rgba(255, 61, 154, 0) 100%),
    radial-gradient(50% 50% at 80% 110%, rgba(255, 154, 77, 0.35) 0%, rgba(255, 154, 77, 0) 100%),
    var(--ciruela);
}
.service__media--light {
  border: 1px solid var(--rule);
  background:
    radial-gradient(55% 55% at 0% 0%, rgba(74, 140, 255, 0.30) 0%, rgba(74, 140, 255, 0) 100%),
    radial-gradient(45% 45% at 20% -10%, rgba(91, 63, 224, 0.18) 0%, rgba(91, 63, 224, 0) 100%),
    var(--panel);
}

.service__tag {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: rgba(251, 246, 241, 0.92);
  color: var(--ciruela);
}
.service__media .plus-mark {
  position: absolute;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  width: 22px; height: 22px;
}
.service__media--dark .plus-mark { color: var(--crema); }

.service__body { display: grid; gap: 12px; max-width: 46ch; }
.service__body h3 { font-size: var(--t-h3); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
.service__body p { color: var(--ciruela); }
.service__body .btn { justify-self: start; margin-top: 6px; }

/* Llamada (agente de voz) */
.call {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  display: grid;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.4;
}
.call__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(251, 246, 241, 0.08);
  border: 1px solid rgba(251, 246, 241, 0.14);
}
.call__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--crema);
  display: grid; place-items: center;
  flex: none;
}
.call__avatar img { width: 24px; height: 24px; }
.call__who { display: grid; gap: 1px; }
.call__who b { font-size: 0.9375rem; }
.call__who span { font-size: 0.75rem; opacity: 0.75; }
.call__wave {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
}
.call__wave i {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 3px;
  background: var(--naranja);
  transform-origin: center;
  animation: wave 1.1s ease-in-out infinite;
}
.call__wave i:nth-child(2) { animation-delay: -0.9s; background: var(--rosa); }
.call__wave i:nth-child(3) { animation-delay: -0.6s; background: #B9A8FF; }
.call__wave i:nth-child(4) { animation-delay: -0.3s; background: var(--azul); }
.call__wave i:nth-child(5) { animation-delay: -0.75s; background: var(--rosa); }
@keyframes wave {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(30, 21, 48, 0.10);
}
.bubble--bot {
  justify-self: start;
  background: var(--crema);
  color: var(--ciruela);
  border-bottom-left-radius: 6px;
}
.bubble--user {
  justify-self: end;
  background: var(--violeta);
  color: var(--blanco);
  border-bottom-right-radius: 6px;
}
.booked {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--naranja);
  color: var(--ciruela);
  font-weight: 700;
  font-size: 0.8125rem;
}
.booked svg { width: 16px; height: 16px; }

/* Chat (chatbot) */
.chat {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  border-radius: 22px;
  overflow: hidden;
  background: var(--crema);
  box-shadow: 0 24px 60px rgba(30, 21, 48, 0.16), 0 0 0 1px var(--rule);
  font-size: 0.875rem;
  line-height: 1.4;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--ciruela);
  color: var(--crema);
}
.chat__head .call__avatar { width: 34px; height: 34px; }
.chat__head .call__avatar img { width: 20px; height: 20px; }
.chat__body {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.chat__body .bubble--bot { background: var(--blanco); box-shadow: 0 4px 14px rgba(30, 21, 48, 0.08); }
.chat__input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 12px 12px;
  padding: 10px 12px 10px 16px;
  border-radius: var(--r-pill);
  background: var(--blanco);
  border: 1px solid var(--rule);
  color: var(--gris);
  font-size: 0.8125rem;
}
.chat__send {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--violeta);
  display: grid; place-items: center;
  color: var(--blanco);
}
.chat__send svg { width: 14px; height: 14px; }

/* Mensajes que aparecen en bucle */
.js .loop > * { opacity: 0; transform: translateY(6px); }
.js .loop.is-playing > * {
  animation: msg 9s var(--ease-out) infinite;
}
.js .loop.is-playing > *:nth-child(2) { animation-delay: 0.9s; }
.js .loop.is-playing > *:nth-child(3) { animation-delay: 1.8s; }
.js .loop.is-playing > *:nth-child(4) { animation-delay: 2.7s; }
.js .loop.is-playing > *:nth-child(5) { animation-delay: 3.6s; }
@keyframes msg {
  0%   { opacity: 0; transform: translateY(6px); }
  5%, 80% { opacity: 1; transform: none; }
  88%, 100% { opacity: 0; transform: translateY(-4px); }
}

/* ==========================================================================
   4 · Declaración (panel de luz)
   ========================================================================== */

.promise { padding-block: clamp(40px, 5vw, 72px); }

.promise__panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-big);
  min-height: clamp(420px, 42vw, 600px);
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  /* cristal esmerilado: la esfera pasa por detrás y se ve difuminada */
  background:
    radial-gradient(38% 55% at 100% 0%, rgba(74, 140, 255, 0.22) 0%, rgba(74, 140, 255, 0) 100%),
    radial-gradient(30% 45% at 100% 100%, rgba(255, 154, 77, 0.24) 0%, rgba(255, 154, 77, 0) 100%),
    rgba(244, 236, 227, 0.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.1);
  backdrop-filter: blur(28px) saturate(1.1);
  box-shadow: 0 0 0 1px var(--rule), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.promise__panel .orbit { --size: min(64vw, 900px); right: -12%; top: 50%; translate: 0 -50%; }

.promise__panel > *:not(.orbit) { position: relative; z-index: 1; }
.promise__text {
  max-width: 15ch;
  font-size: var(--t-manifiesto);
  line-height: 1.03;
}
.promise__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.promise__foot p {
  max-width: 42ch;
  font-size: 1.125rem;
  background: rgba(251, 246, 241, 0.88);
  padding: 16px 20px;
  border-radius: 16px;
}

/* ==========================================================================
   5 · Demo (hueco para el chat interactivo)
   ========================================================================== */

.demo .scene .orbit { --size: min(60vw, 840px); right: -14%; top: -12%; }

.demo__head { grid-column: 1 / span 5; display: grid; gap: 28px; align-content: start; }
.demo__head h2 { font-size: var(--t-h2); line-height: 1.02; }
.demo__head p { color: var(--gris); max-width: 38ch; }

.demo__slot {
  grid-column: 7 / -1;
  position: relative;
  z-index: 1;
}
.demo__slot .chat { width: 100%; max-width: 520px; margin-left: auto; }
.demo__slot .chat__body { min-height: 260px; align-content: start; }
.demo__soon {
  justify-self: center;
  align-self: center;
  margin-top: 36px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px dashed var(--orbit);
  color: var(--gris);
  font-weight: 700;
  font-size: 0.875rem;
}
.demo__soon .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--naranja);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* ==========================================================================
   6 · Cierre
   ========================================================================== */

.closing {
  position: relative;
  padding-top: clamp(96px, 9vw, 140px);
  padding-bottom: 28px;
  overflow: hidden;
}
.closing .scene .orbit:nth-of-type(1) { --size: min(70vw, 1000px); left: 62%; top: 44%; translate: -50% -50%; }
.closing .scene .orbit:nth-of-type(2) { --size: min(48vw, 700px); left: 60%; top: 40%; translate: -50% -50%; }

.closing__grid { row-gap: 56px; }

.closing__title {
  grid-column: 1 / span 8;
  font-size: var(--t-display);
  line-height: 1;
}
.closing__title span { display: block; }
.closing__title .with-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(16px, 2vw, 32px);
  row-gap: 18px;
}
.closing__title .btn { letter-spacing: -0.01em; }

.closing__nav {
  grid-column: 9 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px var(--gutter);
  align-content: start;
  padding-top: 12px;
}
.closing__nav h3 {
  font-family: var(--f-texto);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 12px;
}
.closing__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.closing__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  font-size: var(--t-label);
}

.closing__base {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.closing__legal {
  display: grid;
  gap: 4px;
  font-size: 0.875rem;
  color: var(--gris);
}
.closing__logo { width: min(46vw, 620px); height: auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991px) {
  .rail,
  .about__statement,
  .about__summary,
  .about__body,
  .services__head,
  .services__list,
  .demo__head,
  .demo__slot,
  .closing__title,
  .closing__nav { grid-column: 1 / -1; }

  .about__summary { margin-top: 40px; }
  .people { grid-column: 1 / -1; margin-top: 24px; }
  .people__label { margin-top: 80px; }
  .about__body { margin-top: 20px; }

  .services__head { position: static; margin-bottom: 48px; }
  .demo__slot { margin-top: 48px; }
  .demo__slot .chat { margin-inline: 0; }
}

@media (max-width: 767px) {
  :root { --t-display: clamp(2.6rem, 12.4vw, 4.4rem); }

  .nav__links .hide-sm { display: none; }
  .nav__logo img { width: 116px; }

  .hero { padding-top: 96px; }
  .hero__title {
    grid-template-rows: 1fr auto auto auto 1.4fr;
    row-gap: 6px;
  }
  .hero__line--1 { grid-column: 1 / -1; }
  .hero__line--2 { grid-column: 1 / -1; }
  .hero__line--3 { grid-column: 1 / -1; }
  .hero .scene .orbit:nth-of-type(1) { --size: 140vw; }
  .hero .scene .orbit:nth-of-type(2) { --size: 180vw; }
  .hero__foot { flex-direction: column; align-items: flex-start; }

  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .services__list { grid-template-columns: 1fr; gap: 64px; }
  .service__media { aspect-ratio: auto; min-height: 340px; }
  .services__list > li:nth-child(2) { margin-top: 0; }

  .promise__panel { min-height: 560px; }

  .closing__nav { grid-template-columns: 1fr 1fr; }
  .closing__logo { width: 100%; }
  .btn--big { --h: 64px; width: 100%; }
  .closing__title .with-cta { display: block; }
  .closing__title .with-cta .btn { margin-top: 20px; }
}

@media (max-width: 380px) {
  .nav__links .btn { padding: 0 16px; }
}

/* ==========================================================================
   Movimiento reducido
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html:not(.force-motion) *,
  html:not(.force-motion) *::before,
  html:not(.force-motion) *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html:not(.force-motion).js [data-enter] .hero__line,
  html:not(.force-motion).js [data-enter] .hero__foot,
  html:not(.force-motion).js [data-enter] .scene,
  html:not(.force-motion).js .loop > * { opacity: 1 !important; transform: none !important; }
}
