/* ============================================================
   CDAG Wireframes — Design System (Grayscale)
   Estilo: low-fidelity, líneas finas + bloques sólidos minimal,
   trazos negros sobre off-white. Editorial-institucional.
   ============================================================ */

:root {
  /* Grayscale palette */
  --ink:        #0a0a0a;
  --ink-2:      #262626;
  --ink-3:      #525252;
  --ink-4:      #737373;
  --ink-5:      #a3a3a3;
  --line:       #d4d4d4;
  --line-2:     #e5e5e5;
  --paper:      #fafaf7;
  --paper-2:    #f4f4f0;
  --white:      #ffffff;
  --hatch:      #ececea;

  /* Annotation accents */
  --note:       #1455c8;
  --note-bg:    #eaf1fb;
  --note-line:  #1455c8;
  --warn:       #b45309;

  /* Type — placeholders del brief */
  --display: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
  --body:    'Inter', 'Helvetica Neue', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing scale (8px) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 80px; --s10: 96px; --s11: 120px;

  /* Container */
  --container: 1248px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Wireframe primitives ---------- */

.wf-stage {
  background: var(--paper);
  min-height: 100vh;
}

.wf-frame {
  background: var(--white);
  border: 1px solid var(--ink);
  position: relative;
}

.wf-frame--desktop { width: 1440px; }
.wf-frame--mobile  { width: 375px; }
.wf-frame--tablet  { width: 768px; }

.wf-frame__label {
  position: absolute;
  top: -28px;
  left: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.wf-frame__label strong { color: var(--ink); font-weight: 700; }

.wf-frame__chrome {
  height: 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
}
.wf-frame__chrome::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-5);
  box-shadow: 12px 0 0 var(--ink-5), 24px 0 0 var(--ink-5);
  margin-right: 32px;
}

/* Image / video placeholder with X */
.wf-img {
  background:
    linear-gradient(45deg, transparent 49.6%, var(--ink-5) 49.8%, var(--ink-5) 50.2%, transparent 50.4%),
    linear-gradient(-45deg, transparent 49.6%, var(--ink-5) 49.8%, var(--ink-5) 50.2%, transparent 50.4%),
    var(--paper-2);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.wf-img--solid {
  background: var(--ink-3);
  border: none;
}
.wf-img__label {
  position: absolute;
  top: 8px; left: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  background: var(--white);
  padding: 2px 6px;
  border: 1px solid var(--line);
}

/* Hatch fill (decorative panels) */
.wf-hatch {
  background-image: repeating-linear-gradient(
    45deg,
    var(--line) 0 1px,
    transparent 1px 8px
  );
}

/* ---------- Type ---------- */

.t-display { font-family: var(--display); font-weight: 800; font-size: 48px; line-height: 1.05; letter-spacing: -0.02em; }
.t-h1      { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.1;  letter-spacing: -0.01em; }
.t-h2      { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; }
.t-h3      { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.2; }
.t-h4      { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.25; }
.t-h5      { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.3; }
.t-body-l  { font-family: var(--body); font-size: 18px; line-height: 1.55; }
.t-body    { font-family: var(--body); font-size: 16px; line-height: 1.5; }
.t-body-s  { font-family: var(--body); font-size: 14px; line-height: 1.45; }
.t-cap     { font-family: var(--body); font-size: 12px; line-height: 1.35; letter-spacing: 0.02em; text-transform: uppercase; font-weight: 600; }
.t-mono    { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.t-eyebrow { font-family: var(--body); font-size: 11px; line-height: 1.2; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }

.muted { color: var(--ink-4); }
.strong { font-weight: 700; }

/* ---------- Atoms ---------- */

/* Button */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  font-family: var(--body); font-weight: 600; font-size: 13px;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid var(--ink); background: var(--ink); color: var(--white);
  cursor: pointer; transition: 120ms;
  border-radius: 0;
  text-decoration: none;
}
.btn:hover { background: var(--white); color: var(--ink); }
.btn--secondary { background: transparent; color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn--ghost:hover { text-decoration: underline; background: transparent; color: var(--ink); }
.btn--sm { padding: 6px 12px; font-size: 11px; }
.btn--lg { padding: 14px 24px; font-size: 14px; }
.btn--full { width: 100%; justify-content: center; }
.btn--icon { padding: 8px; aspect-ratio: 1; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Pill / Tag */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  font-family: var(--body); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--ink); color: var(--ink); background: var(--white);
}
.pill--solid { background: var(--ink); color: var(--white); }
.pill--ghost { border-color: var(--line); color: var(--ink-3); }
.pill--status-open    { background: var(--ink); color: var(--white); }
.pill--status-closed  { background: var(--white); color: var(--ink-4); border-color: var(--ink-5); text-decoration: line-through; }
.pill--status-pending { background: repeating-linear-gradient(45deg, var(--white) 0 4px, var(--line-2) 4px 8px); }

/* Badge */
.badge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  background: var(--ink); color: var(--white); text-align: center;
  line-height: 18px; border-radius: 9px;
}

/* Inputs */
.input, .select, .textarea {
  display: block; width: 100%;
  padding: 10px 12px;
  font-family: var(--body); font-size: 14px;
  background: var(--white); border: 1px solid var(--ink-5);
  color: var(--ink); border-radius: 0;
  transition: 120ms;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink);
}
.input--search { padding-left: 36px; background-image: linear-gradient(transparent, transparent); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.field__hint  { font-size: 11px; color: var(--ink-4); }
.field--error .input { border-color: var(--ink); border-width: 2px; }
.field__error { font-size: 11px; color: var(--ink); font-weight: 600; }

/* Checkbox / Radio */
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }

/* Search input with icon */
.search-input {
  position: relative; display: flex; align-items: center;
  border: 1px solid var(--ink); background: var(--white);
}
.search-input svg { position: absolute; left: 12px; pointer-events: none; }
.search-input input {
  flex: 1; padding: 10px 12px 10px 38px;
  border: none; background: transparent; outline: none;
  font-family: var(--body); font-size: 14px;
}
.search-input button { border: none; border-left: 1px solid var(--line); background: var(--ink); color: var(--white); padding: 10px 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-4); padding: 12px 0; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs__sep { color: var(--ink-5); }
.crumbs__current { color: var(--ink); font-weight: 600; }

/* Pager */
.pager { display: flex; gap: 4px; align-items: center; font-family: var(--mono); font-size: 13px; }
.pager a, .pager span {
  min-width: 36px; height: 36px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--ink-3); cursor: pointer;
}
.pager a:hover { border-color: var(--ink); color: var(--ink); }
.pager .is-current { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pager .pager__ellip { border: none; color: var(--ink-5); }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.tabs a, .tabs button {
  padding: 12px 16px;
  font-family: var(--body); font-weight: 600; font-size: 13px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-4); background: transparent; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .is-active { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Cards ---------- */

.card { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; transition: 120ms; cursor: pointer; }
.card:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: 4px 4px 0 var(--ink); }
.card__media { aspect-ratio: 16/10; }
.card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.card__meta { display: flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--ink-4); }
.card__title { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.25; color: var(--ink); }
.card__excerpt { font-size: 13px; color: var(--ink-3); line-height: 1.45; }

.card--compact .card__media { aspect-ratio: 16/10; }
.card--compact .card__title { font-size: 15px; }

.card--feature .card__title { font-size: 28px; line-height: 1.1; }
.card--feature .card__media { aspect-ratio: 16/9; }

.card--overlay { position: relative; color: var(--white); }
.card--overlay .card__media { aspect-ratio: 16/9; height: 100%; }
.card--overlay .card__body { position: absolute; inset: auto 0 0 0; padding: 24px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: var(--white); }
.card--overlay .card__title { color: var(--white); }
.card--overlay .card__meta { color: rgba(255,255,255,0.85); }

/* List item news */
.news-item { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.news-item:hover .news-item__title { text-decoration: underline; }
.news-item__media { aspect-ratio: 1; }
.news-item__title { font-family: var(--display); font-weight: 600; font-size: 14px; line-height: 1.3; }
.news-item__meta { font-family: var(--mono); font-size: 10px; color: var(--ink-4); margin-bottom: 4px; }

/* Federation card */
.fed-card { display: flex; flex-direction: column; align-items: center; padding: 24px 16px; border: 1px solid var(--line); background: var(--white); cursor: pointer; transition: 120ms; gap: 12px; }
.fed-card:hover { border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: translateY(-2px); }
.fed-card__logo { width: 80px; height: 80px; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; color: var(--ink-4); }
.fed-card__name { font-family: var(--display); font-weight: 600; font-size: 13px; text-align: center; line-height: 1.3; }

/* Event / convocatoria card */
.event-card { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; padding: 16px; border: 1px solid var(--line); background: var(--white); align-items: center; cursor: pointer; }
.event-card:hover { border-color: var(--ink); }
.event-card__date { background: var(--ink); color: var(--white); padding: 12px 8px; text-align: center; }
.event-card__date strong { display: block; font-family: var(--display); font-size: 28px; line-height: 1; font-weight: 800; }
.event-card__date span { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }

/* Download card */
.dl-card { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.dl-card:hover { border-color: var(--ink); }
.dl-card__icon { width: 40px; height: 48px; border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; font-weight: 700; }
.dl-card__title { font-family: var(--display); font-weight: 600; font-size: 14px; line-height: 1.3; }
.dl-card__meta { font-family: var(--mono); font-size: 10px; color: var(--ink-4); }

/* ---------- Layout ---------- */

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container--narrow { max-width: 760px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }

.stack { display: flex; flex-direction: column; }
.stack-2 > * + * { margin-top: 8px; }
.stack-4 > * + * { margin-top: 16px; }
.stack-6 > * + * { margin-top: 24px; }
.stack-8 > * + * { margin-top: 32px; }

.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }

.divider { height: 1px; background: var(--line); margin: 24px 0; }
.divider--thick { height: 2px; background: var(--ink); }

/* ---------- Header ---------- */

.wf-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--white); border-bottom: 1px solid var(--ink);
}
.wf-header__utility {
  background: var(--ink); color: var(--white);
  font-family: var(--mono); font-size: 11px;
}
.wf-header__utility .container { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.wf-header__utility a { color: rgba(255,255,255,0.85); padding: 0 10px; border-right: 1px solid rgba(255,255,255,0.15); }
.wf-header__utility a:first-child { padding-left: 0; }
.wf-header__utility a:last-child { border-right: none; }
.wf-header__utility a:hover { color: var(--white); text-decoration: underline; }
.wf-header__utility-left, .wf-header__utility-right { display: flex; align-items: center; }

.wf-header__main .container { display: flex; align-items: center; height: 80px; gap: 32px; }
.wf-header.is-compact .wf-header__main .container { height: 60px; }
.wf-header__logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.wf-header__logo-mark {
  width: 56px; height: 56px;
  border: 2px solid var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 800; font-size: 14px; line-height: 1;
  position: relative;
}
.wf-header__logo-mark::after {
  content: 'GUATEMALA'; position: absolute; bottom: 4px;
  font-size: 6px; letter-spacing: 0.05em;
}
.wf-header__logo-mark span { display: block; margin-top: -8px; }
.wf-header.is-compact .wf-header__logo-mark { width: 40px; height: 40px; font-size: 11px; }

.wf-nav { display: flex; gap: 4px; flex: 1; }
.wf-nav__item {
  position: relative;
  padding: 8px 12px;
  font-family: var(--body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink); cursor: pointer; border-bottom: 2px solid transparent;
}
.wf-nav__item:hover, .wf-nav__item.is-active { border-bottom-color: var(--ink); }
.wf-nav__item-chev { font-size: 9px; margin-left: 4px; }

.wf-header__tools { display: flex; align-items: center; gap: 4px; }
.wf-icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; cursor: pointer;
}
.wf-icon-btn:hover { border-color: var(--ink); }

/* Mega menu */
.wf-megamenu {
  position: absolute; /* relativo a .page-with-annots__main (position:relative) */
  top: 0; left: 0; right: 0; /* top calculado por JS */
  background: var(--white); border-bottom: 1px solid var(--ink); border-top: 1px solid var(--line);
  display: none;
  z-index: 70;
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.wf-megamenu.is-open { display: block; animation: slideDown 200ms ease; }
.wf-megamenu .container { padding-top: 32px; padding-bottom: 32px; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Search drawer */
.wf-searchbar {
  position: absolute; top: 0; left: 0; right: 0; /* top calculado por JS */
  background: var(--ink); color: var(--white);
  display: none;
  z-index: 70;
}
.wf-searchbar.is-open { display: block; animation: slideDown 200ms ease; }
.wf-searchbar .container { padding: 24px 32px; }
.wf-searchbar .search-input { background: var(--white); border: none; }

/* ---------- Footer ---------- */

.wf-footer { background: var(--ink); color: var(--white); margin-top: 96px; }
.wf-footer__main { padding: 64px 0 48px; }
.wf-footer__main .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; }
.wf-footer__brand { padding-right: 32px; }
.wf-footer__col h4 { font-family: var(--display); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.wf-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.wf-footer__col a { font-size: 13px; color: rgba(255,255,255,0.75); }
.wf-footer__col a:hover { color: var(--white); text-decoration: underline; }
.wf-footer__legal { border-top: 1px solid rgba(255,255,255,0.15); padding: 20px 0; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.6); }
.wf-footer__legal .container { display: flex; justify-content: space-between; }

/* ---------- Annotations (Figma-style) ---------- */

.annot-layer {
  position: absolute; inset: 0;
  pointer-events: none;
}
.annot {
  position: absolute;
  pointer-events: auto;
  z-index: 5;
}
.annot__pin {
  width: 24px; height: 24px;
  background: var(--note); color: var(--white);
  border-radius: 50%;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  cursor: pointer;
}
.annot__pin:hover { transform: scale(1.15); }

.annot-panel {
  position: sticky; top: 24px;
  width: 320px; max-height: calc(100vh - 48px);
  background: var(--white); border: 1px solid var(--ink);
  font-size: 12px; line-height: 1.45;
  overflow: hidden; display: flex; flex-direction: column;
}
.annot-panel__head { padding: 12px 16px; background: var(--ink); color: var(--white); font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.annot-panel__list { overflow-y: auto; padding: 8px; flex: 1; }
.annot-item { padding: 12px; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 24px 1fr; gap: 10px; cursor: pointer; }
.annot-item:hover { background: var(--paper-2); }
.annot-item.is-active { background: var(--note-bg); }
.annot-item__num { width: 22px; height: 22px; background: var(--note); color: var(--white); font-family: var(--mono); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.annot-item__title { font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.annot-item__desc  { color: var(--ink-3); font-size: 11px; }
.annot-item__wp { display: inline-block; margin-top: 6px; padding: 2px 6px; background: var(--paper-2); font-family: var(--mono); font-size: 9px; color: var(--ink-3); border: 1px solid var(--line); }

/* ---------- States ---------- */

.state-tag {
  position: absolute; top: -10px; left: 12px;
  background: var(--white); padding: 2px 8px;
  font-family: var(--mono); font-size: 10px; color: var(--note);
  border: 1px solid var(--note); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700;
  z-index: 2;
}

.skeleton {
  background: linear-gradient(90deg, var(--paper-2) 0%, var(--line-2) 50%, var(--paper-2) 100%);
  background-size: 200% 100%;
  animation: skeleton 1.6s linear infinite;
}
@keyframes skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Util ---------- */

.full-bleed { width: 100%; }
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; letter-spacing: 0.04em; }

/* Hide scrollbar where used */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* Section heading */
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.section-head h2 { margin: 0; }
.section-head a { font-family: var(--mono); font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.section-head a:hover { color: var(--ink); text-decoration: underline; }

/* Eyebrow row */
.eyebrow-row { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.06em; }
.eyebrow-row::before { content: ''; width: 24px; height: 2px; background: var(--ink); }

/* Annotated wrapper */
.has-annot { position: relative; }
