/* ============================================================
   Pablo Juliano — sistema de diseño compartido
   Claro, cálido, esperanzador. Lo usan: inicio, propuestas y
   financiamiento. Los nombres de variables coinciden con los que
   ya usaba financiamiento.html, así esa página hereda la paleta.
   ============================================================ */

:root {
  /* ===== Paleta de "La Argentina que vivimos" (flyer oficial, 23/09/2026) =====
     Marino  #031336 → color principal (títulos, botones, links)
     Azul    #0B509E → segundo tono ("QUE VIVIMOS"), bandas, brillos, botón secundario
     Rojo    #DA141A → acento: subrayados, íconos, detalles. Blanco sobre rojo 5.1:1 (AA).
     Los nombres --sun-* y --violet-* se mantienen por compatibilidad:
     --sun-* ahora es el azul y --violet-* el rojo. */

  /* Fondos */
  --canvas: #FFFFFF;
  --surface: #FFFFFF;
  --surface-warm: #F4F7FB;
  --sky-wash: #EEF3FA;        /* marino muy suave */
  --sun-wash: #EAF1FA;        /* azul muy suave */
  --violet-wash: #FDF1F1;     /* rojo muy suave */

  /* Texto */
  --ink: #0F1B2D;
  --ink-secondary: #4A5568;
  --ink-tertiary: #7C8594;
  --ink-faint: #C5CBD3;

  /* Líneas */
  --rule: rgba(3, 19, 54, 0.08);
  --rule-strong: rgba(3, 19, 54, 0.15);

  /* Principal: marino */
  --navy: #031336;
  --accent: #031336;
  --accent-hover: #0B2A5E;
  --accent-surface: #E7ECF5;
  --accent-text: #031336;

  /* Segundo tono: azul */
  --blue: #0B509E;
  --aqua: #0B509E;
  --sun: #0B509E;
  --sun-hover: #0A4588;
  --sun-surface: #E6EEF8;
  --sun-text: #0B509E;

  /* Acento: rojo */
  --red: #DA141A;
  --red-hover: #B81016;
  --red-surface: #FCE8E9;
  --violet: #DA141A;
  --violet-surface: #FCE8E9;
  --violet-text: #B81016;

  /* Logrado / completado */
  --success: #2E7D4F;
  --success-surface: #E7F3EC;

  /* Compatibilidad con financiamiento.html */
  --blue-surface: var(--success-surface);
  --blue-text: var(--success);
  --warm-glow: rgba(11, 80, 158, 0.06);

  /* Bandas de color */
  --band: radial-gradient(ellipse 60% 90% at 100% 0%, rgba(11, 80, 158, 0.65), transparent 70%),
          linear-gradient(135deg, #031336 0%, #0B2A5E 100%);
  --band-kicker: #A9C8EC;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 1px 2px rgba(3, 19, 54, 0.04), 0 8px 28px rgba(3, 19, 54, 0.06);
  --shadow-lift: 0 2px 4px rgba(3, 19, 54, 0.05), 0 18px 48px rgba(3, 19, 54, 0.10);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--canvas);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===================== NAV ===================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid var(--rule);
}

.site-nav .container {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* La marca es el nombre y un punto celeste que lo cierra: una afirmación. */
.brand-dot {
  width: 0.26em;
  height: 0.26em;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 0.22em;
  margin-left: -0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--accent-text); }

@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  .nav-links { gap: 0.7rem; }
  .nav-links .hide-sm { display: none; }
  .nav-links a { font-size: 0.79rem; }
  .nav-links .btn { min-height: 34px; padding: 0.38rem 0.8rem; font-size: 0.79rem; }
  .brand { font-size: 1.05rem; }
}

/* En pantallas muy chicas el nombre se achica, pero nunca desaparece */
@media (max-width: 380px) {
  .brand { font-size: 0.95rem; }
  .nav-links { gap: 0.55rem; }
  .nav-links a { font-size: 0.75rem; }
}

/* ===================== BOTONES ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 8px 22px rgba(2, 44, 101, 0.25); }

.btn-sun { background: var(--sun); color: #fff; }
.btn-sun:hover { background: var(--sun-hover); box-shadow: 0 8px 22px rgba(11, 80, 158, 0.35); }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink-faint); }

.nav-links .btn { min-height: 38px; padding: 0.45rem 1rem; font-size: 0.85rem; color: var(--ink); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-text);
  text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ===================== ETIQUETAS ===================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-surface);
  color: var(--accent-text);
  align-self: flex-start;
  width: fit-content;
}

.tag.sun { background: var(--sun-surface); color: var(--sun-text); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.kicker::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-surface);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-lead {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink-secondary);
  max-width: 560px;
}

/* ===================== ESPACIOS PARA FOTOS ===================== */
/* Si la foto no existe, la imagen se quita sola (onerror) y queda el
   fondo suave con el ícono: el sitio nunca muestra una imagen rota. */
.photo-slot {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--sky-wash), var(--sun-wash));
  display: grid;
  place-items: center;
}

.photo-slot.tone-sun  { background: linear-gradient(135deg, #EAF6F9 0%, #CDE9F1 100%); }
.photo-slot.tone-sky  { background: linear-gradient(135deg, #EEF3F9 0%, #D6E1EF 100%); }
.photo-slot.tone-mint { background: linear-gradient(135deg, #EAF6F9 0%, #E3E2F5 100%); }
.photo-slot.tone-rose { background: linear-gradient(135deg, #F1F0FA 0%, #DEDCF2 100%); }

.photo-slot .slot-icon {
  width: 44px;
  height: 44px;
  color: rgba(2, 44, 101, 0.3);
}

.photo-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===================== COMPARTIR ===================== */
.share-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.share-label {
  font-size: 0.75rem;
  color: var(--ink-tertiary);
  margin-right: 0.2rem;
}

.share-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s var(--ease);
}

.share-btn svg { width: 16px; height: 16px; }
.share-btn:hover { color: var(--accent-text); border-color: var(--accent); background: var(--accent-surface); }
.share-btn.wa-share:hover { color: #1A8D4A; border-color: #25D366; background: #E9F9EF; }

.share-btn .copied-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 4px);
  background: var(--ink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s var(--ease);
}

.share-btn .copied-tip.show { opacity: 1; transform: translate(-50%, 0); }

/* ===================== FOOTER ===================== */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 2.5rem 0 3rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
  line-height: 1.6;
}

.site-footer a { color: var(--ink-secondary); }

.footer-social {
  display: flex;
  gap: 0.5rem;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
  border: 1px solid var(--rule-strong);
  transition: all 0.25s var(--ease);
}

.footer-social a:hover { color: var(--accent-text); border-color: var(--accent); }
.footer-social svg { width: 17px; height: 17px; }

/* ===================== ANIMACIÓN AL SCROLL ===================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ===================== DETALLES VIOLETA ===================== */
.tag.violet { background: var(--violet-surface); color: var(--violet-text); }
em.enfasis, .enfasis { color: var(--violet-text); }
