/* The menus and the mobile overlay stack inside .header's own context, so
   .header is the one value the page sees. Ceiling stays low so plugin
   overlays, which usually sit at 1000+, land above everything of ours. */
:root {
  --z-header: 300;
  --z-modal: 400;
  --z-skip-link: 500;
}

/* Deliberately not theme.json palette entries: those show up in the block
   editor's colour picker, and validation states are not something a client
   picks per block. */
:root {
  --color-error: #c0392b;
  --color-success: #1e7a4b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  font-optical-sizing: auto;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body,
html {
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

img,
svg {
  border-style: none;
  display: block;
  height: auto;
  margin: 0;
  max-width: 100%;
}

::selection {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
}

/* WP core emits this class in its own markup — without the rule that text
   shows up on screen. */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  word-wrap: normal;
}

/* :focus-visible, not :focus: focus that did not come from the keyboard (a
   click, a browser tab switched back to) must not show the skip link. Fixed,
   so it lies over the header instead of pushing the page down. */
.screen-reader-text:focus-visible {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: var(--z-skip-link);
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 20px;
  overflow: visible;
  clip-path: none;
  border-radius: 8px;
  background-color: var(--wp--preset--color--base);
  color: var(--wp--preset--color--primary);
  font-weight: 600;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary);
  outline-offset: 2px;
}
input,
textarea,
select {
  vertical-align: middle;
  font-family: var(--wp--preset--font-family--body);
}
textarea {
  resize: none;
}
form,
fieldset {
  margin: 0;
  padding: 0;
  border-style: none;
}
figure {
  margin: 0;
}
a {
  text-decoration: none;
  cursor: pointer;
  color: inherit;
}
button {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--wp--preset--font-family--body);
  cursor: pointer;
}

input,
textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
