/* ==========================================================================
   IT-Sys Bolivia — Hoja de estilos principal
   Sitio corporativo · Tema oscuro navy + acento dorado
   Sin frameworks ni dependencias de compilación.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens de diseño
   -------------------------------------------------------------------------- */
:root {
  --navy-950: #060d1c;
  --navy-900: #0a192f;
  --navy-850: #0b132b;
  --navy-800: #112240;
  --navy-700: #172a4d;
  --navy-600: #1e3a5f;

  --text: #e6eefc;
  --text-strong: #f5f9ff;
  --muted: #9fb3d1;
  --muted-2: #7e93b3;

  --gold: #d4af37;
  --gold-2: #f0d78c;
  --gold-deep: #b8912c;
  --gold-soft: #c5a059;

  --cobalt: #2563eb;
  --cobalt-dark: #1e3a8a;
  --green: #34d399;
  --whatsapp: #25d366;

  --border: rgba(212, 175, 55, 0.18);
  --border-strong: rgba(212, 175, 55, 0.42);
  --border-soft: rgba(148, 178, 220, 0.13);
  --surface: rgba(17, 34, 64, 0.68);
  --surface-solid: #0d1b33;

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;

  --container: 1200px;
  --header-h: 80px;

  --font-head: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 10px 30px -16px rgba(0, 0, 0, 0.7);
  --shadow-md: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
  --shadow-gold: 0 18px 50px -22px rgba(212, 175, 55, 0.45);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

* {
  margin: 0;
}

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

body {
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(37, 99, 235, 0.1), transparent 62%),
    radial-gradient(900px 500px at 0% 22%, rgba(212, 175, 55, 0.045), transparent 65%),
    var(--navy-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open,
body.modal-open {
  overflow: hidden;
}

body.nav-open .wa-float {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

fieldset {
  min-width: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-strong);
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--gold);
  color: var(--navy-950);
}

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

section[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy-950);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   3. Utilidades
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: clamp(72px, 8vw, 116px) 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(34px, 4vw, 52px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-head--center .eyebrow::before {
  display: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--gold-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.section-title {
  max-width: 20ch;
  font-size: clamp(1.95rem, 4vw, 3.2rem);
  font-weight: 700;
}

.section-head--center .section-title {
  margin-inline: auto;
}

.section-head--center .lead {
  margin-inline: auto;
}

.lead {
  max-width: 66ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.3vw, 1.05rem);
  line-height: 1.75;
}

.text-gold {
  color: var(--gold);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-gold {
    background: linear-gradient(100deg, #f7e8b0 0%, var(--gold) 48%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.panel-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--gold-2);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.required {
  color: var(--gold);
}

.optional {
  color: var(--muted-2);
  font-weight: 400;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.btn i {
  font-size: 0.92em;
  transition: transform 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover i.fa-arrow-right {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(0);
}

.btn-gold {
  background: linear-gradient(135deg, #f0d78c 0%, var(--gold) 48%, #bf9a2f 100%);
  border-color: rgba(240, 215, 140, 0.65);
  color: #081426;
  box-shadow: 0 12px 30px -16px rgba(212, 175, 55, 0.8);
}

.btn-gold:hover {
  box-shadow: 0 18px 40px -16px rgba(212, 175, 55, 0.75);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(212, 175, 55, 0.32);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--border-strong);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-2);
}

.btn-wa {
  background: var(--whatsapp);
  border-color: rgba(255, 255, 255, 0.18);
  color: #052e16;
}

.btn-wa:hover {
  background: #2ee678;
  box-shadow: 0 16px 36px -18px rgba(37, 211, 102, 0.8);
}

.btn-sm {
  padding: 10px 16px;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-2);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(212, 175, 55, 0.4);
  transition: color 0.2s;
}

.link-btn:hover {
  color: #fff1bf;
  text-decoration-color: var(--gold);
}

.microcopy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted-2);
  font-size: 0.72rem;
  line-height: 1.6;
}

.microcopy i {
  margin-top: 3px;
  color: var(--gold);
}

.microcopy a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.microcopy a:hover {
  color: var(--gold-2);
}

/* --------------------------------------------------------------------------
   4. Barra superior
   -------------------------------------------------------------------------- */
.topbar {
  position: relative;
  z-index: 85;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  background: #050b17;
  color: var(--muted-2);
  font-size: 0.74rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 38px;
}

.topbar-note,
.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.topbar-note i,
.topbar-item i {
  color: var(--gold);
  font-size: 0.78rem;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-item {
  transition: color 0.2s;
}

a.topbar-item:hover {
  color: var(--gold-2);
}

/* --------------------------------------------------------------------------
   5. Header y navegación
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid transparent;
  background: rgba(6, 13, 28, 0.72);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border-soft);
  background: rgba(5, 11, 23, 0.95);
  box-shadow: 0 16px 44px -24px rgba(0, 0, 0, 0.9);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  border-radius: 8px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 6px 14px rgba(212, 175, 55, 0.18));
  transition: transform 0.35s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-4deg) scale(1.04);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-head);
  color: var(--text-strong);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-name span {
  color: var(--gold-2);
}

.brand-tagline {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
}

.nav-link {
  position: relative;
  padding: 10px 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 3px;
  left: 13px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.nav-link.is-active {
  color: var(--gold-2);
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.mobile-cta {
  display: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  transition: border-color 0.2s, background-color 0.2s;
}

.nav-toggle:hover {
  border-color: var(--border);
  background: rgba(212, 175, 55, 0.06);
}

.nav-toggle-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 21px;
  height: 15px;
}

.nav-toggle-box span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 7vw, 92px) 0 clamp(44px, 5vw, 64px);
  border-bottom: 1px solid var(--border-soft);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 74% 12%, rgba(37, 99, 235, 0.17), transparent 66%),
    radial-gradient(700px 440px at 8% 88%, rgba(212, 175, 55, 0.07), transparent 70%);
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 178, 220, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 220, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 35%, #000 18%, transparent 72%);
  mask-image: radial-gradient(ellipse at 60% 35%, #000 18%, transparent 72%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  top: 14%;
  right: 4%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.09), transparent 68%);
  filter: blur(30px);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.hero-copy .eyebrow {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.055);
  color: var(--gold-2);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.hero-copy .eyebrow::before {
  display: none;
}

.pulse-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 50%;
  animation: pulseDot 2.6s var(--ease) infinite;
}

.hero h1 {
  max-width: 19ch;
  font-size: clamp(2.25rem, 4.7vw, 4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.hero-lead {
  max-width: 58ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.09rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 28px;
  color: var(--muted-2);
  font-size: 0.8rem;
}

.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-trust i {
  color: var(--gold);
  font-size: 0.82rem;
}

/* Tarjeta de arquitectura de referencia (hero) */
.hero-visual {
  position: relative;
}

.stack-panel {
  position: relative;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(158deg, rgba(23, 42, 77, 0.9) 0%, rgba(13, 27, 51, 0.95) 48%, rgba(6, 13, 28, 0.99) 100%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.stack-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 10%;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 215, 140, 0.85), transparent);
}

.stack-panel::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2), transparent 70%);
  pointer-events: none;
}

.stack-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.stack-top h2 {
  max-width: 15ch;
  font-size: clamp(1.24rem, 1.8vw, 1.48rem);
  font-weight: 600;
  line-height: 1.2;
}

.stack-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 9px;
  border: 1px solid rgba(212, 175, 55, 0.26);
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.07);
  color: var(--gold-2);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.stack-badge i {
  font-size: 0.62rem;
}

.stack-layers {
  position: relative;
  z-index: 1;
  display: grid;
}

.stack-layers::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 23px;
  width: 1px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.45), rgba(212, 175, 55, 0.06));
}

.stack-layers li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(148, 178, 220, 0.08);
}

.stack-layers li:last-child {
  border-bottom: 0;
}

.stack-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.025));
  color: var(--gold-2);
  font-size: 0.96rem;
}

.stack-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 1px;
  line-height: 1.4;
}

.stack-label {
  color: var(--gold-2);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stack-copy strong {
  margin-top: 2px;
  color: var(--text-strong);
  font-family: var(--font-head);
  font-size: 0.94rem;
  font-weight: 600;
}

.stack-copy small {
  margin-top: 1px;
  overflow-wrap: anywhere;
  color: var(--muted-2);
  font-size: 0.69rem;
}

.stack-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 178, 220, 0.09);
  color: var(--muted-2);
  font-size: 0.66rem;
}

.stack-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stack-foot i {
  color: var(--gold);
  font-size: 0.68rem;
}

/* Métricas del hero */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(44px, 5.5vw, 70px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(9, 20, 39, 0.58);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.stat {
  padding: 23px 26px;
  border-left: 1px solid var(--border-soft);
  transition: background-color 0.25s;
}

.stat:first-child {
  border-left: 0;
}

.stat:hover {
  background: rgba(212, 175, 55, 0.035);
}

.stat-value {
  display: block;
  color: var(--gold-2);
  font-family: var(--font-head);
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.stat-value--text {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.5;
}

.stat-label {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   7. Servicios
   -------------------------------------------------------------------------- */
.services {
  background:
    radial-gradient(800px 420px at 95% 0%, rgba(37, 99, 235, 0.07), transparent 70%),
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 46%, #081326 100%);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.filter-btn:hover {
  border-color: var(--border);
  color: var(--text);
}

.filter-btn.is-active {
  border-color: rgba(212, 175, 55, 0.55);
  background: linear-gradient(135deg, rgba(240, 215, 140, 0.95), rgba(212, 175, 55, 0.9));
  color: #081426;
  font-weight: 600;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 25px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(17, 34, 64, 0.72) 0%, rgba(9, 20, 39, 0.94) 100%);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 16%;
  left: 16%;
  z-index: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(340px circle at var(--mx) var(--my), rgba(212, 175, 55, 0.1), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.service-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 28px 60px -28px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(212, 175, 55, 0.08);
  transform: translateY(-6px);
}

.service-card:hover::before,
.service-card:hover::after {
  opacity: 1;
}

.service-card[hidden] {
  display: none;
}

.service-card.is-entering {
  animation: cardIn 0.38s var(--ease) both;
}

.service-index {
  position: absolute;
  top: 18px;
  right: 21px;
  z-index: 0;
  color: rgba(230, 238, 252, 0.045);
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.13), rgba(212, 175, 55, 0.03));
  color: var(--gold-2);
  font-size: 1.3rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}

.service-card:hover .service-icon {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 28px -6px rgba(212, 175, 55, 0.28);
  transform: translateY(-2px);
}

.service-card h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  font-weight: 600;
}

.service-card > p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.72;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 22px;
}

.service-tags li {
  padding: 3px 9px;
  border: 1px solid rgba(148, 178, 220, 0.14);
  border-radius: 999px;
  background: rgba(148, 178, 220, 0.045);
  color: var(--muted-2);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

.service-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 178, 220, 0.1);
}

.card-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  transition: color 0.2s;
}

.card-add i {
  font-size: 0.7rem;
  transition: transform 0.25s var(--ease);
}

.card-add:hover {
  color: #fff1bf;
}

.card-add:hover i {
  transform: rotate(90deg);
}

.card-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.06);
  color: #5ee89a;
  font-size: 0.95rem;
  transition: background-color 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}

.card-wa:hover {
  border-color: var(--whatsapp);
  background: var(--whatsapp);
  color: #052e16;
  transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   8. Especialidades
   -------------------------------------------------------------------------- */
.specialties {
  background:
    radial-gradient(780px 500px at 12% 20%, rgba(37, 99, 235, 0.08), transparent 68%),
    radial-gradient(600px 400px at 92% 80%, rgba(212, 175, 55, 0.04), transparent 70%),
    var(--navy-900);
}

.specialties-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
}

.spec-list {
  border-top: 1px solid var(--border-soft);
}

.spec {
  border-bottom: 1px solid var(--border-soft);
}

.spec summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px 2px;
  list-style: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.spec summary::-webkit-details-marker {
  display: none;
}

.spec summary:hover .spec-heading strong {
  color: var(--gold-2);
}

.spec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 11px;
  background: rgba(212, 175, 55, 0.06);
  color: var(--gold-2);
  font-size: 0.94rem;
}

.spec-heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.4;
}

.spec-heading strong {
  color: var(--text-strong);
  font-family: var(--font-head);
  font-size: 1.01rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.spec-heading small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.69rem;
  letter-spacing: 0.02em;
}

.spec-chevron {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 0.72rem;
  transition: transform 0.3s var(--ease), color 0.2s;
}

.spec[open] .spec-chevron {
  color: var(--gold);
  transform: rotate(180deg);
}

.spec-body {
  padding: 0 2px 22px 58px;
}

.spec-body p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.check-list {
  margin-top: 13px;
}

.check-list li {
  position: relative;
  padding-left: 21px;
  color: var(--muted-2);
  font-size: 0.82rem;
  line-height: 1.65;
}

.check-list li + li {
  margin-top: 7px;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 5px;
  height: 9px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg);
}

/* Ficha de metodología */
.process-card {
  position: sticky;
  top: calc(var(--header-h) + 26px);
  padding: 28px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(23, 42, 77, 0.82) 0%, rgba(10, 25, 47, 0.96) 58%, rgba(6, 13, 28, 0.99) 100%);
  box-shadow: var(--shadow-md);
}

.process-card::before {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.process-card h3 {
  margin-bottom: 24px;
  font-size: 1.36rem;
  font-weight: 600;
}

.process-list {
  position: relative;
}

.process-list::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 28px;
  left: 19px;
  width: 1px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.5), rgba(212, 175, 55, 0.04));
}

.process-list li {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
}

.process-list li:last-child {
  padding-bottom: 0;
}

.process-num {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 50%;
  background: #0b1a33;
  color: var(--gold-2);
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.process-list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text-strong);
  font-family: var(--font-head);
  font-size: 0.94rem;
  font-weight: 600;
}

.process-list p {
  color: var(--muted-2);
  font-size: 0.78rem;
  line-height: 1.6;
}

.process-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 24px 0 20px;
  padding: 14px;
  border: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.045);
}

.process-note i {
  margin-top: 2px;
  color: var(--gold);
  font-size: 0.9rem;
}

.process-note p {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   9. Arquitectura tecnológica
   -------------------------------------------------------------------------- */
.architecture {
  background:
    radial-gradient(900px 500px at 50% -8%, rgba(37, 99, 235, 0.1), transparent 66%),
    radial-gradient(600px 400px at 100% 70%, rgba(212, 175, 55, 0.045), transparent 70%),
    #060d1c;
}

.layer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.layer-card {
  position: relative;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 34, 64, 0.48), rgba(7, 16, 32, 0.72));
  transition: transform 0.3s var(--ease), border-color 0.3s, background-color 0.3s;
}

.layer-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.layer-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
  background-color: rgba(17, 34, 64, 0.6);
  transform: translateY(-4px);
}

.layer-card:hover::after {
  opacity: 1;
}

.layer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.layer-num {
  color: rgba(240, 215, 140, 0.6);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.layer-top i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.055);
  color: var(--gold-2);
  font-size: 0.98rem;
}

.layer-card h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
  font-weight: 600;
}

.layer-card p {
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.65;
}

.layer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
}

.layer-tags li {
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(148, 178, 220, 0.06);
  color: var(--muted-2);
  font-size: 0.62rem;
}

.tech-block {
  margin-top: 40px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(17, 34, 64, 0.5), rgba(8, 18, 36, 0.72));
}

.tech-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.tech-block-head h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  font-weight: 600;
}

.tech-block-head p {
  max-width: 46ch;
  color: var(--muted-2);
  font-size: 0.8rem;
  text-align: right;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.tech {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid rgba(148, 178, 220, 0.1);
  border-radius: 9px;
  background: rgba(6, 13, 28, 0.55);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, transform 0.2s, background-color 0.2s;
}

.tech i {
  width: 16px;
  color: var(--gold-2);
  font-size: 0.92rem;
  text-align: center;
}

.tech:hover {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.04);
  color: var(--text);
  transform: translateY(-2px);
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 178, 220, 0.09);
}

.principles li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 0.73rem;
}

.principles i {
  color: var(--gold);
  font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   10. Formularios (base compartida)
   -------------------------------------------------------------------------- */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field label {
  color: #c9d8ef;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 178, 220, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(5, 12, 25, 0.62);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.field textarea {
  min-height: 126px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #7088aa;
  opacity: 1;
}

.field input:-webkit-autofill,
.field select:-webkit-autofill,
.field textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px #081426 inset;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(148, 178, 220, 0.28);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(212, 175, 55, 0.65);
  background: rgba(5, 12, 25, 0.82);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
  outline: none;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.5);
  outline-offset: 2px;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
}

.select-wrap > i {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--muted-2);
  font-size: 0.65rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-wrap select option {
  background: var(--navy-850);
  color: var(--text);
}

.field-hint {
  color: var(--muted-2);
  font-size: 0.7rem;
  line-height: 1.5;
}

.field-error {
  display: block;
  min-height: 0;
  color: #fca5a5;
  font-size: 0.73rem;
  line-height: 1.45;
}

.field-error:not(:empty) {
  margin-top: 1px;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.08);
}

.form-status {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 9px;
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
  font-size: 0.8rem;
  line-height: 1.55;
}

.checkbox {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
  cursor: pointer;
}

.checkbox input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.checkbox-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  flex-shrink: 0;
  border: 1px solid rgba(148, 178, 220, 0.3);
  border-radius: 5px;
  background: rgba(5, 12, 25, 0.6);
  color: transparent;
  font-size: 0.58rem;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.checkbox input:checked + .checkbox-box {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy-950);
}

.checkbox input:focus-visible + .checkbox-box {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.consent-field {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 16px;
}

.consent-field .link-btn {
  margin-left: 29px;
  font-size: 0.73rem;
}

.hp-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   11. Cotizador
   -------------------------------------------------------------------------- */
.quote {
  background:
    radial-gradient(800px 460px at 8% 10%, rgba(212, 175, 55, 0.045), transparent 68%),
    radial-gradient(900px 500px at 100% 50%, rgba(37, 99, 235, 0.08), transparent 68%),
    linear-gradient(180deg, #060d1c, var(--navy-900));
}

.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.66fr);
  gap: 24px;
  align-items: start;
}

.quote-builder {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, rgba(17, 34, 64, 0.58), rgba(8, 18, 36, 0.8));
  box-shadow: var(--shadow-sm);
}

.quote-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.quote-group + .quote-group {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid rgba(148, 178, 220, 0.1);
}

.quote-group legend {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  color: var(--text-strong);
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.step-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-2);
  font-family: var(--font-body);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.group-hint {
  margin: 7px 0 15px;
  color: var(--muted-2);
  font-size: 0.77rem;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(148, 178, 220, 0.13);
  border-radius: 11px;
  background: rgba(5, 12, 25, 0.4);
  cursor: pointer;
  transition: border-color 0.22s, background-color 0.22s, transform 0.22s;
}

.option:hover {
  border-color: rgba(212, 175, 55, 0.26);
  background: rgba(212, 175, 55, 0.035);
}

.option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.option:has(input:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(148, 178, 220, 0.06);
  color: var(--muted);
  font-size: 0.88rem;
  transition: background-color 0.22s, color 0.22s;
}

.option-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.option-copy strong {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
}

.option-copy small {
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  margin-left: auto;
  flex-shrink: 0;
  border: 1px solid rgba(148, 178, 220, 0.25);
  border-radius: 50%;
  color: transparent;
  font-size: 0.52rem;
  transition: background-color 0.22s, border-color 0.22s, color 0.22s;
}

.option:has(input:checked) {
  border-color: rgba(212, 175, 55, 0.55);
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.025));
}

.option:has(input:checked) .option-icon {
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold-2);
}

.option input:checked ~ .option-check {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy-950);
}

.quote-actions {
  margin-top: 26px;
}

.quote-actions .microcopy {
  margin-top: 12px;
}

/* Panel resumen */
.quote-summary {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 24px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(23, 42, 77, 0.85) 0%, rgba(10, 25, 47, 0.97) 60%, rgba(6, 13, 28, 0.99) 100%);
  box-shadow: var(--shadow-md), 0 0 40px -30px rgba(212, 175, 55, 0.5);
}

.summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 178, 220, 0.1);
}

.summary-head h3 {
  font-size: 1.3rem;
  font-weight: 600;
}

.summary-head > i {
  margin-top: 4px;
  color: var(--gold);
  font-size: 1.35rem;
}

.summary-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed rgba(148, 178, 220, 0.18);
  border-radius: 10px;
  color: var(--muted-2);
  font-size: 0.77rem;
  line-height: 1.55;
}

.summary-empty[hidden] {
  display: none;
}

.summary-empty i {
  color: var(--gold);
  font-size: 1.1rem;
}

.summary-chips {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.summary-chips:empty {
  display: none;
}

.summary-chips li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: 7px;
  background: rgba(212, 175, 55, 0.055);
  color: var(--text);
  font-size: 0.73rem;
  line-height: 1.4;
}

.summary-chips li > i {
  color: var(--gold);
  font-size: 0.6rem;
}

.summary-chips li span {
  flex: 1;
  min-width: 0;
}

.chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  font-size: 0.62rem;
  transition: background-color 0.2s, color 0.2s;
}

.chip-remove:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.summary-meta {
  margin-top: 16px;
  padding-top: 4px;
  border-top: 1px solid rgba(148, 178, 220, 0.1);
}

.summary-meta > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(148, 178, 220, 0.08);
}

.summary-meta > div:last-child {
  border-bottom: 0;
}

.summary-meta dt {
  color: var(--muted-2);
  font-size: 0.72rem;
}

.summary-meta dd {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 500;
  text-align: right;
}

.complexity {
  margin: 14px 0 18px;
  padding: 13px;
  border: 1px solid rgba(148, 178, 220, 0.1);
  border-radius: 9px;
  background: rgba(5, 12, 25, 0.38);
}

.complexity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.complexity-head strong {
  color: var(--gold-2);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.meter {
  display: flex;
  gap: 4px;
}

.meter span {
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: rgba(148, 178, 220, 0.15);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.complexity.level-1 .meter span:nth-child(1),
.complexity.level-2 .meter span:nth-child(-n + 2),
.complexity.level-3 .meter span {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-2));
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.complexity p {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 0.68rem;
  line-height: 1.5;
}

.summary-submit {
  margin-top: 2px;
}

.summary-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 11px;
  color: var(--muted-2);
  font-size: 0.72rem;
  transition: color 0.2s;
}

.summary-alt:hover {
  color: var(--gold-2);
}

.quote-summary.is-pulsing {
  animation: summaryPulse 0.85s var(--ease) both;
}

@keyframes summaryPulse {
  0% { box-shadow: var(--shadow-md); }
  45% { box-shadow: 0 0 0 1px rgba(240, 215, 140, 0.55), 0 22px 60px -20px rgba(212, 175, 55, 0.4); }
  100% { box-shadow: var(--shadow-md); }
}

/* --------------------------------------------------------------------------
   12. Contacto
   -------------------------------------------------------------------------- */
.contact {
  background:
    radial-gradient(800px 500px at 90% 20%, rgba(37, 99, 235, 0.09), transparent 68%),
    radial-gradient(600px 400px at 0% 90%, rgba(212, 175, 55, 0.045), transparent 70%),
    var(--navy-950);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(36px, 5vw, 60px);
  align-items: start;
}

.contact-cards {
  display: grid;
  gap: 10px;
}

.contact-cards li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(17, 34, 64, 0.38);
  transition: border-color 0.2s, background-color 0.2s;
}

.contact-cards li:hover {
  border-color: rgba(212, 175, 55, 0.22);
  background: rgba(17, 34, 64, 0.52);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.06);
  color: var(--gold-2);
  font-size: 0.9rem;
}

.contact-label {
  display: block;
  margin-bottom: 1px;
  color: var(--muted-2);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contact-cards strong {
  display: block;
  color: var(--text-strong);
  font-family: var(--font-head);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.4;
}

.contact-cards strong a {
  transition: color 0.2s;
}

.contact-cards strong a:hover {
  color: var(--gold-2);
}

.contact-cards p {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.77rem;
  line-height: 1.55;
}

.contact-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: rgba(212, 175, 55, 0.045);
}

.contact-note i {
  margin-top: 2px;
  color: var(--gold);
  font-size: 0.85rem;
}

.contact-note p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.contact-form-wrap {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, rgba(17, 34, 64, 0.58), rgba(8, 18, 36, 0.82));
  box-shadow: var(--shadow-sm);
}

.form-head {
  margin-bottom: 20px;
}

.form-head h3 {
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  font-weight: 600;
}

.form-head p {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 0.78rem;
}

#contactForm .form-row {
  margin-top: 0;
  margin-bottom: 14px;
}

#contactForm > .field {
  margin-bottom: 14px;
}

#contactForm .btn-block {
  margin-top: 16px;
}

#contactForm .microcopy {
  margin-top: 12px;
}

.form-success {
  padding: 10px 0;
}

.form-success[hidden] {
  display: none;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.1);
  color: var(--green);
  font-size: 1.3rem;
}

.form-success h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.form-success > p {
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.7;
}

.ticket-line {
  margin-top: 16px !important;
  padding: 10px 14px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.05);
  color: var(--muted-2) !important;
  font-size: 0.8rem !important;
}

.ticket-line strong {
  color: var(--gold-2);
  font-family: var(--font-head);
  letter-spacing: 0.04em;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: clamp(48px, 6vw, 68px) 0 92px;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
  background:
    radial-gradient(700px 400px at 20% 0%, rgba(37, 99, 235, 0.06), transparent 70%),
    #050b17;
}

.error-page .site-footer {
  padding-bottom: 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr) minmax(0, 1.1fr) minmax(0, 1.05fr);
  gap: clamp(26px, 4vw, 44px);
}

.footer-brand .brand {
  margin-bottom: 16px;
}

.footer-brand > p {
  max-width: 36ch;
  color: var(--muted-2);
  font-size: 0.8rem;
  line-height: 1.7;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
}

.footer-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 0.7rem;
}

.footer-badges i {
  color: var(--gold);
  font-size: 0.7rem;
}

.footer-col h3 {
  margin-bottom: 15px;
  color: var(--gold-2);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 8px;
}

.footer-col li,
.footer-col a {
  color: var(--muted-2);
  font-size: 0.78rem;
  line-height: 1.5;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--gold-2);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.footer-contact i {
  width: 14px;
  margin-top: 4px;
  color: var(--gold);
  font-size: 0.74rem;
  text-align: center;
}

.footer-contact small {
  color: #637897;
  font-size: 0.68rem;
}

.footer-support {
  margin-top: 18px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 178, 220, 0.09);
  color: var(--muted-2);
  font-size: 0.73rem;
}

.footer-legal-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-legal-links .link-btn,
.footer-legal-links a {
  color: var(--muted-2);
  font-size: 0.73rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal-links .link-btn:hover,
.footer-legal-links a:hover {
  color: var(--gold-2);
}

.footer-disclaimer {
  max-width: 100%;
  margin-top: 13px;
  color: #526581;
  font-size: 0.65rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   14. WhatsApp flotante
   -------------------------------------------------------------------------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: linear-gradient(145deg, #2ee678, var(--whatsapp));
  box-shadow: 0 16px 38px -12px rgba(37, 211, 102, 0.6);
  color: #052e16;
  font-size: 1.75rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.wa-float:hover {
  box-shadow: 0 20px 44px -10px rgba(37, 211, 102, 0.72);
  transform: translateY(-3px) scale(1.03);
}

.wa-float > i {
  position: relative;
  z-index: 1;
}

.wa-ping {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(37, 211, 102, 0.55);
  border-radius: 50%;
  animation: waPing 2.8s var(--ease) infinite;
  pointer-events: none;
}

.wa-tooltip {
  position: absolute;
  top: 50%;
  right: 70px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(9, 20, 39, 0.97);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translate(6px, -50%);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.wa-float:hover .wa-tooltip,
.wa-float:focus-visible .wa-tooltip {
  opacity: 1;
  transform: translate(0, -50%);
}

/* --------------------------------------------------------------------------
   15. Aviso flotante (toast)
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 96;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(430px, calc(100vw - 110px));
  padding: 13px 14px;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 11px;
  background: rgba(9, 20, 39, 0.97);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 0.79rem;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.toast > i {
  color: var(--green);
  font-size: 0.95rem;
}

.toast-text {
  flex: 1;
  min-width: 0;
}

.toast-link {
  flex-shrink: 0;
  color: var(--gold-2);
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  font-size: 0.65rem;
  transition: background-color 0.2s, color 0.2s;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   16. Modales
   -------------------------------------------------------------------------- */
.modal {
  width: min(92vw, 580px);
  max-height: 90vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: transparent;
  color: var(--text);
  overflow: visible;
}

.modal::backdrop {
  background: rgba(3, 8, 18, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal[open] {
  animation: modalIn 0.28s var(--ease) both;
}

.modal[open]::backdrop {
  animation: backdropIn 0.28s ease both;
}

.modal-inner {
  position: relative;
  max-height: 90vh;
  padding: clamp(24px, 4vw, 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(37, 99, 235, 0.12), transparent 70%),
    linear-gradient(160deg, #112240 0%, #081426 100%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95);
}

.modal-inner--wide {
  padding-bottom: 30px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.modal-close:hover {
  border-color: var(--border);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-2);
}

.modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--gold-2);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.modal-inner h2 {
  padding-right: 34px;
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  font-weight: 600;
}

.modal-lead {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.7;
}

.modal-steps {
  display: grid;
  gap: 13px;
  margin: 22px 0;
}

.modal-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-steps li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.06);
  color: var(--gold-2);
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
}

.modal-steps p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.modal-steps a {
  color: var(--gold-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.055);
}

.modal-note i {
  margin-top: 2px;
  color: #fbbf24;
  font-size: 0.85rem;
}

.modal-note p {
  color: #e3c78f;
  font-size: 0.74rem;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.legal-copy {
  margin-top: 18px;
}

.legal-copy h3 {
  margin: 18px 0 5px;
  color: var(--text-strong);
  font-family: var(--font-head);
  font-size: 0.96rem;
  font-weight: 600;
}

.legal-copy p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.legal-copy a {
  color: var(--gold-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --------------------------------------------------------------------------
   16. Animaciones y revelado
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* El hero se anima por CSS al cargar para evitar cualquier parpadeo. */
.js .hero .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: heroIn 0.75s var(--ease) both;
  }

  .hero-visual {
    animation: heroIn 0.85s var(--ease) 0.1s both;
  }

  .hero-stats {
    animation: heroIn 0.85s var(--ease) 0.18s both;
  }
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes pulseDot {
  0% { opacity: 0.8; transform: scale(0.7); }
  70% { opacity: 0; transform: scale(1.9); }
  100% { opacity: 0; transform: scale(1.9); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes waPing {
  0% { opacity: 0.65; transform: scale(1); }
  80%, 100% { opacity: 0; transform: scale(1.55); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --------------------------------------------------------------------------
   17. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .topbar-mail {
    display: none;
  }

  .nav-inner {
    gap: 16px;
  }

  .nav-link {
    padding-inline: 10px;
    font-size: 0.84rem;
  }

  .nav-link::after {
    right: 10px;
    left: 10px;
  }

  .brand-tagline {
    display: none;
  }

}

@media (max-width: 1040px) {
  .nav-actions {
    display: none;
  }

  /* Sin backdrop-filter: un filtro en el header convierte al panel fijo en
     un elemento contenido por el propio header, impidiendo cubrir la pantalla. */
  .site-header {
    background: rgba(5, 11, 23, 0.98);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .brand,
  .nav-toggle {
    position: relative;
    z-index: 80;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: calc(var(--header-h) + 42px) 24px 38px;
    overflow-y: auto;
    background:
      radial-gradient(600px 400px at 90% 0%, rgba(37, 99, 235, 0.14), transparent 70%),
      #050b17;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.34s var(--ease), opacity 0.3s, visibility 0s linear 0.34s;
  }

  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.34s var(--ease), opacity 0.3s, visibility 0s;
  }

  .nav-link {
    padding: 15px 8px;
    border-bottom: 1px solid rgba(148, 178, 220, 0.1);
    border-radius: 0;
    color: var(--text);
    font-size: 1.02rem;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link.is-active {
    padding-left: 14px;
    border-left: 2px solid var(--gold);
    color: var(--gold-2);
  }

  .mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 26px;
  }

  .mobile-cta .btn {
    width: 100%;
  }

  .topbar-note span {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 1010px) {
  .hero-main {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero h1 {
    max-width: 22ch;
  }

  .hero-visual {
    max-width: 620px;
  }


  .specialties-grid,
  .quote-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .process-card,
  .quote-summary {
    position: static;
  }

  .process-card {
    max-width: 640px;
  }

  .quote-summary {
    max-width: 640px;
  }
}

@media (max-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tech-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand > p {
    max-width: 60ch;
  }
}

@media (max-width: 780px) {
  :root {
    --header-h: 72px;
  }

  .topbar-note span {
    display: none;
  }

  .topbar-inner {
    justify-content: center;
    min-height: 34px;
  }

  .topbar-note {
    display: none;
  }

  .topbar-links {
    gap: 16px;
  }

  .topbar-item:first-child {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: 19px 20px;
  }

  .stat:nth-child(odd) {
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--border-soft);
  }

  .tech-block-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .tech-block-head p {
    text-align: left;
  }

  .quote-summary,
  .process-card {
    max-width: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 2rem, var(--container));
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    margin-bottom: 30px;
  }

  .hero {
    padding-top: 46px;
  }

  .hero h1 {
    font-size: clamp(2.05rem, 10vw, 2.6rem);
    letter-spacing: -0.03em;
  }

  .hero-lead {
    margin-top: 18px;
    font-size: 0.96rem;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .hero-trust {
    flex-direction: column;
    gap: 8px;
  }

  .stack-panel {
    padding: 19px;
  }

  .stack-top {
    flex-direction: column;
    gap: 10px;
  }

  .stack-top h2 {
    max-width: 18ch;
  }

  .stack-layers li {
    padding: 11px 0;
  }

  .stack-icon {
    width: 42px;
    height: 42px;
    font-size: 0.88rem;
  }

  .stack-layers::before {
    left: 21px;
  }

  .stack-foot {
    font-size: 0.64rem;
  }

  .services-grid,
  .layer-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-btn {
    padding: 7px 12px;
    font-size: 0.74rem;
  }

  .service-card {
    padding: 22px;
  }

  .spec summary {
    gap: 11px;
    padding: 16px 0;
  }

  .spec-icon {
    width: 38px;
    height: 38px;
    font-size: 0.84rem;
  }

  .spec-heading strong {
    font-size: 0.94rem;
  }

  .spec-body {
    padding-left: 0;
  }

  .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-card,
  .quote-builder,
  .quote-summary,
  .contact-form-wrap {
    padding: 20px;
  }

  .contact-cards li {
    padding: 13px;
  }

  .success-actions .btn {
    width: 100%;
  }

  .modal-actions .btn {
    flex: 1 1 auto;
  }

  .wa-float {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
    font-size: 1.6rem;
  }

  .wa-tooltip {
    display: none;
  }

  .toast {
    right: 16px;
    bottom: 82px;
    left: 16px;
    max-width: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: auto;
  }
}

@media (max-width: 430px) {
  .brand-copy .brand-name {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .stat {
    border-left: 0;
  }

  .stat + .stat {
    border-top: 1px solid var(--border-soft);
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .footer-legal-links {
    flex-wrap: wrap;
  }

  .topbar {
    font-size: 0.68rem;
  }
}

/* --------------------------------------------------------------------------
   18. Página 404
   -------------------------------------------------------------------------- */
.error-main {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: clamp(60px, 9vw, 110px) 0;
  overflow: hidden;
  background:
    radial-gradient(800px 480px at 80% 10%, rgba(37, 99, 235, 0.13), transparent 68%),
    radial-gradient(600px 400px at 10% 90%, rgba(212, 175, 55, 0.06), transparent 70%);
}

.error-card {
  position: relative;
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(23, 42, 77, 0.72), rgba(6, 13, 28, 0.94));
  box-shadow: var(--shadow-md);
}

.error-code {
  position: absolute;
  top: -54px;
  right: 18px;
  color: transparent;
  font-family: var(--font-head);
  font-size: clamp(5.5rem, 14vw, 10rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  -webkit-text-stroke: 1px rgba(212, 175, 55, 0.22);
  pointer-events: none;
  user-select: none;
}

.error-card h1 {
  max-width: 16ch;
  font-size: clamp(1.85rem, 4vw, 2.8rem);
}

.error-card > p {
  max-width: 54ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

.error-card .hero-actions {
  margin-top: 26px;
}

.error-help {
  padding-top: 18px;
  border-top: 1px solid rgba(148, 178, 220, 0.1);
  color: var(--muted-2) !important;
  font-size: 0.78rem !important;
}

.error-help a {
  color: var(--gold-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 640px) {
  .error-code {
    top: -28px;
    right: 10px;
    font-size: 5rem;
  }
}

/* --------------------------------------------------------------------------
   19. Accesibilidad: movimiento reducido y modo de alto contraste
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .bar span {
    width: var(--val);
  }
}

@media (forced-colors: active) {
  .btn-gold,
  .filter-btn.is-active,
  .option-check,
  .checkbox-box {
    border: 1px solid ButtonText;
  }

  .service-card,
  .layer-card,
  .tech,
  .contact-cards li {
    border: 1px solid CanvasText;
  }
}
