/*
 * Styling for dialyse-darmstadt.de.
 *
 * Layout in one line: a fixed 1200px white canvas floating on a grey page,
 * with content inset by a 130px gutter and full-bleed bands (testimonial,
 * staff, footer) breaking out of it.
 */

:root {
  /* Blues */
  --navy: #203c77;          /* footer, testimonial, nav, headings */
  --navy-link: #224187;     /* body links, title text */
  --navy-deep: #071e4f;     /* subfooter */
  --navy-pale: #dcdde9;     /* testimonial text, location buttons */
  --navy-mist: #cccee2;     /* spacer rule */
  --slate: #c1c8da;         /* contact form background */

  /* Neutrals */
  --page-bg: #babcc6;       /* outside the canvas */
  --band-bg: #eeeff4;       /* staff / contact bands */
  --body-text: #4c5262;
  --muted: #6f6f6f;
  --hairline: #f1f1f1;

  /* Gold accent */
  --gold: #ca9700;
  --gold-hover: #e3aa00;

  /* Type */
  --font-body: 'Signika', Arial, sans-serif;
  --font-display: 'Signika Negative', Arial, sans-serif;

  /* Layout */
  --canvas-width: 1200px;
  --gutter: 130px;
}

/* ---------- Reset / base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--body-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy-link);
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: var(--gold-hover);
}

h1, h2, h3 {
  color: var(--navy-link);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
}

ul, ol {
  padding-left: 1.1em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 0;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: #fff;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Canvas ---------- */

.canvas {
  max-width: var(--canvas-width);
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 25px 1px rgba(0, 0, 0, 0.25);
}

.page {
  padding: 60px var(--gutter);
  box-shadow: inset 0 10px 24px -10px rgba(0, 0, 0, 0.25);
}

/* Home runs edge to edge; zeroing --gutter here also collapses the
   full-bleed offsets below, since those are derived from it. */
.home .page {
  --gutter: 0px;
  padding: 0 0 30px;
}

/* ---------- Header ---------- */

.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4em;
  margin: 0 var(--gutter);
  padding: 13px 0;
  border-bottom: 2px solid var(--hairline);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.contacts .contact span:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 0.6em;
}

.contacts .contact span:last-child {
  font-size: 11px;
}

.contacts a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 30px var(--gutter) 5px;
  background: #fff;
}

/* Needs a definite width, not auto - otherwise the width/height attributes
   have no ratio to resolve against before the image loads, so it measures
   0x0 and then snaps to size once it arrives. */
.site-logo img {
  width: 392px;
  height: auto;
  max-width: 100%;
}

/* Spacing comes from each link's own padding, not a gap, so the row's hit
   targets sit edge to edge. */
.main-nav ul {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 15px 19px 0 5px;
}

.main-nav a {
  display: block;
  padding: 5px 16px 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 21px;
  text-transform: uppercase;
  text-decoration: none;
}

/* aria-current is set in the markup for assistive tech, but intentionally
   left unstyled - there is no visual "current page" highlight. */
.main-nav a:hover {
  color: var(--gold);
}

.header-right {
  display: flex;
  align-items: flex-end;
}

/* Icon-only until opened, then the field slides out leftwards over the nav.
   Absolutely positioned so it doesn't push the nav layout around. */
.site-search {
  position: absolute;
  /* calc(gutter - 50px) only reads right at the desktop 130px gutter; once
     the 1200px breakpoint drops it to 15px the same formula goes negative
     and pushes the icon off the right edge of the viewport, so floor it. */
  right: max(calc(var(--gutter) - 50px), 10px);
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Out of flow (right: 0) rather than a flex item, since a flex item's
   flex-shrink crushes it to 0 regardless of its own width once the
   container is shrink-to-fit. appearance: none also removes the native
   search-cancel button. */
.site-search input {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: 0;
  padding: 11px 15px;
  border: 0;
  border-radius: 25px;
  background: transparent;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 14px;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.35s linear;
}

.site-search input::placeholder {
  color: #5a5a5a;
  opacity: 1;
}

.site-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.site-search.is-open input,
.site-search:hover input,
.site-search input:focus,
.site-search input:not(:placeholder-shown) {
  width: 350px;
  background-color: #ddd;
  color: #000;
}

/* Round, so the focus ring follows the pill's shape. The :hover/:focus
   overrides are needed because the generic button rules below match
   `button:hover` at the same specificity as `.site-search button`, and
   would otherwise fill the icon gold. */
.site-search button {
  position: relative;
  z-index: 2;
  background: none;
  border: 0;
  border-radius: 50%;
  padding: 10px;
  color: #3f3f3f;
  line-height: 1;
  cursor: pointer;
}

.site-search button:hover,
.site-search button:focus {
  background: none;
  color: var(--navy);
}

.site-search svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Hidden entirely above the nav-collapse breakpoint, and hidden without JS
   (see .js gating below) since there's nothing for it to control there. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Morphs the three bars into an X once open. */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Search results page ---------- */

.search-page-form {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
  max-width: 30rem;
}

.search-page-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--navy-mist);
  padding: 0 1rem;
  font: inherit;
}

.search-results {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-results li {
  margin-bottom: 1.8rem;
}

.search-results h2 {
  font-size: 18px;
  margin: 0 0 0.3rem;
}

.search-results mark {
  background: var(--navy-pale);
  color: inherit;
  font-weight: 600;
}

/* ---------- Shared content bits ---------- */

.front-title,
.page-title {
  margin: 0 auto;
  padding: 60px 0 0;
  color: var(--navy-link);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 2em;
  line-height: 1.55;
  text-transform: uppercase;
  text-align: center;
}

.page-title {
  text-align: left;
  padding: 1rem 0 0;
}

.front-title b,
.page-title b {
  font-family: var(--font-display);
  font-weight: 600;
}

.spacer,
.spacer-white {
  width: 24px;
  height: 1px;
  margin: 16px auto 22px;
  border-top: 1px solid var(--navy-mist);
}

.spacer-white {
  border-top-color: #fff;
  margin: 16px auto;
}

.spacer.left {
  margin-left: 0;
  margin-right: 0;
}

.text {
  color: var(--body-text);
  text-align: center;
  padding: 0 0 32px;
}

.action {
  margin: 0 0 38px;
  text-align: center;
}

.button,
button,
input[type="submit"] {
  display: inline-block;
  background: var(--gold);
  border: 0;
  /* #222 for WCAG AA contrast against the gold background. */
  color: #222;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 14px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 23px;
  cursor: pointer;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--gold-hover);
  color: #222;
}

/* ---------- Home ---------- */

/* Full-bleed: cancel the page gutter so these span the whole canvas. Width
   is explicit because the global img max-width:100% would otherwise cap
   the banner at the gutter-inset content width. */
.home .banner,
.testimonial,
.staff,
.contact-container,
.image-group {
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  width: calc(100% + (var(--gutter) * 2));
  max-width: none;
}

.home .banner {
  margin-bottom: 15px;
}

/* .home zeroes --gutter so the banner and the bands below can run edge to
   edge, which leaves this intro block with no inset of its own - the copy was
   hugging both screen edges on narrow viewports. Padding the section rather
   than .text/.front-title, since those are shared with the interior pages
   where .page already applies the gutter. */
.home .welcome {
  padding: 0 15px;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* Row gap has to clear the icon's -36px overhang (see .features img), so a
     wrapped box's icon can never land on the text of the box above it. */
  gap: 60px 2%;
  margin: 78px 0 38px;
  padding: 0 103px;
  text-align: center;
}

.features .feature {
  /* No grow, so if the row ever wraps a lone box keeps the same width as its
     siblings instead of stretching across the whole row. */
  flex: 0 1 23%;
  /* min-height rather than height: keeps the original proportions when the
     text is short, but lets a box grow instead of spilling its text out the
     bottom. Boxes on the same row still match the tallest, via the default
     align-items: stretch. */
  min-height: 200px;
  padding: 0 15px 24px;
  background: var(--band-bg);
}

.features img {
  margin: -36px auto 0;
}

/* font-weight overrides the 600 from the shared h1/h2/h3 rule: live renders
   these card titles bold, matching the footer's .location headings. */
.feature-title {
  color: var(--navy);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  margin: 20px 0 10px;
}

.features p {
  margin: 0;
  font-size: 15px;
}

.testimonial {
  background: var(--navy);
  color: var(--navy-pale);
  font-size: 24px;
  line-height: 32px;
  padding: 60px 10em;
  text-align: center;
}

.staff {
  background: var(--band-bg);
  color: var(--body-text);
  padding: 0 0 60px;
  text-align: center;
}

.staff-list {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.staff-item {
  flex: 1 1 30%;
  min-width: 310px;
  max-width: 310px;
}

.staff-item img {
  width: 180px;
  margin: 0 auto;
}

.staff-item span {
  display: block;
  padding: 16px 0 0;
  color: var(--body-text);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
}

/* ---------- Prose pages ---------- */

/* Scoped to unclassed headings so this can't outrank the display titles
   (.front-title et al) - an unscoped `.page h2` wins on specificity and its
   margin collapses out of the full-bleed bands above/below it, leaving a
   visible gap. */
.page h2:not([class]) {
  margin: 2.9rem 0 0.6rem;
  font-size: 18px;
  text-transform: uppercase;
}

.page h3:not([class]) {
  margin: 1.8rem 0 0.4rem;
  font-size: 16px;
  text-transform: uppercase;
}

/* Larger, semibold, not uppercased - used for the Impressum's headings. */
/* Three-column photo grid with a coloured tab under each, matching the old
   "Google Maps" page's layout - here the tabs are plain in-page anchors
   down to each location's write-up, not a JS map-switcher. */
.standort-grid {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}

.standort-grid li {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}

.standort-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.standort-tab {
  position: relative;
  display: block;
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--navy-pale);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
}

.standort-tab:hover,
.standort-tab.is-selected {
  background: var(--navy-link);
  color: #fff;
}

/* Downward-pointing triangle under the active tab, bridging visually to the
   info panel below it - matches the old page's treatment. */
.standort-tab.is-selected::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: var(--navy-link);
}

.standort-info[hidden] {
  display: none;
}

.subhead {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 22px;
  text-transform: none;
  margin: 5px 0 10px;
}

mark {
  background: none;
  color: #c00;
}

.image-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin-top: 50px;
  margin-bottom: 80px;
  padding: 0;
}

/* Equal division so the strip always fills the canvas width: 4 tiles come
   out at 300px each, 3 (Leistungen) at 400px. */
.image-group li {
  position: relative;
  flex: 1 1 0;
  height: 300px;
  overflow: hidden;
}

.image-group img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-group li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(34, 65, 135, 0.8);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.image-group span {
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  transform: translateY(-50%);
  z-index: 1;
  border: 1px solid #fff;
  padding: 10px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.image-group li:hover::after,
.image-group li:focus-within::after,
.image-group li:hover span,
.image-group li:focus-within span {
  opacity: 1;
}

/* ---------- Kontakt ---------- */

.contact-container {
  background: var(--band-bg);
  padding: 0 0 50px;
}

.form-error {
  margin: 0 var(--gutter) 1.5rem;
  padding: 1rem 1.25rem;
  background: #fff0f0;
  border: 1px solid #900;
  color: #900;
  font-weight: 600;
}

.form-error[hidden] {
  display: none;
}

.contact-form {
  display: flex;
  flex-flow: row wrap;
  gap: 1.6rem 3rem;
  margin: 0 var(--gutter);
  padding: 30px;
  background: var(--slate);
  color: var(--navy);
}

.contact-form__col {
  flex: 1 1 20rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.contact-form label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.contact-form .field-label,
.contact-form legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
}

.contact-form .field-label {
  flex: 0 0 110px;
}

/* #900 for WCAG AA contrast against this form's slate background. */
.contact-form b {
  color: #900;
  font-weight: inherit;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"] {
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
  border: 0;
  padding: 1rem;
  font: inherit;
  font-family: var(--font-body);
}

.contact-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

.contact-form legend {
  float: left;
}

.contact-form .option {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  gap: 0.4rem;
}

.contact-form .option.strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
}

.contact-form input[type="radio"] {
  border: 0;
  margin: 0;
}

.contact-form__message {
  flex: 1;
  align-items: stretch;
}

.contact-form textarea {
  width: 100%;
  min-height: 204px;
  background: #fff;
  border: 0;
  border-radius: 0;
  padding: 1rem;
  font: inherit;
  font-family: var(--font-body);
  resize: vertical;
}

.contact-form .action {
  margin: 0;
  text-align: left;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.jobs-note {
  margin: 12px 0 24px;
  font-size: 13px;
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 0 0 25px;
  font-size: 14px;
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  color: var(--gold-hover);
}

.locations {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  padding: 0 var(--gutter);
  gap: 0;
}

/* The generic "one of N equal columns in a wrapping row" sizing - shared by
   the location cards and the subfooter's copyright/nav split below, kept
   separate from .location so neither side inherits the other's typography. */
.footer-col {
  flex: 1 1 0;
  min-width: 230px;
  max-width: 230px;
}

.location h2,
.location h3 {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  margin: 20px 0 10px;
}

.location p {
  margin: 0.4rem 0;
}

.contact-list {
  margin: 6px 0;
}

.list-contact {
  display: flex;
}

.list-contact dt {
  flex: 0 0 56px;
}

.list-contact.big dt {
  flex: 0 0 66px;
}

.list-contact dd {
  flex: 1;
  margin: 0;
}

.subfooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 25px var(--gutter);
  background: var(--navy-deep);
  color: #fff;
  font-size: 14px;
}

.subfooter a {
  color: #fff;
  text-decoration: none;
}

.subfooter a:hover {
  color: var(--gold-hover);
}

.copyright {
  margin: 0;
  white-space: nowrap;
}

.footer-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Smaller and bolder than the surrounding .subfooter text (14px/300), which is
   how live sets these two links apart from the copyright line beside them. */
.footer-nav a {
  padding: 0 10px 0 8px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

.footer-nav li:last-child a {
  padding-right: 0;
}

/* ---------- Scroll to top ---------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 50%;
  background: #4c5262;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.to-top[hidden] {
  display: none;
}

.to-top:hover {
  background: var(--navy);
}

.to-top svg {
  width: 26px;
  height: 26px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  :root {
    --gutter: 15px;
  }

  .testimonial {
    padding: 4rem 6rem;
  }

  .locations {
    padding: 0 1rem;
  }

  /* The icon reads as slightly off-centre in its own hit target at this
     narrower gutter - a touch less padding tightens that up. */
  .site-search button {
    padding: 7px;
  }
}

@media (max-width: 992px) {
  /* The 103px desktop inset leaves almost no room for the boxes here - it was
     squeezing them to ~150px on a phone. --gutter isn't usable: .home zeroes
     it so the banner can run edge to edge. */
  .features {
    padding: 0 15px;
  }

  .features .feature {
    flex: 0 1 14rem;
  }

  .contact-form {
    margin: 0 2rem;
  }

  .contact-form label {
    flex-wrap: wrap;
  }

  .contact-form legend {
    float: none;
    width: 100%;
    margin-bottom: 0.4rem;
  }

  .contact-form .field-label {
    flex: 1 1 100%;
  }

  /* Footer rows drop their two-column flex layout here and flow as inline
     text instead, so the label and its value read as one centred unit
     ("Dialyse 06151 3000 0", "Mo 8:00 - 13:00 Uhr") rather than a
     left-aligned column pair. Centring comes from .location below.
     A day with two time ranges keeps its <br>, so the extra range wraps
     onto its own centred line beneath. */
  .list-contact {
    display: block;
  }

  .list-contact dt,
  .list-contact dd {
    display: inline;
  }

  .list-contact dd {
    margin-left: 0.5rem;
  }

  /* flex-basis 100% forces exactly one location per row - the min-width:230
     from the base rule would otherwise let two share a row in the ~650-900px
     range, which stretched the odd one out (before the divider below) and
     made the divider below sit as a floating line over just one column. */
  .location {
    flex-basis: 100%;
    max-width: none;
    text-align: center;
  }

  .location + .location {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
  }

  .image-group li {
    flex: 1 1 50%;
  }
}

@media (max-width: 767px) {
  /* Caps the boxes at 20rem so the centred text doesn't stretch across the full
     width on the wider phones in this range. Note flex line-breaking uses the
     basis clamped by max-width (so 20rem, not 100%): two boxes still share a
     row down to ~684px, then it's one per row. Either way every box is the same
     width and the rows stay centred. */
  .features .feature {
    flex: 0 1 100%;
    max-width: 20rem;
  }

  /* Header content reads as centred on mobile - logo, phone numbers, and
     the search row all sit on the midline instead of hugging the left. */
  .site-header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .contacts {
    justify-content: center;
  }

  /* Search field and toggle share the row below the logo (order 1/2); the
     nav list itself drops to a full-width row underneath (order 3), open
     or not. */
  .header-right {
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .main-nav {
    order: 3;
    flex: 1 0 100%;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .main-nav li {
    border-bottom: 1px solid var(--hairline);
  }

  .main-nav a {
    padding: 14px 4px;
  }

  /* Collapsed by default once JS is available (see the .no-js/.js swap in
     base.njk) - without JS the toggle button stays hidden and this list is
     never given the chance to hide, so it just renders open like before. */
  .js .main-nav ul {
    display: none;
  }

  .js .main-nav.is-open ul {
    display: flex;
  }

  /* Field is always visible and full width below this breakpoint - there is
     no hover to open it with on touch. */
  .site-search {
    order: 1;
    position: relative;
    right: auto;
    bottom: auto;
    flex: 1 1 auto;
    margin-bottom: 1rem;
  }

  .site-search input,
  .site-search.is-open input,
  .site-search:hover input,
  .site-search input:focus {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    background-color: #ddd;
    color: #000;
  }

  .site-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
  }

  .nav-toggle {
    order: 2;
    flex: 0 0 auto;
    margin: 0 0 1rem 12px;
  }

  .js .nav-toggle {
    display: flex;
  }

  .front-title {
    padding: 40px 0 0;
    font-size: 1.5em;
  }

  /* Matches the (small) desktop inset instead of growing it further - the
     40px shared with .front-title above left a much bigger gap under the
     header on interior pages than live has. */
  .page-title {
    padding: 1rem 0 0;
    font-size: 2em;
  }

  .testimonial {
    padding: 60px 2em;
    font-size: 22px;
    line-height: 32px;
  }

  .canvas {
    box-shadow: none;
  }

  .subfooter {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-form {
    margin: 0 1rem;
  }

  /* Stacked full-width tiles read as a jumbled wall of touching photos at
     full bleed - give the gallery back the page's normal inset and some
     breathing room between tiles instead. */
  .image-group {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    gap: 1rem;
  }

  .image-group li {
    flex: 1 1 100%;
  }
}
