/* Site footer (app/components/footer.php): the sweeping curve into a plain navy ground, in both light and dark modes. Phones
 * first. Selectors start with #site-footer so that the site-wide paragraph, list and heading colours (light and dark) do not
 * leak in. */
#site-footer {
  --wf-card: rgba(255, 255, 255, 0.045);
  --wf-line: rgba(160, 200, 240, 0.18);
  --wf-text: #d5e2f0;
  --wf-muted: #a4bad2;
  --wf-white: #fafcff;
  --wf-cyan: #43b7ff;
  position: relative;
  z-index: 10; /* below the enquiry signboard (100), whose posts run down into the curve */
  padding: clamp(6.25rem, 20vw, 18.5rem) 1rem clamp(1.875rem, 5vw, 3.125rem);
  background-color: var(--primary); /* the same navy as the signboard and its posts */
  color: var(--wf-text);
}
html.dark-mode #site-footer {
  background-color: #01060a;
}
/* The curve (components/wave.php) takes the colour of the page above it. */
#site-footer .cs-footer-swoosh {
  --footerSwish: #fff;
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}
html.dark-mode #site-footer .cs-footer-swoosh {
  --footerSwish: var(--dark);
}
#site-footer p,
#site-footer li {
  margin: 0;
  color: var(--wf-text);
}
#site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
#site-footer a {
  text-decoration: none;
}
#site-footer a:focus-visible,
#site-footer button:focus-visible {
  outline: 3px solid var(--wf-cyan);
  outline-offset: 3px;
}
#site-footer .wf-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(2.25rem, 5vw, 3.5rem);
  max-width: 80rem;
  margin: 0 auto;
}

/* ------------------------------------------------------------------ brand */
#site-footer .wf-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem;
}
#site-footer .wf-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
#site-footer .wf-logo {
  position: relative;
  display: flex;
  align-items: center;
  width: min(17.5rem, 82%);
  min-height: 2.75rem;
}
#site-footer .wf-logo img {
  display: block;
  width: 100%;
  height: auto;
}
#site-footer p.wf-tagline {
  max-width: 21rem;
  margin-top: 1.75rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-wrap: balance;
}

/* ------------------------------------------------------------------ quick links */
#site-footer .wf-quick ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 34rem;
  margin: 0 auto;
}
#site-footer .wf-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  height: 100%;
  min-height: 6.25rem;
  padding: 1.125rem 0.75rem;
  border: 1px solid var(--wf-line);
  border-radius: 1rem;
  background-color: var(--wf-card);
  font-family: var(--headerFont);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  color: var(--wf-white);
  transition: border-color 0.25s, background-color 0.25s, transform 0.25s;
}
#site-footer .wf-card .wf-icon {
  width: 1.625rem;
  height: 1.625rem;
  color: var(--wf-cyan);
}
#site-footer .wf-card:hover,
#site-footer .wf-card:focus-visible {
  border-color: rgba(67, 183, 255, 0.7);
  background-color: rgba(67, 183, 255, 0.09);
  transform: translateY(-2px);
}
#site-footer .wf-card--accent {
  border-color: rgba(67, 183, 255, 0.65);
  background-color: rgba(67, 183, 255, 0.14);
}
#site-footer .wf-card--accent:hover,
#site-footer .wf-card--accent:focus-visible {
  border-color: var(--wf-cyan);
  background-color: rgba(67, 183, 255, 0.24);
}

/* Phones: the four cards have a little more presence. */
@media only screen and (max-width: 47.999rem) {
  #site-footer .wf-card {
    gap: 0.875rem;
    min-height: 7.75rem;
    padding: 1.5rem 0.75rem;
    font-size: 1.125rem;
  }
  #site-footer .wf-card .wf-icon {
    width: 2.125rem;
    height: 2.125rem;
    stroke-width: 1.5;
  }
}

/* ------------------------------------------------------------------ navigation columns */
#site-footer .wf-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--wf-line);
}
#site-footer .wf-col {
  min-width: 0;
}
#site-footer .wf-col__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.1em;
  color: var(--wf-white);
}
#site-footer .wf-toggle {
  display: none;
}
#site-footer .wf-col__label {
  display: block;
  padding: 1.25rem 0 0.625rem;
}
#site-footer .wf-col li a,
#site-footer .wf-col li span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--wf-muted);
  overflow-wrap: anywhere;
  transition: color 0.2s;
}
#site-footer .wf-col li a:hover {
  color: var(--wf-cyan);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
/* Phones: with the script running, each column is an accordion. */
@media only screen and (max-width: 47.999rem) {
  #site-footer .wf-col {
    border-bottom: 1px solid var(--wf-line);
  }
  #site-footer.wf--accordion .wf-col__label {
    display: none;
  }
  #site-footer.wf--accordion .wf-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 3.5rem;
    margin: 0;
    padding: 0.5rem 0.25rem;
    border: 0;
    background: none;
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-transform: uppercase;
    color: inherit;
    cursor: pointer;
  }
  #site-footer .wf-chevron {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--wf-cyan);
    transition: transform 0.3s;
  }
  #site-footer .wf-col.is-open .wf-chevron {
    transform: rotate(180deg);
  }
  #site-footer.wf--accordion .wf-col__panel {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden; /* closed links cannot be reached by keyboard or screen reader */
    transition: grid-template-rows 0.3s, visibility 0s 0.3s;
  }
  #site-footer.wf--accordion .wf-col__panel > ul {
    min-height: 0;
    overflow: hidden;
    padding: 0 0.25rem;
  }
  #site-footer.wf--accordion .wf-col.is-open .wf-col__panel {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.3s, visibility 0s;
  }
  #site-footer.wf--accordion .wf-col.is-open li:last-child {
    margin-bottom: 0.75rem;
  }
}

/* ------------------------------------------------------------------ social and legal */
#site-footer .wf-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
#site-footer .wf-social a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--wf-line);
  border-radius: 50%;
  color: var(--wf-text);
}
#site-footer .wf-social a:hover {
  border-color: var(--wf-cyan);
  color: var(--wf-cyan);
}
#site-footer .wf-social svg {
  width: 1.25rem;
  height: 1.25rem;
}
#site-footer .wf-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--wf-line);
  text-align: center;
}
#site-footer .wf-legal p,
#site-footer .wf-legal a {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--wf-muted);
}
#site-footer .wf-legal ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 1.5rem;
}
#site-footer .wf-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
#site-footer .wf-legal a:hover {
  color: var(--wf-cyan);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Phones: the last accordion already ends in a rule, so the legal line needs none of its own. */
@media only screen and (max-width: 47.999rem) {
  #site-footer .wf-legal {
    margin-top: -1.25rem;
    padding-top: 0;
    border-top: 0;
  }
}

/* ------------------------------------------------------------------ tablets and desktop */
@media only screen and (min-width: 48rem) {
  #site-footer {
    padding-right: 2rem;
    padding-left: 2rem;
  }
  #site-footer .wf-quick ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 46rem;
  }
  #site-footer .wf-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    row-gap: 1rem;
    padding-top: 0.75rem;
  }
  #site-footer .wf-col li a,
  #site-footer .wf-col li span {
    min-height: 2.25rem;
  }
  #site-footer .wf-legal {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
@media only screen and (min-width: 64rem) {
  #site-footer .wf-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
    align-items: center;
    gap: 3.5rem;
  }
  #site-footer .wf-brand {
    align-items: flex-start;
    text-align: left;
  }
  #site-footer .wf-logo {
    width: 18.5rem;
  }
  #site-footer p.wf-tagline {
    text-wrap: pretty;
  }
  #site-footer .wf-quick ul {
    max-width: none;
  }
  #site-footer .wf-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 2.5rem;
    padding-top: 1.5rem;
  }
}

/* ------------------------------------------------------------------ the "After Dark" sign (dark mode only) */
#site-footer .neon {
  position: absolute;
  right: 0;
  bottom: -1.375rem; /* hangs just under the wordmark */
  z-index: 2;
  display: none;
  white-space: nowrap;
}
#site-footer .neon span {
  font-family: var(--navNeon);
  font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2rem);
  line-height: 1.2;
  color: #646464;
  animation: neonGlow 3s linear infinite;
}
#site-footer .neon span:nth-child(5) {
  margin-right: 0.375rem;
  animation-delay: 2s;
}
#site-footer .neon span:nth-child(1), #site-footer .neon span:nth-child(2), #site-footer .neon span:nth-child(4) {
  animation-delay: 1s;
}
#site-footer .neon span:nth-child(3) {
  animation-delay: 1.2s;
}
#site-footer .neon span:nth-child(6) {
  animation-delay: 2.45s;
}
#site-footer .neon span:nth-child(7), #site-footer .neon span:nth-child(8), #site-footer .neon span:nth-child(9) {
  animation-delay: 2.75s;
}
html.dark-mode #site-footer .neon {
  display: flex; /* flex drops the spaces between the letters */
}

@media (prefers-reduced-motion: reduce) {
  #site-footer .wf-card,
  #site-footer .wf-chevron,
  #site-footer.wf--accordion .wf-col__panel {
    transition: none !important;
  }
  #site-footer .neon span {
    animation: none;
    color: #fff;
  }
  #site-footer .wf-card:hover {
    transform: none;
  }
}
