/* ==========================================================================
   Cleansify Web — hoja de estilos base
   Tokens alineados con "Cleansify App/src/theme/tokens.ts" (fuente de verdad)
   ========================================================================== */

:root {
  /* Azul — primario de marca */
  --blue:       #4AA9DF;
  --blue-dk:    #2E86B5;
  --blue-lt:    #A8D4EF;
  --blue-pale:  #E8F5FC;

  /* Menta — estados positivos */
  --mint:       #3ECFAA;
  --mint-dk:    #27A882;

  /* Neutros */
  --ink:        #0D1B2A;
  --ink-2:      #2C4A63;
  --muted:      #6B8DAA;
  --border:     #E2ECF3;
  --surface:    #FFFFFF;
  --surface-2:  #F0F4F8;
  --bg:         #F8FAFC;

  /* Tipografía — el wordmark «Cleansify» es siempre el logotipo en imagen,
     nunca texto, así que aquí solo hace falta la fuente de cuerpo. */
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radios */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 100px;

  /* Layout */
  --maxw: 720px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-dk); }

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

:focus-visible { outline: 2px solid var(--blue-dk); outline-offset: 3px; }

/* ─── Portada "próximamente" ──────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(1100px 620px at 50% -10%, #6FBCE8 0%, var(--blue) 42%, var(--blue-dk) 100%);
  color: #fff;
}

/* Círculos decorativos translúcidos */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.hero::before { width: 460px; height: 460px; top: -160px; left: -140px; }
.hero::after  { width: 620px; height: 620px; bottom: -300px; right: -200px; }

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: 128px;
  margin-bottom: 28px;
  filter: drop-shadow(0 6px 18px rgba(13, 27, 42, 0.22));
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(62, 207, 170, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(62, 207, 170, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 170, 0); }
}

.hero__title {
  margin: 24px 0 0;
  font-size: clamp(2.4rem, 11vw, 3.9rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__text {
  margin: 18px 0 0;
  font-size: clamp(1rem, 3.4vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  max-width: 26em;
}

.hero__meta {
  margin: 32px 0 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
}

.hero__meta a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.hero__footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 56px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
}

.legal-links a {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  transition: border-color 0.18s ease, opacity 0.18s ease;
}

.legal-links a:hover,
.legal-links a:focus-visible { border-bottom-color: #fff; opacity: 0.9; }

.legal-links__sep { color: rgba(255, 255, 255, 0.45); font-size: 14px; }

.copyright { font-size: 12.5px; color: rgba(255, 255, 255, 0.68); }

/* ─── Cabecera de páginas legales ─────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Logotipo completo (icono + wordmark). Se dimensiona por altura: el archivo ya
   viene recortado, así que el ancho sale solo. */
.topbar__brand img {
  height: 26px;
  width: auto;
}

.topbar__back {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}

.topbar__back:hover { color: var(--blue-dk); }

/* ─── Documento legal ─────────────────────────────────────────────────── */

.doc {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.doc__eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-dk);
}

.doc h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.doc__updated {
  margin: 0 0 36px;
  font-size: 14px;
  color: var(--muted);
}

.doc h2 {
  margin: 44px 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 80px;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 1.02rem;
  font-weight: 600;
}

.doc p { margin: 0 0 16px; color: var(--ink-2); }

.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; color: var(--ink-2); }

.doc li { margin-bottom: 8px; }

.doc strong { color: var(--ink); font-weight: 600; }

.doc a { text-decoration: underline; text-underline-offset: 2px; }

/* Índice */
.toc {
  margin: 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 15px;
}

.toc li { margin-bottom: 6px; }

.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--blue-dk); text-decoration: underline; }

/* Caja destacada / contacto */
.callout {
  margin: 24px 0 0;
  padding: 20px 24px;
  background: var(--blue-pale);
  border: 1px solid var(--blue-lt);
  border-radius: var(--r-lg);
}

.callout p:last-child { margin-bottom: 0; }

/* Aviso de borrador pendiente de revisión legal */
.notice {
  margin: 0 0 32px;
  padding: 14px 18px;
  background: #FFF8EB;
  border: 1px solid #F5D9A3;
  border-radius: var(--r-md);
  font-size: 14px;
  color: #7A5410;
}

.notice p { margin: 0; color: inherit; }

/* ─── Pie de páginas legales ──────────────────────────────────────────── */

.doc-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.doc-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  font-size: 13.5px;
  color: var(--muted);
}

.doc-footer a { color: var(--ink-2); text-decoration: none; }
.doc-footer a:hover { color: var(--blue-dk); text-decoration: underline; }

.doc-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
