/* =========================================================
   SoyCreador VIP — Estilos compartidos para páginas legales
   ========================================================= */

:root {
  --bg: #08080d;
  --bg-soft: #0d0d15;

  --surface: rgba(20, 20, 32, 0.72);
  --surface-solid: #12121c;
  --surface-hover: #181827;

  --text: #f7f7fb;
  --text-soft: #b9b9c8;
  --text-muted: #86869a;

  --primary: #b245ff;
  --primary-light: #d68cff;
  --secondary: #ff3f96;
  --cyan: #4ce4ff;
  --success: #55e6a5;
  --warning: #ffc76b;

  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  --gradient:
    linear-gradient(
      135deg,
      var(--primary) 0%,
      var(--secondary) 52%,
      #ff8154 100%
    );

  --gradient-text:
    linear-gradient(
      100deg,
      #ffffff 0%,
      var(--primary-light) 40%,
      #ff75b6 72%,
      #ffaf73 100%
    );

  --shadow:
    0 24px 80px rgba(0, 0, 0, 0.4);

  --shadow-primary:
    0 18px 50px rgba(178, 69, 255, 0.24);

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;

  --container: 1180px;
  --header-height: 78px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   Reset
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 30px);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      circle at 12% 5%,
      rgba(178, 69, 255, 0.14),
      transparent 32rem
    ),
    radial-gradient(
      circle at 93% 20%,
      rgba(255, 63, 150, 0.1),
      transparent 30rem
    ),
    var(--bg);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

::selection {
  color: #fff;
  background: rgba(178, 69, 255, 0.55);
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  padding: 12px 18px;
  color: #09090f;
  background: #fff;
  border-radius: 10px;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* =========================================================
   Reading progress
   ========================================================= */

.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2000;
  height: 3px;
  pointer-events: none;
}

.reading-progress__bar {
  width: 0;
  height: 100%;
  background: var(--gradient);
  box-shadow: 0 0 18px rgba(178, 69, 255, 0.7);
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  min-height: var(--header-height);
  background: rgba(8, 8, 13, 0.78);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--gradient);
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(178, 69, 255, 0.3);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-name {
  font-size: 1.08rem;
}

.brand-name span {
  color: var(--primary-light);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 27px;
}

.main-nav a {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 700;
  transition: color 180ms ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: #fff;
}

.menu-button {
  display: none;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
}

.menu-button svg {
  width: 23px;
  height: 23px;
}

/* =========================================================
   Buttons
   ========================================================= */

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  transition:
    transform 180ms var(--ease),
    background-color 180ms ease,
    border-color 180ms ease;
}

.button:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button svg {
  width: 18px;
  height: 18px;
}

.button--primary {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  box-shadow: var(--shadow-primary);
}

.button--small {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 0.86rem;
}

/* =========================================================
   Hero
   ========================================================= */

.legal-hero {
  position: relative;
  overflow: hidden;
  padding:
    calc(var(--header-height) + 90px)
    0
    74px;
  border-bottom: 1px solid var(--border);
}

.legal-hero::before {
  position: absolute;
  top: -170px;
  right: -100px;
  width: 520px;
  aspect-ratio: 1;
  background:
    radial-gradient(
      circle,
      rgba(178, 69, 255, 0.22),
      rgba(255, 63, 150, 0.08) 42%,
      transparent 68%
    );
  content: "";
  filter: blur(30px);
  pointer-events: none;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.breadcrumbs a {
  transition: color 180ms ease;
}

.breadcrumbs a:hover {
  color: var(--primary-light);
}

.breadcrumbs svg {
  width: 14px;
  height: 14px;
}

.legal-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 50px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--primary-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 24px;
  height: 1px;
  background: currentColor;
  content: "";
}

.legal-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.gradient-text {
  color: transparent;
  background: var(--gradient-text);
  background-clip: text;
  -webkit-background-clip: text;
}

.legal-hero__description {
  max-width: 740px;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.legal-meta {
  display: grid;
  min-width: 250px;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}

.legal-meta__item {
  display: grid;
  gap: 2px;
}

.legal-meta__item + .legal-meta__item {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.legal-meta__item span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-meta__item strong {
  font-size: 0.91rem;
}

/* =========================================================
   Legal layout
   ========================================================= */

.legal-main {
  padding: 76px 0 110px;
}

.legal-layout {
  display: grid;
  align-items: start;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(45px, 7vw, 90px);
}

.legal-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 28px);
}

.legal-sidebar__title {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-index {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-index a {
  position: relative;
  display: block;
  padding: 9px 12px;
  color: var(--text-muted);
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.legal-index a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.legal-index a.is-active {
  color: #fff;
  background: rgba(178, 69, 255, 0.11);
}

.legal-index a.is-active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 2px;
  background: var(--gradient);
  border-radius: 999px;
  content: "";
}

.sidebar-actions {
  display: grid;
  gap: 10px;
  margin-top: 25px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.sidebar-actions .button {
  width: 100%;
}

/* =========================================================
   Legal content
   ========================================================= */

.legal-document {
  width: 100%;
  max-width: 820px;
}

.notice {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 20px;
  margin-bottom: 44px;
  color: var(--text-soft);
  background:
    linear-gradient(
      135deg,
      rgba(178, 69, 255, 0.1),
      rgba(255, 63, 150, 0.04)
    );
  border: 1px solid rgba(178, 69, 255, 0.25);
  border-radius: 17px;
}

.notice--warning {
  background: rgba(255, 199, 107, 0.06);
  border-color: rgba(255, 199, 107, 0.22);
}

.notice__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--primary-light);
  background: rgba(178, 69, 255, 0.12);
  border-radius: 13px;
}

.notice--warning .notice__icon {
  color: var(--warning);
  background: rgba(255, 199, 107, 0.1);
}

.notice__icon svg {
  width: 21px;
  height: 21px;
}

.notice strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.notice p {
  margin: 0;
  font-size: 0.91rem;
}

.legal-section {
  padding: 0 0 46px;
  margin: 0 0 46px;
  border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.legal-section__number {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 16px;
  color: var(--primary-light);
  background: rgba(178, 69, 255, 0.1);
  border: 1px solid rgba(178, 69, 255, 0.18);
  border-radius: 11px;
  font-size: 0.8rem;
  font-weight: 900;
}

.legal-section h2 {
  margin: 0 0 19px;
  color: var(--text);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.legal-section h3 {
  margin: 30px 0 10px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.legal-section p {
  margin: 0 0 17px;
  color: var(--text-soft);
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  display: grid;
  gap: 10px;
  padding-left: 23px;
  margin: 18px 0;
  color: var(--text-soft);
}

.legal-section li {
  padding-left: 5px;
}

.legal-section li::marker {
  color: var(--primary-light);
  font-weight: 800;
}

.legal-section a {
  color: var(--primary-light);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(214, 140, 255, 0.35);
  text-underline-offset: 4px;
}

.legal-section a:hover {
  color: #fff;
  text-decoration-color: var(--primary-light);
}

.legal-section strong {
  color: var(--text);
}

.data-table-wrapper {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 15px;
}

.data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.contact-card {
  display: grid;
  gap: 7px;
  margin-top: 24px;
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.contact-card strong {
  font-size: 1.05rem;
}

.contact-card p {
  margin: 0;
}

.placeholder {
  color: var(--warning);
  font-weight: 800;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  padding: 52px 0 32px;
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.footer-brand p {
  max-width: 430px;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.89rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
}

.footer-links a {
  color: var(--text-soft);
  font-size: 0.89rem;
  font-weight: 700;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 25px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* =========================================================
   Back to top
   ========================================================= */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 500;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: var(--gradient);
  border: 0;
  border-radius: 15px;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition:
    opacity 200ms ease,
    transform 200ms var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top svg {
  width: 21px;
  height: 21px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 960px) {
  .menu-button {
    display: grid;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    right: 20px;
    left: 20px;
    display: grid;
    gap: 0;
    padding: 14px;
    background: rgba(14, 14, 22, 0.98);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition:
      opacity 180ms ease,
      transform 180ms var(--ease);
  }

  .main-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav a {
    padding: 13px;
  }

  .legal-hero__grid {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .legal-meta {
    width: min(100%, 520px);
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
  }

  .legal-sidebar__title {
    margin-bottom: 12px;
  }

  .legal-index {
    display: flex;
    padding-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .legal-index li {
    flex: 0 0 auto;
  }

  .legal-index a {
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
  }

  .legal-index a.is-active::before {
    display: none;
  }

  .sidebar-actions {
    display: flex;
    padding-top: 16px;
    margin-top: 12px;
  }

  .sidebar-actions .button {
    width: auto;
  }

  .legal-document {
    max-width: none;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 70px;
  }

  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .brand-name {
    font-size: 1rem;
  }

  .legal-hero {
    padding:
      calc(var(--header-height) + 60px)
      0
      54px;
  }

  .legal-hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.2rem);
  }

  .legal-main {
    padding: 54px 0 78px;
  }

  .legal-layout {
    gap: 46px;
  }

  .notice {
    grid-template-columns: 1fr;
  }

  .legal-section {
    padding-bottom: 38px;
    margin-bottom: 38px;
  }

  .sidebar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-actions .button {
    width: 100%;
  }

  .footer-top,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   Printing and PDF
   ========================================================= */

@media print {
  :root {
    --text: #111;
    --text-soft: #333;
    --text-muted: #555;
    --border: #ddd;
  }

  body {
    color: #111;
    background: #fff;
    font-family: Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.55;
  }

  .site-header,
  .reading-progress,
  .legal-sidebar,
  .back-to-top,
  .site-footer,
  .breadcrumbs,
  .legal-hero::before {
    display: none !important;
  }

  .legal-hero {
    padding: 0 0 24px;
    border-color: #ccc;
  }

  .legal-hero__grid,
  .legal-layout {
    display: block;
  }

  .legal-hero h1 {
    color: #111;
    font-size: 30pt;
  }

  .gradient-text {
    color: #111;
    background: none;
    -webkit-text-fill-color: #111;
  }

  .legal-meta {
    margin-top: 20px;
    color: #111;
    background: #fff;
    border-color: #ccc;
  }

  .legal-main {
    padding: 28px 0 0;
  }

  .legal-document {
    max-width: none;
  }

  .legal-section {
    break-inside: avoid;
    border-color: #ddd;
  }

  .legal-section h2,
  .legal-section h3,
  .legal-section strong {
    color: #111;
  }

  .legal-section a {
    color: #111;
  }

  .legal-section a[href^="http"]::after,
  .legal-section a[href^="mailto"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    font-weight: normal;
  }

  .notice,
  .contact-card {
    color: #222;
    background: #fafafa;
    border-color: #ccc;
  }

  .notice__icon,
  .legal-section__number {
    color: #111;
    background: #eee;
    border-color: #ccc;
  }

  .data-table-wrapper {
    border-color: #ccc;
  }

  .data-table {
    color: #222;
  }

  .data-table th {
    color: #111;
    background: #eee;
  }

  .data-table th,
  .data-table td {
    border-color: #ccc;
  }

  @page {
    margin: 18mm;
  }
}
