/*
 * Site theme, layered on top of Pico.
 *
 * The site has exactly one palette: dark. The previous stylesheet also carried
 * a full light-theme block and a prefers-color-scheme block, neither of which
 * could ever apply because the document hardcodes data-theme="dark". Those are
 * removed rather than left as dead code that looks maintained.
 */

:root,
[data-theme="dark"] {
  --pico-background-color: rgb(42, 37, 93);
  --pico-text-selection-color: rgba(159, 154, 255, 0.1875);
  --pico-primary: #7263fb;
  --pico-primary-background: rgb(84, 44, 255);
  --pico-primary-underline: rgba(159, 154, 255, 0.5);
  --pico-primary-hover: #8180ff;
  --pico-primary-hover-background: #7263fb;
  --pico-primary-focus: rgba(159, 154, 255, 0.375);
  --pico-primary-inverse: #fff;

  --app-color-invalid: #9b2318;
}

/*
 * Montserrat for body text. The old rule was `* { font-family: … !important }`,
 * which also overrode <code>, <pre> and <kbd> — and could not be overridden
 * anywhere. Setting it on :root lets it inherit normally, and Pico's own
 * monospace stack keeps working.
 */
:root {
  --pico-font-family-sans-serif: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pico-font-family: var(--pico-font-family-sans-serif);
}

body {
  font-family: var(--pico-font-family-sans-serif);
}

.center {
  text-align: center;
}

.pt-1 {
  padding-top: 0.18rem;
}

.m-1 {
  margin-block: 1.5rem;
}

.color-inverse {
  border-top: 1px solid var(--pico-primary-focus);
}

/* Service illustrations: cap the height so a 300px-tall SVG and a 320px-tall
   one sit at the same scale, and never overflow a narrow viewport. */
main .grid img {
  max-width: 100%;
  height: auto;
  max-height: 300px;
}

.center > img {
  margin-inline: auto;
}

header nav img {
  max-width: min(100%, 300px);
  height: auto;
}

footer nav img {
  vertical-align: text-bottom;
}

/*
 * Available to screen readers, invisible on screen. Used to give each
 * "Schedule a call" button a distinct accessible name — there are four on the
 * home page, and a screen-reader user listing the links otherwise hears the
 * same label four times with nothing to tell them apart.
 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Keep the focus ring visible on the icon links in the footer, which have no
   text to carry Pico's default underline treatment. */
footer a:focus-visible,
header a:focus-visible {
  outline: 2px solid var(--pico-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  :where(.modal-is-opening, .modal-is-closing) dialog,
  :where(.modal-is-opening, .modal-is-closing) dialog > article {
    animation: none;
  }
}
