/* ═══════════════════════════════════════════════════════════════════════════
   AGENCIA PROSPERIA — ECOSISTEMA MULTI-MENÚ & ESCUADRÓN IA (STYLESHEET COMPARTIDO)
   Tokens Cyber-Luxury · Modern Web Guidance Compliant (motion, tabs, accordion, forms)
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --bg-dark: #02040a;
  --bg-surface: #070b14;
  --bg-panel: rgba(11, 17, 32, 0.84);
  --bg-card: rgba(14, 22, 40, 0.78);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-cyan: rgba(0, 229, 255, 0.32);
  --cyan: #00e5ff;
  --emerald: #34d399;
  --amber: #fbbf24;
  --indigo: #818cf8;
  --pink: #f472b6;
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  padding-top: 106px;
  min-height: 100vh;
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 18% 8%, rgba(0, 229, 255, 0.11) 0%, transparent 42%),
    radial-gradient(circle at 84% 16%, rgba(99, 102, 241, 0.13) 0%, transparent 44%),
    radial-gradient(circle at 50% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 46%);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: clip;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.pia-shell {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.pia-section {
  padding-block: 4.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pia-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.32);
  color: #67e8f9;
  margin-block-end: 1rem;
}

.pia-gradient-text {
  background: linear-gradient(95deg, #ffffff 0%, #67e8f9 48%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pia-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 22px 48px -15px rgba(0, 0, 0, 0.75);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.pia-card:hover {
  border-color: rgba(0, 229, 255, 0.38);
  box-shadow: 0 28px 58px -16px rgba(0, 0, 0, 0.88), 0 0 32px rgba(0, 229, 255, 0.1);
}

/* ── Botones ── */
.pia-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.78rem 1.4rem;
  border-radius: 13px;
  background: linear-gradient(135deg, #00e5ff 0%, #0ea5e9 100%);
  color: #020617 !important;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1.5px solid #67e8f9;
  cursor: pointer;
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pia-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 38px rgba(0, 229, 255, 0.5);
}

.pia-btn-emerald {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.78rem 1.4rem;
  border-radius: 13px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #020617 !important;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1.5px solid #6ee7b7;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pia-btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(16, 185, 129, 0.48);
}

.pia-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc !important;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.pia-btn-ghost:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.45);
  transform: translateY(-1px);
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2.5px solid #00e5ff;
  outline-offset: 3px;
}

/* ── Personajes Animados del Escuadrón IA de ProsperIA ── */
.squad-avatar-stage {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 26px;
  background: radial-gradient(circle at 50% 35%, rgba(0, 229, 255, 0.16), rgba(7, 11, 20, 0.96) 72%);
  border: 1px solid rgba(0, 229, 255, 0.28);
  padding: 1.5rem;
  overflow: hidden;
}

.squad-orbit-ring {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 1px dashed rgba(0, 229, 255, 0.22);
  pointer-events: none;
}

@keyframes squadFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes squadOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes squadPulseGlow {
  0%, 100% { opacity: 0.65; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.03); }
}

@media (prefers-reduced-motion: no-preference) {
  .squad-float { animation: squadFloat 4.2s ease-in-out infinite; }
  .squad-orbit-ring { animation: squadOrbit 26s linear infinite; }
  .squad-pulse { animation: squadPulseGlow 3.2s ease-in-out infinite; }
}

.squad-paused .squad-float,
.squad-paused .squad-orbit-ring,
.squad-paused .squad-pulse {
  animation-play-state: paused !important;
}

/* ── Vitrina de Sitios Web: Preview Interactiva con Hover Scroll ── */
.web-preview-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #040812;
  aspect-ratio: 16 / 10;
}
.web-preview-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(6, 10, 20, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 10px;
  z-index: 4;
}
.web-preview-dots {
  display: inline-flex;
  gap: 5px;
}
.web-preview-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.45);
}
.web-preview-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
}
.web-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
@media (prefers-reduced-motion: no-preference) {
  .web-preview-img {
    transition: object-position 3.5s ease-in-out, transform 0.6s ease;
  }
  .pia-card:hover .web-preview-img {
    object-position: center bottom;
    transform: scale(1.04);
  }
}

/* ── Tabs accesibles (single row scrollable + non-color-only active indicator) ── */
.pia-tablist {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-block: 0.25rem 0.65rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.pia-tab {
  position: relative;
  flex: none;
  min-height: 42px;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.pia-tab:hover {
  color: #ffffff;
  border-color: rgba(0, 229, 255, 0.45);
}
.pia-tab[aria-selected="true"] {
  color: #020617;
  background: #00e5ff;
  border-color: #67e8f9;
}
.pia-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -6px;
  height: 3px;
  border-radius: 3px;
  border-bottom: 3px solid #00e5ff;
}

/* ── Acordeón FAQ nativo <details> (modern-web-guidance) ── */
.pia-faq-list {
  display: grid;
  gap: 0.85rem;
}
.pia-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
}
.pia-faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  font-size: 0.97rem;
  color: #f8fafc;
  cursor: pointer;
}
.pia-faq-item summary::-webkit-details-marker { display: none; }
.pia-faq-item summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: #00e5ff;
  font-weight: 800;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.pia-faq-item[open] summary::before {
  content: "−";
}
.pia-faq-body {
  padding: 0 1.25rem 1.15rem 3.7rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ── Formularios accesibles ── */
.pia-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-block-end: 1.1rem;
}
.pia-form-field label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f1f5f9;
}
.pia-input {
  font: inherit;
  font-size: max(1rem, 1em);
  min-height: 48px;
  width: 100%;
  padding: 0.72rem 0.95rem;
  border-radius: 12px;
  border: 1.5px solid rgba(148, 163, 184, 0.38);
  background: #060d1c;
  color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pia-input:user-invalid {
  border-color: #fb7185;
}
.pia-input:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.22);
}
@media (pointer: coarse) {
  .pia-input { min-height: 52px; }
}
.pia-visually-hidden {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ── Tabla comparativa responsive ── */
.pia-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 11, 22, 0.88);
}
.pia-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  text-align: left;
}
.pia-table th, .pia-table td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
}
.pia-table th {
  background: rgba(0, 229, 255, 0.08);
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}
.pia-table td:first-child {
  color: #cbd5e1;
  font-weight: 600;
}

/* ── Responsive grids utilitarios ── */
.pia-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.pia-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}
.pia-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .pia-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pia-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pia-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .pia-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pia-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
