/* Page shell: background, header, footer and the notice bar. */

.page {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--page-top), var(--page-bottom));
  overflow-x: clip;
}

.page[aria-busy="true"] {
  cursor: progress;
}

.page__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.page__main {
  flex: 1;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 98px;
  padding-top: 7px;
  border-bottom: 1px solid var(--color-line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand__logo {
  --icon-size: 34px;
  color: var(--color-logo);
}

.brand__name {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1.2;
}

.site-header__tools {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header__tools .search {
  width: 361px;
}

.locate {
  --icon-size: 32px;
  display: grid;
  place-items: center;
  color: var(--color-accent);
  transition: opacity 0.15s;
}

.locate:hover {
  opacity: 0.7;
}

.locate:disabled {
  cursor: progress;
  opacity: 0.4;
}

/* Notice bar for errors */

.notice {
  margin-top: 16px;
  padding: 12px 18px;
  background: var(--color-chip);
  border: 1px solid var(--color-field-line);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
  font-size: 15px;
  line-height: 1.4;
}

/* Footer */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 17px;
  color: var(--color-ink-3);
  font-size: 12px;
  line-height: 1.4;
}

/* Illustration behind the content. Anchored by its bottom edge so images of
   different heights all rest on the same line. */

.scene-art {
  position: absolute;
  z-index: -1;
  top: var(--art-bottom, 516px);
  right: 40px;
  width: min(988px, 68.6%);
  height: auto;
  transform: translateY(-100%);
  pointer-events: none;
}

.scene-art--home {
  --art-bottom: 530px;
  width: min(854px, 59.3%);
}

/* The Weather Scene covers the window. It comes after the illustration in the
   markup, so it paints over it, and under the page content. vw/vh rather than
   inset: 0 keeps its size from changing when a phone's address bar slides away. */

.scene-canvas {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

@media (max-width: 900px) {
  :root {
    --page-gutter: 20px;
  }

  .site-header {
    height: 76px;
  }

  .site-header {
    gap: 12px;
  }

  .site-header__tools {
    flex: 1;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
  }

  .site-header__tools .search {
    flex: 1;
    width: auto;
    min-width: 0;
    max-width: 361px;
  }

  .brand {
    gap: 12px;
  }

  .brand__name {
    font-size: 20px;
    letter-spacing: 2px;
  }

  /* The illustration is laid out for the wide desktop screen and would sit on
     top of the text here. */
  .scene-art {
    display: none;
  }
}
