/* ============================================================
   CIME Veracruz — Sistema visual institucional
   Azul marino + dorado (escudo) · cian (acento digital)
   Serif técnica (Spectral) + sans humanista (IBM Plex Sans)
   ============================================================ */

:root {
  /* Marca */
  --navy:        #1b2150;
  --navy-deep:   #11163a;
  --navy-700:    #232a63;
  --gold:        #b08a3e;
  --gold-soft:   #c9a85e;
  --gold-line:   #d9c490;
  --cyan:        #15c8d4;
  --cyan-deep:   #0f9aa4;

  /* Neutros */
  --paper:       #f6f5f1;
  --paper-2:     #efede6;
  --white:       #ffffff;
  --ink:         #21232c;
  --ink-soft:    #4c4f5a;
  --muted:       #7b7e89;
  --line:        #e3e1d8;
  --line-2:      #d7d4c8;

  /* Tipografía */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, sans-serif;

  /* Métricas */
  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 64px);
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }

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

p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding-inline: var(--gut); }

/* ---------- Eyebrow / kicker ---------- */
.kicker {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--gold);
  display: inline-block;
}
.kicker.center { justify-content: center; }
.kicker.on-navy { color: var(--gold-soft); }
.kicker.on-navy::before { background: var(--gold-soft); }

/* ============================================================
   Barra de utilidad + cabecera
   ============================================================ */
.util {
  background: var(--navy-deep);
  color: #c7c9d8;
  font-size: 13px;
  letter-spacing: 0.01em;
}
.util .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  gap: 18px;
}
.util a { color: #c7c9d8; }
.util a:hover { color: #fff; }
.util .util-r { display: flex; gap: 22px; align-items: center; }
.util .util-l { display: flex; gap: 10px; align-items: center; color: #9498b3; }
.util .util-l strong { color: #e7e8f0; font-weight: 600; }

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand .crest {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  overflow: hidden; flex: none;
}
.brand .crest img { width: 46px; height: auto; }
.brand .wm-l { font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--navy); line-height: 1.05; letter-spacing: -0.01em; }
.brand .wm-s { font-family: var(--sans); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  padding: 9px 13px; border-radius: var(--radius);
  transition: color .15s, background .15s; white-space: nowrap;
}
.nav a:hover { color: var(--navy); background: var(--paper-2); }
.nav a.active { color: var(--navy); font-weight: 600; }
.nav a.active::after {
  content: ""; display: block; height: 2px; background: var(--gold);
  margin-top: 5px; border-radius: 2px;
}
.nav-cta {
  margin-left: 8px;
}

.menu-btn { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px 10px; cursor: pointer; }
.menu-btn svg { display: block; }

/* ============================================================
   Botones
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 14.5px;
  letter-spacing: 0.01em;
  padding: 13px 22px; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer;
  transition: all .16s ease; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-700); }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: #9c7a32; border-color: #9c7a32; }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--navy); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }

.txtlink {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 14.5px; color: var(--navy);
  border-bottom: 1.5px solid var(--gold-line); padding-bottom: 2px;
  transition: border-color .15s, gap .15s;
}
.txtlink:hover { border-color: var(--gold); gap: 11px; }
.txtlink svg { width: 15px; height: 15px; }

/* ============================================================
   Secciones
   ============================================================ */
section { position: relative; }
.sec { padding-block: clamp(56px, 8vw, 104px); }
.sec-tight { padding-block: clamp(40px, 6vw, 72px); }
.bg-paper { background: var(--paper); }
.bg-navy { background: var(--navy); color: #dfe1ee; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }

.sec-head { max-width: 720px; margin-bottom: 48px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 42px); }
.sec-head p { color: var(--ink-soft); font-size: 18px; margin-top: 16px; }
.bg-navy .sec-head p { color: #b9bcd2; }

.lede { font-size: 19px; line-height: 1.6; color: var(--ink-soft); }

/* ============================================================
   Tarjetas
   ============================================================ */
.cards { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white); padding: 38px 34px;
  display: flex; flex-direction: column; gap: 14px;
  transition: background .18s;
}
.card:hover { background: #fcfbf8; }
.card .ic { width: 44px; height: 44px; color: var(--navy); }
.card .ic svg { width: 100%; height: 100%; stroke: var(--navy); stroke-width: 1.4; fill: none; }
.card h3 { font-size: 22px; }
.card .num { font-family: var(--serif); font-size: 14px; color: var(--gold); font-weight: 600; letter-spacing: 0.08em; }
.card p { color: var(--ink-soft); font-size: 15.5px; margin: 0; flex: 1; }
.card .txtlink { margin-top: 6px; align-self: flex-start; }

/* Tarjeta dorada de borde superior */
.card-accent { border-top: 3px solid var(--gold); }

/* ============================================================
   Avisos
   ============================================================ */
.avisos {
  background: var(--navy-deep); color: #d6d8e6;
  border-top: 2px solid var(--gold);
}
.avisos .wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; min-height: 64px; padding-block: 14px; }
.avisos .tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--navy-deep); background: var(--gold-soft); padding: 5px 11px; border-radius: 2px; flex: none;
}
.avisos .feed { display: flex; gap: 28px; flex: 1; flex-wrap: wrap; font-size: 14.5px; }
.avisos .feed a { color: #e7e8f3; display: inline-flex; gap: 9px; align-items: baseline; }
.avisos .feed a:hover { color: #fff; }
.avisos .feed .dt { color: var(--cyan); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================================================
   Footer
   ============================================================ */
.site-foot { background: var(--navy-deep); color: #a9adc6; font-size: 14.5px; }
.site-foot .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-block: 64px; }
.site-foot .crest-f { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; margin-bottom: 18px; }
.site-foot .crest-f img { width: 50px; }
.site-foot h4 { font-family: var(--sans); color: #fff; font-size: 13px; letter-spacing: 0.13em; text-transform: uppercase; margin: 0 0 18px; font-weight: 600; }
.site-foot a { color: #a9adc6; display: block; padding: 5px 0; }
.site-foot a:hover { color: #fff; }
.site-foot .org-name { font-family: var(--serif); color: #fff; font-size: 17px; line-height: 1.3; }
.site-foot .org-sub { color: #8488a5; font-size: 13.5px; margin-top: 10px; max-width: 280px; }
.site-foot .bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-block: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #7e82a0; }

/* ============================================================
   Utilidades
   ============================================================ */
.eng-mono { font-variant-numeric: tabular-nums; }
.divider-dot { color: var(--gold); }
.hr-fine { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Duotono institucional para fotos stock */
.duotone { position: relative; overflow: hidden; }
.duotone img { filter: grayscale(0.35) contrast(1.02); }
.duotone::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,33,80,0.18), rgba(17,22,58,0.45));
  mix-blend-mode: multiply;
}

/* Animación de entrada sobria */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================
   Páginas internas
   ============================================================ */
.page-hero { background: var(--navy); color: #fff; padding-block: clamp(56px, 7vw, 92px); position: relative; overflow: hidden; }
.page-hero::after { content:""; position:absolute; right:-80px; top:-80px; width:360px; height:360px; border:1px solid rgba(255,255,255,0.06); border-radius:50%; }
.page-hero .crumb { font-size: 13px; letter-spacing: 0.04em; color: #9498b3; margin-bottom: 22px; display: flex; gap: 9px; align-items: center; }
.page-hero .crumb a { color: #9498b3; } .page-hero .crumb a:hover { color: #fff; }
.page-hero .crumb .sep { color: var(--gold-soft); }
.page-hero h1 { color: #fff; font-size: clamp(32px, 4.4vw, 54px); max-width: 16ch; }
.page-hero .sub { color: #c4c7dd; font-size: 19px; line-height: 1.6; max-width: 620px; margin-top: 20px; }
.page-hero .kicker { margin-bottom: 16px; }

.prose { max-width: 760px; }
.prose h2 { font-size: clamp(24px, 3vw, 34px); margin: 48px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; margin: 32px 0 10px; }
.prose p { color: var(--ink-soft); font-size: 17.5px; }
.prose ul { color: var(--ink-soft); font-size: 17px; padding-left: 0; list-style: none; }
.prose ul li { padding: 9px 0 9px 30px; position: relative; border-bottom: 1px solid var(--line); }
.prose ul li::before { content:""; position:absolute; left:2px; top:18px; width:10px; height:10px; border:1.5px solid var(--gold); border-radius:50%; }

/* Pasos */
.steps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { background: #fff; padding: 30px 32px; display: grid; grid-template-columns: 60px 1fr; gap: 24px; align-items: start; }
.step .sn { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--gold); line-height: 1; }
.step h3 { font-size: 20px; margin: 0 0 8px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* Tabla institucional */
.itable { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.itable th { text-align: left; font-family: var(--sans); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 14px 16px; border-bottom: 2px solid var(--line-2); }
.itable td { padding: 16px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
.itable tr:hover td { background: var(--paper); }
.itable .nm { color: var(--navy); font-weight: 600; }
.badge-on { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--cyan-deep); background:rgba(21,200,212,0.1); padding:4px 10px; border-radius:20px; }
.badge-on::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--cyan-deep); }

/* Two-col layout interno */
.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(36px,5vw,64px); align-items: start; }
.aside-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; position: sticky; top: 110px; }
.aside-card h4 { font-family: var(--serif); color: var(--navy); font-size: 19px; margin: 0 0 8px; font-weight: 600; }
.aside-card .row { display:flex; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); font-size:14.5px; }
.aside-card .row:last-of-type { border-bottom:0; }
.aside-card .row .k { color: var(--muted); } .aside-card .row .v { color: var(--navy); font-weight:600; text-align:right; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .aside-card { position: static; }
  .step { grid-template-columns: 44px 1fr; gap: 16px; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .nav { position: fixed; inset: 0 0 0 auto; width: min(320px, 84vw);
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 96px 20px 30px; gap: 4px; transform: translateX(100%);
    transition: transform .28s ease; box-shadow: -20px 0 50px rgba(0,0,0,0.12); z-index: 40; }
  .nav.open { transform: none; }
  .nav a { padding: 13px 14px; font-size: 16px; border-radius: var(--radius); }
  .nav a.active::after { display: none; }
  .nav a.active { background: var(--paper-2); }
  .nav-cta { margin: 12px 0 0; }
  .menu-btn { display: inline-flex; z-index: 60; }
  .site-foot .top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cards.c3 { grid-template-columns: 1fr; }
  .util .util-l { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand .wm-l { font-size: 15px; }
  .site-foot .top { grid-template-columns: 1fr; }
}
