/* ============================================================
   TRAVIDENCE — Hub de recursos
   Estilos del hub multi-página. Consume los tokens de marca de
   colors_and_type.css vía var(). NO depende de landing.css ni la
   edita. Sin JS: el FAQ usa <details>/<summary> nativo.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.container--text { max-width: 760px; }
.section { padding-block: var(--section-y); }
.section--sunken { background: var(--bg-sunken); }

/* ---------- skip link (a11y) ---------- */
.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--accent); color: var(--fg-on-amber); padding: 10px 16px;
  border-radius: var(--r-md); font-weight: 600; z-index: 200;
  transition: top var(--motion-ui) var(--easing-standard);
}
.skip-link:focus { top: 10px; }

/* ---------- focus ring ---------- */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------- wordmark ---------- */
.wordmark {
  font-family: var(--font-sans); font-weight: 600; font-size: 21px;
  letter-spacing: 0.06em; color: var(--fg); text-decoration: none; white-space: nowrap;
}
.wordmark:hover { color: var(--fg); }

/* ---------- nav ---------- */
.hub-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.hub-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); height: 64px; }
.hub-nav__links { display: flex; align-items: center; gap: var(--s-5); }
.hub-nav__link {
  color: var(--fg-muted); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: color var(--motion-micro) var(--easing-standard);
}
.hub-nav__link:hover { color: var(--fg); }
.hub-nav__link[aria-current="page"] { color: var(--accent); }

/* ---------- breadcrumb ---------- */
.breadcrumb { font-size: var(--t-small); color: var(--fg-subtle); margin-bottom: var(--s-4); }
.breadcrumb a { color: var(--fg-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--fg); text-decoration: underline; }
.breadcrumb span[aria-hidden] { margin: 0 6px; color: var(--line-strong); }

/* ---------- page head ---------- */
.page-head { padding-block: var(--s-8) var(--s-5); }
.eyebrow {
  font-family: var(--font-sans); font-weight: 600; font-size: var(--t-micro);
  letter-spacing: var(--tr-eyebrow); text-transform: uppercase; color: var(--accent);
  margin: 0 0 var(--s-4);
}
.page-title {
  font-family: var(--font-display); font-weight: 400; font-size: var(--t-h1);
  line-height: var(--lh-tight); letter-spacing: var(--tr-tight); color: var(--fg); margin: 0;
}
.lead {
  font-size: var(--t-body-lg); line-height: var(--lh-relaxed); color: var(--fg-muted);
  margin-top: var(--s-5); max-width: 60ch;
}
.rule--amber { background: var(--accent); height: 2px; width: 44px; border: 0; border-radius: 2px; margin: var(--s-5) 0; }

/* ---------- prose (article body) ---------- */
.prose { color: var(--fg); }
.prose > * + * { margin-top: var(--s-5); }
.prose h2 {
  font-family: var(--font-display); font-weight: 500; font-size: var(--t-h2);
  line-height: var(--lh-heading); letter-spacing: var(--tr-tight); color: var(--fg);
  margin: 0; padding-top: var(--s-8); scroll-margin-top: 84px;
}
.prose h2:first-child { padding-top: 0; }
.prose h3 {
  font-family: var(--font-sans); font-weight: 600; font-size: var(--t-h3);
  line-height: var(--lh-heading); color: var(--fg); margin: 0; padding-top: var(--s-5);
}
.prose p { margin: 0; max-width: 68ch; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-hover); }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; max-width: 66ch; }
.prose li { margin: 0; }
.prose li + li { margin-top: var(--s-2); }
.prose strong { font-weight: 600; color: var(--fg); }
.prose em { font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }

/* ---------- index cards ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-5); margin-top: var(--s-7);
}
.res-card {
  display: flex; flex-direction: column;
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: var(--s-6);
  text-decoration: none; color: inherit;
  transition: box-shadow var(--motion-ui) var(--easing-standard),
              border-color var(--motion-ui) var(--easing-standard),
              transform var(--motion-ui) var(--easing-standard);
}
.res-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); transform: translateY(-2px); }
.res-card__eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: var(--tr-wide);
  text-transform: uppercase; color: var(--fg-subtle);
}
.res-card__title {
  font-family: var(--font-sans); font-weight: 600; font-size: var(--t-h4);
  color: var(--fg); margin-top: var(--s-3);
}
.res-card__desc { color: var(--fg-muted); font-size: 15.5px; line-height: 1.6; margin-top: var(--s-3); }
.res-card__cta { color: var(--accent); font-weight: 600; font-size: 14px; margin-top: var(--s-5); }
.res-card:hover .res-card__cta { color: var(--accent-hover); }

/* ---------- glossary (definition list) ---------- */
.glossary { margin-top: var(--s-6); border-top: 1px solid var(--line); }
.glossary__item { padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.glossary dt {
  font-family: var(--font-sans); font-weight: 600; font-size: var(--t-h4);
  color: var(--fg); scroll-margin-top: 84px;
}
.glossary dd { margin: var(--s-3) 0 0; color: var(--fg-muted); max-width: 70ch; line-height: 1.65; }
.glossary dd + dd { margin-top: var(--s-3); }

/* ---------- FAQ (native details) ---------- */
.faq { margin-top: var(--s-5); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5) 0; font-family: var(--font-sans); font-size: 17px; font-weight: 600;
  color: var(--fg); scroll-margin-top: 84px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; color: var(--accent); font-size: 24px; line-height: 1;
  font-weight: 400; transition: transform var(--motion-ui) var(--easing-standard);
}
.faq details[open] summary::after { content: "\2212"; }
.faq__a { padding-bottom: var(--s-5); color: var(--fg-muted); max-width: 70ch; line-height: 1.65; }
.faq__a > * + * { margin-top: var(--s-4); }
.faq__a a { color: var(--accent); text-underline-offset: 2px; }

/* ---------- certificate label chip (verbatim cert wording) ---------- */
.cert-label {
  font-family: var(--font-mono); font-size: 0.82em; font-weight: 500;
  background: var(--accent-wash); border: 1px solid var(--accent-line); color: var(--accent);
  padding: 2px 8px; border-radius: var(--r-sm); white-space: nowrap;
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* band chips on the cert guide */
.band-list { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.band-chip {
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  background: var(--bg-raised); border: 1px solid var(--line-strong);
  border-radius: var(--r-pill); padding: 7px 14px; color: var(--fg);
}

/* ---------- disclaimer callout ---------- */
.disclaimer {
  background: var(--accent-wash); border: 1px solid var(--accent-line);
  border-left: 3px solid var(--accent); border-radius: var(--r-md);
  padding: var(--s-5) var(--s-5) var(--s-5) var(--s-6);
  color: var(--fg-muted); font-size: var(--t-small); line-height: 1.6;
  margin-top: var(--s-7); max-width: 70ch;
}
.disclaimer strong { color: var(--fg); font-weight: 600; }

/* ---------- back link ---------- */
.backlink { display: inline-flex; align-items: center; gap: 7px; color: var(--fg-muted);
  text-decoration: none; font-size: 15px; font-weight: 500; }
.backlink:hover { color: var(--accent); }

/* ---------- footer ---------- */
.hub-footer { background: var(--bg-ink); color: var(--fg-on-ink); padding-block: var(--s-8) var(--s-7); }
.hub-footer .wordmark { color: var(--fg-on-ink); }
.hub-footer__top { display: flex; flex-wrap: wrap; gap: var(--s-6) var(--s-8); justify-content: space-between; align-items: flex-start; margin-top: var(--s-5); }
.hub-footer__nav { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); }
.hub-footer__nav a { color: var(--accent-light); text-decoration: none; font-size: 15px; }
.hub-footer__nav a:hover { text-decoration: underline; }
.hub-footer__legal { color: #8C8983; font-size: var(--t-small); line-height: 1.6; max-width: 600px; }
.hub-footer hr { border: 0; border-top: 1px solid rgba(244,241,234,0.12); margin: var(--s-6) 0 var(--s-5); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .hub-nav__inner { gap: var(--s-3); }
  .hub-nav__links {
    gap: var(--s-4); overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .hub-nav__links::-webkit-scrollbar { display: none; }
}
