/* ProSoluciones Tema — tokens + reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ps-primary: #4F1964;
  --ps-accent: #F9D81D;
  --ps-text: #F0EEF4;
  --ps-bg: #0E0B12;
  --ps-bg-soft: #16121E;
  --ps-muted: #9B93A8;
  --ps-border: rgba(249, 216, 29, 0.10);
  --ps-glass: rgba(255, 255, 255, 0.06);
  --ps-heading: #ffffff;
  --ps-header-fill: rgba(14, 11, 18, 0.72);
  --ps-nav: rgba(240, 238, 244, 0.82);
  --ps-nav-hover: #F9D81D;
  --ps-cta-text: #0D0A10;
  --ps-font: "Sora", sans-serif;
  --ps-container: 1140px;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

html,
body {
  background: var(--ps-bg);
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--ps-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ps-text);
}

::selection {
  background: rgba(249, 216, 29, 0.35);
  color: #ffffff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ps-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  margin: 0 0 0.75rem;
  color: var(--ps-text);
}

p {
  margin: 0 0 1rem;
}

.ps-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 0.75rem 1rem;
  background: var(--ps-primary);
  color: var(--ps-bg);
}

.ps-skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.ps-container {
  width: min(100% - 2rem, var(--ps-container));
  margin-inline: auto;
}

.ps-main,
.ps-main--flush {
  padding: 0;
  margin: 0;
  background: var(--ps-bg);
}

.ps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(123, 183, 255, 0.72);
  border-radius: 12px;
  color: var(--ps-cta-text);
  font-weight: 600;
  text-decoration: none;
}

.ps-btn:hover {
  text-decoration: none;
  border-color: var(--ps-primary);
}

.ps-back-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ps-primary) 55%, transparent);
  background: color-mix(in srgb, var(--ps-header-fill) 88%, transparent);
  color: var(--ps-heading);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--ps-heading) 10%, transparent),
    0 12px 28px color-mix(in srgb, #000 22%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px) scale(0.86);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.4s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
  text-decoration: none !important;
}

.ps-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ps-back-top:hover {
  background: color-mix(in srgb, var(--ps-primary) 16%, transparent);
  border-color: var(--ps-primary);
  color: var(--ps-primary);
  text-decoration: none !important;
}

.ps-back-top:focus-visible {
  outline: 2px solid var(--ps-primary);
  outline-offset: 3px;
}

body.ps-nav-open .ps-back-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 767px) {
  .ps-back-top {
    right: 16px;
    bottom: 18px;
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-back-top {
    transition: opacity 0.2s ease, visibility 0.2s ease;
    transform: none;
  }

  .ps-back-top.is-visible {
    transform: none;
  }
}
