/* OkariK — sitio público (rediseño 2026, maqueta "WEB OKARIK"). CSS puro, sin build step.
   El panel de administración sigue usando main.css + admin.css. */

:root {
  --blue: #3358c8;
  --blue-dark: #2441a8;
  --blue-deep: #13239a;
  --red: #e3353a;
  --red-dark: #c4262b;
  --purple: #8a3f8e;
  --ink: #1d2550;
  --gray: #6d717c;
  --line: #c9d3f1;
  --soft: #e9f0fe;
  --card: #f6f6f8;
  --card-line: #e4e6ee;
  --white: #ffffff;
  --background: #ffffff;
  /* Tokens de tema: en modo oscuro se redefinen en html.dark (al final del archivo). */
  --accent: var(--blue);          /* azul para textos y bordes (en oscuro, más claro para que se lea) */
  --surface: #ffffff;             /* tarjetas, paneles, campos enfocados */
  --surface-2: #e6e6e8;
  --surface-2-hover: #dcdfe8;
  --card-glass: rgba(246, 246, 248, .9);
  --divider: #e3e5ea;
  --field-border: #c7d5f6;
  --placeholder: #7a8dbd;
  --selected-bg: #f7f9ff;
  --header-glass: rgba(255, 255, 255, .94);
  --success-bg: #e4f6ea; --success-fg: #136c3c;
  --error-bg: #fde8e8; --error-fg: var(--red-dark);
  --gradient: linear-gradient(90deg, var(--blue) 0%, var(--purple) 55%, var(--red) 100%);
  --font-sans: "Source Sans 3", "Myriad Pro", system-ui, sans-serif;
  --font-display: "Asap Condensed", "Myriad Pro Condensed", "Arial Narrow", system-ui, sans-serif;
  --radius-card: 2rem;
  --header-h: 6.25rem;
}

/* ── BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--background); }
body {
  margin: 0; background: var(--background); color: var(--ink);
  font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
section[id] { scroll-margin-top: var(--header-h); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.container-wide { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .container, .container-wide { padding: 0 2rem; } }

.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 200; background: var(--red); color: #fff; padding: .75rem 1.25rem; border-radius: 999px; font-weight: 600; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Texto con degradado (se activa escribiendo *texto* en el panel). */
.grad {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  /* El degradado solo se pinta dentro de la caja: este margen interno evita que se corten
     las curvas de la última letra (ej. la "s") con el interletrado negativo de los títulos. */
  padding: 0 .14em .08em; margin: 0 -.14em -.08em;
}

/* Espacio reservado para una imagen que aún no se subió desde el panel. */
.img-empty { background: transparent; }

/* ── TIPOGRAFÍA COMPARTIDA ────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--red); font-size: 1rem; font-weight: 500; text-transform: uppercase; letter-spacing: .01em;
}
.eyebrow::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; }
.eyebrow-center::after { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; }
.eyebrow-tag { background: var(--red); color: #fff; padding: .05rem .5rem; font-size: .95rem; }
.eyebrow-tag::before { background: #fff; }

.title {
  font-family: var(--font-display); font-weight: 800; color: var(--accent);
  font-size: clamp(2.4rem, 5.6vw, 4.6rem); line-height: .92; letter-spacing: -0.035em;
  margin-top: .9rem;
}
.lead { margin-top: 1.25rem; font-size: clamp(1.1rem, 1.6vw, 1.45rem); line-height: 1.25; color: var(--gray); max-width: 38rem; }
.lead-blue { color: var(--accent); }
.section-head { position: relative; z-index: 2; max-width: 46rem; }
.section-head-center { margin: 0 auto; text-align: center; }
.section-head-center .lead { margin-left: auto; margin-right: auto; }

/* ── BOTONES ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: 999px; padding: .7rem 1.4rem; font-weight: 600; font-size: 1rem;
  border: 2px solid transparent; transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn .icon { width: 1.05em; height: 1.05em; }
/* Principal (y botones de envío): degradado de marca, igual que en el panel. */
.btn-grad, .btn-red { background: linear-gradient(90deg, var(--blue) 0%, var(--purple) 55%, var(--red) 100%); color: #fff; border: none; padding: calc(.7rem + 2px) calc(1.4rem + 2px); box-shadow: 0 10px 22px -14px rgba(51, 88, 200, .9); transition: transform .25s ease, box-shadow .25s ease, filter .25s ease; }
.btn-grad:hover, .btn-red:hover { filter: brightness(1.08) saturate(1.1); box-shadow: 0 14px 28px -12px rgba(227, 53, 58, .6); }
.btn-red { padding: calc(.8rem + 2px) calc(2.2rem + 2px); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-white { background: #fff; color: var(--blue); }

/* ── DECORACIÓN (anillos y círculos de línea) ────── */
/* Las decoraciones solo se recortan a los lados (bordes de pantalla); arriba y abajo
   continúan hacia la sección vecina, siempre detrás de su contenido (z-index 2). */
.deco { position: absolute; inset: 0; pointer-events: none; overflow: visible; overflow-x: clip; z-index: 0; }
.ring { position: absolute; border-radius: 50%; border: clamp(18px, 2.4vw, 34px) solid var(--blue); }
.ring-red { border-color: var(--red); }
.ring-line { position: absolute; border-radius: 50%; border: 1px solid var(--line); }
/* Los anillos gruesos viven en los márgenes laterales: debajo de 1200px no hay margen y taparían el contenido. */
@media (max-width: 1199px) {
  .deco .ring { display: none; }
  .orbit-somos { --size: 17rem !important; right: -3rem !important; top: 1rem !important; }
  .orbit-servicios { --size: 34rem !important; right: -14rem !important; top: -12rem !important; }
  .orbit-proyectos { --size: 30rem !important; right: -12rem !important; top: 2rem !important; }
}
.section { position: relative; padding: clamp(4.5rem, 9vw, 8rem) 0; overflow: visible; overflow-x: clip; }
.section > .container, .section > .container-wide { position: relative; z-index: 2; }

/* ── HEADER ───────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 60; background: transparent; transition: background .3s ease, box-shadow .3s ease; }
.site-header.scrolled { background: var(--header-glass); backdrop-filter: blur(10px); box-shadow: 0 6px 24px -18px rgba(29, 37, 80, .45); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand-logo { height: 3.1rem; width: auto; }
.brand-mark { width: 2.9rem; height: 2.9rem; border-radius: 50%; object-fit: cover; }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: .02em; line-height: 1; }
.brand-word .oka { color: var(--red); }
.brand-word .rik { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 1.5rem; }
.talk-btn { display: inline-flex; align-items: center; font-size: clamp(1.1rem, 2.2vw, 1.85rem); font-weight: 600; color: var(--accent); letter-spacing: -0.01em; line-height: 1; }
.talk-btn .hl { display: inline-flex; align-items: center; gap: .35rem; background: var(--blue); color: #fff; padding: .2rem .35rem .25rem; margin-left: .2rem; transition: background .25s ease; }
.talk-btn:hover .hl { background: var(--red); }
.talk-btn .icon { width: 1.05em; height: 1.05em; }
.burger {
  width: 3.5rem; height: 3rem; border-radius: .9rem; border: 2px solid var(--accent); background: transparent; color: var(--accent);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; transition: background .25s ease, color .25s ease;
}
.burger span { width: 1.6rem; height: 3px; border-radius: 2px; background: currentColor; }
.burger:hover { background: var(--blue); color: #fff; }

.site-header.is-blue { background: var(--blue); }
.site-header.is-blue.scrolled { background: rgba(51, 88, 200, .96); }
.is-blue .talk-btn { color: #fff; }
.is-blue .talk-btn .hl { background: #fff; color: var(--blue); }
.is-blue .burger { border-color: #fff; color: #fff; }
.is-blue .burger:hover { background: #fff; color: var(--blue); }
.is-blue .brand-word .rik { color: #fff; }

@media (max-width: 640px) {
  :root { --header-h: 4.75rem; }
  .talk-btn .txt { display: none; }
  .talk-btn .hl { border-radius: 999px; padding: .55rem; margin: 0; }
  .talk-btn .hl-text { display: none; }
  .brand-logo { height: 2.4rem; }
  .brand-word { font-size: 1.5rem; }
  .header-actions { gap: .75rem; }
}

/* ── MENÚ (pantalla completa) ────────────────────── */
.menu-panel {
  position: fixed; inset: 0; z-index: 100; color: #fff; overflow-y: auto;
  background: radial-gradient(circle at 85% 110%, rgba(227, 53, 58, .45), transparent 45%), linear-gradient(160deg, var(--blue) 0%, var(--blue-deep) 100%);
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease;
}
.menu-panel.open { opacity: 1; visibility: visible; }
.menu-panel .header-inner .brand-word .rik { color: #fff; }
.menu-close { border-color: #fff; color: #fff; font-size: 1.75rem; line-height: 1; }
.menu-close:hover { background: #fff; color: var(--blue); }
/* Solo margen vertical: el lateral lo da .container-wide (antes "padding: 2rem 0 4rem" lo anulaba y el texto quedaba pegado al borde). */
.menu-grid { display: grid; gap: 2.5rem; padding-top: 2rem; padding-bottom: 4rem; }
@media (min-width: 900px) { .menu-grid { grid-template-columns: 1.4fr 1fr; align-items: end; padding-top: 4rem; gap: 3rem; } }
@media (max-width: 767px) {
  .menu-panel .container-wide { padding-left: 1.75rem; padding-right: 1.75rem; }
  .menu-panel .header-inner { padding-top: .25rem; }
}
.menu-links { display: flex; flex-direction: column; gap: .35rem; }
.menu-contact { padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, .18); }
@media (min-width: 900px) { .menu-contact { padding-top: 0; border-top: 0; } }
.menu-links a {
  display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.05; letter-spacing: -0.03em; opacity: 0; transform: translateY(18px);
  transition: color .2s ease, opacity .5s ease, transform .5s ease;
}
.menu-panel.open .menu-links a { opacity: 1; transform: none; }
.menu-links li:nth-child(2) a { transition-delay: .04s; } .menu-links li:nth-child(3) a { transition-delay: .08s; }
.menu-links li:nth-child(4) a { transition-delay: .12s; } .menu-links li:nth-child(5) a { transition-delay: .16s; }
.menu-links li:nth-child(6) a { transition-delay: .2s; }  .menu-links li:nth-child(7) a { transition-delay: .24s; }
.menu-links li:nth-child(8) a { transition-delay: .28s; } .menu-links li:nth-child(n+9) a { transition-delay: .32s; }
.menu-links a:hover { color: #ffb3b5; }
.menu-contact { display: flex; flex-direction: column; gap: 1.1rem; font-size: 1.1rem; line-height: 1.45; }
.menu-contact a, .menu-contact p { display: flex; align-items: flex-start; gap: .75rem; }
.menu-contact .icon { margin-top: .15rem; }

/* ── HERO ─────────────────────────────────────────── */
.hero {
  --orbit-outer-size: 56rem; --orbit-inner-size: 42rem;
  position: relative; overflow: visible; overflow-x: clip;
  margin-top: calc(var(--header-h) * -1); padding-top: var(--header-h);
  /* Alto mínimo para que la órbita (y el cohete) no se corten por arriba. */
  min-height: max(min(100vh, 58rem), calc(var(--orbit-outer-size) + 2rem));
  display: flex; align-items: center;
}
.hero-orbits { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .18; }
.hero-content { position: relative; z-index: 2; text-align: center; margin: 0 auto; padding: 3rem 0 5rem; max-width: 52rem; }
.badge { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--red); color: var(--red); border-radius: 999px; padding: .2rem .9rem; font-size: 1.05rem; background: var(--surface); }
.badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--red); }
.hero-title {
  margin-top: 1.4rem; font-family: var(--font-sans); font-weight: 800; color: var(--accent);
  font-size: clamp(2.9rem, 8vw, 6.6rem); line-height: .92; letter-spacing: -0.045em;
}
.hero-sub { margin: 1.75rem auto 0; max-width: 37rem; color: var(--accent); font-size: clamp(1.1rem, 1.9vw, 1.5rem); line-height: 1.2; }
.hero-ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.25rem; }

/* Órbitas del hero: el círculo dibujado (.orbit-ring) y el recorrido (.orbit) comparten tamaño y centro. */
.orbit-outer { --orbit: var(--orbit-outer-size); }
.orbit-inner { --orbit: var(--orbit-inner-size); }
/* Centradas sobre el contenido del hero (que empieza debajo de la cabecera). */
.hero-orbits .orbit-ring, .hero-orbits .orbit { position: absolute; left: 50%; top: calc(50% + var(--header-h) / 2); width: var(--orbit); height: var(--orbit); transform: translate(-50%, -50%); }
.orbit-track { position: absolute; inset: 0; border-radius: 50%; animation: orbit-spin 42s linear infinite; }
.orbit-track-reverse { animation-duration: 64s; animation-direction: reverse; }
/* Estela de luz que el cohete deja sobre la órbita, detrás de él. */
.orbit-outer .orbit-track::before, .orbit-track.has-trail::before {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 285deg, rgba(51, 88, 200, .25) 315deg, rgba(227, 53, 58, .85) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}
.orbit-rocket { position: absolute; left: 50%; top: 0; width: clamp(4.5rem, 7.5vw, 7rem); transform: translate(-50%, -50%) rotate(90deg); }

/* Órbita pequeña reutilizable: <div class="mini-orbit" style="--size:30rem;right:..;top:.."> */
.mini-orbit { position: absolute; width: var(--size, 30rem); height: var(--size, 30rem); }
.mini-orbit-line { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line); }
.mini-orbit .orbit-track { animation-duration: 30s; }
.mini-orbit .orbit-rocket { width: clamp(2.6rem, 3.6vw, 3.4rem); }
.mini-orbit .orbit-rocket-md { width: clamp(3.2rem, 4.8vw, 4.6rem); }
/* Sentido antihorario: el cohete mira al otro lado y la estela queda del lado opuesto. */
.orbit-track.ccw { animation-direction: reverse; }
.orbit-track.ccw .orbit-rocket { transform: translate(-50%, -50%) rotate(-90deg); }
.orbit-track.ccw.has-trail::before { background: conic-gradient(from 0deg, rgba(227, 53, 58, .85) 0deg, rgba(51, 88, 200, .25) 45deg, transparent 75deg 360deg); }
.orbit-rocket svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 0 14px rgba(255, 138, 61, .45)) drop-shadow(0 10px 18px rgba(27, 92, 110, .25)); }
.orbit-satellite { position: absolute; left: 50%; top: 0; width: .8rem; height: .8rem; border-radius: 50%; background: var(--red); transform: translate(-50%, -50%); box-shadow: 0 0 0 5px rgba(227, 53, 58, .15), 0 0 18px 4px rgba(227, 53, 58, .45); }
.rocket-body { animation: rocket-bob 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 65%; }
.rocket-flame { animation: rocket-flame-flicker .32s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0%; }
.rocket-smoke-dot { opacity: .12; animation: rocket-smoke-rise 2.6s ease-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes rocket-bob { 0%, 100% { transform: translateX(0) rotate(-2deg); } 50% { transform: translateX(6px) rotate(2deg); } }
@keyframes rocket-flame-flicker { 0%, 100% { transform: scaleY(1) scaleX(1); opacity: 1; } 50% { transform: scaleY(1.2) scaleX(.86); opacity: .85; } }
@keyframes rocket-smoke-rise { 0% { transform: translateY(0) scale(.6); opacity: .3; } 100% { transform: translateY(90px) scale(1.8); opacity: 0; } }
/* Las órbitas del hero se inclinan en 3D siguiendo el mouse (site.js fija --tilt-x / --tilt-y). */
.hero-orbits { transform: perspective(1600px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .8s cubic-bezier(.16, 1, .3, 1); }

/* ── Planeta 3D ── tamaño con --p; las medidas internas van en em (1em = --p / 10). */
.planet-scene {
  --p: clamp(6.5rem, 12vw, 11.5rem);
  position: absolute; right: clamp(2rem, 9vw, 9rem); bottom: clamp(3rem, 12%, 8rem); z-index: 1;
  width: var(--p); height: var(--p); font-size: calc(var(--p) / 10); perspective: 900px; pointer-events: none;
}
.planet-tilt, .planet-float, .planet-axis { position: absolute; inset: 0; transform-style: preserve-3d; }
.planet-tilt { transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .8s cubic-bezier(.16, 1, .3, 1); }
.planet-float { animation: planet-float 7s ease-in-out infinite; }
.planet-axis { transform: rotateZ(-20deg); }
.planet-halo { position: absolute; inset: -70%; border-radius: 50%; background: radial-gradient(closest-side, rgba(227, 53, 58, .5) 0%, rgba(227, 53, 58, .3) 34%, rgba(138, 63, 142, .12) 55%, transparent 100%); animation: halo-pulse 5s ease-in-out infinite; }
.planet {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 32% 28%, #ffb0a6 0%, #f0484b 26%, #c4262b 58%, #5e0b10 100%);
}
.planet-surface {
  position: absolute; inset: 0; border-radius: 50%; opacity: .85;
  background:
    radial-gradient(circle at 20% 60%, rgba(94, 11, 16, .45) 0 4%, transparent 5%),
    radial-gradient(circle at 55% 30%, rgba(94, 11, 16, .35) 0 3%, transparent 4%),
    radial-gradient(circle at 80% 70%, rgba(255, 200, 190, .35) 0 2.5%, transparent 3.5%),
    repeating-linear-gradient(168deg, transparent 0 8%, rgba(255, 215, 205, .28) 8% 11%, rgba(110, 10, 18, .22) 11% 16%, transparent 16% 24%);
  background-size: 300% 100%;
  animation: planet-spin 18s linear infinite;
}
.planet-shade { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset -1.7em -1.3em 2.4em rgba(50, 0, 8, .62), inset .5em .45em 1.1em rgba(255, 255, 255, .5); }
.planet-ring { position: absolute; left: 50%; top: 50%; width: 240%; height: 240%; margin: -120% 0 0 -120%; transform: rotateX(74deg); transform-style: preserve-3d; }
.planet-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(51, 88, 200, .95), rgba(138, 63, 142, .85), rgba(227, 53, 58, .95), rgba(255, 200, 87, .85), rgba(51, 88, 200, .95));
  -webkit-mask: radial-gradient(farthest-side, transparent 60%, #000 61% 69%, transparent 70% 73%, #000 74% 90%, transparent 91%);
  mask: radial-gradient(farthest-side, transparent 60%, #000 61% 69%, transparent 70% 73%, #000 74% 90%, transparent 91%);
  animation: ring-spin 14s linear infinite;
}
.moon-orbit { position: absolute; left: 50%; top: 50%; width: 330%; height: 330%; margin: -165% 0 0 -165%; transform: rotateX(74deg); transform-style: preserve-3d; }
.moon-arm { position: absolute; inset: 0; transform-style: preserve-3d; animation: moon-orbit 9s linear infinite; }
/* La luna gira con el brazo pero se "des-rota" para mirar siempre a la pantalla. */
/* Dentro del espacio 3D nada puede dibujarse fuera de la caja del elemento
   (box-shadow, pseudo-elementos más grandes): el navegador lo recorta en un
   rectángulo. Por eso esfera y brillo son un único degradado dentro de la caja:
   la esfera ocupa el centro (hasta 50%) y el brillo se desvanece hacia el borde. */
.moon {
  position: absolute; left: 50%; top: 0; width: 14%; height: 14%;
  background:
    radial-gradient(circle at 42% 40%, rgba(220, 230, 255, .95) 0, rgba(140, 170, 245, .6) 9%, transparent 18%),
    radial-gradient(closest-side, var(--blue) 0, #2a49b8 40%, var(--blue-deep) 49%, rgba(51, 88, 200, .4) 51%, rgba(51, 88, 200, .14) 72%, rgba(51, 88, 200, 0) 100%);
  animation: moon-face 9s linear infinite;
}
@keyframes planet-float { 0%, 100% { transform: translate3d(0, 0, 0) rotateY(-8deg); } 50% { transform: translate3d(0, -.9em, 0) rotateY(10deg); } }
@keyframes halo-pulse { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes planet-spin { to { background-position: -300% 0; } }
@keyframes ring-spin { to { transform: rotate(360deg); } }
@keyframes moon-orbit { to { transform: rotateZ(360deg); } }
@keyframes moon-face { from { transform: translate(-50%, -50%) rotateZ(0deg) rotateX(-74deg); } to { transform: translate(-50%, -50%) rotateZ(-360deg) rotateX(-74deg); } }

/* ── Estrellas ── */
.stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.stars-layer { position: absolute; left: 0; top: 0; width: 2px; height: 2px; border-radius: 50%; animation: twinkle 4s ease-in-out infinite; }
.stars-layer-1 { animation-delay: -1.3s; animation-duration: 5s; }
.stars-layer-2 { animation-delay: -2.6s; animation-duration: 3.4s; }
.shooting-star {
  position: absolute; width: 9rem; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgba(227, 53, 58, 1), rgba(138, 63, 142, .6) 30%, rgba(51, 88, 200, 0));
  box-shadow: 0 0 10px rgba(227, 53, 58, .6);
  animation: shoot 9s ease-in infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes shoot {
  0% { transform: translate(0, 0) rotate(-33deg); opacity: 0; }
  3% { opacity: 1; }
  11% { transform: translate(-26rem, 17rem) rotate(-33deg); opacity: 0; }
  100% { transform: translate(-26rem, 17rem) rotate(-33deg); opacity: 0; }
}

@media (max-width: 700px) {
  .hero { --orbit-outer-size: 40rem; --orbit-inner-size: 30rem; }
  /* En celular el planeta va centrado bajo los botones, entero dentro de la pantalla. */
  .planet-scene { --p: 4.6rem; right: auto; left: calc(50% - var(--p) / 2); bottom: 2.25rem; }
  .orbit-somos { --size: 12rem !important; right: -5rem !important; top: .5rem !important; }
  .orbit-servicios { --size: 22rem !important; right: -10rem !important; top: -7rem !important; }
  .orbit-proyectos { --size: 20rem !important; right: -9rem !important; top: 1rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  .orbit-track { animation: none; transform: rotate(48deg); }
  .orbit-track-reverse { transform: rotate(-120deg); }
  .rocket-body, .rocket-flame, .rocket-smoke-dot { animation: none; }
  .planet-float, .planet-halo, .planet-surface, .planet-ring::before, .moon-arm, .moon, .stars-layer, .shooting-star { animation: none; }
  .moon { transform: translate(-50%, -50%) rotateX(-74deg); }
  .shooting-star { display: none; }
  .hero-orbits, .planet-tilt { transform: none; }
}

/* ── NOSOTROS ─────────────────────────────────────── */
.about-text { margin-top: 1.5rem; max-width: 40rem; color: var(--gray); font-size: 1.15rem; line-height: 1.6; }
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: clamp(3rem, 7vw, 6rem) auto 0; max-width: 54rem; position: relative; z-index: 2; }
.stat { text-align: center; padding: .5rem clamp(.4rem, 2vw, 1.5rem); }
.stat + .stat { border-left: 3px solid var(--divider); }
.stat-value { font-family: var(--font-display); font-weight: 800; color: var(--red); font-size: clamp(2.1rem, 7.5vw, 4.6rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: .9rem; color: var(--accent); font-size: clamp(.95rem, 2.6vw, 1.3rem); line-height: 1.1; max-width: 9rem; margin-left: auto; margin-right: auto; }
@media (max-width: 560px) { .stat + .stat { border-left-width: 2px; } .stat-label { margin-top: .5rem; } }

.logos { position: relative; z-index: 2; display: flex; align-items: center; gap: .75rem; margin-top: clamp(3.5rem, 8vw, 7rem); }
.logos-track { flex: 1; display: flex; gap: clamp(1.5rem, 3vw, 3rem); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: .5rem 0; }
.logos-track::-webkit-scrollbar { display: none; }
/* Cinta automática: sin "imanes" de scroll y con bordes difuminados. */
.logos-track.is-auto { scroll-snap-type: none; scroll-behavior: auto; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.logos-track.is-auto .logo-item { scroll-snap-align: none; }
.logo-item { flex: 0 0 auto; width: clamp(9.5rem, 15vw, 13rem); height: clamp(5rem, 8vw, 7rem); display: flex; align-items: center; justify-content: center; scroll-snap-align: start; }
.logo-item img { max-height: 100%; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .3s ease, opacity .3s ease, transform .3s ease; }
.logo-item:hover img { filter: none; opacity: 1; transform: scale(1.06); }
.logo-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.05; text-align: center; color: #9a9ca3; text-transform: uppercase; }
.logos-arrow { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: none; background: var(--surface); color: var(--accent); box-shadow: 0 4px 14px rgba(29, 37, 80, .18); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logos-arrow:hover { background: var(--blue); color: #fff; }

/* ── SERVICIOS ────────────────────────────────────── */
.services-grid { position: relative; z-index: 2; display: grid; gap: 2.5rem; margin-top: clamp(3rem, 6vw, 5.5rem); }
@media (min-width: 680px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 679px) { .services-grid { gap: 1.25rem; } .service-card { min-height: 12.5rem; padding: 1.5rem 1.4rem 1.4rem; } .service-media { padding: .5rem 0; } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); gap: 3.25rem 3.5rem; } }
.service-card {
  position: relative; display: flex; flex-direction: column; min-height: 17rem; padding: 2rem 1.75rem 1.75rem;
  background: var(--card-glass); border: 1px solid var(--card-line); border-radius: var(--radius-card);
  box-shadow: 0 18px 30px -24px rgba(29, 37, 80, .35); backdrop-filter: blur(2px);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 28px 40px -26px rgba(29, 37, 80, .45); border-color: var(--line); }
.service-num { color: var(--accent); font-size: 1.1rem; }
.service-media { flex: 1; display: flex; align-items: center; padding: 1rem 0; }
.service-media img { max-height: 6.5rem; width: auto; }
.service-title { font-family: var(--font-display); font-weight: 800; color: var(--red); font-size: clamp(1.75rem, 2.5vw, 2.15rem); line-height: .95; letter-spacing: -0.03em; }
.service-text { margin-top: .6rem; color: var(--accent); font-size: 1.15rem; line-height: 1.2; }

/* ── PROYECTOS (mosaico) ─────────────────────────── */
.bento { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(16.5rem, auto); grid-auto-flow: dense; gap: .9rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.bento-card {
  position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--card-bg, var(--blue));
  color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.75rem 1.6rem;
  grid-column: span var(--cols, 4); grid-row: span var(--rows, 1); isolation: isolate;
}
.bento-card .bento-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.bento-card:has(img.bento-img)::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .45) 100%); }
.bento-card:hover .bento-img { transform: scale(1.04); }
.bento-card.text-dark { color: var(--ink); }
.bento-card.text-dark::after { display: none; }
.tag { display: inline-block; align-self: flex-start; background: var(--red); color: #fff; font-size: 1rem; line-height: 1.25; padding: 0 .35rem; }
.bento-title { margin-top: .6rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1; letter-spacing: -0.02em; }
.bento-text { margin-top: .45rem; font-size: 1.1rem; line-height: 1.2; max-width: 32rem; opacity: .95; }
.bento-cta { background: var(--surface-2); color: var(--accent); align-items: center; justify-content: center; text-align: center; gap: 1.5rem; transition: background .3s ease; }
.bento-cta:hover { background: var(--surface-2-hover); }
.bento-cta-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 3.4vw, 2.7rem); line-height: .9; letter-spacing: -0.03em; }
.bento-cta-plus { width: 4.4rem; height: 4.4rem; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; transition: transform .3s ease, background .3s ease; }
.bento-cta-plus .icon { width: 2.4rem; height: 2.4rem; stroke-width: 3; }
.bento-cta:hover .bento-cta-plus { transform: rotate(90deg); background: var(--red); }
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card { grid-column: span var(--cols-sm, 1); grid-row: span 1; min-height: 17rem; }
}
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .bento-card { grid-column: auto; } }

/* ── POR QUÉ ELEGIRNOS ───────────────────────────── */
.features { position: relative; z-index: 2; display: grid; margin-top: clamp(3rem, 6vw, 5rem); }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); row-gap: 3rem; } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(4, 1fr); } .feature + .feature { border-left: 3px solid var(--divider); } }
.feature { text-align: center; padding: 1rem 1.5rem; display: flex; flex-direction: column; align-items: center; }
.feature-icon { height: 4.5rem; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.feature-icon .icon { width: 4rem; height: 4rem; stroke-width: 1.6; }
.feature-icon img { max-height: 4.5rem; width: auto; }
.feature-title { margin-top: 1rem; font-family: var(--font-display); font-weight: 800; color: var(--red); font-size: 1.95rem; line-height: .95; letter-spacing: -0.02em; min-height: 3.7rem; display: flex; align-items: center; }
.feature-text { margin-top: 1rem; color: var(--accent); font-size: 1.2rem; line-height: 1.2; max-width: 14rem; }

/* ── ESENCIA ──────────────────────────────────────── */
.essence .title { font-size: clamp(2.5rem, 6.2vw, 5.4rem); }
.essence-rule { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); opacity: .7; }

/* ── Escena de despegue sobre la línea de "Nuestra esencia" ──
   Ciclo de 12s: el astronauta corre hasta la torre (0–38%), sube en el ascensor
   (40–50%), cruza el brazo y entra por la escotilla (52–63%); el brazo se retira,
   el cohete tiembla, se enciende y despega (64–94%) y reaparece al iniciar el ciclo.
   Medidas en función de --w (ancho del SVG del cohete de marca, 300×420: el
   cuerpo ocupa el 31% central y las aletas apoyan a 296/420 de su alto). */
.launch-strip {
  --cycle: 12s; --w: clamp(8rem, 14vw, 13rem); --astro: clamp(2.6rem, 3.6vw, 3.2rem);
  --pad: calc(var(--w) * .92);            /* torre .16 + brazo .11 + cohete (el SVG sobresale a la izquierda) */
  --arm-top: calc(var(--w) * .42);        /* altura del brazo de acceso (bajo la escotilla) */
  --tower: #8b94a7; --tower-light: rgba(139, 148, 167, .45);
  position: relative; width: min(48rem, 86%); height: calc(var(--w) * 1.05); margin: clamp(1.5rem, 4vw, 3rem) auto 0;
}
html.dark .launch-strip { --tower: #6c7aa0; --tower-light: rgba(108, 122, 160, .45); }
.launch-pad { position: absolute; right: 0; bottom: 0; width: var(--pad); height: 100%; }
.launch-base { position: absolute; left: calc(var(--w) * -.06); right: calc(var(--w) * .1); bottom: calc(var(--w) * -.05); height: calc(var(--w) * .05); border-radius: 3px; background: linear-gradient(180deg, #a3abbb, #626a7b); }
html.dark .launch-base { background: linear-gradient(180deg, #4b5677, #2a3150); }

/* Torre de lanzamiento */
.launch-tower {
  position: absolute; left: 0; bottom: 0; width: calc(var(--w) * .16); height: calc(var(--w) * .78);
  border-left: 3px solid var(--tower); border-right: 3px solid var(--tower);
  background:
    repeating-linear-gradient(0deg, transparent 0 14px, var(--tower) 14px 16px),
    repeating-linear-gradient(45deg, transparent 0 9px, var(--tower-light) 9px 11px),
    repeating-linear-gradient(-45deg, transparent 0 9px, var(--tower-light) 9px 11px);
}
.launch-tower::before { content: ""; position: absolute; left: -6px; right: -6px; top: -5px; height: 5px; border-radius: 2px; background: var(--tower); }
.tower-beacon { position: absolute; left: 50%; top: -14px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px 3px rgba(227, 53, 58, .7); animation: beacon 1.1s steps(2, jump-none) infinite; }
.tower-lift { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--w) * .025); background: var(--red); border-radius: 2px; animation: tower-lift var(--cycle) ease-in-out infinite; }
.tower-arm { position: absolute; left: 100%; bottom: calc(var(--arm-top) - var(--w) * .025); width: calc(var(--w) * .11 + 3px); height: calc(var(--w) * .025); background: var(--tower); border-radius: 2px; transform-origin: 0 50%; animation: tower-arm var(--cycle) ease-in-out infinite; }

/* Cohete */
.launch-rocket { position: absolute; right: 0; bottom: calc(var(--w) * -.413); width: var(--w); animation: rocket-launch var(--cycle) ease-in infinite; }
.launch-rocket svg { width: 100%; height: auto; overflow: visible; display: block; filter: drop-shadow(0 0 14px rgba(255, 138, 61, .35)); }
.launch-rocket .rocket-body { animation: none; }
.launch-rocket .rocket-flame { animation: rocket-flame-flicker .2s ease-in-out infinite, launch-flame var(--cycle) linear infinite; }
.launch-rocket .rocket-smoke { animation: launch-smoke var(--cycle) linear infinite; }
.launch-puff { position: absolute; bottom: calc(var(--w) * -.1); left: calc(100% - var(--w) / 2); width: calc(var(--w) * .45); height: calc(var(--w) * .25); margin-left: calc(var(--w) * -.225); border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, rgba(205, 212, 230, .95), rgba(205, 212, 230, 0)); animation: launch-puff var(--cycle) ease-out infinite; }
.launch-puff-2 { --dx: calc(var(--w) * -.5); animation-delay: .15s; }
.launch-puff-3 { --dx: calc(var(--w) * .5); animation-delay: .3s; }
html.dark .launch-puff { background: radial-gradient(closest-side, rgba(150, 165, 210, .7), rgba(150, 165, 210, 0)); }

/* Astronauta */
.astronaut-run { position: absolute; bottom: 0; left: 0; width: var(--astro); animation: astro-route var(--cycle) linear infinite; }
.astronaut { transform: rotate(7deg); transform-origin: 50% 100%; }
.astronaut svg { width: 100%; height: auto; overflow: visible; display: block; filter: drop-shadow(0 4px 6px rgba(19, 35, 154, .25)); }
.astro-body { animation: astro-bob .26s ease-in-out infinite alternate; }
.astro-leg, .astro-arm { transform-box: fill-box; transform-origin: 50% 8%; animation: astro-swing .52s ease-in-out infinite alternate; }
.astro-leg-front, .astro-arm-back { animation-delay: -.26s; }
.astro-arm { animation-name: astro-swing-arm; }

@keyframes astro-route {
  0% { left: 0; opacity: 0; transform: translateY(0) scale(1); }
  3% { opacity: 1; }
  38%, 40% { left: calc(100% - var(--w) * .84 - var(--astro) / 2); transform: translateY(0) scale(1); opacity: 1; }
  50%, 52% { left: calc(100% - var(--w) * .84 - var(--astro) / 2); transform: translateY(calc(var(--arm-top) * -1)) scale(1); opacity: 1; }
  60% { left: calc(100% - var(--w) * .5 - var(--astro) / 2); transform: translateY(calc(var(--arm-top) * -1)) scale(1); opacity: 1; }
  63%, 100% { left: calc(100% - var(--w) * .5 - var(--astro) / 2); transform: translateY(calc(var(--arm-top) * -1 - var(--w) * .03)) scale(.3); opacity: 0; }
}
@keyframes tower-lift {
  0%, 40% { transform: translateY(0); }
  50%, 74% { transform: translateY(calc(var(--arm-top) * -1 + var(--w) * .025)); }
  86%, 100% { transform: translateY(0); }
}
@keyframes tower-arm { 0%, 64% { transform: rotate(0); } 68%, 94% { transform: rotate(-75deg); } 99%, 100% { transform: rotate(0); } }
@keyframes beacon { 0% { opacity: 1; } 100% { opacity: .25; } }
@keyframes astro-bob { from { transform: translateY(0); } to { transform: translateY(-2.5px); } }
@keyframes astro-swing { from { transform: rotate(34deg); } to { transform: rotate(-34deg); } }
@keyframes astro-swing-arm { from { transform: rotate(-40deg); } to { transform: rotate(40deg); } }
@keyframes rocket-launch {
  0% { transform: translateY(0); opacity: 0; }
  6%, 67% { transform: translateY(0) rotate(0); opacity: 1; }
  68% { transform: translate(-1px, 0) rotate(-.8deg); }
  69% { transform: translate(1px, 0) rotate(.8deg); }
  70% { transform: translate(-1px, 0) rotate(-.8deg); }
  71% { transform: translate(1px, 0) rotate(.8deg); }
  72% { transform: translateY(0) rotate(0); }
  90% { transform: translateY(calc(var(--w) * -1.9)); opacity: 1; }
  95%, 100% { transform: translateY(calc(var(--w) * -2.6)); opacity: 0; }
}
@keyframes launch-flame { 0%, 66% { opacity: 0; } 69%, 92% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes launch-smoke { 0%, 67% { opacity: 0; } 71%, 90% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes launch-puff {
  0%, 67% { opacity: 0; transform: translateX(0) scale(.4); }
  73% { opacity: .95; }
  90%, 100% { opacity: 0; transform: translateX(var(--dx, 0)) scale(1.9); }
}
@media (prefers-reduced-motion: reduce) {
  .astronaut-run { animation: none; left: calc(100% - var(--w) * .84 - var(--astro) * 1.6); }
  .launch-rocket, .launch-rocket .rocket-flame, .launch-rocket .rocket-smoke, .launch-puff, .tower-lift, .tower-arm, .tower-beacon, .astro-body, .astro-leg, .astro-arm { animation: none; }
  .launch-rocket .rocket-flame, .launch-rocket .rocket-smoke { opacity: 0; }
}

/* ── CONTACTO ─────────────────────────────────────── */
.contact { position: relative; padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem); overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 58%; z-index: 0;
  background: radial-gradient(ellipse at 50% 120%, var(--blue-deep), transparent 70%), linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
}
.contact-card {
  position: relative; z-index: 2; display: grid; gap: 3rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: clamp(2rem, 4vw, 3.5rem); padding: clamp(2rem, 5vw, 4.25rem) clamp(1.5rem, 4vw, 3.75rem);
  box-shadow: 0 30px 60px -40px rgba(19, 35, 154, .6);
}
@media (min-width: 960px) { .contact-card { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.contact-card .title { font-size: clamp(2.5rem, 5vw, 4.4rem); }
.contact-text { margin-top: 1.4rem; color: var(--accent); font-size: 1.35rem; line-height: 1.2; max-width: 31rem; }
.contact-list { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-item { display: flex; align-items: flex-start; gap: .85rem; color: var(--accent); font-size: 1.4rem; line-height: 1.15; }
.contact-item:hover { color: var(--red); }
.contact-ico { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-ico .icon { width: 1.25rem; height: 1.25rem; }
.contact-form { display: flex; flex-direction: column; gap: .75rem; align-self: start; position: relative; z-index: 2; }
@media (min-width: 960px) { .contact-form { padding-top: .5rem; } }
.field { width: 100%; background: var(--soft); border: 1px solid var(--field-border); border-radius: .9rem; padding: 1rem 1.25rem; color: var(--ink); font: inherit; font-size: 1.05rem; transition: border-color .2s ease, background .2s ease; }
.field::placeholder { color: var(--placeholder); }
.field:focus { outline: none; border-color: var(--accent); background: var(--surface); }
textarea.field { min-height: 9rem; resize: vertical; }
.contact-form .btn-red { align-self: flex-start; margin-top: .5rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Columna derecha: formulario arriba y la imagen abajo, a la altura del mapa. */
.contact-side { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.contact-side .contact-form { align-self: stretch; }
.contact-figure { margin-top: auto; display: flex; justify-content: center; pointer-events: none; }
.contact-figure img { width: 100%; max-width: 27rem; height: auto; filter: drop-shadow(0 24px 30px rgba(19, 35, 154, .18)); }
@media (min-width: 960px) { .contact-figure { margin-bottom: calc(-1 * clamp(2rem, 5vw, 4.25rem)); } }
@media (max-width: 959px) { .contact-figure img { max-width: 20rem; } }
.form-alert { padding: .9rem 1.1rem; border-radius: .9rem; font-weight: 600; }
.form-alert-success { background: var(--success-bg); color: var(--success-fg); }
.form-alert-error { background: var(--error-bg); color: var(--error-fg); }

/* ── FRANJA ANIMADA (marquee) ────────────────────── */
.marquee { overflow: hidden; background: var(--blue); color: #fff; padding: 1.1rem 0; box-shadow: 0 10px 20px -16px rgba(0, 0, 0, .5); position: relative; z-index: 5; }
.marquee-light { background: var(--surface); color: var(--accent); }
.marquee-track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem; }
.marquee-item { font-family: var(--font-sans); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); text-transform: uppercase; line-height: 1; letter-spacing: .01em; }
.marquee-dot { width: .9rem; height: .9rem; border-radius: 50%; background: var(--red); flex-shrink: 0; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── PORTAFOLIO / PROYECTO ───────────────────────── */
.page-pad { padding: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(4rem, 8vw, 6rem); }
.portfolio-intro { max-width: 46rem; margin: 0 auto 2rem; text-align: center; color: var(--gray); font-size: 1.25rem; }
.empty-note { text-align: center; color: var(--gray); padding: 4rem 0; font-size: 1.2rem; }

.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: dense; gap: .6rem; }
.project-cover, .project-shot { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--card-bg, var(--blue)); min-height: 19rem; }
.project-cover { grid-column: span 8; grid-row: span 2; min-height: 34rem; }
/* En la página del proyecto las imágenes se muestran completas (sin recortar) sobre el color del proyecto. */
.project-cover img, .project-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: clamp(.75rem, 2.5vw, 2rem); }
.project-shot { grid-column: span var(--cols, 4); }
.project-info { grid-column: span 4; padding: 2.5rem 1.5rem 1.5rem 2rem; }
.project-name { margin-top: .75rem; font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: clamp(2rem, 3.2vw, 2.6rem); line-height: 1; letter-spacing: -0.02em; }
.project-subtitle { margin-top: .75rem; color: var(--accent); font-size: 1.3rem; line-height: 1.15; }
.project-desc { margin-top: 1.5rem; color: var(--gray); font-size: 1.2rem; line-height: 1.3; }
.project-desc p + p { margin-top: .8rem; }
.project-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: clamp(3rem, 6vw, 5rem); padding-top: 2.5rem; border-top: 1px solid var(--line); }
.project-foot .title { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); }
.link-more { display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); font-weight: 600; font-size: 1.1rem; }
.link-more:hover { color: var(--red); }
@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-cover, .project-info { grid-column: 1 / -1; grid-row: auto; min-height: 22rem; }
  .project-info { min-height: 0; padding: 1.5rem .5rem; }
  .project-shot { grid-column: span 1; min-height: 14rem; }
}
@media (max-width: 560px) { .project-shot { grid-column: 1 / -1; } }

/* ── PÁGINAS DE DETALLE (servicio, manual, 404) ──── */
.page-hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.back-link { display: flex; width: fit-content; align-items: center; gap: .35rem; color: var(--accent); font-weight: 600; margin-bottom: 1.75rem; }
.back-link:hover { color: var(--red); }
.narrow { max-width: 54rem; margin: 0 auto; padding: 0 1.25rem; position: relative; z-index: 2; }
.detail-hook { margin-top: 1rem; color: var(--red); font-size: 1.3rem; font-weight: 600; }
.detail-blocks { display: grid; gap: 3.5rem; padding-bottom: clamp(4rem, 8vw, 6rem); }
.detail-label { font-family: var(--font-display); font-weight: 800; color: var(--red); font-size: 1.8rem; line-height: 1; margin-bottom: 1rem; letter-spacing: -0.02em; }
.detail-text { color: var(--ink); font-size: 1.2rem; line-height: 1.55; }
.detail-text p + p { margin-top: 1rem; }
.steps { display: flex; flex-direction: column; gap: 1rem; counter-reset: step; }
.steps li { display: flex; gap: 1rem; align-items: flex-start; font-size: 1.15rem; line-height: 1.45; }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 1.5rem; line-height: 1; min-width: 2.2rem; padding-top: .1rem; }
.callout { background: var(--soft); border-radius: var(--radius-card); padding: 2rem; color: var(--accent); font-size: 1.2rem; line-height: 1.45; }
.checks { display: grid; gap: .85rem; }
@media (min-width: 640px) { .checks { grid-template-columns: 1fr 1fr; } }
.checks li { display: flex; gap: .6rem; align-items: center; font-size: 1.1rem; }
.checks .icon { color: var(--red); }
.cta-band { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--blue), var(--blue-deep)); color: #fff; text-align: center; padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.cta-band .title { color: #fff; margin: 0 0 1.75rem; font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
.cta-band .grad { background: none; color: #ffb3b5; }
.related { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .related { grid-template-columns: 1fr 1fr; } }
.state-404 { min-height: 55vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.25rem; padding: 4rem 1.25rem; }

.manual-box { max-width: 30rem; margin: 0 auto; }
.code-input { text-align: center; font-size: 1.4rem; letter-spacing: .14em; text-transform: uppercase; font-family: ui-monospace, monospace; }
.btn-block { width: 100%; }
.small-note { margin-top: 1.25rem; text-align: center; color: var(--gray); }
.small-note a { color: var(--red); font-weight: 600; }

/* ── FOOTER ───────────────────────────────────────── */
.site-footer { background: radial-gradient(ellipse at 100% 0%, rgba(227, 53, 58, .22), transparent 45%), var(--blue-deep); color: #fff; padding: clamp(3rem, 6vw, 4.75rem) 0 1.75rem; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gradient); z-index: 3; }
.footer-grid { display: grid; gap: 2.5rem 2rem; position: relative; z-index: 2; }
/* Tableta: la marca ocupa toda la fila y debajo van navegación y contacto lado a lado. */
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem 2rem; }
  .footer-about .footer-text { margin: 0; }
  .footer-about .footer-cta, .footer-about .socials { grid-column: 1 / -1; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .footer-about { padding-bottom: 2rem; border-bottom: 1px solid rgba(255, 255, 255, .14); }
}
/* Escritorio: tres columnas. */
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.25fr 1fr 1.15fr; gap: 3rem; }
  .footer-about { grid-column: auto; display: block; }
  .footer-about .footer-text { margin-top: 1.25rem; }
}
.site-footer .brand-word .rik { color: #fff; }
.footer-text { margin-top: 1.25rem; max-width: 24rem; color: rgba(255, 255, 255, .8); line-height: 1.55; }
.footer-cta { margin-top: 1.5rem; justify-self: start; }
.footer-cta .icon { width: 1.05rem; height: 1.05rem; transition: transform .25s ease; }
.footer-cta:hover .icon { transform: translateX(4px); }
.footer-title { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; margin-bottom: 1.25rem; padding-bottom: .6rem; }
.footer-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2.25rem; height: 3px; border-radius: 3px; background: var(--gradient); }
.footer-links { display: flex; flex-direction: column; gap: .7rem; color: rgba(255, 255, 255, .85); }
.footer-links a { transition: color .2s ease; overflow-wrap: anywhere; }
.footer-links a:hover { color: #ffb3b5; }
.footer-links li { display: flex; gap: .75rem; align-items: center; line-height: 1.4; }
.footer-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.5rem; }
.footer-menu a { position: relative; display: inline-block; padding-left: 0; transition: color .2s ease, padding .25s ease; }
.footer-menu a::before { content: ""; position: absolute; left: 0; top: 50%; width: 0; height: 2px; border-radius: 2px; background: var(--red); transition: width .25s ease; }
.footer-menu a:hover { padding-left: .9rem; }
.footer-menu a:hover::before { width: .55rem; }
.footer-ico { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); transition: background .25s ease; }
.footer-ico .icon { width: 1.05rem; height: 1.05rem; }
.footer-links li:hover .footer-ico { background: var(--red); border-color: var(--red); }
.socials { display: flex; gap: .6rem; margin-top: 1.5rem; }
.social { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: rgba(255, 255, 255, .12); display: flex; align-items: center; justify-content: center; transition: background .25s ease, transform .25s ease; }
.social:hover { background: var(--red); transform: translateY(-2px); }
.footer-bottom { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin-top: 1.5rem; font-size: .92rem; color: rgba(255, 255, 255, .7); }
.to-top { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem 1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); color: #fff; font-weight: 600; font-size: .88rem; transition: background .25s ease, border-color .25s ease; }
.to-top .icon { width: 1rem; height: 1rem; transition: transform .25s ease; }
.to-top:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.to-top:hover .icon { transform: translateY(-3px); }
/* Móvil: todo en una columna y espacio final para que el botón flotante de WhatsApp no tape el pie. */
@media (max-width: 639px) {
  .site-footer { padding-bottom: 6rem; }
  .footer-cta { width: 100%; justify-content: center; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── WHATSAPP FLOTANTE ───────────────────────────── */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50; width: 3.6rem; height: 3.6rem; border-radius: 50%;
  background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 30px -12px rgba(227, 53, 58, .7); opacity: 0; transform: translateY(1rem); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .3s ease;
}
.wa-float.visible { opacity: 1; transform: none; pointer-events: auto; }
.wa-float:hover { background: var(--blue); }
.wa-float .icon { width: 1.7rem; height: 1.7rem; }

/* ── REVEAL ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .marquee-track { animation: none; }
  .menu-links a { transition: none; }
}

/* ── COTIZADOR ────────────────────────────────────── */
.section-cta { position: relative; z-index: 2; display: flex; justify-content: center; margin-top: clamp(2.5rem, 5vw, 4rem); }
.quote-page { padding-top: clamp(3rem, 6vw, 5rem); overflow: visible; }
.quote-page .deco { overflow: hidden; }
.quote-layout { position: relative; z-index: 2; display: grid; gap: 2.5rem; margin-top: clamp(2.5rem, 5vw, 4rem); align-items: start; }
@media (min-width: 1000px) { .quote-layout { grid-template-columns: minmax(0, 1fr) 23rem; } }
.quote-groups { display: flex; flex-direction: column; gap: 1.75rem; }
.quote-group { background: var(--card-glass); border: 1px solid var(--card-line); border-radius: var(--radius-card); padding: 1.75rem 1.5rem 1.25rem; box-shadow: 0 18px 30px -24px rgba(29, 37, 80, .35); scroll-margin-top: calc(var(--header-h) + 1rem); }
.quote-group:target { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(51, 88, 200, .18); }
.quote-group-head .service-title { margin-top: .35rem; }
.quote-group-text { margin-top: .35rem; color: var(--accent); font-size: 1.05rem; line-height: 1.25; max-width: 36rem; }
.quote-options { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.25rem; }
.quote-option { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--card-line); border-radius: 1.1rem; padding: .9rem 1rem; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.quote-option.is-selected { border-color: var(--accent); background: var(--selected-bg); box-shadow: 0 10px 20px -16px rgba(51, 88, 200, .7); }
.quote-check { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: .85rem; cursor: pointer; }
.quote-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.quote-box { width: 1.6rem; height: 1.6rem; border-radius: .45rem; border: 2px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: transparent; margin-top: .05rem; transition: all .2s ease; }
.quote-box .icon { width: 1rem; height: 1rem; stroke-width: 3; }
.quote-check input:checked + .quote-box { background: var(--blue); border-color: var(--accent); color: #fff; }
.quote-check input:focus-visible + .quote-box { outline: 2px solid var(--red); outline-offset: 2px; }
.quote-text { display: flex; flex-direction: column; gap: .15rem; }
.quote-name { font-weight: 700; color: var(--ink); font-size: 1.08rem; line-height: 1.2; }
.quote-desc { color: var(--gray); font-size: .95rem; line-height: 1.3; }
.quote-side { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; text-align: right; flex-shrink: 0; }
.quote-price { font-family: var(--font-display); font-weight: 800; color: var(--red); font-size: 1.45rem; line-height: 1; white-space: nowrap; }
.quote-price small { font-family: var(--font-sans); font-weight: 600; font-size: .8rem; color: var(--gray); margin: 0 .2rem; }
.quote-unit { font-size: .8rem; color: var(--gray); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.qty button { width: 2rem; height: 2rem; border: none; background: transparent; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.qty button:hover { background: var(--soft); }
.qty .icon { width: .95rem; height: .95rem; }
.qty input { width: 2.4rem; border: none; text-align: center; font: inherit; font-weight: 700; color: var(--ink); -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 560px) {
  .quote-option { flex-direction: column; align-items: stretch; }
  .quote-side { flex-direction: row; align-items: center; justify-content: space-between; padding-left: 2.45rem; }
}

.quote-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 1.75rem 1.5rem; box-shadow: 0 30px 60px -40px rgba(19, 35, 154, .55); scroll-margin-top: calc(var(--header-h) + 1rem); }
@media (min-width: 1000px) { .quote-summary { position: sticky; top: calc(var(--header-h) + 1rem); max-height: calc(100vh - var(--header-h) - 2rem); overflow-y: auto; } }
.quote-summary-title { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 2rem; line-height: 1; letter-spacing: -0.02em; margin-bottom: 1rem; }
.quote-summary .form-alert { margin-bottom: 1rem; }
.quote-empty { color: var(--gray); font-size: 1rem; line-height: 1.4; padding: .5rem 0 1rem; }
.quote-lines { display: flex; flex-direction: column; gap: .7rem; }
.quote-lines li { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; line-height: 1.25; padding-bottom: .7rem; border-bottom: 1px dashed var(--line); }
.quote-lines .ql-service { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--red); font-weight: 600; }
.quote-lines .ql-amount { white-space: nowrap; font-weight: 700; color: var(--accent); }
.quote-totals { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.qt-block { background: var(--soft); border-radius: 1rem; padding: .9rem 1rem; }
.qt-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin-bottom: .35rem; }
.qt-row { display: flex; justify-content: space-between; font-size: .95rem; color: var(--gray); }
.qt-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: .3rem; color: var(--ink); font-weight: 700; }
.qt-total strong { font-family: var(--font-display); font-weight: 800; color: var(--red); font-size: 1.9rem; line-height: 1; }
.qt-total small { font-weight: 600; color: var(--gray); font-size: .8rem; }
.quote-note { margin-top: 1rem; font-size: .85rem; line-height: 1.4; color: var(--gray); }
.quote-form { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.quote-form-title { font-weight: 700; color: var(--accent); font-size: 1.1rem; margin-bottom: .2rem; }
.quote-form .field { padding: .8rem 1rem; }
.quote-form textarea.field { min-height: 5rem; }
.quote-form .btn { margin-top: .2rem; }

.quote-bar { position: fixed; left: .75rem; right: .75rem; bottom: .75rem; z-index: 55; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--blue); color: #fff; border-radius: 999px; padding: .85rem 1.4rem; box-shadow: 0 16px 30px -12px rgba(19, 35, 154, .7); font-weight: 600; }
.quote-bar strong { font-family: var(--font-display); font-size: 1.35rem; }
.quote-bar[hidden] { display: none; }
@media (min-width: 1000px) { .quote-bar { display: none !important; } }
body:has(.quote-bar:not([hidden])) .wa-float { bottom: 5.5rem; }

/* ── BOTÓN MODO CLARO / OSCURO ────────────────────── */
.theme-toggle {
  width: 3rem; height: 3rem; border-radius: 50%; border: 2px solid var(--accent); background: transparent; color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; transition: background .25s ease, color .25s ease, transform .4s ease;
}
.theme-toggle:hover { background: var(--accent); color: var(--background); transform: rotate(-20deg); }
.theme-toggle .icon { width: 1.3rem; height: 1.3rem; }
.is-blue .theme-toggle { border-color: #fff; color: #fff; }
.is-blue .theme-toggle:hover { background: #fff; color: var(--blue); }
.icon-sun { display: none; }
html.dark .icon-sun { display: inline-flex; }
html.dark .icon-moon { display: none; }
.theme-toggle .icon-sun, .theme-toggle .icon-moon { align-items: center; justify-content: center; }
.menu-theme { align-self: flex-start; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); color: #fff; border-radius: 999px; padding: .6rem 1.2rem; font-weight: 600; }
.menu-theme:hover { background: rgba(255, 255, 255, .22); }
.menu-theme .icon-moon, .menu-theme .icon-sun { align-items: center; gap: .5rem; }
.menu-theme .icon-moon { display: inline-flex; }
html.dark .menu-theme .icon-moon { display: none; }
@media (max-width: 640px) { .theme-toggle { width: 2.6rem; height: 2.6rem; } }

/* Logo: si hay versión en blanco, se usa en modo oscuro. */
.logo-for-dark { display: none; }
html.dark .logo-for-light { display: none; }
html.dark .logo-for-dark { display: block; }

/* ══════════════════════════════════════════════════
   MODO OSCURO — "luz noche": azul marino profundo,
   los colores de marca se aclaran para mantener el contraste.
   ══════════════════════════════════════════════════ */
html.dark {
  color-scheme: dark;
  --background: #0a0f1f;
  --ink: #e7ebfa;
  --gray: #a3acc8;
  --accent: #8ea8ff;
  --line: rgba(142, 168, 255, .24);
  --soft: #151d38;
  --card-line: #263159;
  --surface: #111834;
  --surface-2: #1a2347;
  --surface-2-hover: #222c55;
  --card-glass: rgba(20, 27, 54, .86);
  --divider: #263159;
  --field-border: #2c3966;
  --placeholder: #7d88ad;
  --selected-bg: #182553;
  --header-glass: rgba(10, 15, 31, .88);
  --success-bg: #0f2f22; --success-fg: #74e0a6;
  --error-bg: #3a1418; --error-fg: #ff8a8f;
  --gradient: linear-gradient(90deg, #8ea8ff 0%, #c27bd4 55%, #ff5c62 100%);
}
html.dark ::selection { background: var(--red); color: #fff; }
/* Logos de clientes: silueta clara para que se vean sobre fondo oscuro. */
html.dark .logo-item img { filter: grayscale(1) brightness(0) invert(1); opacity: .75; }
html.dark .logo-item:hover img { opacity: 1; }
html.dark .logo-name { color: #6f7896; }
html.dark .logos-arrow { box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
html.dark .service-card, html.dark .quote-group { box-shadow: 0 18px 30px -22px rgba(0, 0, 0, .7); }
html.dark .contact-card, html.dark .quote-summary { box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .8); }
html.dark .site-footer { background: radial-gradient(ellipse at 100% 0%, rgba(227, 53, 58, .16), transparent 45%), #070b18; }
html.dark .contact::before { background: radial-gradient(ellipse at 50% 120%, #070b18, transparent 70%), linear-gradient(180deg, #1c2d82 0%, #070b18 100%); }
html.dark .cta-band { background: linear-gradient(160deg, #1c2d82, #070b18); }
html.dark .menu-panel { background: radial-gradient(circle at 85% 110%, rgba(227, 53, 58, .35), transparent 45%), linear-gradient(160deg, #1c2d82 0%, #070b18 100%); }
/* En la noche las estrellas brillan más. */
html.dark .stars-layer { filter: brightness(1.8) saturate(1.2); }
html.dark .orbit-rocket svg { filter: drop-shadow(0 0 16px rgba(255, 138, 61, .6)) drop-shadow(0 0 22px rgba(142, 168, 255, .25)); }
html.dark .marquee { box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .8); }
html.dark .marquee-light { box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .8); }
/* Transición suave al cambiar de modo (solo colores). */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease !important;
}

/* ── PÁGINA EQUIPO (/equipo) ─────────────────────── */
.about-team-btn { margin-top: 1.75rem; }

/* Cabecera de espacio profundo (igual en modo claro y oscuro). */
.team-hero {
  position: relative; overflow: hidden; color: #fff; padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(5rem, 10vw, 8rem);
  background:
    radial-gradient(circle at 82% 18%, rgba(227, 53, 58, .38), transparent 42%),
    radial-gradient(circle at 12% 85%, rgba(138, 63, 142, .45), transparent 46%),
    linear-gradient(160deg, #0b1240 0%, #13239a 55%, #1a0f45 100%);
}
.team-hero .stars-layer, .team-cta .stars-layer { filter: brightness(3.2) saturate(.5); }
.team-hero-rings { position: absolute; inset: 0; pointer-events: none; }
.team-hero-rings .ring-line { border-color: rgba(255, 255, 255, .14); }
.team-hero .planet-scene { --p: clamp(5rem, 10vw, 9rem); right: 8%; bottom: 16%; }
.team-hero-inner { position: relative; z-index: 2; display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .team-hero-inner.has-image { grid-template-columns: 1.05fr 1fr; } }
.team-hero-text { max-width: 42rem; }
.team-hero .eyebrow { color: #ffb3b5; }
.team-hero .title { color: #fff; font-size: clamp(2.6rem, 6.4vw, 5.2rem); }
.team-hero .grad { background: linear-gradient(90deg, #8ea8ff 0%, #c27bd4 55%, #ff5c62 100%); -webkit-background-clip: text; background-clip: text; }
.team-hero .lead { color: rgba(255, 255, 255, .85); }
.team-hero-photo { border-radius: var(--radius-card); overflow: hidden; border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8), 0 0 60px -10px rgba(142, 168, 255, .45); }
.team-hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Grilla de tripulantes */
.team-section { padding-top: clamp(3.5rem, 7vw, 6rem); }
.crew-grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 21rem)); justify-content: center; }
.crew-inner {
  position: relative; height: 100%; text-align: center; overflow: hidden;
  padding: 2.4rem 1.5rem 1.9rem; border-radius: var(--radius-card);
  background: var(--card-glass); border: 1px solid var(--card-line); box-shadow: 0 24px 40px -30px rgba(29, 37, 80, .5);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), box-shadow .4s ease, border-color .4s ease;
}
/* Nebulosa sobre la ventanilla */
.crew-inner::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10rem; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 28% 0%, rgba(51, 88, 200, .32), transparent 62%), radial-gradient(circle at 82% 12%, rgba(227, 53, 58, .26), transparent 55%);
}
.crew-inner > * { position: relative; z-index: 1; }
.crew-inner:hover { border-color: var(--accent); box-shadow: 0 34px 60px -30px rgba(51, 88, 200, .6); }

.crew-porthole { position: relative; width: 9.5rem; height: 9.5rem; margin: 0 auto 1.4rem; }
.crew-porthole::before { content: ""; position: absolute; inset: .25rem; border-radius: 50%; background: conic-gradient(var(--blue), var(--purple), var(--red), var(--blue)); animation: orbit-spin 8s linear infinite; }
.crew-photo {
  position: absolute; inset: .6rem; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #eef2ff, #cdd7f3 60%, #b1c0ea);
  box-shadow: 0 0 0 4px var(--surface), 0 14px 30px -12px rgba(19, 35, 154, .6);
}
html.dark .crew-photo { background: radial-gradient(circle at 35% 30%, #2a3768, #1a2347 60%, #111834); }
.crew-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.crew-inner:hover .crew-photo img { transform: scale(1.07); }
.crew-orbit { position: absolute; inset: -.7rem; border-radius: 50%; border: 1px dashed var(--line); animation: orbit-spin 14s linear infinite; }
.crew-moon { position: absolute; top: -6px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px 2px rgba(227, 53, 58, .65); }

.crew-badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); border: 1px solid currentColor; border-radius: 999px; padding: .2rem .75rem; background: var(--surface); }
.crew-name { margin-top: .9rem; font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: clamp(1.7rem, 2.6vw, 2rem); line-height: 1; letter-spacing: -0.02em; }
.crew-role { margin-top: .45rem; font-weight: 700; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.crew-bio { margin-top: .85rem; color: var(--gray); font-size: 1.02rem; line-height: 1.5; }
.crew-links { display: flex; justify-content: center; gap: .55rem; margin-top: 1.2rem; }
.crew-links a { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; transition: background .25s ease, color .25s ease, transform .25s ease, border-color .25s ease; }
.crew-links a:hover { background: var(--gradient); border-color: transparent; color: #fff; transform: translateY(-2px); }
.crew-links .icon { width: 1.05rem; height: 1.05rem; }

/* Llamado final */
.team-cta .narrow { position: relative; z-index: 2; }
.team-cta-text { color: rgba(255, 255, 255, .85); font-size: 1.15rem; margin: -.75rem auto 1.75rem; max-width: 34rem; }

@media (max-width: 700px) {
  .team-hero { padding-bottom: 8rem; }
  .team-hero .planet-scene { --p: 4rem; right: auto; left: calc(50% - 2rem); bottom: 1.75rem; }
  .crew-porthole { width: 8.5rem; height: 8.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .crew-porthole::before, .crew-orbit { animation: none; }
  .crew-inner { transform: none; }
}

/* ── PÁGINAS LEGALES (/terminos, /privacidad, /cookies) ── */
.legal-hero { padding-bottom: clamp(2rem, 4vw, 3rem); }
.legal-hero .eyebrow .icon, .claim-page .eyebrow .icon { width: 1rem; height: 1rem; }
.legal-hero .eyebrow::before, .claim-page .eyebrow::before { display: none; }
.legal-updated { margin-top: 1rem; color: var(--gray); font-size: 1rem; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.legal-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); color: var(--accent); font-weight: 600; font-size: .92rem; background: var(--surface); transition: all .25s ease; }
.legal-tab .icon { width: 1rem; height: 1rem; }
.legal-tab:hover { border-color: var(--accent); }
.legal-tab.active { background: var(--gradient); color: #fff; border-color: transparent; }
.legal-section { padding: 0 0 clamp(4rem, 8vw, 6rem); }
.legal-layout { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 960px) { .legal-layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 4rem; } }
.legal-toc { background: var(--card-glass); border: 1px solid var(--card-line); border-radius: 1.4rem; padding: 1.25rem 1.25rem 1rem; }
@media (min-width: 960px) { .legal-toc { position: sticky; top: calc(var(--header-h) + 1.25rem); } }
.legal-toc-title { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 1.25rem; margin-bottom: .6rem; }
.legal-toc ol { list-style: decimal; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .4rem; font-size: .95rem; }
.legal-toc li::marker { color: var(--red); font-weight: 700; }
.legal-toc a { color: var(--gray); }
.legal-toc a:hover { color: var(--accent); }
.legal-body { max-width: 50rem; color: var(--ink); font-size: 1.1rem; line-height: 1.7; }
.legal-body h2 { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.05; letter-spacing: -0.02em; margin: 2.4rem 0 .8rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-weight: 700; color: var(--red); font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.legal-body p + p, .legal-body ul + p, .legal-body p + ul { margin-top: .85rem; }
.legal-body ul { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.legal-body li { position: relative; padding-left: 1.4rem; }
.legal-body li::before { content: ""; position: absolute; left: .2rem; top: .7em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--red); }
.legal-body a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.legal-body strong { color: var(--ink); font-weight: 700; }

/* ── LIBRO DE RECLAMACIONES ───────────────────────── */
.claim-intro { max-width: 46rem; }
.claim-provider { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem 1.5rem; margin-top: 2rem; padding: 1.25rem 1.5rem; border-radius: 1.4rem; background: var(--soft); border: 1px solid var(--field-border); }
.claim-provider span { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.claim-provider strong { display: block; margin-top: .2rem; color: var(--ink); font-weight: 600; line-height: 1.3; }
.claim-form { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2rem; max-width: 60rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.claim-section { margin: 0; padding: 1.5rem 1.5rem 1.75rem; border: 1px solid var(--card-line); border-radius: var(--radius-card); background: var(--card-glass); box-shadow: 0 18px 30px -26px rgba(29, 37, 80, .4); }
.claim-section legend, .claim-sheet-section { display: inline-flex; align-items: center; gap: .6rem; padding: 0 .4rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 2.2vw, 1.6rem); color: var(--accent); letter-spacing: -0.01em; }
.claim-section legend span, .claim-sheet-section span { width: 2rem; height: 2rem; border-radius: 50%; background: var(--gradient); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.claim-grid { display: grid; gap: 1rem 1.25rem; margin-top: .75rem; }
@media (min-width: 700px) { .claim-grid { grid-template-columns: 1fr 1fr; } }
.claim-wide { grid-column: 1 / -1; }
.claim-field { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: .95rem; color: var(--ink); }
.claim-field .field { font-weight: 400; }
.claim-field[hidden] { display: none; }
select.field { appearance: auto; }
.claim-check { display: flex; align-items: flex-start; gap: .6rem; font-size: .98rem; color: var(--ink); cursor: pointer; }
.claim-check input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--blue); flex-shrink: 0; }
.claim-check a, .claim-accept a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.claim-pills { display: flex; gap: .6rem; flex-wrap: wrap; }
.claim-pills label { cursor: pointer; }
.claim-pills input, .claim-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.claim-pills span { display: inline-block; padding: .55rem 1.3rem; border-radius: 999px; border: 2px solid var(--line); color: var(--accent); font-weight: 600; transition: all .2s ease; }
.claim-pills input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.claim-pills input:focus-visible + span, .claim-type input:focus-visible + .claim-type-box { outline: 2px solid var(--red); outline-offset: 2px; }
.claim-types { display: grid; gap: 1rem; margin-top: .75rem; }
@media (min-width: 700px) { .claim-types { grid-template-columns: 1fr 1fr; } }
.claim-type { cursor: pointer; display: block; }
.claim-type-box { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1.1rem 1.2rem; border-radius: 1.2rem; border: 2px solid var(--line); background: var(--surface); transition: all .25s ease; }
.claim-type-box strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent); }
.claim-type-box small { color: var(--gray); font-size: .95rem; line-height: 1.35; }
.claim-type input:checked + .claim-type-box { border-color: var(--red); background: var(--selected-bg); box-shadow: 0 12px 26px -18px rgba(227, 53, 58, .7); }
.claim-type input:checked + .claim-type-box strong { color: var(--red); }
.claim-legal { padding: 1rem 1.25rem; border-left: 4px solid var(--red); border-radius: .6rem; background: var(--soft); color: var(--gray); font-size: .92rem; line-height: 1.5; }
.claim-form .btn-red { align-self: flex-start; }
.form-privacy { font-size: .85rem; color: var(--gray); }
.form-privacy a { color: var(--accent); font-weight: 600; text-decoration: underline; }

/* Copia de la hoja */
.claim-success { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; }
.claim-sheet { max-width: 60rem; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--card-line); box-shadow: 0 30px 60px -40px rgba(19, 35, 154, .55); }
.claim-sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.25rem; border-bottom: 2px solid var(--divider); }
.claim-sheet-title { margin-top: .5rem; font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1; }
.claim-sheet-title span { display: block; color: var(--red); }
.claim-sheet-date { display: grid; grid-template-columns: auto auto; gap: .2rem 1rem; align-content: start; font-size: .95rem; }
.claim-sheet-date span { color: var(--gray); }
.claim-sheet-date strong { color: var(--ink); }
.claim-sheet .claim-provider { margin-top: 1.25rem; }
.claim-sheet-section { margin: 1.75rem 0 .75rem; padding: 0; }
.claim-dl { display: grid; gap: .8rem 1.5rem; }
@media (min-width: 700px) { .claim-dl { grid-template-columns: 1fr 1fr; } }
.claim-dl-wide { grid-column: 1 / -1; }
.claim-dl dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray); }
.claim-dl dd { margin: .2rem 0 0; color: var(--ink); line-height: 1.5; }
.claim-type-tag { display: inline-block; padding: .1rem .6rem; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; font-size: .85rem; }
.claim-response { padding: 1rem 1.25rem; border-radius: 1rem; background: var(--soft); line-height: 1.55; }
.claim-note { margin-top: .5rem; color: var(--gray); }
.claim-sheet .claim-legal { margin-top: 1.75rem; }
.claim-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }
@media print {
  .site-header, .site-footer, .wa-float, .cookie-banner, .marquee, .deco, .no-print, .menu-panel { display: none !important; }
  body, html { background: #fff !important; }
  .page-hero { padding: 0 !important; }
  .claim-sheet { box-shadow: none; border: 1px solid #999; max-width: none; }
  html.dark { --ink: #111; --gray: #444; --accent: #2441a8; --surface: #fff; --soft: #f3f5fb; --divider: #ccc; --card-line: #ccc; --field-border: #ccc; }
}

/* ── PIE: legales + Libro de Reclamaciones ────────── */
.footer-legal { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .18); }
.claims-badge { display: inline-flex; align-items: center; gap: .7rem; padding: .55rem 1.1rem .55rem .7rem; border-radius: 1rem; background: #fff; color: var(--blue); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6); transition: transform .25s ease; }
.claims-badge:hover { transform: translateY(-2px); }
.claims-badge .icon { width: 2rem; height: 2rem; padding: .35rem; border-radius: .6rem; background: var(--red); color: #fff; }
.claims-badge span { display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; line-height: 1; }
.claims-badge strong { font-size: .8rem; font-weight: 700; color: #6d717c; text-transform: uppercase; letter-spacing: .06em; }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .92rem; color: rgba(255, 255, 255, .8); }
.footer-legal-links a:hover, .footer-legal-links button:hover { color: #ffb3b5; }
.footer-legal-links button { background: none; border: none; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 639px) {
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .footer-legal-links { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; }
}

/* ── AVISO DE COOKIES ─────────────────────────────── */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90; margin: 0 auto; max-width: 54rem;
  display: flex; align-items: center; gap: 1rem 1.25rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; border-radius: 1.4rem; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgba(19, 35, 154, .55); animation: cookie-in .5s cubic-bezier(.16, 1, .3, 1);
}
.cookie-banner[hidden] { display: none; }
.cookie-icon { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--gradient); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cookie-banner p { flex: 1 1 18rem; color: var(--ink); font-size: .98rem; line-height: 1.4; }
.cookie-banner p a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.cookie-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.btn-sm-site { padding: .55rem 1.15rem !important; font-size: .92rem; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .cookie-actions { width: 100%; } .cookie-actions .btn { flex: 1; } }
body:has(.cookie-banner:not([hidden])) .wa-float { bottom: 7.5rem; }

/* ── SOPORTE: "¿Eres cliente? Ingresa un ticket" ─── */
.support { position: relative; padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 6vw, 4.5rem); }
.support-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(2rem, 4vw, 3.5rem);
  padding: clamp(2rem, 5vw, 4rem); border-radius: clamp(1.5rem, 3vw, 2.5rem); color: #fff; isolation: isolate;
  background: radial-gradient(circle at 92% 110%, rgba(227, 53, 58, .6), transparent 48%), radial-gradient(circle at 0% 0%, rgba(138, 63, 142, .55), transparent 42%), linear-gradient(135deg, #2441a8 0%, #13239a 55%, #0d1550 100%);
  box-shadow: 0 40px 80px -45px rgba(19, 35, 154, .95);
}
.support-card .stars-layer { filter: brightness(3.2) saturate(.5); }
.support-glow { position: absolute; z-index: 0; right: 8%; top: 50%; width: 26rem; height: 26rem; translate: 0 -50%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 3.5rem rgba(255, 255, 255, .03), 0 0 0 7rem rgba(255, 255, 255, .02); pointer-events: none; }
.support-text { position: relative; z-index: 1; }
.support-card .title { color: #fff; font-size: clamp(2.4rem, 5vw, 4.2rem); }
.support-card .grad { background: linear-gradient(90deg, #ffd2d4, #ff6b70); -webkit-background-clip: text; background-clip: text; }
.support-lead { margin-top: 1.1rem; max-width: 34rem; font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.5; color: rgba(255, 255, 255, .85); }
.support-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1.75rem; }
.support-types li {
  display: flex; flex-direction: column; gap: .6rem; padding: 1rem; border-radius: 1.1rem;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px);
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
}
.support-types li:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .32); }
.support-ico { width: 2.5rem; height: 2.5rem; border-radius: .8rem; display: grid; place-items: center; background: linear-gradient(135deg, #ff6b70, #e3353a); box-shadow: 0 10px 20px -10px rgba(227, 53, 58, .9); }
.support-ico .icon { width: 1.25rem; height: 1.25rem; }
.support-types strong { display: block; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; }
.support-types small { display: block; margin-top: .2rem; font-size: .88rem; line-height: 1.35; color: rgba(255, 255, 255, .75); }
.support-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.support-btn { font-size: 1.08rem; padding: 1rem 1.6rem; box-shadow: 0 18px 36px -16px rgba(0, 0, 0, .55); }
.support-btn .icon { width: 1.15rem; height: 1.15rem; }
.support-btn .icon:last-child { width: .95rem; height: .95rem; opacity: .7; transition: transform .3s ease; }
.support-btn:hover { color: var(--red); }
.support-btn:hover .icon:last-child { transform: translate(3px, -3px); }
.support-note { display: inline-flex; align-items: center; gap: .45rem; font-size: .92rem; color: rgba(255, 255, 255, .75); }
.support-note .icon { width: 1rem; height: 1rem; color: #7ee2a8; }

/* Ticket ilustrado: se inclina con el mouse (data-tilt-card) y flota suave */
.ticket-wrap { position: relative; z-index: 1; display: block; justify-self: center; width: min(100%, 25rem); animation: ticket-float 5s ease-in-out infinite; }
@keyframes ticket-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.ticket {
  position: relative; display: flex; border-radius: 1.4rem; color: #1d2550; filter: drop-shadow(0 30px 40px rgba(5, 10, 40, .55));
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-4deg);
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
/* Las muescas del ticket se recortan con una máscara: media luna en el borde derecho del cuerpo y en el izquierdo del talón. */
.ticket-main, .ticket-stub { position: relative; }
.ticket-main { background: #fff; flex: 1; padding: 1.4rem 1.4rem 1.3rem; border-radius: 1.4rem 0 0 1.4rem; display: flex; flex-direction: column; gap: .85rem;
  -webkit-mask: radial-gradient(circle at 100% 50%, transparent .9rem, #000 calc(.9rem + .5px)); mask: radial-gradient(circle at 100% 50%, transparent .9rem, #000 calc(.9rem + .5px)); }
.ticket-stub { width: 6.2rem; flex: none; border-radius: 0 1.4rem 1.4rem 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; color: #fff;
  background: linear-gradient(160deg, #3358c8, #8a3f8e 55%, #e3353a); border-left: 2px dashed rgba(255, 255, 255, .55);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent .9rem, #000 calc(.9rem + .5px)); mask: radial-gradient(circle at 0 50%, transparent .9rem, #000 calc(.9rem + .5px)); }
.ticket-stub .icon { width: 2rem; height: 2rem; }
.ticket-stub span { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; }
.ticket-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ticket-brand { white-space: nowrap; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6d717c; }
.ticket-status { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; background: #e3f6ec; color: #14895a; font-size: .74rem; font-weight: 700; }
.ticket-status i { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; animation: status-blink 1.4s ease-in-out infinite; }
@keyframes status-blink { 50% { opacity: .25; } }
.ticket-no { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1; letter-spacing: -.02em; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .05em; }
.ticket-lines { display: flex; flex-direction: column; gap: .45rem; }
.ticket-lines i { display: block; height: .5rem; border-radius: 99px; background: #e9effd; }
.ticket-lines i:nth-child(2) { width: 82%; }
.ticket-lines i:nth-child(3) { width: 55%; }
.ticket-steps { display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .85rem; border-top: 1px dashed #dfe5f3; }
.ticket-steps span { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; background: #f1f3f9; color: #8a90a2; }
.ticket-steps .icon { width: .8rem; height: .8rem; }
.ticket-steps .done { background: #e3f6ec; color: #14895a; }
.ticket-steps .now { background: #e9effd; color: #3358c8; }
.ticket-wrap:hover .ticket { filter: drop-shadow(0 36px 46px rgba(5, 10, 40, .65)); }

@media (max-width: 960px) {
  .support-card { grid-template-columns: 1fr; }
  .ticket-wrap { order: -1; width: min(100%, 22rem); }
  .support-glow { right: 50%; top: 18%; translate: 50% -50%; }
}
@media (max-width: 640px) {
  .support-types { grid-template-columns: 1fr; }
  .support-types li { flex-direction: row; align-items: center; }
  .support-btn { width: 100%; justify-content: center; }
  .ticket-stub { width: 4.8rem; }
  .ticket-brand { font-size: .6rem; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) { .ticket-wrap, .ticket-status i { animation: none; } }

/* ── PORTAFOLIO: filtro por servicio ─────────────── */
.pf-filters { position: sticky; top: calc(var(--header-h) - .25rem); z-index: 20; margin: 0 0 1.5rem; }
.pf-bar { isolation: isolate;
  display: flex; align-items: center; gap: .75rem 1.25rem; padding: .65rem .75rem .65rem 1.1rem; border-radius: 999px;
  background: var(--header-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--divider); box-shadow: 0 18px 40px -30px rgba(29, 37, 80, .55);
}
.pf-label { flex: none; display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.pf-label .icon { width: 1rem; height: 1rem; }
.pf-chips { flex: 1; min-width: 0; display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: .15rem; }
.pf-chips::-webkit-scrollbar { display: none; }
.pf-chip {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); background: var(--surface);
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1; white-space: nowrap;
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .2s ease, box-shadow .3s ease;
}
.pf-chip span { display: inline-grid; place-items: center; min-width: 1.45rem; height: 1.45rem; padding: 0 .35rem; border-radius: 99px; font: 700 .75rem var(--font-sans); background: color-mix(in srgb, var(--accent) 12%, transparent); transition: background .3s ease, color .3s ease; }
.pf-chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.pf-chip.active { background: var(--gradient); color: #fff; border-color: transparent; box-shadow: 0 10px 22px -12px rgba(227, 53, 58, .7); }
.pf-chip.active span { background: rgba(255, 255, 255, .25); color: #fff; }
.pf-count { flex: none; font-size: .95rem; color: var(--gray); padding-right: .5rem; }
.pf-count strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--accent); }
.bento-card.pf-hide { display: none; }
.bento-card.pf-in { animation: pf-in .55s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--pf-i, 0) * 45ms); }
@keyframes pf-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.pf-empty { text-align: center; padding: clamp(3rem, 8vw, 5rem) 1rem; border-radius: var(--radius-card); border: 1.5px dashed var(--divider); color: var(--gray); font-size: 1.15rem; }
.pf-empty p { margin-bottom: 1.25rem; }
@media (max-width: 760px) {
  .pf-bar { flex-wrap: wrap; border-radius: 22px; padding: .75rem; }
  .pf-label { order: 1; }
  .pf-count { order: 2; margin-left: auto; padding-right: .25rem; }
  .pf-chips { order: 3; flex-basis: 100%; margin: 0 -.75rem; padding: .15rem .75rem; }
}
@media (prefers-reduced-motion: reduce) { .bento-card.pf-in { animation: none; } }

/* ── PROYECTO: videos y textos en la galería ─────── */
figure.project-shot { margin: 0; }
/* Videos: el reproductor mantiene 16:9 y el texto va en una franja debajo (no tapa los controles ni el título). */
.project-media-video, .project-media-embed { min-height: 0; display: flex; flex-direction: column; background: #0b1030; }
.project-media-video video, .project-media-embed iframe { position: static; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; display: block; object-fit: contain; background: #000; }
.project-shot figcaption {
  position: absolute; left: .75rem; right: .75rem; bottom: .75rem; z-index: 2; padding: .5rem .8rem; border-radius: .8rem;
  background: rgba(16, 22, 60, .72); color: #fff; font-size: .95rem; line-height: 1.3; backdrop-filter: blur(6px);
  pointer-events: none;
}
.project-media-video figcaption, .project-media-embed figcaption { position: static; border-radius: 0; background: none; padding: .85rem 1.1rem; font-size: 1rem; }
@media (max-width: 900px) { .project-media-video, .project-media-embed { grid-column: 1 / -1; } }
/* Con un filtro activo el mosaico se vuelve una grilla pareja (sin huecos) según cuántos proyectos quedan. */
@media (min-width: 901px) {
  .bento.is-filtered .bento-card { grid-column: span 4 !important; grid-row: span 1 !important; min-height: 20rem; }
  .bento.is-filtered[data-count="1"] .bento-card { grid-column: span 12 !important; min-height: 26rem; }
  .bento.is-filtered[data-count="2"] .bento-card, .bento.is-filtered[data-count="4"] .bento-card { grid-column: span 6 !important; min-height: 24rem; }
}
@media (max-width: 900px) {
  .bento.is-filtered .bento-card { grid-column: span 1 !important; }
  .bento.is-filtered[data-count="1"] .bento-card { grid-column: 1 / -1 !important; }
}

/* ── CONTACTO: mapa de Google Maps ───────────────── */
.contact-map { margin-top: 2rem; border-radius: 1.4rem; overflow: hidden; border: 1px solid var(--divider); background: var(--surface-2, #eef1f8); }
.contact-map-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; }
.contact-map-head strong { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-display); font-size: 1.2rem; color: var(--accent); }
.contact-map-head strong .icon { width: 1.1rem; height: 1.1rem; color: var(--red); }
.contact-map-head a { display: inline-flex; align-items: center; gap: .25rem; font-weight: 700; font-size: .95rem; color: var(--red); }
.contact-map-head a .icon { width: .95rem; height: .95rem; }
.contact-map-frame { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #e9effd, #f7e9f2); }
.contact-map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.9); }
.contact-map-frame iframe:not([src]) { display: none; }
.contact-map-load { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; border: 0; cursor: pointer; color: var(--accent); background: radial-gradient(circle at 50% 40%, rgba(51, 88, 200, .12), transparent 60%); font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.contact-map-load .icon { width: 2.6rem; height: 2.6rem; padding: .55rem; border-radius: 50%; background: var(--gradient); color: #fff; box-shadow: 0 12px 24px -10px rgba(227, 53, 58, .7); animation: map-pin 2s ease-in-out infinite; }
.contact-map-load small { font-family: var(--font-sans); font-size: .85rem; font-weight: 500; color: var(--gray); }
.contact-map-frame.is-loaded .contact-map-load { display: none; }
@keyframes map-pin { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
html.dark .contact-map-frame { background: linear-gradient(135deg, #18214a, #261a3a); }

/* ── MANUAL PRIVADO: versión web del manual + PDF ─── */
.manual-hero .lead { max-width: 40rem; }
.manual-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.manual-fact { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--divider); color: var(--accent); font-weight: 600; font-size: .95rem; }
.manual-fact .icon { width: 1rem; height: 1rem; color: var(--red); }
.manual-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.manual-section { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(4rem, 8vw, 6rem); }
.manual-layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.manual-layout-single { grid-template-columns: minmax(0, 1fr); max-width: 64rem; }
.manual-content { display: flex; flex-direction: column; gap: clamp(2.5rem, 5vw, 4rem); min-width: 0; }
.brand-sheet { padding: clamp(1.25rem, 3vw, 2rem); border-radius: 1.75rem; background: var(--surface); border: 1px solid var(--divider); box-shadow: 0 30px 50px -40px rgba(29, 37, 80, .55); }
.brand-sheet-title { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--accent); margin-bottom: 1rem; }
.font-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.font-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); font-weight: 600; }
.font-pill b { font-family: var(--font-display); font-size: 1.2rem; color: var(--red); }
.manual-sec { scroll-margin-top: calc(var(--header-h) + 1rem); }
.manual-sec-head { display: flex; align-items: baseline; gap: .9rem; margin-bottom: 1.1rem; padding-bottom: .9rem; border-bottom: 2px solid var(--divider); position: relative; }
.manual-sec-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 4.5rem; height: 2px; background: var(--gradient); }
.manual-sec-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .1em; }
.manual-sec-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1; letter-spacing: -.02em; color: var(--accent); }
.manual-text { max-width: 48rem; }
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .9rem; margin-top: 1.5rem; }
.swatch-grid-sm { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); margin-top: 0; }
.swatch { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--divider); border-radius: 1.2rem; overflow: hidden; background: var(--surface); text-align: left; cursor: copy; font: inherit; color: inherit; transition: transform .25s, box-shadow .25s; }
.swatch:hover { transform: translateY(-4px); box-shadow: 0 20px 34px -24px rgba(29, 37, 80, .6); }
.swatch-color { display: block; height: 5.5rem; background: var(--sw); }
.swatch-grid-sm .swatch-color { height: 3.6rem; }
.swatch-info { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .85rem .8rem; }
.swatch-info strong { font-size: .98rem; color: var(--accent); }
.swatch-info small { font-size: .8rem; color: var(--gray); font-variant-numeric: tabular-nums; }
.swatch.copied .swatch-info strong::after { content: " · copiado"; color: var(--red); font-weight: 600; }
.manual-pages { display: grid; gap: 1.25rem; margin-top: 1.5rem; justify-items: center; }
.manual-pages .manual-page { width: 100%; max-width: 46rem; }
.manual-page { position: relative; display: block; border-radius: 1.2rem; overflow: hidden; border: 1px solid var(--divider); background: #fff; box-shadow: 0 30px 50px -40px rgba(29, 37, 80, .6); cursor: zoom-in; }
.manual-page img { width: 100%; height: auto; display: block; }
.manual-zoom { position: absolute; right: .8rem; top: .8rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: rgba(29, 37, 80, .7); color: #fff; opacity: 0; transition: opacity .25s; }
.manual-zoom .icon { width: 1.1rem; height: 1.1rem; }
.manual-page:hover .manual-zoom { opacity: 1; }
.manual-download {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 1.75rem; color: #fff;
  background: radial-gradient(circle at 95% 120%, rgba(227, 53, 58, .65), transparent 50%), linear-gradient(135deg, #2441a8, #13239a 60%, #0d1550);
  box-shadow: 0 34px 60px -38px rgba(19, 35, 154, .9);
}
.manual-download > div { flex: 1; min-width: 14rem; }
.manual-download .eyebrow { color: #ffb3b5; }
.manual-download h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1; margin: .35rem 0 .45rem; }
.manual-download p:not(.eyebrow) { color: rgba(255, 255, 255, .8); }
.manual-download-ico { position: relative; flex: none; width: 4.4rem; height: 5.4rem; border-radius: .9rem; display: grid; place-items: center; background: #fff; color: var(--red); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .55); transform: rotate(-6deg); }
.manual-download-ico .icon { width: 1.9rem; height: 1.9rem; margin-top: -.8rem; }
.manual-download-ico b { position: absolute; bottom: .6rem; left: 50%; translate: -50% 0; padding: .05rem .4rem; border-radius: .3rem; background: var(--red); color: #fff; font-size: .7rem; letter-spacing: .06em; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 2rem; background: rgba(8, 12, 30, .88); backdrop-filter: blur(4px); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: .8rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: #fff; color: var(--blue); font-size: 1.8rem; line-height: 1; cursor: pointer; }
@media (max-width: 960px) {
  .manual-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .manual-toc ol { grid-template-columns: 1fr; } .manual-download .btn { width: 100%; justify-content: center; } }

/* Índice del manual: barra lateral en escritorio; barra fija y desplegable en el celular. */
.manual-toc { position: sticky; top: calc(var(--header-h) + 1rem); z-index: 30; border-radius: 1.5rem; background: var(--surface); border: 1px solid var(--divider); box-shadow: 0 24px 40px -34px rgba(29, 37, 80, .55); overflow: hidden; }
.toc-bar { display: none; }
.toc-progress { display: block; height: 4px; background: var(--divider); }
.toc-progress i { display: block; height: 100%; width: 0; background: var(--gradient); transition: width .15s linear; }
.toc-panel { padding: 1.1rem 1rem 1.1rem; }
.manual-toc-title { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 .35rem .75rem; }
.manual-toc-title span { font-size: .75rem; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--gray); }
.toc-search { position: relative; display: block; margin: 0 0 .6rem; }
.toc-search .icon { position: absolute; left: .75rem; top: 50%; translate: 0 -50%; width: 1rem; height: 1rem; color: var(--gray); }
.toc-search input { width: 100%; padding: .55rem .75rem .55rem 2.2rem; border-radius: 999px; border: 1px solid var(--divider); background: var(--surface-2, #f3f5fa); color: var(--ink); font: inherit; font-size: .95rem; }
.toc-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.manual-toc ol { list-style: none; margin: 0; padding: 0 .1rem 0 0; display: flex; flex-direction: column; gap: .1rem; max-height: calc(100vh - var(--header-h) - 15rem); overflow-y: auto; overscroll-behavior: contain; }
.manual-toc ol a { position: relative; display: flex; gap: .6rem; padding: .5rem .6rem; border-radius: .75rem; color: var(--gray); font-size: .98rem; line-height: 1.25; transition: background .2s, color .2s; }
.manual-toc ol a span { flex: none; min-width: 1.4rem; font-family: var(--font-display); font-weight: 800; color: var(--accent); opacity: .5; }
@media (hover: hover) { .manual-toc ol a:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); color: var(--accent); } }
.manual-toc ol a.active { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-weight: 600; }
.manual-toc ol a.active::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; border-radius: 3px; background: var(--gradient); }
.manual-toc ol a.active span { opacity: 1; color: var(--red); }
.manual-toc ol a.is-read span { opacity: .85; }
.toc-empty { padding: .75rem .6rem; font-size: .92rem; color: var(--gray); }
.manual-toc a.manual-toc-pdf { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .9rem; padding: .65rem; border-radius: 999px; background: var(--gradient); color: #fff; font-weight: 700; }
.manual-pager { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-top: 2rem; }
.manual-pager a { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-radius: 1.1rem; border: 1px solid var(--divider); background: var(--surface); color: var(--accent); transition: border-color .25s, transform .25s, box-shadow .25s; min-width: 0; }
.manual-pager a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 16px 30px -24px rgba(29, 37, 80, .6); }
.manual-pager a span { min-width: 0; display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manual-pager a small { font-family: var(--font-sans); font-weight: 700; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.manual-pager .icon { flex: none; width: 1.3rem; height: 1.3rem; }
.pager-next { justify-content: flex-end; text-align: right; grid-column: 2; }
.pager-next span { align-items: flex-end; }
@media (max-width: 960px) {
  .manual-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .manual-toc { top: var(--header-h); margin: 0 -1.25rem; border-radius: 0 0 1.25rem 1.25rem; border-width: 0 0 1px; background: var(--header-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 14px 30px -24px rgba(29, 37, 80, .6); }
  .toc-bar { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .7rem 1.25rem; border: 0; background: none; color: var(--accent); font: inherit; text-align: left; cursor: pointer; }
  .toc-bar-ico { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--gradient); color: #fff; }
  .toc-bar-ico .icon { width: 1rem; height: 1rem; }
  .toc-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
  .toc-bar-text small { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
  .toc-bar-text small b { color: var(--gray); letter-spacing: 0; }
  .toc-bar-text strong { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .toc-chevron { flex: none; width: 1.2rem; height: 1.2rem; transition: transform .3s ease; }
  .manual-toc.is-open .toc-chevron { transform: rotate(180deg); }
  .toc-progress { height: 3px; }
  .toc-panel { display: none; padding: .9rem 1.25rem 1.1rem; border-top: 1px solid var(--divider); }
  .manual-toc.is-open .toc-panel { display: block; animation: toc-open .3s cubic-bezier(.22, 1, .36, 1); }
  .manual-toc .manual-toc-title { display: none; }
  .manual-toc ol { max-height: 52vh; }
  .manual-pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: auto; }
}
@media (min-width: 768px) and (max-width: 960px) { .manual-toc { margin: 0 -2rem; } .toc-bar, .toc-panel { padding-left: 2rem; padding-right: 2rem; } }
@keyframes toc-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 960px) { .manual-sec { scroll-margin-top: calc(var(--header-h) + 5.5rem); } }

/* ── Controles de formulario con color de marca (sitio público) ── */
select.field {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233358c8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 1.1rem;
}
html.dark select.field { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ea8ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
select.field option:checked { background: #3358c8; color: #fff; }
.claim-check input[type=checkbox] {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; display: inline-grid; place-content: center;
  border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); background: var(--surface); cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s;
}
.claim-check input[type=checkbox] { border-radius: 6px; }
.claim-check input[type=checkbox]::before { content: ""; transform: scale(0); transition: transform .18s cubic-bezier(.34, 1.56, .64, 1); background: #fff; }
.claim-check input[type=checkbox]::before { width: .72rem; height: .72rem; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
.claim-check input[type=checkbox]:checked { background: var(--gradient); border-color: transparent; box-shadow: 0 4px 10px -4px rgba(51, 88, 200, .7); }
.claim-check input[type=checkbox]:checked::before { transform: scale(1); }
.claim-check input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=date].field::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(31%) sepia(73%) saturate(1800%) hue-rotate(214deg) brightness(88%); }

/* ── MANUAL: historial de versiones ──────────────── */
a.manual-fact-link { transition: border-color .2s, background .2s; }
a.manual-fact-link:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.version-banner { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 1.4rem; padding: .9rem 1.1rem; border-radius: 1.1rem; border: 1.5px solid color-mix(in srgb, var(--red) 45%, transparent); background: color-mix(in srgb, var(--red) 7%, var(--surface)); }
.version-banner > .icon { flex: none; width: 1.4rem; height: 1.4rem; color: var(--red); }
.version-banner p { flex: 1 1 16rem; color: var(--ink); line-height: 1.35; }
.manual-versions { padding: clamp(1.5rem, 4vw, 2.25rem); border-radius: 1.75rem; background: var(--surface); border: 1px solid var(--divider); box-shadow: 0 30px 50px -40px rgba(29, 37, 80, .55); scroll-margin-top: calc(var(--header-h) + 1rem); }
.manual-versions h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.4rem); line-height: 1; color: var(--accent); margin: .35rem 0 .5rem; }
.manual-versions-lead { color: var(--gray); margin-bottom: 1.5rem; max-width: 40rem; }
.version-timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; position: relative; display: flex; flex-direction: column; gap: 1rem; }
.version-timeline::before { content: ""; position: absolute; left: .7rem; top: .5rem; bottom: .5rem; width: 2px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--red) 50%, transparent)); opacity: .35; }
.version-timeline li { position: relative; }
.vt-dot { position: absolute; left: -1.4rem; top: 1rem; translate: -50% 0; margin-left: .7rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--divider); color: var(--gray); }
.vt-dot .icon { width: .9rem; height: .9rem; }
.version-timeline li.is-current .vt-dot { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px rgba(227, 53, 58, .7); }
.vt-card { margin-left: 1rem; padding: 1rem 1.15rem; border-radius: 1.1rem; border: 1px solid var(--divider); background: var(--surface); transition: border-color .2s; }
.version-timeline li.is-current .vt-card { border-color: color-mix(in srgb, var(--accent) 45%, var(--divider)); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.version-timeline li.is-viewing .vt-card { border-color: var(--red); }
.vt-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; }
.vt-head strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--accent); }
.vt-tag { padding: .12rem .55rem; border-radius: 999px; background: var(--gradient); color: #fff; font-size: .75rem; font-weight: 700; }
.vt-tag-view { background: var(--red); }
.vt-head time { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; font-size: .9rem; color: var(--gray); }
.vt-head time .icon { width: .95rem; height: .95rem; color: var(--red); }
.vt-notes { margin-top: .45rem; color: var(--ink); line-height: 1.45; }
.vt-meta { margin-top: .3rem; font-size: .88rem; color: var(--gray); }
.vt-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.vt-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .9rem; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); font-weight: 700; font-size: .9rem; transition: background .2s, color .2s, border-color .2s; }
.vt-btn .icon { width: 1rem; height: 1rem; }
.vt-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.vt-btn-pdf { border-color: color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); }
.vt-btn-pdf:hover { background: var(--red); border-color: var(--red); color: #fff; }
@media (max-width: 560px) { .vt-head time { margin-left: 0; width: 100%; } }

/* ── PORTAFOLIO: filtro por servicio, versión destacada ── */
.pf-filters { margin: 0 0 1.75rem; }
.pf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.pf-head .pf-count { padding: 0; }
.pf-bar { isolation: isolate;
  position: relative; padding: .55rem; border-radius: 1.6rem; background: var(--header-glass);
  border: 1.5px solid transparent; background-clip: padding-box;
  box-shadow: 0 22px 46px -30px rgba(29, 37, 80, .6);
}
.pf-bar::before { content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: inherit; background: var(--gradient); opacity: .55; }
.pf-bar::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--surface); }
.pf-chips { gap: .5rem; padding: .1rem; }
.pf-chip { gap: .55rem; padding: .45rem 1rem .45rem .45rem; font-size: 1.12rem; border-width: 1.5px; }
.pf-ico { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; font-style: normal; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); transition: background .3s, color .3s, transform .3s; }
.pf-ico .icon { width: 1.05rem; height: 1.05rem; }
.pf-chip:hover .pf-ico { transform: rotate(-8deg) scale(1.08); }
.pf-chip.active .pf-ico { background: rgba(255, 255, 255, .22); color: #fff; }
.pf-chip.active { box-shadow: 0 12px 26px -12px rgba(227, 53, 58, .75), 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent); }
@media (max-width: 760px) {
  .pf-filters { margin-left: -1.25rem; margin-right: -1.25rem; }
  .pf-head { padding: 0 1.25rem; }
  .pf-bar { border-radius: 0; padding: .55rem 0; box-shadow: 0 16px 30px -24px rgba(29, 37, 80, .6); }
  .pf-bar::before { inset: -1.5px 0; border-radius: 0; }
  .pf-bar::after { border-radius: 0; }
  .pf-chips { margin: 0; padding: .1rem 1.25rem; flex-basis: auto; -webkit-mask: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent); mask: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent); }
  .pf-chip { font-size: 1.02rem; padding: .38rem .9rem .38rem .38rem; }
  .pf-ico { width: 1.85rem; height: 1.85rem; }
}

/* ── Ajustes de legibilidad y responsive ─────────── */
/* Tarjetas con foto: degradado oscuro abajo para que el título siempre se lea sobre la imagen. */
.bento-card:has(img.bento-img)::after { background: linear-gradient(180deg, rgba(8, 12, 40, 0) 30%, rgba(8, 12, 40, .35) 58%, rgba(8, 12, 40, .86) 100%); }
.bento-card:has(img.bento-img) .bento-title, .bento-card:has(img.bento-img) .bento-text { text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
@media (max-width: 560px) {
  .bento-card { min-height: 15rem; padding: 1.4rem 1.3rem; }
  .bento-card:has(img.bento-img) { min-height: 22rem; }
  .bento-title { font-size: 1.75rem; }
  .bento-text { font-size: 1.02rem; }
  /* El cohete pequeño de Proyectos tapaba el título en pantallas chicas. */
  .orbit-proyectos { display: none !important; }
}
@media (max-width: 679px) {
  /* Servicios sin imagen: sin el espacio vacío en el medio. */
  .service-card:not(:has(.service-media img)) .service-media { display: none; }
  .service-card { min-height: 0; gap: .35rem; }
  .service-num { margin-bottom: .6rem; }
}
/* La cabecera del filtro también queda fija al bajar: con fondo para que no se mezcle con las tarjetas. */
.pf-head { background: var(--background); margin-bottom: 0; padding-top: .4rem; padding-bottom: .65rem; }
@media (max-width: 760px) { .pf-head { padding-top: .5rem; } }

/* ── Barras de desplazamiento con color de marca ──────────────────────────
   Chrome/Edge/Safari: degradé azul → rojo. Firefox: color sólido (va en @supports
   porque en Chrome scrollbar-color anula los estilos ::-webkit-scrollbar). */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--surface-2, #eef1f8); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #3358c8 0%, #8a3f8e 55%, #e3353a 100%); border-radius: 999px; border: 3px solid var(--surface-2, #eef1f8); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #2441a8 0%, #7a3380 55%, #c4262b 100%); border-width: 2px; }
::-webkit-scrollbar-corner { background: transparent; }
.manual-toc ol::-webkit-scrollbar { width: 6px; }
.manual-toc ol::-webkit-scrollbar-track { background: transparent; }
.manual-toc ol::-webkit-scrollbar-thumb { border: 0; }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: #3358c8 var(--surface-2, #eef1f8); }
}
html.dark ::-webkit-scrollbar-track, html.dark ::-webkit-scrollbar-corner { background: #0a0f1f; }
html.dark ::-webkit-scrollbar-thumb { border-color: #0a0f1f; }

