/* ==========================================================================
   CG AYUDAS WEB — SISTEMA DE DISEÑO Y HOJA DE ESTILOS
   Conforme al Expediente Técnico y Maqueta Oficial
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- Variables y Paleta de Colores (Expediente Técnico §5) --- */
:root {
  color-scheme: dark;
  --orange: #ff6b2c;
  --orange-light: #ffb18d;
  --blue: #243b70;
  --blue-bright: #6b91ff;
  --deep: #070b16;
  --panel: #10182b;
  --surface: #10182b;
  --text: #f5f7ff;
  --muted: #a8b1c8;
  --line: #ffffff19;
  --line-hover: #ff6b2c80;
  --header-bg: #070b1670;
  --header-scrolled: #070b16db;
  --surface-soft: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(17, 25, 43, 0.88);
  --nav-mobile: #0b1120;
  --art-bg: #0c1221;
  --live-color: #8df0bd;
  --live-bg: rgba(141, 240, 189, 0.12);
  --live-border: rgba(141, 240, 189, 0.3);
  --shadow-card: 0 35px 90px rgba(0, 0, 0, 0.45);
  --shadow-btn: 0 0 28px rgba(255, 107, 44, 0.28);
  --shadow-btn-hover: 0 0 38px rgba(255, 107, 44, 0.6);
  --noise-opacity: 0.035;
  --font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --transition-theme: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

:root[data-theme="light"] {
  color-scheme: light;
  --deep: #f5f7fc;
  --panel: #ffffff;
  --surface: #ffffff;
  --text: #14213d;
  --muted: #5f6b82;
  --line: #14213d1c;
  --line-hover: #ff6b2c99;
  --header-bg: #f5f7fccc;
  --header-scrolled: #f5f7f7f2;
  --surface-soft: rgba(255, 255, 255, 0.85);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --nav-mobile: #f7f9fd;
  --art-bg: #e9eef8;
  --live-color: #137a4b;
  --live-bg: rgba(19, 122, 75, 0.12);
  --live-border: rgba(19, 122, 75, 0.28);
  --shadow-card: 0 30px 80px rgba(29, 44, 75, 0.12);
  --shadow-btn: 0 8px 24px rgba(255, 107, 44, 0.25);
  --shadow-btn-hover: 0 12px 32px rgba(255, 107, 44, 0.4);
  --noise-opacity: 0.015;
}

/* --- Reseteo y Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  background: var(--deep);
  color: var(--text);
  font-family: var(--font-family);
  line-height: 1.6;
  transition: var(--transition-theme);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Fondo ambiental dinámico */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background: 
    radial-gradient(ellipse at 15% 15%, rgba(36, 59, 112, 0.35), transparent 38%),
    radial-gradient(ellipse at 88% 45%, rgba(255, 107, 44, 0.12), transparent 34%),
    var(--deep);
  transition: background 0.35s ease;
  pointer-events: none;
}

:root[data-theme="light"] body::before {
  background: 
    radial-gradient(ellipse at 15% 15%, rgba(36, 59, 112, 0.1), transparent 38%),
    radial-gradient(ellipse at 88% 45%, rgba(255, 107, 44, 0.09), transparent 34%),
    var(--deep);
}

/* Textura noise sutil */
.noise {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

/* Contenedor central */
.wrap {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* Accesibilidad por teclado (Expediente §9) */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- Encabezado Fijo (Expediente §3.1, §3.2, §3.3, §3.4) --- */
header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  background: var(--header-scrolled);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.nav {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

/* Logotipo */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: scale(1.02);
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text span {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
}

.brand-text em {
  font-style: normal;
  color: var(--orange);
}

.brand-tagline {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Navegación horizontal */
nav {
  display: flex;
  align-items: center;
  gap: 32px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

nav a {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width 0.25s ease;
  border-radius: 2px;
}

nav a:hover {
  color: var(--orange);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Botones principales */
.btn, .navbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  font-size: 0.88rem;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  isolation: isolate;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.primary, .navbtn {
  background: var(--orange);
  color: #ffffff !important;
  box-shadow: var(--shadow-btn);
}

.primary:hover, .navbtn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-btn-hover);
}

.primary:active, .navbtn:active {
  transform: translateY(-1px);
}

.secondary {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.secondary:hover {
  background: var(--surface);
  border-color: var(--line-hover);
  transform: translateY(-3px);
}

/* Selector de Tema (Expediente §3.4) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(8px);
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  background: var(--surface);
}

.theme-toggle .theme-icon {
  font-size: 1rem;
  color: var(--orange);
  line-height: 1;
}

/* Botón Hamburguesa Móvil (Expediente §3.3) */
.hamb {
  display: none;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.4rem;
  padding: 8px 12px;
  border-radius: 12px;
  line-height: 1;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hamb:hover {
  border-color: var(--orange);
}

/* --- Hero / Portada (Expediente §4.1) --- */
.hero {
  min-height: 820px;
  padding: 165px 0 95px;
  display: flex;
  align-items: center;
  position: relative;
  isolation: isolate;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 107, 44, 0.4);
  background: rgba(255, 107, 44, 0.08);
  color: var(--orange-light);
  border-radius: 99px;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

:root[data-theme="light"] .eyebrow {
  color: #d85012;
  background: rgba(255, 107, 44, 0.1);
  border-color: rgba(255, 107, 44, 0.3);
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 107, 44, 0.9);
  animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
  70% {
    box-shadow: 0 0 0 10px rgba(255, 107, 44, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 44, 0);
  }
}

h1 {
  font-size: clamp(3.1rem, 6.4vw, 5.8rem);
  line-height: 1.01;
  letter-spacing: -0.075em;
  margin: 24px 0 22px;
  max-width: 700px;
  font-weight: 900;
}

h1 .gradient {
  background: linear-gradient(110deg, #ffffff 0%, #ffb18d 35%, #ff6b2c 65%, #ffb18d 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 6s linear infinite;
}

:root[data-theme="light"] h1 .gradient {
  background: linear-gradient(110deg, #14213d 0%, #ff6b2c 45%, #e04e0a 75%, #14213d 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.hero p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 550px;
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.mini-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 550;
}

.proof-symbols {
  display: flex;
}

.proof-symbols span {
  width: 32px;
  height: 32px;
  margin-left: -6px;
  border: 2px solid var(--deep);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-size: 0.85rem;
}

.proof-symbols span:first-child {
  margin-left: 0;
}

.proof-symbols span:nth-child(2) {
  background: var(--orange);
}

.proof-symbols span:nth-child(3) {
  background: #2b3956;
}

/* Composición Visual Interactiva (Hero Art) */
.visual {
  height: 520px;
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1000px;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 460px;
  height: 460px;
  animation: spin 32s linear infinite;
  pointer-events: none;
}

:root[data-theme="light"] .orbit {
  border-color: rgba(20, 33, 61, 0.08);
}

.orbit::before, .orbit::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 24px var(--orange);
  top: 14%;
  left: 14%;
}

.orbit::after {
  background: var(--blue-bright);
  box-shadow: 0 0 24px var(--blue-bright);
  top: auto;
  left: auto;
  right: 8%;
  bottom: 28%;
}

.orbit.two {
  width: 350px;
  height: 350px;
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 45s;
}

.orbit.two::before {
  background: var(--orange-light);
  top: auto;
  bottom: 8%;
  left: 24%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Glass Card 3D Flotante */
.glass-card {
  width: min(100%, 400px);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 26px;
  padding: 26px;
  box-shadow: var(--shadow-card);
  transform: rotateY(-8deg) rotateX(3deg);
  animation: cardFloat 6s ease-in-out infinite;
}

:root[data-theme="light"] .glass-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 244, 251, 0.9));
  border-color: rgba(20, 33, 61, 0.12);
}

.glass-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.glass-logo {
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: 0.95rem;
}

.glass-logo i {
  font-style: normal;
  color: var(--orange);
}

.live {
  font-size: 0.68rem;
  font-weight: 750;
  color: var(--live-color);
  background: var(--live-bg);
  border: 1px solid var(--live-border);
  border-radius: 50px;
  padding: 5px 10px;
  letter-spacing: 0.05em;
}

.preview-title {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.06em;
  margin: 24px 0 10px;
}

.preview-title b {
  color: var(--orange);
}

.preview-copy {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 800;
  margin-top: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(255, 107, 44, 0.4);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.preview-tile {
  height: 110px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d2c52, #10182b);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

:root[data-theme="light"] .preview-tile {
  background: linear-gradient(135deg, #e4ecfc, #f5f7fc);
  border-color: rgba(20, 33, 61, 0.1);
}

.preview-tile:nth-child(2) {
  background: linear-gradient(135deg, #592e1e, #1a1420);
}

:root[data-theme="light"] .preview-tile:nth-child(2) {
  background: linear-gradient(135deg, #ffe5d9, #fff6f2);
}

.tile-icon {
  font-size: 1.25rem;
  color: var(--orange);
}

.preview-tile strong {
  font-size: 0.82rem;
  font-weight: 800;
}

.preview-tile small {
  font-size: 0.68rem;
  color: var(--muted);
}

/* Floating chips decorativos */
.float-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--surface-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.3);
  font-size: 0.78rem;
  font-weight: 800;
  animation: cardFloat 5.5s ease-in-out infinite;
}

:root[data-theme="light"] .float-chip {
  border-color: rgba(20, 33, 61, 0.12);
  box-shadow: 0 16px 42px rgba(29, 44, 75, 0.12);
}

.float-chip .ico {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 107, 44, 0.18);
  color: var(--orange);
  font-size: 1rem;
}

.chip-a {
  left: -10px;
  top: 75px;
}

.chip-b {
  right: -10px;
  bottom: 60px;
  animation-delay: -2.5s;
}

.chip-b .ico {
  background: rgba(107, 145, 255, 0.2);
  color: var(--blue-bright);
}

@keyframes cardFloat {
  0%, 100% {
    transform: translateY(0) rotateY(-8deg) rotateX(3deg);
  }
  50% {
    transform: translateY(-14px) rotateY(-4deg) rotateX(1deg);
  }
}

.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.scroll-hint::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

/* --- Ticker / Banda Animada (Expediente §4.2) --- */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  padding: 18px 0;
}

:root[data-theme="light"] .ticker {
  background: rgba(255, 255, 255, 0.6);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}

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

.ticker span {
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 850;
  color: var(--muted);
  padding: 0 32px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.ticker b {
  color: var(--orange);
  padding-left: 32px;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* --- Secciones Generales --- */
section.content {
  padding: 110px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 50px;
}

.kicker {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 8px;
}

.section-head h2, .about-copy h2, .faq h2 {
  font-size: clamp(2.3rem, 4.8vw, 4.2rem);
  letter-spacing: -0.065em;
  line-height: 1.04;
  margin: 12px 0 18px;
  font-weight: 900;
}

.section-head p, .about-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
  max-width: 640px;
  margin: 0;
}

/* --- Servicios (Expediente §3.8, §4.3) --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service {
  min-height: 270px;
  padding: 30px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--surface-soft), rgba(255, 255, 255, 0.01));
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

:root[data-theme="light"] .service {
  background: var(--surface);
  border-color: rgba(20, 33, 61, 0.09);
  box-shadow: 0 4px 20px rgba(20, 33, 61, 0.04);
}

.service::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0, rgba(255, 107, 44, 0.16), transparent 50%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.service:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 107, 44, 0.6);
  box-shadow: 0 20px 48px rgba(255, 107, 44, 0.12);
}

:root[data-theme="light"] .service:hover {
  background: #ffffff;
  border-color: rgba(255, 107, 44, 0.5);
  box-shadow: 0 20px 48px rgba(20, 33, 61, 0.08);
}

.service:hover::before {
  opacity: 1;
}

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

.service-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: rgba(255, 107, 44, 0.12);
  border: 1px solid rgba(255, 107, 44, 0.3);
  color: var(--orange);
  border-radius: 16px;
  font-size: 1.4rem;
  margin-bottom: 24px;
  transition: transform 0.3s ease;
}

.service:hover .service-icon {
  transform: scale(1.08) rotate(3deg);
}

.service:nth-child(2n) .service-icon {
  background: rgba(36, 59, 112, 0.35);
  border-color: rgba(107, 145, 255, 0.3);
  color: var(--blue-bright);
}

.service h3 {
  font-size: 1.25rem;
  margin: 0 0 10px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.service p {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.service a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--orange);
  font-size: 0.86rem;
  font-weight: 850;
  transition: color 0.2s ease;
}

.service a span {
  transition: transform 0.2s ease;
}

.service a:hover span {
  transform: translateX(5px);
}

/* --- Nosotros (Expediente §4.4) --- */
.about {
  background: linear-gradient(180deg, transparent, rgba(16, 24, 43, 0.4), transparent);
}

:root[data-theme="light"] .about {
  background: linear-gradient(180deg, transparent, rgba(233, 238, 248, 0.4), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.about-art {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 26px;
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(circle at 30% 35%, rgba(255, 107, 44, 0.18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(36, 59, 112, 0.45), transparent 50%),
    var(--art-bg);
  display: grid;
  place-items: center;
}

:root[data-theme="light"] .about-art {
  border-color: rgba(20, 33, 61, 0.1);
}

.big-orb {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: conic-gradient(from 40deg, var(--orange), #ffb28e, var(--blue), var(--blue-bright), var(--orange));
  filter: drop-shadow(0 0 50px rgba(255, 107, 44, 0.45));
  animation: spin 20s linear infinite;
  position: relative;
}

.big-orb::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: var(--art-bg);
  border: 1px solid var(--line);
}

.orbit-text {
  position: absolute;
  z-index: 2;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-align: center;
}

.orbit-text span {
  display: block;
  color: var(--orange);
}

.stat-float {
  position: absolute;
  background: var(--surface-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  animation: cardFloat 6s ease-in-out infinite;
}

:root[data-theme="light"] .stat-float {
  border-color: rgba(20, 33, 61, 0.1);
  box-shadow: 0 12px 36px rgba(29, 44, 75, 0.1);
}

.stat-float strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 2px;
  font-weight: 850;
}

.stat-one {
  top: 28px;
  left: 28px;
}

.stat-two {
  bottom: 28px;
  right: 24px;
  animation-delay: -3s;
}

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}

.checks span {
  font-size: 0.92rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}

.checks b {
  color: var(--orange);
  font-size: 1.1rem;
}

/* --- Proceso / Metodología (Expediente §4.5) --- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.step {
  border-top: 1px solid var(--line);
  padding: 26px 18px 10px 0;
  position: relative;
  transition: transform 0.25s ease;
}

.step::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 32px;
  height: 5px;
  background: var(--orange);
  border-radius: 5px;
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.step:hover::before {
  width: 90px;
}

.step small {
  font-size: 0.74rem;
  color: var(--orange);
  letter-spacing: 0.14em;
  font-weight: 900;
  text-transform: uppercase;
}

.step h3 {
  font-size: 1.15rem;
  margin: 16px 0 10px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.step p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* --- Preguntas Frecuentes (Expediente §3.9, §4.6) --- */
.faq {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 70px;
}

.faq-intro p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  transition: border-color 0.2s ease;
}

.faq details[open] {
  border-bottom-color: rgba(255, 107, 44, 0.4);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.08rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  user-select: none;
  transition: color 0.2s ease;
}

.faq summary:hover {
  color: var(--orange);
}

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

.faq summary::after {
  content: "+";
  color: var(--orange);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.25s ease, color 0.2s ease;
}

.faq details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}

.faq details p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 16px 20px 0 0;
}

/* --- Sección Final de Contacto / CTA (Expediente §3.10, §4.7, §12) --- */
.final-cta {
  padding: 60px 0 110px;
}

.cta-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 107, 44, 0.35);
  border-radius: 32px;
  padding: 65px;
  background: 
    radial-gradient(ellipse at 85% 20%, rgba(255, 107, 44, 0.22), transparent 45%),
    linear-gradient(130deg, #131c33 0%, #0c1220 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] .cta-box {
  background: 
    radial-gradient(ellipse at 85% 20%, rgba(255, 107, 44, 0.16), transparent 45%),
    linear-gradient(130deg, #f0f4fc 0%, #fff6f2 100%);
  border-color: rgba(255, 107, 44, 0.35);
  box-shadow: 0 30px 80px rgba(29, 44, 75, 0.12);
}

.cta-box::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 107, 44, 0.25);
  border-radius: 50%;
  right: -60px;
  top: -180px;
  box-shadow: 0 0 0 35px rgba(255, 107, 44, 0.05), 0 0 0 75px rgba(255, 107, 44, 0.03);
  pointer-events: none;
}

.cta-copy {
  position: relative;
  z-index: 1;
}

.cta-copy h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
  margin: 0 0 16px;
  font-weight: 900;
}

.cta-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
  margin: 0 0 30px;
}

.cta-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-badge-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.cta-badge-item .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

/* Formulario Web Funcional integrado (Mejora §12) */
.contact-form-card {
  position: relative;
  z-index: 2;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

:root[data-theme="light"] .contact-form-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(20, 33, 61, 0.1);
  box-shadow: 0 20px 50px rgba(29, 44, 75, 0.08);
}

.form-title {
  font-size: 1.25rem;
  font-weight: 850;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.form-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 22px;
}

.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.2);
  outline: none;
  background: var(--surface);
}

.form-group select {
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 95px;
}

.form-direct-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.direct-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 650;
  transition: color 0.2s ease;
}

.direct-link:hover {
  color: var(--orange);
}

/* Modal de Éxito de Contacto */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 11, 22, 0.75);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(100%, 450px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 107, 44, 0.15);
  border: 1px solid var(--orange);
  color: var(--orange);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  margin: 0 auto 18px;
}

/* --- Pie de Página (Expediente §3.11, §4.8) --- */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 28px;
  background: var(--deep);
  position: relative;
  z-index: 1;
}

.foot-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding-bottom: 30px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
}

.foot-brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.foot-brand span {
  font-size: 1.05rem;
  color: var(--text);
}

.foot-brand small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
}

.foot-links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.foot-links a {
  transition: color 0.2s ease;
}

.foot-links a:hover {
  color: var(--orange);
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.78rem;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

/* --- Animaciones de Aparición (Reveal - Expediente §7) --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay1 {
  transition-delay: 0.12s;
}

.delay2 {
  transition-delay: 0.24s;
}

.delay3 {
  transition-delay: 0.36s;
}

/* --- Diseño Adaptable / Responsive (Expediente §8) --- */

/* Rango Tablet: Hasta 900px */
@media (max-width: 900px) {
  nav {
    gap: 18px;
  }
  .navbtn {
    display: none;
  }
  .hero {
    min-height: auto;
    padding: 135px 0 80px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .visual {
    height: 440px;
  }
  .orbit {
    width: 360px;
    height: 360px;
  }
  .orbit.two {
    width: 290px;
    height: 290px;
  }
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    gap: 40px;
  }
  .faq {
    gap: 40px;
  }
  .cta-box {
    grid-template-columns: 1fr;
    padding: 45px 36px;
    gap: 36px;
  }
}

/* Rango Móvil: Hasta 680px */
@media (max-width: 680px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .nav {
    height: 72px;
    gap: 10px;
  }
  .brand img {
    width: 40px;
    height: 40px;
  }
  .brand-text span {
    font-size: 0.95rem;
  }
  .brand-tagline {
    display: none;
  }
  .theme-toggle {
    padding: 8px 12px;
    font-size: 0.76rem;
  }
  .hamb {
    display: block;
  }
  
  /* Menú desplegable móvil con accesibilidad */
  nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--nav-mobile);
    padding: 16px 24px 26px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  }
  nav.open {
    display: flex;
    animation: menuSlideDown 0.25s ease;
  }
  @keyframes menuSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  nav a::after {
    display: none;
  }
  
  .hero {
    padding: 115px 0 60px;
  }
  h1 {
    font-size: clamp(2.5rem, 11vw, 3.8rem);
  }
  .hero p {
    font-size: 1rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .visual {
    height: 380px;
    margin-top: 15px;
  }
  .orbit {
    width: 300px;
    height: 300px;
  }
  .orbit.two {
    width: 235px;
    height: 235px;
  }
  .glass-card {
    max-width: 330px;
    padding: 20px;
  }
  .preview-title {
    font-size: 1.65rem;
  }
  .chip-a {
    top: 35px;
    left: -6px;
  }
  .chip-b {
    bottom: 25px;
    right: -6px;
  }
  .scroll-hint {
    display: none;
  }
  
  .ticker span {
    font-size: 0.72rem;
    padding: 0 18px;
  }
  .ticker b {
    padding-left: 18px;
  }
  
  section.content {
    padding: 70px 0;
  }
  .section-head {
    margin-bottom: 32px;
  }
  .service-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .service {
    min-height: auto;
    padding: 24px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-art {
    min-height: 340px;
  }
  .big-orb {
    width: 180px;
    height: 180px;
  }
  .stat-one {
    top: 18px;
    left: 18px;
  }
  .stat-two {
    bottom: 18px;
    right: 18px;
  }
  .checks {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .steps {
    grid-template-columns: 1fr 1fr;
    gap: 26px 14px;
  }
  
  .faq {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .cta-box {
    padding: 34px 22px;
    border-radius: 24px;
  }
  .contact-form-card {
    padding: 24px 18px;
  }
  .form-direct-links {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .foot-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .foot-links {
    gap: 14px 20px;
  }
  .foot-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

/* Movimiento Reducido (Expediente §7, §9) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .orbit, .big-orb, .glass-card, .float-chip, .pulse, .ticker-track {
    animation: none !important;
  }
}
