/* What surrounds the content: the header, the footer and the phone's floating bottom bar. */

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-h);
}
.logo { justify-self: start; display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.logo img { flex: none; width: 30px; height: 30px; border-radius: 8px; }
.site-nav { display: flex; gap: 34px; font-size: 15px; color: var(--soft); }
.site-nav a { transition: color 0.18s; }
.site-nav a:hover { color: var(--ink); }
.site-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; font-size: 15px; }
.site-actions__link { color: var(--soft); white-space: nowrap; }
.site-actions__link:hover { color: var(--ink); }

.language-switch { display: inline-flex; gap: 2px; font-size: 13px; font-weight: 500; color: var(--muted); }
.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  transition: background-color 0.18s, color 0.18s;
}
.language-switch a:hover { color: var(--ink); }
.language-switch a[aria-current] { background: var(--surface-2); color: var(--ink); }

.site-footer { padding-block: 60px calc(30px + var(--bottom-bar-room)); border-top: 1px solid var(--dark-line); background: var(--dark); color: var(--bg); overflow: hidden; }
.site-footer__columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
.site-footer__columns h2 { margin-bottom: 11px; font-size: 21px; }
.site-footer__columns a { display: block; padding-block: 3px; font-size: 14.5px; line-height: 1.6; color: var(--dark-muted); }
.site-footer a:hover { color: var(--bg); }
.site-footer__wordmark {
  margin-top: 26px;
  font-family: var(--serif);
  font-size: clamp(76px, 20.5vw, 330px);
  line-height: 0.98;
  letter-spacing: -0.012em;
  text-align: center;
  white-space: nowrap;
}
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--dark-muted);
}
.site-footer .language-switch { color: var(--dark-muted); }
.site-footer .language-switch a[aria-current] { background: var(--dark-line); color: var(--bg); }

.not-found { display: grid; justify-items: start; gap: 16px; padding-block: 12vh; }
.not-found h1 { font-size: clamp(44px, 6vw, 84px); }
.not-found p { max-width: 520px; font-size: 18px; color: var(--soft); }

.bottom-bar { display: none; }

@media (max-width: 1160px) {
  .site-header { grid-template-columns: auto 1fr; }
  .site-nav { display: none; }
}

@media (max-width: 720px) {
  .site-header { display: flex; justify-content: space-between; min-height: 58px; }
  .logo { font-size: 19px; }
  .site-actions { display: none; }

  .site-footer { padding-block: 40px calc(24px + var(--bottom-bar-room)); }
  .site-footer__columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .site-footer__legal { justify-content: center; text-align: center; }

  .bottom-bar {
    position: fixed;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.28s var(--ease), opacity 0.2s;
  }
  html.sheet-open .bottom-bar { transform: translateY(24px); opacity: 0; pointer-events: none; }

  .bottom-bar__tabs {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    height: 64px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--surface);
  }
  .bottom-bar__tabs a {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    min-width: 44px;
    border-radius: 999px;
  }
  .bottom-bar__tabs a[aria-current='page'] {
    flex: none;
    padding: 0 18px;
    background: var(--surface);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
  }
  .bottom-bar__search {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bordo);
    color: var(--on-bordo);
    transition: transform 0.18s var(--ease);
  }
  .bottom-bar__search:active { transform: scale(0.94); }
}

/* Controls that only work with JavaScript are not offered without it. */
@media (scripting: none) {
  .search-trigger, .bottom-bar__search, .favourite-button, .search .picker, .search .stepper { display: none; }
  .search__fields { grid-template-columns: minmax(0, 1fr) auto; }
  .search-field--text { border-right: 0; }
}
@media (scripting: none) and (max-width: 720px) {
  .search__fields { grid-template-columns: minmax(0, 1fr); }
  .search-field--text { border: 1px solid var(--field); }
}

/* Without JavaScript the sheet cannot open: on a phone the form simply stands in the page. */
@media (max-width: 720px) and (scripting: none) {
  .search {
    position: static;
    height: auto;
    margin-top: 16px;
    padding-top: 14px;
    border-radius: 22px;
    transform: none;
    visibility: visible;
  }
  .search__grip, .search__sheet-title .round-button { display: none; }
  .search__body { overflow: visible; }
  .search__sheet-actions { border-top: 0; background: none; }
}
