/* What both pages share on top of the kit. Both load this last. */

/* the menu: the section on screen is underlined, and a menu goes once a link in it has been used */
.nav__link[aria-current="location"]::after { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: -2px; height: 2px; border-radius: 2px; background: currentColor; }
@media (min-width: 1024px) {
  .nav.is-used .nav__item > .nav__menu { opacity: 0 !important; visibility: hidden !important; transition: none !important; }
  .nav--split .nav__links > .nav__item:first-child > .nav__link[aria-current="location"]::after { left: 0; }
}
@media (max-width: 1023px) {
  .nav:not(.is-open) .nav__link[aria-current="location"]::after { display: none; }
  .nav.is-open .nav__link[aria-current="location"]::after { left: 0; right: auto; width: 24px; bottom: 10px; }
}

/* a second button reads as a button on every ground */
.btn--secondary { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 48%, var(--bg)); }

/* the address beside the closing button, for anyone whose button opens nothing */
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: calc(-1 * var(--s-2)); }
.mail a { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.mail a:hover { text-decoration-color: currentColor; }
.mail button { min-width: 148px; }
.mail button[hidden] { display: none; }
.mail [role="status"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the footer: the credits link is only as wide as its words */
.closing__links .footer__lede { line-height: 1.4; }
.footer__legal .credits { flex: 0 0 auto; }

/* The kit makes each section one screen tall. That breaks twice, and in both a section takes the height of its
   content, while whatever has no height of its own (a photograph, a mock) gets a least height:
   - a short window (a 1366x768 laptop, a small phone, any screen zoomed in): the words ran over the next section
   - an upright tablet or screen: a tall empty gap in every section */
@media (max-height: 820px), (min-width: 640px) and (orientation: portrait) {
  main > .section:not(.is-live), main > .hero, footer.closing { height: auto; min-height: 100svh; }
  main > .section:not(.is-live) > .wrap, main > .hero > .wrap, footer.closing > .wrap { height: auto; }
  main > .section > .wrap > .fill { flex: 1 0 auto; }
  footer.closing > .wrap { grid-template-rows: auto auto; }
  .closing__cta { min-height: auto; }

  main > .hero { display: flex; flex-direction: column; }
  main > .hero > .wrap { flex: 1 0 auto; }
  main > .hero > .wrap > .hero-text { flex: 1 0 auto; height: auto; }
  .hero--centred .hero__window { flex: 1 0 240px; }
  .hero-text.hero__grid { grid-template-rows: auto; }
  .hero__media { min-height: 300px; }

  .frame--fill { min-height: 320px; }
  .pb__cols { min-height: 400px; }
  main > .section > .wrap > .sys__photo { min-height: 220px; }
}
@media (max-height: 820px) and (min-width: 640px) {
  main > .section:not(.is-live) { display: flex; flex-direction: column; }
  main > .section:not(.is-live) > .wrap { flex: 1 0 auto; }
}
@media (max-height: 820px) and (min-width: 1024px), (min-width: 1024px) and (orientation: portrait) {
  .rn { grid-template-rows: 300px; }
  .hero__media { min-height: 440px; }
}
@media (max-height: 820px) and (max-width: 639px) {
  main > .section > .wrap > .rn { min-height: 820px; }
}
@media (min-width: 640px) and (orientation: portrait) {
  main > .section:not(.is-live), footer.closing { min-height: 0; }
  main > .hero { min-height: min(100svh, 1120px); }
  main > .section > .wrap > .frame--fill, .grid.fill > .frame--fill { min-height: 420px; }
  main > .section > .wrap > .sys__photo { min-height: 380px; }
  .pb__cols { flex: none; height: 520px; }
}
