/* ==========================================================================
   shell.css — the shared top bar, footer and closing CTA (ADR-045).

   Every class is .sh-* and every custom property is --sh-*, on purpose: the
   homepage's inline <style>, legal.css and education.css each still define
   their own .nav/.footer rules and their own :root tokens, and this file has
   to sit beside them without either side winning by accident. A page that
   adopts the shell deletes its old nav/footer rules in the same change.

   Markup is duplicated by hand across pages (no templates, ADR-002), so the
   nav/footer blocks must stay byte-identical apart from the page's own
   aria-current and its one CTA slot. Copy the block from solutions.html.
   ========================================================================== */

:root {
  --sh-void: #0A0A0A;
  --sh-surface: #141414;
  --sh-surface-2: #1B1B1C;
  --sh-line: #2A2A2E;
  --sh-line-soft: rgb(245 245 240 / .08);
  --sh-muted: #84848C;   /* 4.97:1 on --sh-surface; #7C7C84 was 4.45:1 */
  --sh-slate: #9A9AA0;
  --sh-signal: #F5F5F0;
  --sh-paper: #EAEAE5;
  --sh-ink: #0F0F10;
  --sh-ember-rgb: 201 107 46;
  --sh-display: 'Outfit', system-ui, sans-serif;
  --sh-body: 'DM Sans', system-ui, sans-serif;
  --sh-mono: 'JetBrains Mono', ui-monospace, monospace;
  --sh-accent: 'Fraunces', Georgia, serif;
  --sh-ease: cubic-bezier(.2, .7, .2, 1);
  /* One number drives the bar's height, anchor landings and any sticky
     block a page pins under it. */
  --sh-nav-h: 64px;
  --sh-nav-top: 14px;
}

html { scroll-padding-top: calc(var(--sh-nav-h) + var(--sh-nav-top) + 20px); }

/* Skip link: first focusable thing on the page. */
.sh-skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--sh-signal); color: var(--sh-ink);
  padding: 12px 18px; border-radius: 999px; text-decoration: none;
  font: 500 12px/1 var(--sh-mono); letter-spacing: .12em; text-transform: uppercase;
  transition: top .2s;
}
.sh-skip:focus { top: 14px; }

/* ---------- top bar ---------- */
.sh-head {
  position: fixed; z-index: 100;
  top: calc(var(--sh-nav-top) + env(safe-area-inset-top, 0px));
  left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
}
.sh-nav {
  pointer-events: auto;
  width: min(1120px, 100%); min-height: var(--sh-nav-h);
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px 8px 20px;
  color: var(--sh-signal);
  background: rgb(20 20 20 / .78);
  border: 1px solid var(--sh-line); border-radius: 999px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: background .3s, border-color .3s;
}
.sh-head.is-scrolled .sh-nav { background: rgb(12 12 12 / .9); border-color: rgb(245 245 240 / .14); }

.sh-brand { display: flex; align-items: center; margin-right: auto; flex: none; }
.sh-brand img { display: block; width: 125px; height: 40px; }

.sh-links { list-style: none; margin: 0 10px 0 auto; padding: 0; display: flex; gap: 2px; align-items: center; }
.sh-links a {
  display: block; padding: 12px 16px; border-radius: 999px; text-decoration: none;
  font: 500 11.5px/1 var(--sh-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--sh-slate); transition: color .25s, background .25s;
}
.sh-links a:hover { color: var(--sh-signal); }
.sh-links a[aria-current="page"] { background: #1F1F21; color: var(--sh-signal); }

/* The nav's CTA is the one ember element (ADR-026's standing exception). */
.sh-cta {
  flex: none; white-space: nowrap; text-decoration: none; color: #fff;
  padding: 14px 20px; border-radius: 999px;
  font: 500 11.5px/1 var(--sh-mono); letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(180deg, #D6783A, #B85820);
  box-shadow: 0 0 0 1px rgb(var(--sh-ember-rgb) / .5), 0 8px 28px rgb(var(--sh-ember-rgb) / .28);
  transition: transform .25s, box-shadow .25s;
}
.sh-cta:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgb(var(--sh-ember-rgb) / .7), 0 12px 34px rgb(var(--sh-ember-rgb) / .4); }
.sh-cta .sh-short { display: none; }
/* Ring glyph closes the primary actions; it replaces the arrow in copy. Fills on
   hover with currentColor, never ember (ADR-026). */
.sh-btn-primary::after, .sh-cta::after { content: ""; display: inline-block; box-sizing: border-box; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; vertical-align: middle; transition: background .25s; }
.sh-btn-primary::after { align-self: center; }
.sh-cta::after { margin-left: 10px; }
.sh-btn-primary:hover::after, .sh-btn-primary:focus-visible::after, .sh-cta:hover::after, .sh-cta:focus-visible::after { background: currentColor; }

.sh-burger {
  display: none; flex: none; position: relative;
  width: 44px; height: 44px; margin-left: 6px; border-radius: 50%;
  background: transparent; color: var(--sh-signal); border: 1px solid var(--sh-line); cursor: pointer;
}
.sh-burger i { position: absolute; left: 14px; right: 14px; height: 1.5px; background: currentColor; transition: transform .3s, top .3s; }
.sh-burger i:nth-child(1) { top: 17px; }
.sh-burger i:nth-child(2) { top: 25px; }
.sh-nav.is-open .sh-burger i:nth-child(1) { top: 21px; transform: rotate(45deg); }
.sh-nav.is-open .sh-burger i:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.sh-panel { display: none; }

.sh-skip:focus-visible, .sh-brand:focus-visible, .sh-links a:focus-visible,
.sh-cta:focus-visible, .sh-burger:focus-visible, .sh-btn:focus-visible,
.sh-foot a:focus-visible, .sh-panel a:focus-visible {
  outline: 2px solid var(--sh-signal); outline-offset: 3px;
}

/* Below 980px the links leave the bar and a burger opens them (html.sh-js).
   Without JS the panel stays closed — the footer's «Navegar» column is the
   no-JS navigation, and an always-open panel would sit over the page. */
@media (max-width: 979px) {
  .sh-links { display: none; }
  .sh-panel {
    pointer-events: auto; display: none; gap: 2px; width: min(1120px, 100%); margin-top: 8px; padding: 10px;
    background: rgb(14 14 14 / .96); border: 1px solid var(--sh-line); border-radius: 24px;
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  }
  .sh-panel a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px; border-radius: 16px; text-decoration: none;
    font: 300 26px/1 var(--sh-display); color: var(--sh-slate);
  }
  .sh-panel a[aria-current="page"] { color: var(--sh-signal); background: #1A1A1B; }
  .sh-js .sh-burger { display: block; }
  .sh-js .sh-nav.is-open + .sh-panel { display: grid; }
  .sh-cta { padding: 13px 16px; }
}
@media (max-width: 639px) {
  .sh-cta .sh-long { display: none; }
  .sh-cta .sh-short { display: inline; }
  .sh-cta::after { display: none; }
  .sh-nav { padding-left: 16px; }
  .sh-brand img { width: 112px; height: 36px; }
}

/* Scroll lock while the menu is open. Put on <html>, never <body>: a body
   overflow change re-roots scrolling and breaks position:sticky sections. */
html.sh-lock { overflow: hidden; scrollbar-gutter: stable; }

/* ---------- shared closing CTA ---------- */
.sh-final { padding: clamp(72px, 10vw, 128px) 0; display: grid; gap: 26px; }
.sh-final .sh-eyebrow { color: var(--sh-muted); }
.sh-final h2 {
  margin: 0; max-width: 16ch; text-wrap: balance;
  font: 300 clamp(34px, 6vw, 72px)/1.02 var(--sh-display); letter-spacing: -.025em;
}
.sh-final h2 em { font: italic 300 1em/1 var(--sh-accent); color: var(--sh-paper); }
.sh-final p { margin: 0; max-width: 50ch; color: var(--sh-slate); }
.sh-eyebrow { font: 500 11px/1.4 var(--sh-mono); letter-spacing: .14em; text-transform: uppercase; }
.sh-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.sh-btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 17px 24px; border-radius: 999px;
  font: 500 12px/1 var(--sh-mono); letter-spacing: .14em; text-transform: uppercase;
  transition: transform .25s, background .25s, border-color .25s;
}
/* Action is neutral (ADR-026): brightest neutral on the ground, ember never. */
.sh-btn-primary { background: var(--sh-signal); color: var(--sh-ink); }
.sh-btn-primary:hover { transform: translateY(-1px); background: #fff; }
.sh-btn-ghost { color: var(--sh-signal); border: 1px solid var(--sh-line); }
.sh-btn-ghost:hover { border-color: var(--sh-slate); }

/* ---------- footer ---------- */
.sh-foot { border-top: 1px solid var(--sh-line); padding: 56px 0 28px; color: var(--sh-slate); font-size: 14px; }
.sh-foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.sh-foot h2 { margin: 0 0 16px; font: 500 11px/1 var(--sh-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--sh-muted); }
.sh-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sh-foot a { color: inherit; text-decoration: none; }
.sh-foot a:hover { color: var(--sh-signal); }
.sh-foot-brand img { display: block; width: 150px; height: 48px; }
.sh-foot-brand p { margin: 18px 0 0; max-width: 32ch; line-height: 1.55; }
.sh-foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--sh-line-soft);
  font: 400 11px/1.5 var(--sh-mono); letter-spacing: .06em; color: var(--sh-muted);
}
@media (max-width: 820px) {
  .sh-foot-grid { grid-template-columns: 1fr 1fr; }
  .sh-foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 420px) { .sh-foot-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .sh-nav, .sh-cta, .sh-btn, .sh-burger i, .sh-links a, .sh-skip, .sh-btn-primary::after, .sh-cta::after { transition: none; }
}
