/* The footer, in the dark theme: the wordmark, two short menus, the year and the way back up. */
@layer widgets {
  .site-footer {
    background: var(--color-dark);
    padding: var(--space-16) 0 var(--space-7);
  }
  .footer-layout {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-10);
    align-items: start;
  }
  .footer-layout nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
  }
  .footer-layout nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: var(--text-sm);
    color: var(--color-light-soft);
  }
  .footer-layout nav a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
  }
  .footer-bottom {
    margin-top: var(--space-18);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-line);
    display: flex;
    justify-content: space-between;
    gap: var(--space-6);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
  }
  .footer-bottom span a {
    margin-inline-start: var(--space-6);
  }
  .footer-bottom span a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
  }
  /* The site's languages: their names in their own words, the one on screen underlined. */
  .footer-bottom .languages {
    display: flex;
    gap: var(--space-6);
  }
  .footer-bottom .languages a:hover,
  .footer-bottom .languages [aria-current] {
    text-decoration: underline;
    text-underline-offset: 5px;
  }
  /* The way back up: its arrow drawn as the hero button's, General Sans has none. */
  .footer-bottom .top {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
  }
  .footer-bottom .top svg {
    width: 14px;
    height: 14px;
  }

  @media (max-width: 760px) {
    .footer-layout {
      grid-template-columns: 1fr 1fr;
    }
    .footer-layout > .brand {
      grid-column: 1/-1;
    }
    /* On a phone the company's name keeps a line of its own, the two pages go under it and the way back up under
       them: side by side they broke the name. */
    .footer-bottom {
      margin-top: var(--space-10);
      flex-direction: column;
    }
    .footer-bottom .year {
      display: block;
      margin-bottom: var(--space-2);
    }
    .footer-bottom span a:first-of-type {
      margin-inline-start: 0;
    }
  }
}
/* The header: the wordmark, the menu and the main button; on a phone the menu folds into one line and the button
   stays beside it, unless the first screen has a buy button of its own. Over a dark first screen it lies on the
   picture and takes the hero's light roles; its folded menu stays dark. */
@layer widgets {
  .site-header {
    position: relative;
    z-index: var(--z-header);
    padding: var(--space-5) 0;
  }
  .site-header.over {
    position: absolute;
    inset: 0 0 auto;
  }
  .bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-7);
  }
  .site-nav {
    display: flex;
    gap: var(--space-8);
    align-items: center;
  }
  .site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: var(--text-sm);
  }
  .site-nav a:hover,
  .site-nav [aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 6px;
  }
  .mobile-nav {
    display: none;
  }

  @media (max-width: 980px) {
    .site-nav {
      gap: var(--space-5);
    }
  }

  @media (max-width: 760px) {
    .site-header {
      padding: var(--space-4) 0;
    }
    .bar {
      gap: var(--space-4);
    }
    .desktop-nav,
    .hero-cta .header-cta {
      display: none;
    }
    .header-cta {
      margin-inline-start: auto;
      white-space: nowrap;
    }
    /* Over a picture the small button is dark with a light edge: a light one vanishes on the picture's light. */
    .over .header-cta {
      --color-action: var(--color-dark);
      --color-action-edge: var(--color-light-edge);
      --color-on-action: var(--color-light);
      --color-action-hover: var(--color-deep);
      --color-action-hover-edge: var(--color-light);
      --color-on-action-hover: var(--color-light);
    }
    .mobile-nav {
      display: block;
    }
    .mobile-nav summary {
      list-style: none;
      display: flex;
      align-items: center;
      gap: var(--space-4);
      min-height: 44px;
      font-size: var(--text-sm);
    }
    .mobile-nav summary::-webkit-details-marker {
      display: none;
    }
    .mobile-nav summary::after {
      content: "+";
      font-size: var(--text-2xl);
    }
    .mobile-nav[open] summary::after {
      content: "−";
    }
    .mobile-nav .site-nav {
      position: absolute;
      inset: 74px 0 auto;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      padding: var(--space-5) var(--space-6);
      background: var(--color-bg);
      color: var(--color-text);
      box-shadow: var(--shadow-menu);
    }
    .mobile-nav .site-nav a {
      font-size: var(--text-lg);
      min-height: 48px;
    }
    .site-header.over .mobile-nav .site-nav {
      color: var(--color-light);
      background: var(--color-dark);
      box-shadow: var(--shadow-menu-dark);
    }
  }

  /* The narrowest phones: the wordmark, the button and the menu still fit one line. */
  @media (max-width: 380px) {
    .bar {
      gap: var(--space-3);
    }
    .header-cta.pill {
      padding: 0 var(--space-3);
    }
  }
}
