/* =========================================================
   SALINAS CONSULTORES — Sistema de diseño v2
   ========================================================= */

:root {
  --ink: #12181F;
  --navy: #0E2A4A;
  --navy-deep: #081A30;
  --paper: #F6F4EF;
  --paper-raised: #FFFFFF;
  --verdigris: #3F6E64;
  --verdigris-dark: #2E524A;
  --line: #DDD7C9;
  --muted: #5B6470;
  --background: #FFFFFF;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-width: 1180px;
  --radius: 3px;
  --transition: 220ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em 0;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; }

p { margin: 0 0 1em 0; color: var(--ink); max-width: 62ch; }
.lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--navy);
  max-width: 46ch;
  line-height: 1.4;
}

/* ---------- Utilities ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section--alt { background: var(--paper); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: rgba(255,255,255,0.78); }
.section--tight { padding: 48px 0; }

.section-title { margin-bottom: 10px; max-width: 20ch; }
.section-subtitle {
  color: var(--muted);
  max-width: 58ch;
  margin-bottom: 44px;
  font-size: 1.05rem;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--verdigris-dark);
  font-weight: 600;
  margin-bottom: 10px;
}
.section--navy .eyebrow { color: #9FC2B8; }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: auto;
  background: var(--navy); color: #fff;
  padding: 12px 20px; z-index: 1000; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; top: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--verdigris);
  outline-offset: 2px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }

.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: #fff; }

.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--paper); }

.btn-group { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: var(--container-width); margin: 0 auto; gap: 24px;
}
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
  font-weight: 600;
}
.brand__sub {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 4px;
}

.nav-desktop { display: flex; align-items: center; gap: 26px; }
.nav-desktop ul { display: flex; gap: 22px; }
.nav-desktop a {
  font-size: 0.9rem; font-weight: 500; color: var(--ink);
  position: relative; padding: 6px 0; white-space: nowrap;
}
.nav-desktop a:hover, .nav-desktop a[aria-current="page"] { color: var(--navy); }
.nav-desktop a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--verdigris);
}

.header-cta { display: flex; align-items: center; gap: 14px; }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px; color: var(--navy);
}
.menu-toggle svg { display: block; }

.nav-mobile {
  display: none; flex-direction: column; background: #fff;
  border-top: 1px solid var(--line); padding: 12px 24px 24px;
}
.nav-mobile a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.nav-mobile .btn { margin-top: 16px; width: 100%; justify-content: center; }
.nav-mobile.is-open { display: flex; }

@media (max-width: 1050px) {
  .nav-desktop { display: none; }
  .nav-desktop-cta { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 18px 0 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line); }
.breadcrumb li[aria-current="page"] { color: var(--navy); font-weight: 500; }

/* ---------- Hero (home) ---------- */
.hero-home { padding: 32px 0 40px; }
.hero-home__kicker { font-size: 1rem; color: var(--verdigris-dark); font-weight: 600; margin-bottom: 18px; }
.hero-home h1 { max-width: 15ch; }
.hero-home__lead { margin-top: 22px; }

.hero-cta {
  margin-top: 40px;
  max-width: 820px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-cta__text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  line-height: 1.4;
  margin: 0;
  max-width: 46ch;
  flex: 1;
}

.hero-home__hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Hero genérico (páginas internas) */
.hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.hero .lead { margin-top: 14px; }

/* ---------- Grid / Tags ---------- */
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }

.tag-carousel {
  overflow: hidden;
  max-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.tag-carousel__track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: tag-scroll 24s linear infinite;
}
.tag-carousel:hover .tag-carousel__track { animation-play-state: paused; }
@keyframes tag-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.tag {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px;
  font-size: 0.86rem; color: var(--navy); background: transparent;
}

/* ---------- Cards ---------- */
.card {
  background: transparent;
  border-top: 2px solid var(--ink);
  padding: 26px 0 0;
  transition: border-color var(--transition);
  display: flex; flex-direction: column; gap: 8px; height: 100%;
}
.card:hover { border-color: var(--verdigris); }
.card__icon { color: var(--verdigris-dark); margin-bottom: 6px; }
.card__icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 2px; }
.card p { color: var(--muted); flex-grow: 1; }
.card__link {
  font-weight: 600; color: var(--navy); font-size: 0.9rem; margin-top: 4px;
  border-bottom: 1px solid var(--line);
  align-self: flex-start;
  padding-bottom: 1px;
}
.card:hover .card__link { border-color: var(--verdigris); color: var(--verdigris-dark); }

/* ---------- Pasos (solo secuencias reales) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 2px solid var(--navy); padding-top: 16px; }
.step__num {
  font-family: var(--font-display); font-size: 1.6rem; color: var(--verdigris-dark);
  display: block; margin-bottom: 6px; font-weight: 500;
}

/* ---------- Perfil / equipo ---------- */
.profile-card {
  display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: start;
  padding: 8px 0;
}
@media (max-width: 640px) { .profile-card { grid-template-columns: 1fr; } }

.avatar-mono {
  width: 160px; aspect-ratio: 1/1;
  border: 1px solid var(--line);
  border-top: 3px solid var(--verdigris);
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--navy);
  font-weight: 500;
}
.avatar-mono--lg { width: 220px; font-size: 3.4rem; }
.profile-role { color: var(--verdigris-dark); font-weight: 600; margin-bottom: 10px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%; background: none; border: none; text-align: left; padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-weight: 600; color: var(--navy); font-size: 1.05rem; font-family: var(--font-display);
}
.faq-question .faq-icon {
  flex-shrink: 0; width: 22px; height: 22px; color: var(--verdigris-dark);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  transition: transform var(--transition);
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--transition), padding var(--transition); color: var(--muted); }
.faq-answer[data-open="true"] { padding-bottom: 22px; }

/* ---------- CTA ---------- */
.cta-section {
  background: var(--navy); color: #fff; padding: 56px; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-section h2 { color: #fff; max-width: 22ch; }
.cta-section p { color: rgba(255,255,255,0.78); max-width: 42ch; }
.cta-section__text { flex: 1; min-width: 260px; }
@media (max-width: 640px) { .cta-section { padding: 32px 24px; } }

/* ---------- Formulario ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--verdigris); }
.field small { color: var(--muted); }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; grid-column: 1 / -1; }
.checkbox-field input { margin-top: 4px; }
.form-status { margin-top: 16px; font-weight: 600; }
.form-status[data-state="error"] { color: #B3261E; }
.form-status[data-state="success"] { color: var(--verdigris-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.78); padding: 64px 0 32px; }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 32px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.14);
}
@media (max-width: 900px) { .footer-top { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand__name { font-family: var(--font-display); color: #fff; font-size: 1.3rem; }
.footer-brand__sub { font-size: 0.72rem; letter-spacing: 0.04em; color: rgba(255,255,255,0.55); margin: 6px 0 16px; }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.92rem; max-width: 32ch; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; margin-bottom: 16px; font-weight: 600; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 0.92rem; color: rgba(255,255,255,0.72); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 16px; padding-top: 28px; font-size: 0.85rem; color: rgba(255,255,255,0.6);
}
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: rgba(255,255,255,0.72); font-size: 0.85rem; }
.footer-social a:hover { color: #fff; }

/* ---------- Related links ---------- */
.related-links { margin-top: 8px; }

/* ---------- Reveal (deshabilitado: un único efecto de scroll no aporta aquí) ---------- */
.reveal { opacity: 1; }

/* ---------- Utilidades de anchura ---------- */
.narrow { max-width: 68ch; }

/* ---------- Placeholder de video/artículo (recursos) ---------- */
.image-placeholder {
  background: var(--paper); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.85rem; text-align: center; padding: 24px; min-height: 160px;
}
