@layer base, layout, components, utilities;

/* ==========================================================================
   FBK ForBikers — folha de estilo única
   ========================================================================== */

@layer base {
  :root {
    /* Cor */
    --brand: #00b7ff;          /* ciano do logo oficial — uso gráfico */
    --brand-ink: #0071bc;      /* azul acessível para texto e botões */
    --brand-deep: #005a95;
    --brand-wash: #eaf5ff;
    --ink: #0f1b26;
    --ink-soft: #4a5c6b;
    --line: #e2e9f0;
    --bg: #ffffff;
    --bg-soft: #f3f8fc;
    --navy: #0b1826;
    --navy-soft: #16283a;

    /* Tipografia — mesmas famílias do vilicoekyncilor.com.br:
       Inter para leitura, Kanit para títulos e elementos de interface. */
    --font: "Inter", Arial, sans-serif;
    --font-head: "Kanit", Arial, sans-serif;
    --t-body: clamp(1rem, 0.97rem + 0.18vw, 1.075rem);
    --t-lead: clamp(1.075rem, 1rem + 0.4vw, 1.3rem);
    --t-h1: clamp(2rem, 1.5rem + 2.3vw, 3.15rem);
    --t-h2: clamp(1.5rem, 1.3rem + 0.95vw, 2.1rem);
    --t-h3: clamp(1.15rem, 1.09rem + 0.3vw, 1.35rem);
    --t-small: 0.875rem;

    /* Espaço */
    --gap: clamp(1rem, 0.6rem + 1.4vw, 1.75rem);
    --block: clamp(3rem, 2rem + 4vw, 5.5rem);
    --radius: 14px;
    --radius-sm: 8px;
    --header-h: 72px;       /* altura real do .site-header__bar — usada por sticky e âncoras */
    --shadow: 0 1px 2px rgba(15, 27, 38, 0.04), 0 8px 24px rgba(15, 27, 38, 0.06);

    --prose: 68ch;

    --icon-external: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><path d="M2.4 1h6.1a.5.5 0 0 1 .5.5v6.1H7.5V3.4L2.3 8.6 1.4 7.7l5.2-5.2H2.4z"/></svg>');
  }

  *, *::before, *::after { box-sizing: border-box; }

  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    color-scheme: light;
    /* cabeçalho sticky não pode cobrir o alvo de âncoras nem do "pular para o conteúdo" */
    scroll-padding-top: calc(var(--header-h) + 1rem);
  }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: var(--t-body);
    line-height: 1.65;
  }

  /* Kanit já é uma família estreita e fechada: o tracking negativo que servia
     à Segoe UI a deixaria apertada demais. */
  h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.15;
    letter-spacing: normal;
    font-weight: 700;
    margin: 0;
    text-wrap: balance;
  }

  h1 { font-size: var(--t-h1); }
  h2 { font-size: var(--t-h2); }
  h3 { font-size: var(--t-h3); }

  /* rede de segurança para URLs e palavras longas — só quebra quando não couber */
  p, li, dd, h1, h2, h3, h4, figcaption { overflow-wrap: break-word; }

  p, ul, ol, table, figure { margin: 0 0 1.15em; }
  ul, ol { padding-inline-start: 1.35em; }
  li { margin-bottom: 0.45em; }
  li::marker { color: var(--brand-ink); }

  a { color: var(--brand-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
  a:hover { color: var(--brand-deep); }

  strong { font-weight: 600; }

  img, svg { max-width: 100%; height: auto; }

  :focus-visible {
    outline: 3px solid var(--brand-ink);
    outline-offset: 3px;
    border-radius: 4px;
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}

@layer layout {
  .wrap {
    width: min(100% - 2.25rem, 1200px);
    margin-inline: auto;
  }

  .section { padding-block: var(--block); }
  .section--soft { background: var(--bg-soft); }
  .section--tight { padding-block: clamp(2rem, 1.4rem + 2.5vw, 3.5rem); }

  .skip {
    position: absolute;
    inset-inline-start: 0.75rem;
    inset-block-start: -6rem;
    z-index: 100;
    background: var(--ink);
    color: #fff;
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: inset-block-start 0.15s ease;
  }
  .skip:focus { inset-block-start: 0.75rem; color: #fff; }
}

/* ==========================================================================
   Componentes
   ========================================================================== */

@layer components {

  /* --- Cabeçalho e navegação ------------------------------------------- */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }

  .site-header__bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: var(--header-h);
    padding-block: 0.65rem;
  }

  .brand { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 44px; }
  /* nunca deixa a marca empurrar o botão Menu para fora em 320px */
  .brand img { display: block; width: clamp(108px, 32vw, 135px); height: auto; }

  .nav { margin-inline-start: auto; }
  .nav > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0 0.85rem;
    font-family: var(--font-head);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    color: var(--ink);
  }
  .nav > summary::-webkit-details-marker { display: none; }
  .nav > summary .bars { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
  .nav > summary .bars::before,
  .nav > summary .bars::after {
    content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
  }
  .nav > summary .bars::before { top: -6px; }
  .nav > summary .bars::after { top: 6px; }
  .nav[open] > summary .bars { background: transparent; }
  .nav[open] > summary .bars::before { top: 0; transform: rotate(45deg); }
  .nav[open] > summary .bars::after { top: 0; transform: rotate(-45deg); }

  .nav__panel {
    position: absolute;
    inset-inline: 0;
    background: #fff;
    border-block-end: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.75rem 1.125rem 1.25rem;
    /* menu longo (Guias aberto) em tela baixa/paisagem precisa rolar dentro de si */
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
  .nav__list a,
  .nav__group > summary {
    display: block;
    padding: 0.7rem 0.5rem;
    min-height: 44px;
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
  }
  .nav__list a:hover,
  .nav__group > summary:hover { background: var(--brand-wash); color: var(--brand-deep); }
  .nav__list a[aria-current="page"] { color: var(--brand-ink); }

  .nav__group > summary { list-style: none; display: flex; align-items: center; gap: 0.4rem; }
  .nav__group > summary::-webkit-details-marker { display: none; }
  .nav__group > summary::after {
    content: "";
    width: 0.45em; height: 0.45em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
  }
  .nav__group[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

  .nav__sub {
    list-style: none;
    margin: 0.15rem 0 0.5rem;
    padding: 0 0 0 0.75rem;
    border-inline-start: 2px solid var(--line);
    display: grid;
    gap: 0.1rem;
  }
  .nav__sub a { font-weight: 500; font-size: 0.97rem; }

  @media (min-width: 62rem) {
    .nav > summary { display: none; }
    .nav__panel {
      position: static;
      border: 0;
      box-shadow: none;
      padding: 0;
      background: transparent;
      display: block !important;
    }
    .nav__list { grid-auto-flow: column; align-items: center; gap: 0.25rem; }
    .nav__list a,
    .nav__group > summary { padding: 0.55rem 0.7rem; font-size: 0.975rem; }
    .nav__list a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brand); }

    .nav__group { position: relative; }
    /* "Guias" fica sempre na metade direita do cabeçalho: o painel cresce para a
       esquerda, senão os rótulos longos saem da viewport entre 992px e ~1120px. */
    .nav__sub {
      position: absolute;
      top: calc(100% + 0.35rem);
      inset-inline-start: auto;
      inset-inline-end: 0;
      z-index: 60;
      width: max-content;
      max-width: min(30rem, calc(100vw - 2.25rem));
      background: #fff;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 0.5rem;
      margin: 0;
    }
    .nav__sub a { padding: 0.5rem 0.7rem; }
  }

  /* --- Botões ----------------------------------------------------------- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.6rem 1.35rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  .btn--primary { background: var(--brand-ink); color: #fff; }
  .btn--primary:hover { background: var(--brand-deep); color: #fff; }
  .btn--ghost { background: #fff; color: var(--brand-ink); border-color: var(--line); }
  .btn--ghost:hover { border-color: var(--brand-ink); color: var(--brand-deep); }
  .btn .arrow { flex: 0 0 auto; }

  /* Micro-rótulos e chamadas: mesma família dos títulos, como no site irmão. */
  .eyebrow, .kicker, .cb-note__tag, .card__tag, .card__link, .notfound .code {
    font-family: var(--font-head);
  }

  /* --- Hero ------------------------------------------------------------- */
  .hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
    background:
      radial-gradient(120% 90% at 88% 0%, var(--brand-wash) 0%, transparent 62%),
      var(--bg);
  }
  /* A coluna precisa ser explícita. Com a trilha implícita `auto`, o mínimo da
     coluna vira o min-content do conteúdo — e o `min(100%, …)` de .hero__facts
     não resolve a porcentagem em contexto indefinido, forçando 2 colunas e
     estourando a viewport no celular. */
  .hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2rem, 1rem + 4vw, 3.5rem);
    align-items: center;
  }
  @media (min-width: 60rem) {
    .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  }
  .eyebrow {
    display: block;
    font-size: var(--t-small);
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--brand-ink);
    margin-bottom: 0.9rem;
  }
  .hero h1 { margin-bottom: 1rem; }
  .hero h1 .accent { color: var(--brand-ink); }
  .hero__lead { font-size: var(--t-lead); color: var(--ink-soft); max-width: 46ch; margin-bottom: 1.75rem; }
  .hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 2.25rem; }

  .hero__facts {
    display: grid;
    gap: 1.1rem 1.75rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
    max-width: 42rem;
  }
  .hero__facts li { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
  .hero__facts strong { display: block; color: var(--ink); font-weight: 600; }
  .hero__facts svg { flex: 0 0 auto; color: var(--brand-ink); }

  .hero__art { position: relative; }
  .hero__art svg { display: block; width: 100%; height: auto; }

  /* --- Cabeçalho de página interna -------------------------------------- */
  .page-head {
    padding-block: clamp(1.75rem, 1rem + 3vw, 3.25rem) clamp(1.25rem, 1rem + 1.5vw, 2rem);
    background:
      radial-gradient(90% 120% at 100% 0%, var(--brand-wash) 0%, transparent 60%),
      var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .page-head h1 { max-width: 20ch; margin-bottom: 0.85rem; }
  .page-head .lead { font-size: var(--t-lead); color: var(--ink-soft); max-width: var(--prose); margin: 0; }
  .page-head .kicker {
    display: inline-block;
    font-size: var(--t-small);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-ink);
    margin-bottom: 0.75rem;
  }

  /* --- Breadcrumb ------------------------------------------------------- */
  .crumbs { padding-block: 0.9rem; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
  .crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; list-style: none; margin: 0; padding: 0; font-size: var(--t-small); }
  .crumbs li { display: flex; align-items: center; gap: 0.5rem; margin: 0; color: var(--ink-soft); }
  .crumbs li + li::before { content: "›"; color: var(--brand-ink); }
  /* alvo de toque mínimo (WCAG 2.5.8) sem engordar a faixa */
  .crumbs a { color: var(--ink-soft); text-decoration: none; display: inline-block; padding-block: 0.28rem; }
  .crumbs a:hover { color: var(--brand-ink); text-decoration: underline; }
  .crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

  /* --- Corpo editorial -------------------------------------------------- */
  .prose { max-width: var(--prose); min-width: 0; }
  .prose > section { margin-bottom: clamp(2rem, 1.4rem + 1.6vw, 3rem); }
  .prose h2 { margin-bottom: 0.8rem; padding-top: 0.35rem; }
  .prose h2::before {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    background: var(--brand);
    border-radius: 2px;
    margin-bottom: 1.1rem;
  }
  .prose h3 { margin: 1.9rem 0 0.55rem; }
  .prose ol { counter-reset: step; list-style: none; padding-inline-start: 0; }
  .prose ol > li {
    counter-increment: step;
    position: relative;
    padding-inline-start: 2.5rem;
    margin-bottom: 0.7rem;
  }
  .prose ol > li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    top: 0.05em;
    width: 1.75rem;
    height: 1.75rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-wash);
    color: var(--brand-deep);
    font-size: 0.85rem;
    font-weight: 700;
  }
  .prose ul > li { padding-inline-start: 0.25rem; }

  .page-body {
    padding-block: var(--block);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  }
  .page-body > * { min-width: 0; }
  @media (min-width: 64rem) {
    .page-body { grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
    .page-body > .prose { justify-self: start; }
  }

  /* --- Tabela ----------------------------------------------------------- */
  .table-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    /* sombra de borda indicando que ainda há conteúdo para o lado */
    background:
      linear-gradient(to right, var(--bg) 30%, rgba(255, 255, 255, 0)) left / 2.5rem 100% no-repeat,
      linear-gradient(to left, var(--bg) 30%, rgba(255, 255, 255, 0)) right / 2.5rem 100% no-repeat,
      radial-gradient(farthest-side at 0 50%, rgba(15, 27, 38, 0.12), transparent) left / 0.75rem 100% no-repeat,
      radial-gradient(farthest-side at 100% 50%, rgba(15, 27, 38, 0.12), transparent) right / 0.75rem 100% no-repeat;
    background-attachment: local, local, scroll, scroll;
  }
  .table-scroll:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 2px; }
  table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: 0.95rem; margin: 0; }
  th, td { text-align: start; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
  thead th { background: var(--bg-soft); font-weight: 600; white-space: nowrap; }
  /* célula com texto longo não pode empurrar a tabela indefinidamente */
  td, tbody th { overflow-wrap: break-word; }
  tbody tr:last-child td { border-bottom: 0; }
  tbody th { font-weight: 600; }

  /* --- Bloco Ciclo Busca ------------------------------------------------ */
  .cb-note {
    border: 1px solid var(--line);
    border-inline-start: 4px solid var(--brand);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: clamp(1.1rem, 0.9rem + 0.7vw, 1.6rem);
    margin-bottom: 1.5rem;
  }
  .cb-note__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-deep);
    margin-bottom: 0.6rem;
  }
  .cb-note p:last-child { margin-bottom: 0; }
  .cb-note p + p { color: var(--ink-soft); font-size: 0.95rem; }

  /* Indicador discreto de link externo. Não se aplica a botões. */
  a[target="_blank"]:not(.btn)::after {
    content: "";
    display: inline-block;
    width: 0.58em;
    height: 0.58em;
    margin-inline-start: 0.22em;
    vertical-align: 0.02em;
    background-color: currentColor;
    -webkit-mask: var(--icon-external) no-repeat center / contain;
    mask: var(--icon-external) no-repeat center / contain;
  }

  /* --- FAQ -------------------------------------------------------------- */
  .faq h3 {
    margin: 0;
    padding: 1.15rem 0 0.4rem;
    border-top: 1px solid var(--line);
  }
  .faq h3:first-of-type { border-top: 0; padding-top: 0; }
  .faq p { color: var(--ink-soft); }

  /* --- Cards ------------------------------------------------------------ */
  .cards {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
    margin: 0;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  }
  /* Em touch o :hover "gruda" depois do toque — o realce só faz sentido com mouse. */
  @media (hover: hover) {
    .card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
    .card:hover .card__link::after { transform: translateX(3px); }
  }
  /* teclado: o card inteiro reage ao foco do link real */
  .card:focus-within { border-color: var(--brand); box-shadow: var(--shadow); }
  .card__icon { color: var(--brand-ink); margin-bottom: 0.35rem; }
  .card h3 { font-size: 1.15rem; }
  .card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
  .card__link {
    margin-top: auto;
    padding-top: 0.9rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
  .card__link::after { content: "→"; transition: transform 0.15s ease; }
  /* card inteiro clicável, preservando o link real como alvo de teclado */
  .card__link::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
  /* O outline pertence ao card, não à linha de texto do link. Sem :has() o foco
     padrão continua valendo — nunca removemos o indicador sem substituto. */
  @supports selector(:has(*)) {
    .card__link:focus-visible { outline: none; }
    .card:has(.card__link:focus-visible) { outline: 3px solid var(--brand-ink); outline-offset: 3px; }
  }

  .card--guide .card__tag {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-deep);
    background: var(--brand-wash);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
  }

  /* --- Cabeçalho de seção ----------------------------------------------- */
  .section-head { max-width: 46ch; margin-bottom: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); }
  .section-head p { color: var(--ink-soft); margin-bottom: 0; margin-top: 0.75rem; }

  /* --- Faixa Ciclo Busca (home) ----------------------------------------- */
  .cb-band {
    background: var(--navy);
    color: #e8f1f8;
    border-radius: var(--radius);
    padding: clamp(1.75rem, 1.2rem + 2.5vw, 3rem);
    display: grid;
    gap: clamp(1.25rem, 1rem + 1.5vw, 2.5rem);
    position: relative;
    overflow: hidden;
  }
  @media (min-width: 55rem) {
    .cb-band { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
  }
  .cb-band h2 { color: #fff; margin-bottom: 0.9rem; }
  .cb-band p { color: #b9cddc; margin-bottom: 0; }
  .cb-band p + p { margin-top: 0.9rem; font-size: 0.95rem; }
  .cb-band a { color: #8fd6ff; }
  .cb-band a:hover { color: #fff; }
  .cb-band .btn--primary { color: #04202f; }
  .cb-band .btn--primary { background: var(--brand); color: #04202f; }
  .cb-band .btn--primary:hover { background: #56c4ff; color: #04202f; }
  .cb-band__cta { display: flex; }

  /* --- Bloco lateral ---------------------------------------------------- */
  .aside-box {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.35rem;
    background: var(--bg-soft);
  }
  .aside-box h2 { font-size: 1.05rem; margin-bottom: 0.85rem; }
  .aside-box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.15rem; }
  .aside-box li { margin: 0; }
  .aside-box a {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
  }
  .aside-box li:last-child a { border-bottom: 0; }
  .aside-box a:hover { text-decoration: underline; }
  @media (min-width: 64rem) {
    .aside-box {
      position: sticky;
      top: calc(var(--header-h) + 1.5rem);
      max-height: calc(100dvh - var(--header-h) - 3rem);
      overflow-y: auto;
    }
  }

  /* --- Rodapé ----------------------------------------------------------- */
  .site-footer {
    background: var(--navy);
    color: #b9cddc;
    padding-block: clamp(2.5rem, 2rem + 3vw, 4rem) 2rem;
    font-size: 0.95rem;
  }
  .site-footer__grid {
    display: grid;
    gap: clamp(1.75rem, 1.2rem + 2.5vw, 3rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  }
  .site-footer img { width: 135px; }
  .site-footer h2 {
    font-size: 0.78rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #7f9bb1;
    margin-bottom: 1rem;
    font-weight: 700;
  }
  .site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
  .site-footer li { margin: 0; }
  .site-footer a { color: #dcebf6; text-decoration: none; display: inline-block; padding-block: 0.25rem; }
  .site-footer a:hover { color: #fff; text-decoration: underline; }
  .site-footer__intro p { margin-top: 1.1rem; max-width: 34ch; color: #92aec5; }
  .site-footer__base {
    margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: space-between;
    color: #7f9bb1;
    font-size: 0.85rem;
  }
  .site-footer__base p { margin: 0; }

  /* --- 404 -------------------------------------------------------------- */
  .notfound { text-align: center; padding-block: clamp(4rem, 3rem + 6vw, 8rem); }
  /* decorativo (aria-hidden), mas em var(--brand-wash) ficava invisível (1.1:1) */
  .notfound .code {
    font-size: clamp(4rem, 3rem + 8vw, 8rem);
    font-weight: 700;
    line-height: 1;
    color: #cfe6fa;
    color: color-mix(in srgb, var(--brand-ink) 22%, #fff);
  }
  .notfound h1 { margin: 0.5rem 0 1rem; }
  .notfound p { max-width: 46ch; margin-inline: auto; color: var(--ink-soft); }
  .notfound .hero__actions { justify-content: center; margin-top: 1.75rem; }
}

@layer utilities {
  .visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .stack-lg > * + * { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
}
