/* Hide the large green featured-image logo on the home page */
body.home .wp-block-post-featured-image { display: none; }

/* Hide the large page title on the home page (site title in header stays) */
body.home .wp-block-post-title { display: none; }

/* Collapse the title wrapper group (80px top padding) and tighten the space above the first heading on the home page */
body.home .wp-site-blocks > .wp-block-group:has(> .wp-block-post-title) { display: none; }
body.home .entry-content > .wp-block-spacer:first-child { display: none; }
body.home .entry-content > h1:first-of-type,
body.home .entry-content > h2:first-of-type { margin-top: 0; }

/* Remove social media icons everywhere */
.wp-block-social-links,
.wp-block-navigation-item:has(> .wp-block-social-links) { display: none; }

/* Buttons: white background, text filled with the site gradient; inverts on hover/focus */
.wp-element-button, .wp-block-button__link, .wp-block-search__button,
input[type="submit"], .sib-default-btn, .sib-form .sib-form-block__button {
  background: linear-gradient(135deg, #4aeadc 0%, #9778d1 20%, #cf2aba 40%, #ee2c82 60%, #fb6962 80%, #fef84c 100%), #fff !important;
  /* gradient layer pinned to the viewport so the text matches the page gradient behind the button, like .wide-white */
  background-attachment: fixed, scroll !important;
  background-size: 100vw 100vh, auto !important;
  background-repeat: no-repeat, no-repeat !important;
  background-clip: text, padding-box !important;
  -webkit-background-clip: text, padding-box !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  border: 2px solid #fff !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}
.wp-element-button:hover, .wp-block-button__link:hover, .wp-block-search__button:hover,
input[type="submit"]:hover, .sib-default-btn:hover,
.wp-element-button:focus-visible, .wp-block-button__link:focus-visible, .wp-block-search__button:focus-visible,
input[type="submit"]:focus-visible, .sib-default-btn:focus-visible {
  background: transparent !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
/* Size the mailing-list submit button to match the theme's buttons */
.sib-default-btn, .sib-form .sib-form-block__button {
  font-family: inherit !important;
  font-size: 1rem !important;
  padding: 0.75em 1.5em !important;
  cursor: pointer;
}

/* White canvas behind the gradient (overscroll / rubber-banding) — html gets the white; see body::before below */

/* ---- Site gradient as one shared, viewport-fixed layer so text-fill effects line up exactly with the page background ---- */
/* The gradient lives on a fixed pseudo-element instead of body's background: iOS Safari ignores
   background-attachment: fixed, which left everything below the first screen white. */
html { background: #fff !important; }
body { background: transparent !important; }
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(135deg, #4aeadc 0%, #9778d1 20%, #cf2aba 40%, #ee2c82 60%, #fb6962 80%, #fef84c 100%);
}

/* .wide-white: full-bleed white section whose text is filled with the page gradient behind it */
.entry-content > .wide-white {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: 3rem max(1.5rem, calc(50vw - 430px)) !important;
  background: linear-gradient(135deg, #4aeadc 0%, #9778d1 20%, #cf2aba 40%, #ee2c82 60%, #fb6962 80%, #fef84c 100%), #fff !important;
  background-attachment: fixed, scroll !important;
  background-size: 100vw 100vh, auto !important;
  background-repeat: no-repeat, no-repeat !important;
  background-clip: text, padding-box !important;
  -webkit-background-clip: text, padding-box !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}
.wide-white * {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}
/* Form fields inside stay readable */
.wide-white input, .wide-white textarea, .wide-white select {
  color: #222 !important;
  -webkit-text-fill-color: #222 !important;
  background: #fff !important;
  border: 1px solid #ccc !important;
  border-radius: 4px;
  padding: .4em .6em;
}
/* Buttons inside a white section invert: gradient fill, white text */
.wide-white .wp-element-button, .wide-white .wp-block-button__link,
.wide-white input[type="submit"], .wide-white .sib-default-btn {
  background: linear-gradient(135deg, #4aeadc 0%, #9778d1 20%, #cf2aba 40%, #ee2c82 60%, #fb6962 80%, #fef84c 100%) !important;
  background-attachment: fixed !important;
  background-size: 100vw 100vh !important;
  background-clip: padding-box !important;
  -webkit-background-clip: padding-box !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 2px solid transparent !important;
}
.wide-white .wp-element-button:hover, .wide-white .wp-block-button__link:hover,
.wide-white input[type="submit"]:hover, .wide-white .sib-default-btn:hover {
  filter: brightness(1.1);
  box-shadow: inset 0 0 0 2px #222;
}

/* Hide Jetpack's floating Subscribe button */
.jetpack-subscribe-floating-button { display: none !important; }

/* Text selection: white highlight with brand-magenta text on the gradient; inverted inside .wide-white.
   (Browsers only allow a flat color for selection backgrounds, so the gradient's mid-point magenta stands in for it.) */
::selection {
  background: #fff !important;
  color: #cf2aba !important;
  -webkit-text-fill-color: #cf2aba !important;
}
.wide-white ::selection, .wide-white::selection {
  background: #cf2aba !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Link hover/focus: underline only, keep the link's own color (overrides the theme's gray text + green highlight) */
a:not(.wp-element-button) { text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:not(.wp-element-button):hover, a:not(.wp-element-button):focus {
  color: var(--wp--preset--color--background) !important;
  background-color: transparent !important;
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important; /* 2x the resting underline */
}
.wp-elements-1 a:not(.wp-element-button):hover, .wp-elements-1 a:not(.wp-element-button):focus {
  color: var(--wp--preset--color--black) !important;
}
.wp-elements-2 a:not(.wp-element-button):hover, .wp-elements-2 a:not(.wp-element-button):focus {
  color: var(--wp--preset--color--nv-text-dark-bg) !important;
}
.wide-white a:not(.wp-element-button):hover, .wide-white a:not(.wp-element-button):focus {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

/* Mailing-list (Brevo) form: stacked layout — label on its own line, full-width input beneath, consistent spacing */
.sib_signup_form .sib_signup_box_inside_1 > p {
  margin: 0 0 1.25rem;
  line-height: 1.4;
  font-weight: 600;
}
.sib_signup_form .sib_signup_box_inside_1 > p br { display: none; } /* plugin adds <br> on some fields but not others */
.sib_signup_form input[type="text"], .sib_signup_form input[type="email"] {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin-top: .4rem;
  font: inherit;
  font-size: 1rem !important;
  font-weight: 400;
  padding: .6em .75em !important;
  border: 1px solid #bbb !important;
  border-radius: 4px !important;
}
.sib_signup_form .sib-default-btn { display: inline-block; margin-top: .25rem; }

/* Safari (iOS + macOS) fallback: WebKit renders nothing when background-clip: text is combined with
   background-attachment: fixed, so the gradient-text layers fall back to scrolling with the element there. */
@supports (font: -apple-system-body) {
  .entry-content > .wide-white,
  .wp-element-button, .wp-block-button__link, .wp-block-search__button,
  input[type="submit"], .sib-default-btn, .sib-form .sib-form-block__button,
  .wide-white .wp-element-button, .wide-white .wp-block-button__link,
  .wide-white input[type="submit"], .wide-white .sib-default-btn {
    background-attachment: scroll !important;
  }
  .entry-content > .wide-white { background-size: 100vw 100vh, auto !important; }
  .wp-element-button, .wp-block-button__link, .wp-block-search__button,
  input[type="submit"], .sib-default-btn { background-size: 200% 200%, auto !important; background-position: center, 0 0 !important; }
  .wide-white .wp-element-button, .wide-white .wp-block-button__link,
  .wide-white input[type="submit"], .wide-white .sib-default-btn { background-size: 200% 200% !important; background-position: center !important; }
}

/* Mobile menu overlay: site gradient with white links (theme default was the palette's primary color) */
.wp-block-navigation__responsive-container.is-menu-open {
  background: linear-gradient(135deg, #4aeadc 0%, #9778d1 20%, #cf2aba 40%, #ee2c82 60%, #fb6962 80%, #fef84c 100%) !important;
  color: #fff !important;
  padding: 24px !important;
}
.wp-block-navigation__responsive-container.is-menu-open a,
.wp-block-navigation__responsive-container.is-menu-open button,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  color: #fff !important;
}