/* =============================================================
   ROOT: Custom Properties
   ============================================================= */
:root {
  --font-size-base: 1rem;
  --gutter: var(--wp--preset--spacing--40);
  --header-height: 64px;
  --line-height-body: 1.6;
  --line-height-heading: 1.05;
}

/* =============================================================
   RESETS
   ============================================================= */
* {
  box-sizing: border-box;
}

:where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd) {
  margin: 0;
  padding: 0;
}

:where(ul, ol) {
  list-style: none;
}

:where(a) {
  text-decoration: none;
  color: inherit;
}

:where(img) {
  display: block;
  max-width: 100%;
}

:where(button, input) {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  padding: 0;
}

:where(details) {
  display: block;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--wp--preset--color--accent-1);
  outline-offset: 3px;
}

:target {
  scroll-margin-top: calc(var(--header-height) + var(--wp--preset--spacing--40));
}

.animate-on-scroll {
  opacity: 1;
  transform: translateY(0);
}

.js .animate-on-scroll:not(.is-visible) {
  opacity: 0;
  transform: translateY(28px);
}

.js .animate-on-scroll {
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.js .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.js .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.js .animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.js .animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Navigation — Parent-level rules (can't scope to nav block)
   -------------------------------------------------------------------------- */
.wp-block-template-part:has(.wp-block-navigation .is-menu-open),
header:has(.wp-block-navigation .is-menu-open) {
  z-index: 100001;
  position: relative;
}

footer.wp-block-template-part,
footer.wp-block-template-part > .wp-block-group {
  position: relative;
  z-index: 1;
}

[class*="site-footer"],
[class*="footer-section"] {
  margin-block-start: 0 !important;
}

:where(.wp-site-blocks, .wp-block-post-content) :where(
  .wp-block-group,
  .wp-block-cover,
  .wp-block-columns,
  .wp-block-column,
  .wp-block-media-text,
  .wp-block-buttons,
  .wp-block-button,
  .wp-block-image,
  .wp-block-heading,
  p,
  ul,
  ol,
  li
) {
  min-width: 0;
  box-sizing: border-box;
}

:where(.wp-site-blocks, .wp-block-post-content) > :where(.alignfull, section) {
  max-width: 100vw;
  box-sizing: border-box;
}

/* Static conversion scroll reveal visibility guard */
.animate-on-scroll,
.animate-from-left,
.animate-from-right,
.animate-scale,
html.js .animate-on-scroll:not(.is-visible),
.js .animate-on-scroll:not(.is-visible),
.editor-styles-wrapper .animate-on-scroll,
.editor-styles-wrapper .animate-from-left,
.editor-styles-wrapper .animate-from-right,
.editor-styles-wrapper .animate-scale {
  opacity: 1 !important;
  transform: none !important;
}