/* Vinclo — hoja de estilo del sitio público.
   Los tokens replican frontend/src/theme/tokens.ts para que la web y la app
   se lean como el mismo producto. Si cambias la paleta de la app, cámbiala
   también aquí. */

:root {
  --bg:          #F5F0E8;
  --bg-deep:     #EEE6D9;
  --surface:     #FBF7F0;
  --ink:         #1B2A3F;
  --ink-soft:    rgba(27, 42, 63, 0.62);
  --ink-mute:    rgba(27, 42, 63, 0.42);
  --line:        rgba(27, 58, 107, 0.10);
  --primary-deep:#1B3A6B;
  --primary:     #2F5FA0;
  --primary-mid: #4A7BB7;
  --primary-bg:  rgba(74, 123, 183, 0.10);
  --gold:        #B89055;
  --gold-line:   rgba(184, 144, 85, 0.35);

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --measure: 34rem;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0F1B2D;
    --bg-deep:     #0A1422;
    --surface:     #16243A;
    --ink:         #EAEFF6;
    --ink-soft:    rgba(234, 239, 246, 0.65);
    --ink-mute:    rgba(234, 239, 246, 0.42);
    --line:        rgba(200, 215, 236, 0.10);
    --primary-deep:#7BA8D4;
    --primary:     #9BBDDF;
    --primary-mid: #4A7BB7;
    --primary-bg:  rgba(123, 168, 212, 0.14);
    --gold:        #D9B675;
    --gold-line:   rgba(217, 182, 117, 0.4);
  }
}

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

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

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

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-deep); }

.wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Cabecera --------------------------------------------------------- */

.site-head {
  padding: 1.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-name {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* --- Portada ---------------------------------------------------------- */

.hero {
  padding: 3.5rem 0 4rem;
  text-align: center;
}

.hero-logo { margin-bottom: 1.75rem; }

h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 6vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

.hero p {
  max-width: var(--measure);
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

.hero .lead-em {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink);
}

/* --- Pasos ------------------------------------------------------------ */

.steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  padding: 1rem 0 4rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.step-num {
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--gold);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
}

.step h2 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* --- Aviso de disponibilidad ------------------------------------------ */

.note {
  background: var(--primary-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  color: var(--ink-soft);
  margin-bottom: 4rem;
}

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

/* --- Botones ---------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--primary-deep);
  color: #FBF7F0;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
}

.btn:hover { background: var(--primary); color: #FBF7F0; }

@media (prefers-color-scheme: dark) {
  .btn { color: #0F1B2D; }
  .btn:hover { color: #0F1B2D; }
}

/* --- Páginas de texto legal ------------------------------------------- */

.doc {
  max-width: 44rem;
  padding: 1rem 0 4rem;
}

.doc h1 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); text-align: left; }

.doc .updated {
  color: var(--ink-mute);
  font-size: 0.9rem;
  margin: -0.5rem 0 2.5rem;
}

.doc h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.doc h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.02rem;
  margin: 1.75rem 0 0.4rem;
}

.doc p, .doc li { color: var(--ink-soft); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.5rem; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

.doc th, .doc td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-soft);
}

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

.doc-table-scroll { overflow-x: auto; }

/* --- Pie -------------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  color: var(--ink-mute);
  font-size: 0.92rem;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.75rem;
}

/* --- Pantalla del magic link ------------------------------------------ */

.centered {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
}

.centered .inner { max-width: 26rem; }

.centered h1 { font-size: 1.6rem; margin-bottom: 0.75rem; }

.centered p {
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

.fallback-link {
  display: block;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-mute);
  word-break: break-all;
}

[hidden] { display: none !important; }

/* --- Extras de la pantalla del magic link ----------------------------- */
/* Van como clases y no como atributos `style` para que la CSP del sitio
   pueda prohibir todo lo inline. */

.magic-logo { margin-bottom: 1.5rem; }

.magic-hint {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--ink-mute);
}
