html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  color-scheme: dark;
}

html[data-bop-theme="light"] {
  color-scheme: light;
}

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

body {
  margin: 0;
  background: var(--bop-body-background);
  color: var(--bop-theme-text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

input,
textarea,
select {
  background: var(--bop-theme-surface);
  color: var(--bop-theme-text);
  border-color: var(--bop-theme-border);
  color-scheme: dark;
}

input::placeholder,
textarea::placeholder {
  color: var(--bop-theme-text-muted);
  opacity: 1;
}

html[data-bop-theme="light"] input,
html[data-bop-theme="light"] textarea,
html[data-bop-theme="light"] select {
  background: var(--bop-theme-surface-elevated);
  color: var(--bop-theme-text);
  border-color: var(--bop-theme-border);
  color-scheme: light;
  -webkit-text-fill-color: var(--bop-theme-text);
}

html[data-bop-theme="light"] input::placeholder,
html[data-bop-theme="light"] textarea::placeholder {
  color: var(--bop-theme-text-muted);
  -webkit-text-fill-color: var(--bop-theme-text-muted);
}

body.bop-front-page {
  background: var(--bop-front-background);
  background-size: 100% 100%, 100% 100%, 100% 100%, 240% 240%;
  animation: bop-ambient-gradient 24s ease-in-out infinite;
}

main {
  display: block;
}

body.bop-front-page [id] {
  scroll-margin-top: var(--bop-scroll-offset);
}

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

a {
  color: var(--bop-theme-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  transition: color var(--bop-transition-fast);
}

a:hover {
  color: var(--bop-theme-accent-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--bop-color-accent-red);
  outline-offset: 3px;
}

::selection {
  background: rgba(110, 168, 255, 0.24);
  color: var(--bop-color-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--bop-theme-text);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1,
h2 {
  text-wrap: balance;
}

.bop-front-page .bop-home,
.bop-front-page .bop-site-footer {
  font-family: var(--bop-font-sans);
}

.bop-front-page .bop-home h1,
.bop-front-page .bop-home h2,
.bop-front-page .bop-home h3,
.bop-front-page .bop-home h4,
.bop-front-page .bop-home h5,
.bop-front-page .bop-home h6,
.bop-front-page .bop-site-footer h1,
.bop-front-page .bop-site-footer h2,
.bop-front-page .bop-site-footer h3,
.bop-front-page .bop-site-footer h4,
.bop-front-page .bop-site-footer h5,
.bop-front-page .bop-site-footer h6 {
  font-family: var(--bop-font-display);
}

p {
  margin: 0;
}

.bop-container {
  width: min(100% - 2rem, var(--bop-container-lg));
  margin-inline: auto;
}

.bop-front-page .wp-site-blocks {
  background: transparent;
}

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.u-flow > * + * {
  margin-top: var(--bop-space-4);
}

.u-text-balance {
  text-wrap: balance;
}

.u-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bop-space-3);
  align-items: center;
}

@media (prefers-reduced-motion: reduce) {
  body.bop-front-page {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes bop-ambient-gradient {
  0% {
    background-position: 0% 0%, 100% 0%, 50% 100%, 0% 50%;
  }

  50% {
    background-position: 0% 0%, 100% 0%, 50% 100%, 100% 50%;
  }

  100% {
    background-position: 0% 0%, 100% 0%, 50% 100%, 0% 50%;
  }
}
