/* The website's styles (the public pages; loaded by layouts/site.html). Plain
   HTML is styled by the framework (base.css) with the tokens in theme.css: use
   the --app-* tokens, so light and dark both work. The brand colour is set in
   css/app.css, for the website and the signed-in part alike. */
:root {
  --site-width: 68rem;
}

body.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

/* Signed in: the way to the pages behind the sign-in, above the site. */
.owner-strip {
  display: block;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface);
  font-size: 0.9rem;
}

.owner-strip .site-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 0.4rem 1.25rem;
}

.owner-strip ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.owner-strip li {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The button that opens a menu: on a phone only (below). */
.site-menu-button {
  display: none;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.35rem 0.6rem;
  color: var(--app-text);
  background: none;
  border: none;
  box-shadow: none;
  font-size: inherit;
  line-height: 1;
}

.site-menu-button:hover,
.site-menu-button[aria-expanded="true"] {
  background: var(--app-subtle);
}

.site-head,
.site-main,
.site-foot {
  width: 100%;
  max-width: var(--site-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--app-text);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem 1.25rem;
}

.site-nav > a {
  padding: 0.35rem 0;
  color: var(--app-text);
  text-decoration: none;
}

.site-nav > a:is(:hover, [aria-current="page"]) {
  color: var(--app-accent-tone);
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.site-main {
  flex: 1;
  padding-block: 1.5rem 3rem;
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--app-border);
  color: var(--app-muted);
  font-size: 0.9rem;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

/* Home */
.hero {
  padding-block: clamp(2rem, 8vw, 5rem);
  max-width: 44rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
}

.lead {
  color: var(--app-muted);
  font-size: 1.2rem;
  line-height: 1.5;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.features article {
  margin: 0;
}

.features h2 {
  font-size: 1.1rem;
}

.band {
  margin-top: 3rem;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border-radius: var(--app-radius);
  background: var(--app-accent-soft);
}

.band h2 {
  margin-top: 0;
}

/* Pages of text; the contact form */
.prose {
  max-width: 44rem;
  box-shadow: none;
  background: none;
  padding: 0;
}

.thanks {
  padding: 1.25rem;
  border-left: 4px solid var(--app-success);
  border-radius: var(--app-radius);
  background: var(--app-success-soft);
}

.thanks h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.message-body {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* A phone: each menu folds behind its button and opens as a list of large rows. */
@media (max-width: 640px) {
  .site-menu-button {
    display: inline-flex;
  }

  .site-head .site-menu-button {
    margin-right: -0.6rem;
  }

  .owner-strip .site-menu-button {
    display: flex;
    width: 100%;
    padding-inline: 1.25rem;
    border-radius: 0;
  }

  .site-menu,
  .owner-strip .site-menu {
    display: none;
  }

  .site-menu.is-open,
  .owner-strip .site-menu.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .site-menu.is-open select {
    width: auto;
    margin: 0.5rem 0;
  }

  .owner-strip .site-menu.is-open {
    padding-block: 0 0.5rem;
  }

  .owner-strip ul {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .owner-strip ul + ul {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--app-border);
  }

  .site-menu.is-open a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
  }

  .owner-strip .site-menu.is-open li a {
    margin: 0;
    padding: 0.6rem 0;
  }
}
