/* Gap Hunter Labs -- shared shell CSS (tokens, topbar, footer, small
   prose-page components) for the secondary static pages (methodology,
   contact, security, laboratorio, privacy, terms). Extracted 2026-09-24
   from what was ~15-20KB of byte-identical inline <style> duplicated on
   every one of these pages -- verified identical via diff across all 4
   pre-existing pages before extraction, not eyeballed.

   index.html and catalog/index.html are NOT on this file yet: their
   topbar/footer CSS is a proven superset of this shared block (extra
   rules: scanline animation, live status dot, more footer links) --
   folding those in safely is a separate, larger pass, left for later
   rather than rushed into this one.

   Load BEFORE the page's own inline <style> and before css/shell.css
   (shell.css already documents that it expects :root to exist first --
   this file is now that :root, not the inline block). */

:root {
    --page-max: 1280px;
    --page-pad: 24px;
    --section-gap: 20px;
    --card-pad: 16px;
    --card-pad-sm: 10px;
    --duration-fast: 120ms;
    --duration-base: 150ms;
    --duration-slow: 300ms;
    --ease-standard: cubic-bezier(.65,0,.35,1);
    --ease-emphasized: cubic-bezier(.2,.7,.3,1);
  }

* { box-sizing: border-box; }
  html { scrollbar-color: var(--border) var(--bg); scrollbar-width: thin; }
  body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  a { color: var(--accent); }
  a:hover { color: var(--text); }

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    border-bottom: 1px solid var(--border);
  }
  .topbar-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--page-pad);
    height: 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-width: 0;
  }
  .topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-md);
  }
  .topbar-brand:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .topbar-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
  }
  .topbar-mark svg { width: 32px; height: 32px; display: block; }
  .topbar-wordmark {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
  }
  .tw-name {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.15;
    white-space: nowrap;
  }
  .tw-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
    line-height: 1.2;
  }
  .topbar-nav {
    display: flex;
    align-items: center;
    justify-self: center;
    gap: 0;
    flex: none;
    padding: 3px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .topbar-link {
    display: inline-flex;
    align-items: center;
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-faint);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    cursor: pointer;
  }
  .topbar-link:hover {
    color: var(--text);
    background: var(--surface-2);
  }
  .topbar-link.active {
    color: var(--text);
    background: var(--surface-2);
  }
  .topbar-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .topbar-actions {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
    min-width: 0;
  }
  .topbar-ext {
    display: flex;
    align-items: stretch;
    height: 36px;
    flex: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  .topbar-ext-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-dim);
    text-decoration: none;
    padding: 0 12px;
    border-left: 1px solid var(--border);
    background: transparent;
  }
  .topbar-ext-link:first-child { border-left: 0; }
  .topbar-ext-link:hover {
    color: var(--text);
    background: var(--surface-2);
  }
  .topbar-ext-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    color: var(--text);
  }
  .topbar-ext-link svg { width: 15px; height: 15px; flex: none; }
  .topbar-burger {
    display: none;
    flex: none;
    width: 44px;
    height: auto;
    align-self: stretch;
    border-radius: 0;
    border: 0;
    border-left: 1px solid var(--border);
    background: transparent;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .topbar-burger:hover { background: var(--surface-2); }
  .topbar-burger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }
  .topbar-burger span,
  .topbar-burger::before,
  .topbar-burger::after {
    content: "";
    display: block;
    width: 16px;
    height: 1.85px;
    background: var(--text-dim);
    position: relative;
  }
  .topbar-burger::before { position: absolute; transform: translateY(-5.75px); }
  .topbar-burger::after { position: absolute; transform: translateY(5.75px); }
  .topbar.nav-open .topbar-burger span { opacity: 0; }
  .topbar.nav-open .topbar-burger::before { transform: translateY(0) rotate(45deg); }
  .topbar.nav-open .topbar-burger::after { transform: translateY(0) rotate(-45deg); }

  @media (max-width: 900px) {
    .tw-tag { display: none; }
    .topbar-ext-label { display: none; }
    .topbar-ext { height: 44px; }
    .topbar-ext-link { min-width: 44px; padding: 0 12px; }
  }
  @media (max-width: 840px) {
    .topbar-inner {
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
    }
    .topbar-nav { display: none; }
    .topbar-burger { display: flex; }
    .topbar.nav-open .topbar-nav {
      display: flex;
      position: absolute;
      top: 56px; left: 0; right: 0;
      flex-direction: column;
      align-items: stretch;
      background: var(--bg);
      border-bottom: 1px solid var(--border);
      border-radius: 0;
      padding: 6px;
      gap: 2px;
    }
    .topbar.nav-open .topbar-link { padding: 12px 14px; }
  }

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
  }
.brand-mark svg { width: 19px; height: 19px; }

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--surface);
  }
  .footer-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 36px var(--page-pad) 28px;
  }
  .footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr) minmax(0, 0.9fr);
    gap: 40px 48px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
  }
  .footer-brand { max-width: 400px; }
  .footer-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .footer-brand-name {
    font-weight: 650;
    font-size: 15px;
    letter-spacing: -0.01em;
  }
  .footer-brand-tagline {
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--text-faint);
    margin-top: 2px;
  }
  .footer-brand p {
    margin: 14px 0 0;
    font-size: 13.5px;
    color: var(--text-dim);
    line-height: 1.65;
  }
  .footer-col-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 12px;
  }
  .footer-nav { display: flex; flex-direction: column; gap: 2px; }
  .footer-nav a {
    display: block;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--text-dim);
    text-decoration: none;
    padding: 6px 0;
    border-radius: var(--radius-sm);
    transition: color var(--duration-base) ease;
  }
  .footer-nav a:hover { color: var(--text); }
  .footer-nav a:focus-visible {
    color: var(--text);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .footer-elsewhere { display: flex; flex-direction: column; gap: 2px; }
  .fe-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--text-dim);
    text-decoration: none;
    padding: 6px 0;
    border-radius: var(--radius-sm);
    transition: color var(--duration-base) ease;
  }
  .fe-link svg { width: 15px; height: 15px; flex: none; opacity: 0.85; }
  .fe-link:hover { color: var(--text); }
  .fe-link:hover svg { opacity: 1; }
  .fe-link:focus-visible {
    color: var(--text);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .footer-bottom {
    margin-top: 18px;
    font-family: var(--sans);
    font-size: 12.5px;
    color: var(--text-faint);
    line-height: 1.5;
  }
  .footer-bottom a {
    color: var(--text-dim);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--duration-base) ease;
  }
  .footer-bottom a:hover { color: var(--text); }
  .footer-bottom a:focus-visible {
    color: var(--text);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
  }
  @media (max-width: 760px) {
    .footer-grid {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      grid-template-areas: "brand brand" "nav elsewhere";
      gap: 28px 24px;
    }
    .footer-brand { grid-area: brand; max-width: none; }
    .footer-nav { grid-area: nav; }
    .footer-elsewhere { grid-area: elsewhere; }
  }
  @media (max-width: 640px) {
    .footer-grid {
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas: "brand" "nav" "elsewhere";
    }
  }

.contact-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
  }
.contact-lead {
    margin: 0 0 36px;
    font-size: 17px;
    color: var(--text-dim);
    line-height: 1.65;
  }

.back-link {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    text-decoration: none;
  }
.back-link:hover { text-decoration: underline; }

/* 2026-09-27: respaldo del mailto: en contacto (hire/partnership). */
.cf-fallback { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.cf-fallback p { margin: 0 0 10px; color: var(--text); }
.cf-fallback textarea { width: 100%; box-sizing: border-box; font: 13px/1.5 var(--mono); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 10px; resize: vertical; }
.cf-fallback-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cf-direct { margin: 14px 0 0; color: var(--text-dim); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cf-direct a { color: var(--accent); font-weight: 600; }

/* 2026-09-27: resumen de Engineering & Evidence y migas de pan de sus subpaginas. */
.ee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 8px; }
.ee-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.ee-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.ee-kicker { color: var(--accent); font: 700 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.ee-card strong { font-size: 19px; line-height: 1.3; }
.ee-text { color: var(--text-dim); line-height: 1.6; }
.ee-meta { color: var(--text-faint); font-size: 13px; }
.ee-go { margin-top: auto; padding-top: 8px; color: var(--accent); font-weight: 600; }
.ee-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--text-faint); font-size: 14px; }
.ee-crumbs a { color: var(--accent); text-decoration: none; }
.ee-next { margin-top: 24px; color: var(--text-dim); }
.ee-next a { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .ee-card, .ee-card:hover { transition: none; transform: none; } }

/* .btn -- mismo estilo que home.css y catalog.css. Las paginas que cargan
   base.css (evidencia, metodologia, contacto, legales) no lo tenian, asi
   que el boton "Work with Joel" del topbar y del footer (chrome compartido)
   se veia como un enlace subrayado (2026-10-05). */
.btn {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  padding: 10px 16px; border-radius: var(--radius-md);
  text-decoration: none; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color var(--duration-base) ease, opacity var(--duration-base) ease, transform var(--duration-fast) ease;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:hover { border-color: var(--accent); }
.btn.primary:hover { opacity: 0.9; }
.btn:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: border-color var(--duration-base) ease, opacity var(--duration-base) ease; }
  .btn:active { transform: none; }
}
