@layer layout {

  body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .wrap {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  .section { padding-block: var(--space-section) }

  .bg-alt { background: var(--papel-2) }

  .section-head { max-width: 38em; margin-bottom: 3rem }
  .section-head p {
    margin-top: 1rem;
    color: var(--ink-78);
    font-size: 1.05rem;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--rio-negro-92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--papel-20);
    --accent-text: var(--areia);
  }

  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
  }
  .nav-links a {
    color: var(--papel-70);
    text-decoration: none;
    font-size: var(--size-sm);
    font-weight: 500;
    transition: color var(--transition);
  }
  .nav-links a:hover { color: var(--papel) }

  @media (max-width: 760px) {
    .nav-links li:not(:last-child) { display: none }
  }

  footer {
    background: var(--rio-negro);
    color: var(--papel-70);
    border-top: 1px solid var(--papel-20);
    padding: 40px 0 48px;
    font-size: var(--size-xs);
    --accent-text: var(--areia);

    margin-top: auto;
  }

  .foot {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
  }

  .foot nav { display: flex; flex-wrap: wrap; gap: 20px }
  .foot a { color: var(--papel-70) }
  .foot a:hover { color: var(--papel) }

  .foot nav a {
    text-decoration: none;
    background-image: linear-gradient(var(--areia), var(--areia));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    padding-bottom: 2px;
    transition: color var(--transition), background-size var(--transition) ease-out;
  }
  .foot nav a:hover { background-size: 100% 1px }

  .foot .legal {

    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: .78rem;
    margin-left: auto;
  }

  @media (max-width: 760px) {
    .foot .legal { margin-left: 0 }
  }
}
