/* ============================================================
   SECG — Social Economic Consulting Group, LLC
   Hoja de estilos principal — Sistema de diseño
   Paleta: Ink #142233 · Teal #176B68 · Ivory #F5F2EA
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #142233;
  --ink-soft: #22344c;
  --teal: #176B68;
  --teal-deep: #0f4f4d;
  --teal-light: #6fa8a4;
  --teal-tint: rgba(23, 107, 104, 0.07);
  --ivory: #F5F2EA;
  --ivory-deep: #EDE8DC;
  --gray: #E8E8E3;
  --white: #FFFFFF;
  --muted: #667085;
  --muted-on-dark: #9aa7b8;

  --line: rgba(20, 34, 51, 0.14);
  --line-soft: rgba(20, 34, 51, 0.08);
  --line-on-dark: rgba(245, 242, 234, 0.16);

  --font-head: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(20, 34, 51, 0.05), 0 6px 18px rgba(20, 34, 51, 0.05);
  --shadow-md: 0 2px 6px rgba(20, 34, 51, 0.06), 0 18px 44px rgba(20, 34, 51, 0.1);

  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
  --header-h: 76px;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }

a { color: var(--teal); text-decoration: none; }

p, h1, h2, h3, h4, ul, ol, dl, dd, figure, blockquote { margin: 0; }

ul, ol { padding: 0; list-style: none; }

button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

::selection { background: var(--teal); color: var(--ivory); }

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

[id] { scroll-margin-top: calc(var(--header-h) + 96px); }

/* ---------- 3. Utilidades ---------- */
.container {
  width: min(calc(100% - 2 * var(--gutter)), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--ink);
  color: var(--ivory);
  padding: 0.7rem 1.1rem;
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 1rem; color: var(--ivory); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--teal);
}

.section--dark .eyebrow { color: var(--teal-light); }
.section--dark .eyebrow::before { background: var(--teal-light); }

.accent-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--teal);
}
.section--dark .accent-serif,
.cta-band .accent-serif { color: var(--teal-light); }

.lead {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.75;
  color: var(--muted);
  max-width: 44rem;
}
.section--dark .lead { color: var(--muted-on-dark); }

/* ---------- 4. Botones y enlaces ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease);
  white-space: nowrap;
}
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.btn-primary { background: var(--ink); color: var(--ivory); }
.btn-primary:hover { background: var(--teal); color: var(--white); transform: translateY(-1px); }

.btn-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); transform: translateY(-1px); }

.btn-light { background: var(--ivory); color: var(--ink); }
.btn-light:hover { background: var(--white); transform: translateY(-1px); }

.btn-ghost-dark { border-color: var(--line-on-dark); color: var(--ivory); }
.btn-ghost-dark:hover { border-color: var(--ivory); transform: translateY(-1px); }

.btn-sm { padding: 0.68rem 1.15rem; font-size: 0.85rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.25s var(--ease);
}
.link-arrow .arr { transition: transform 0.3s var(--ease); }
.link-arrow:hover { color: var(--teal); }
.link-arrow:hover .arr { transform: translateX(4px); }
.section--dark .link-arrow { color: var(--ivory); }
.section--dark .link-arrow:hover { color: var(--teal-light); }

/* ---------- 5. Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 242, 234, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line-soft);
  box-shadow: 0 1px 0 rgba(20, 34, 51, 0.03), 0 10px 30px rgba(20, 34, 51, 0.05);
}

.topbar {
  background: var(--ink);
  color: #c3cedd;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink);
}
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-mark .mark-accent { stroke: var(--teal); }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-acronym {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: 0.02em;
}
.brand-name {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav ul { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  position: relative;
  display: inline-block;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.2rem;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav a:hover { color: var(--teal); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--teal); }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* Menú móvil */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ivory);
  padding: calc(var(--header-h) + 3rem) var(--gutter) 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateY(-102%);
  visibility: hidden;
  transition: transform 0.45s var(--ease), visibility 0s linear 0.45s;
}
.mobile-menu.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.45s var(--ease), visibility 0s;
}
.mobile-nav { display: grid; gap: 0.25rem; }
.mobile-nav a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.65rem 0;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.mobile-nav a:hover { color: var(--teal); padding-left: 0.5rem; }
.mobile-menu-foot { display: grid; gap: 0.35rem; color: var(--muted); }

body.menu-open { overflow: hidden; }

/* ---------- 6. Hero (home) ---------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}
.hero-copy { display: grid; gap: 1.6rem; justify-items: start; }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 5.4vw, 4.35rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.4rem; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 1.4rem; }
.hero-meta span + span::before { content: "·"; color: var(--teal); }

.hero-figure {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(0.9rem, 2vw, 1.4rem);
}
.hero-figure svg { width: 100%; height: auto; }
.hero-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 7. Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
  padding: 0.95rem 0;
}
.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-item::after { content: "·"; color: var(--teal); font-size: 1rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 8. Secciones ---------- */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section--white { background: var(--white); border-block: 1px solid var(--line-soft); }
.section--tint { background: var(--ivory-deep); }
.section--dark {
  background:
    radial-gradient(900px 480px at 88% 12%, rgba(23, 107, 104, 0.28), transparent 62%),
    var(--ink);
  color: var(--ivory);
}

.section-head {
  display: grid;
  gap: 1.1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  max-width: 52rem;
}
.section-head--split {
  max-width: none;
  grid-template-columns: 1fr auto;
  align-items: end;
  column-gap: 3rem;
}
.section-head--split .section-head-text { display: grid; gap: 1.1rem; max-width: 44rem; }

.section-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.section--dark .section-index { color: var(--muted-on-dark); }

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.95rem, 3.8vw, 2.9rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 20ch;
}
.section--dark .section-title { color: var(--ivory); }

/* ---------- 9. Grids y tarjetas ---------- */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem 1.6rem;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(23, 107, 104, 0.45);
  box-shadow: var(--shadow-md);
}
.card:hover::before { transform: scaleX(1); }

.card-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.card-title {
  font-family: var(--font-head);
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-text { font-size: 0.93rem; line-height: 1.68; color: var(--muted); flex: 1; }
.card .link-arrow { margin-top: 0.6rem; font-size: 0.88rem; }

/* Tarjetas sobre fondo oscuro */
.section--dark .card {
  background: rgba(245, 242, 234, 0.045);
  border-color: var(--line-on-dark);
  color: var(--ivory);
}
.section--dark .card:hover {
  border-color: rgba(111, 168, 164, 0.6);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}
.section--dark .card::before { background: var(--teal-light); }
.section--dark .card-title { color: var(--ivory); }
.section--dark .card-text { color: var(--muted-on-dark); }
.section--dark .card-index { color: var(--teal-light); }

/* ---------- 10. Proceso (steps) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.step { border-top: 2px solid var(--ink); padding-top: 1.3rem; display: grid; gap: 0.55rem; align-content: start; }
.step-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--teal);
}
.step-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; }
.step-text { font-size: 0.92rem; line-height: 1.65; color: var(--muted); }

/* ---------- 11. Paneles destacados ---------- */
.feature-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.feature-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 300px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3.5vw, 2.6rem);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.feature-panel:hover {
  transform: translateY(-4px);
  border-color: rgba(23, 107, 104, 0.45);
  box-shadow: var(--shadow-md);
}
.feature-panel h3 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.feature-panel p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; max-width: 34rem; }
.feature-panel .link-arrow { margin-top: auto; }
.feature-motif {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 210px;
  height: 210px;
  color: var(--teal);
  opacity: 0.14;
  pointer-events: none;
}

/* ---------- 12. Banda CTA ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(800px 420px at 12% 0%, rgba(23, 107, 104, 0.32), transparent 60%),
    var(--ink);
  color: var(--ivory);
  padding: clamp(4.5rem, 9vw, 7rem) 0;
}
.cta-inner { display: grid; gap: 1.5rem; max-width: 46rem; position: relative; }
.cta-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.06;
  color: var(--ivory);
}
.cta-band p { color: var(--muted-on-dark); font-size: 1.02rem; line-height: 1.75; max-width: 38rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.5rem; }
.cta-rings {
  position: absolute;
  right: -140px;
  top: -140px;
  width: 460px;
  height: 460px;
  color: var(--teal-light);
  opacity: 0.14;
  pointer-events: none;
}

/* ---------- 13. Hero de páginas internas ---------- */
.page-hero {
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}
.page-hero-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.page-hero-copy { display: grid; gap: 1.2rem; justify-items: start; max-width: 48rem; }
.page-title {
  font-family: var(--font-head);
  font-size: clamp(2.15rem, 4.4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.028em;
  max-width: 20ch;
}
.page-hero-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 0.5rem;
}
.page-hero-meta b { color: var(--teal); font-weight: 500; }

/* ---------- 14. Listas, chips, datos ---------- */
.list-check { display: grid; gap: 0.65rem; }
.list-check li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--teal);
}
.list-check--cols { grid-template-columns: 1fr 1fr; column-gap: 2rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.chip:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.badge--soon { color: var(--teal-deep); border-color: rgba(23, 107, 104, 0.4); background: var(--teal-tint); }

.fact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.6rem, 3vw, 2.2rem);
}
.fact-card dl { display: grid; }
.fact-card dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.2rem;
}
.fact-card dt:first-child { margin-top: 0; }
.fact-card dd {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.3rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line-soft);
}
.fact-card dd:last-of-type { border-bottom: 0; padding-bottom: 0; }

.quote-block {
  border-left: 3px solid var(--teal);
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
  box-shadow: var(--shadow-sm);
}
.quote-block p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
  color: var(--ink-soft);
}
.quote-block footer {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 15. Bloques de servicio ---------- */
.service-block {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2.8rem, 5.5vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}
.service-block:first-of-type { border-top: 0; padding-top: clamp(2rem, 4vw, 3rem); }
.service-info { display: grid; gap: 1rem; align-content: start; justify-items: start; }
.service-info h2 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.service-info p { color: var(--muted); line-height: 1.75; max-width: 34rem; }
.service-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  display: grid;
  gap: 1.4rem;
  align-content: start;
  box-shadow: var(--shadow-sm);
}
.service-panel .mono { color: var(--muted); }

/* ---------- 16. Artículos / investigación ---------- */
.article-feature {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}
.article-feature-body {
  padding: clamp(1.8rem, 4vw, 3rem);
  display: grid;
  gap: 1.1rem;
  align-content: start;
  justify-items: start;
}
.article-feature-body h3 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.article-feature-body p { color: var(--muted); line-height: 1.75; max-width: 36rem; }
.article-feature-art {
  background: var(--ivory-deep);
  border-left: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.article-feature-art svg { width: 78%; height: auto; }
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-card { min-height: 240px; }
.article-card h3 { font-size: 1.22rem; }
.article-card .article-meta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}

/* ---------- 17. Publicaciones / libros ---------- */
.book-card { padding: 1.3rem 1.3rem 1.5rem; }
.book-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: var(--ivory-deep);
}
.book-cover svg { width: 100%; height: 100%; }
.book-cover .badge { position: absolute; top: 0.85rem; left: 0.85rem; }
.book-card h3 { font-size: 1.12rem; margin-top: 1.1rem; }
.book-author {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.book-card .card-text { flex: none; }
.book-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.note-panel {
  background: var(--white);
  border: 1px dashed rgba(20, 34, 51, 0.3);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3.5vw, 2.6rem);
  display: grid;
  gap: 1rem;
  justify-items: start;
}
.note-panel h3 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.015em; }
.note-panel p { color: var(--muted); line-height: 1.75; max-width: 44rem; }

/* ---------- 18. Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.8rem, 3.5vw, 2.6rem);
}
.form { display: grid; gap: 1.15rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.field label .req { color: var(--teal); }
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.85rem 1rem;
  width: 100%;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 107, 104, 0.14);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23142233' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1em;
  padding-right: 2.6rem;
}
.form-note { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--muted); line-height: 1.7; }
.form-status {
  display: none;
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 0.9rem 1.1rem;
  border-radius: 3px;
  background: var(--teal-tint);
  border: 1px solid rgba(23, 107, 104, 0.35);
  color: var(--teal-deep);
}
.form-status.is-visible { display: block; }

/* Contacto directo por correo */
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  letter-spacing: 0.02em;
  color: var(--ink);
  border-bottom: 2px solid var(--teal);
  padding-bottom: 0.35rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--teal); }
.footer-links a[href^="mailto:"] { overflow-wrap: anywhere; }

.aside-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(420px 260px at 110% -10%, rgba(23, 107, 104, 0.4), transparent 60%),
    var(--ink);
  color: var(--ivory);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3.5vw, 2.4rem);
  display: grid;
  gap: 1.5rem;
}
.aside-card h2 { font-family: var(--font-head); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.015em; color: var(--ivory); }
.aside-list { display: grid; gap: 1.1rem; }
.aside-list dt {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  margin-bottom: 0.3rem;
}
.aside-list dd { font-size: 0.95rem; color: var(--ivory); }
.aside-list dd a { color: var(--ivory); border-bottom: 1px solid var(--line-on-dark); transition: color 0.25s, border-color 0.25s; }
.aside-list dd a:hover { color: var(--teal-light); border-color: var(--teal-light); }
.aside-card .placeholder { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--teal-light); }
.aside-note { font-size: 0.85rem; line-height: 1.7; color: var(--muted-on-dark); border-top: 1px solid var(--line-on-dark); padding-top: 1.2rem; }

/* ---------- 19. Páginas legales ---------- */
.prose { max-width: 46rem; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 {
  font-family: var(--font-head);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-top: 2.4rem;
}
.prose p, .prose li { color: #3c4a5c; line-height: 1.8; font-size: 0.97rem; }
.prose ul { padding-left: 1.2rem; list-style: disc; display: grid; gap: 0.5rem; }
.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 20. Pie de página ---------- */
.site-footer {
  background: var(--ink);
  color: var(--muted-on-dark);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 2rem;
  flex-shrink: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-brand .brand-mark { width: 46px; height: 46px; color: var(--ivory); }
.footer-legal-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ivory);
  margin: 1.1rem 0 0.5rem;
}
.footer-tag { font-size: 0.9rem; line-height: 1.7; max-width: 24rem; }
.footer-areas {
  margin-top: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7f8ca0;
  line-height: 2;
}
.footer-h {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8b98ab;
  margin-bottom: 1.1rem;
}
.footer-links { display: grid; gap: 0.6rem; }
.footer-links li { font-size: 0.92rem; }
.footer-links a {
  color: #c6d0dd;
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.footer-links a:hover { color: var(--white); padding-left: 0.35rem; }
.footer-links .placeholder { font-family: var(--font-mono); font-size: 0.8rem; color: var(--teal-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem 2rem;
  flex-wrap: wrap;
  padding-top: 1.6rem;
  font-size: 0.8rem;
  color: #7f8ca0;
}
.footer-legal { display: inline-flex; gap: 1.4rem; }
.footer-legal a { color: #7f8ca0; }
.footer-legal a:hover { color: var(--white); }

/* ---------- 21. Página 404 ---------- */
.error-wrap {
  min-height: 52vh;
  display: grid;
  place-content: center;
  gap: 1.2rem;
  text-align: center;
  justify-items: center;
  padding: 4rem 0;
}
.error-code {
  font-family: var(--font-head);
  font-size: clamp(4.5rem, 14vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.error-code span { color: var(--teal); }

/* ---------- 22. Animaciones de aparición ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 23. Responsive ---------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-title { max-width: 16ch; }
  .hero-figure { max-width: 560px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .article-feature { grid-template-columns: 1fr; }
  .article-feature-art { border-left: 0; border-top: 1px solid var(--line); min-height: 200px; }
}

@media (max-width: 920px) {
  :root { --header-h: 66px; }
  .topbar { display: none; }
  .site-nav { display: none; }
  .nav-toggle { display: block; }
  .header-actions .btn { display: none; }
  .brand-name { display: none; }
  .service-block { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .section-head--split { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .feature-panels { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .list-check--cols { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .page-hero-meta { display: none; }
}

/* ---------- 24. Movimiento reducido ---------- */
@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;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: 100%; }
}
