/* Shared by the frontend and the editor canvas. */
:where(.wp-site-blocks) { overflow-wrap: anywhere; }
:where(a, button, input, textarea, select):focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
:where(.wp-block-post-featured-image img) { width: 100%; object-fit: cover; }
:where(.wp-block-navigation a, .wp-block-post-title a) { text-decoration: none; }
:where(.wp-block-navigation a, .wp-block-post-title a):hover { text-decoration: underline; text-underline-offset: .2em; }
.is-style-olivia-panel { padding: var(--wp--preset--spacing--50); border: 1px solid var(--wp--preset--color--border); }
:where(.wp-block-post-content) :where(img, video, iframe) { max-width: 100%; }
:where(.wp-block-post-content) pre { overflow-x: auto; }
:where(.wp-block-post-content) :where(th, td) { overflow-wrap: normal; }
@media (max-width: 600px) {
  .wp-block-post-template.is-layout-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Equal side tracks anchor both menus to the centered wordmark. */
.wp-block-group.olivia-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  row-gap: 0;
}
.wp-block-group.olivia-header-grid > * {
  min-width: 0;
  margin-block: 0;
}
.olivia-header-grid > .olivia-header-title {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  text-align: center;
  max-width: 24ch;
}
.olivia-header-grid > .olivia-header-menu-left {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  justify-content: flex-end;
  --navigation-layout-justify: flex-end;
}
.olivia-header-grid > .olivia-header-menu-right {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  justify-content: flex-start;
  --navigation-layout-justify: flex-start;
}
.wp-block-navigation.olivia-header-menu .wp-block-navigation-item__content {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
}
.wp-block-navigation.olivia-header-menu .wp-block-navigation-item__content:hover {
  color: #777777;
  color: color-mix(in srgb, var(--wp--preset--color--contrast) 65%, var(--wp--preset--color--base));
  text-decoration: none;
}
@media (max-width: 599px) {
  .wp-block-group.olivia-header-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
    column-gap: var(--wp--preset--spacing--20);
  }
  .olivia-header-grid > .olivia-header-title {
    font-size: var(--wp--preset--font-size--x-large);
  }
}

/* Social links sit above the centered wordmark and its two menus. */
.wp-block-group.olivia-social-row {
  display: flex;
  justify-content: flex-end;
  margin-block-start: 0;
  margin-block-end: var(--wp--preset--spacing--40);
}
.olivia-social-row .wp-block-social-links {
  margin: 0;
  gap: 1px;
  font-size: 12.75px;
}
.olivia-social-row .wp-block-social-links.is-style-logos-only .wp-social-link {
  color: var(--wp--preset--color--contrast);
  transform: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.olivia-social-row .wp-block-social-links .wp-social-link a {
  box-sizing: content-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  padding: 0;
  color: var(--wp--preset--color--contrast);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-decoration: none;
  transition: color 200ms ease-in-out;
}
.olivia-social-row .wp-block-social-links .wp-social-link svg {
  width: 12.75px;
  height: 12.75px;
  flex-shrink: 0;
}
.olivia-social-row .wp-block-social-links .wp-social-link a:hover,
.olivia-social-row .wp-block-social-links .wp-social-link a:focus-visible {
  color: #777777;
  color: color-mix(in srgb, var(--wp--preset--color--contrast) 65%, var(--wp--preset--color--base));
}
@media (prefers-reduced-motion: reduce) {
  .olivia-social-row .wp-block-social-links .wp-social-link a {
    transition: none;
  }
}

/* A single mobile trigger combines both menus and their configured social links. */
.olivia-mobile-toggle,
.olivia-mobile-dialog {
  display: none;
}
html.olivia-menu-open,
html.olivia-menu-open body {
  overflow: hidden;
}
.olivia-mobile-toggle,
.olivia-mobile-close {
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  color: var(--wp--preset--color--contrast);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.olivia-mobile-close { display: inline-flex; }
.olivia-mobile-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: calc(var(--olivia-close-top, 32px) + var(--olivia-close-height, 44px) + 24px) 24px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--wp--preset--color--contrast);
  background: var(--wp--preset--color--base);
  border: 0;
  border-radius: 0;
}
.olivia-mobile-dialog {
  opacity: 0;
  transition: opacity 280ms ease;
}
.olivia-mobile-dialog.is-visible { opacity: 1; }
.olivia-mobile-dialog::backdrop {
  background: rgb(0 0 0 / 35%);
  opacity: 0;
  transition: opacity 280ms ease;
}
.olivia-mobile-dialog.is-visible::backdrop { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .olivia-mobile-dialog,
  .olivia-mobile-dialog::backdrop { transition: none; }
}
.olivia-mobile-dialog-heading {
  margin: 0;
  height: 0;
}
.olivia-mobile-dialog .olivia-mobile-close {
  position: fixed;
  top: var(--olivia-close-top, 32px);
  left: var(--olivia-close-left, calc(100% - 68px));
  width: var(--olivia-close-width, 44px);
  height: var(--olivia-close-height, 44px);
  box-sizing: border-box;
  z-index: 1;
  background: var(--wp--preset--color--base);
}
.olivia-mobile-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.olivia-mobile-links a {
  display: block;
  padding: 10px 0;
  font-family: var(--wp--preset--font-family--body);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--wp--preset--color--contrast);
  overflow-wrap: anywhere;
}
.olivia-mobile-links a:hover {
  color: #777777;
  color: color-mix(in srgb, var(--wp--preset--color--contrast) 65%, var(--wp--preset--color--base));
  text-decoration: none;
}
.olivia-mobile-dialog .olivia-mobile-socials {
  display: flex;
  justify-content: center;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--wp--preset--color--border);
}
.olivia-mobile-socials .wp-block-social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
}
@media (max-width: 767px) {
  .wp-block-group.olivia-header-grid.olivia-mobile-ready {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
  }
  .olivia-header-grid.olivia-mobile-ready > .olivia-header-title {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: 100%;
    font-size: var(--wp--preset--font-size--x-large);
    text-align: left;
  }
  .olivia-header-grid.olivia-mobile-ready > .olivia-header-menu,
  .olivia-mobile-header-ready .olivia-social-row:not(.olivia-mobile-socials) {
    display: none;
  }
  .olivia-mobile-ready > .olivia-mobile-toggle:not([hidden]) {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .olivia-mobile-dialog[open] { display: block; }
}

/* Break out of the article-width container while staying centered in the viewport. */
.wp-block-template-part.olivia-home-featured-section {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 88vw;
  max-width: none !important;
  margin-inline: 0 !important;
  --wp--style--global--content-size: 100%;
  --wp--style--global--wide-size: 100%;
}
.olivia-home-featured-section > .olivia-home-featured,
.olivia-home-featured-section .olivia-featured-query {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-inline: 0 !important;
}
/* Homepage: text/image, image/text, text/image. */
.olivia-home-featured {
  padding-block-start: var(--wp--preset--spacing--40);
  padding-block-end: var(--wp--preset--spacing--60);
}
.olivia-home-featured .wp-block-post-template {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: stretch;
  margin-block: 0;
  padding: 0;
  list-style: none;
}
.olivia-home-featured .wp-block-post-template > li {
  min-width: 0;
  margin: 0;
}
.olivia-home-featured .olivia-featured-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--contrast);
}
.olivia-featured-card > .olivia-featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  box-sizing: border-box;
  min-height: clamp(160px, 16vw, 240px);
  padding: clamp(24px, 3vw, 48px);
  margin: 0;
  flex: 1;
}
.olivia-featured-copy > * { margin-block: 0; }
.olivia-featured-category a {
  color: var(--wp--preset--color--contrast);
  text-decoration: none;
}
.olivia-featured-category a:hover {
  color: #777777;
  color: color-mix(in srgb, var(--wp--preset--color--contrast) 65%, var(--wp--preset--color--base));
}
.olivia-featured-card > .olivia-featured-media {
  height: clamp(240px, 29vw, 420px);
  margin: 0;
  flex: none;
  background: var(--wp--preset--color--surface);
}
.olivia-featured-media .wp-block-post-featured-image,
.olivia-featured-media .wp-block-post-featured-image a,
.olivia-featured-media .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}
.olivia-featured-media .wp-block-post-featured-image img { object-fit: cover; }
.olivia-home-featured .wp-block-post-template > li.olivia-featured-slot-2 .olivia-featured-media {
  order: -1;
}
@media (max-width: 767px) {
  .olivia-home-featured .wp-block-post-template {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .olivia-featured-card > .olivia-featured-copy {
    min-height: 0;
    padding: 24px;
  }
  .olivia-featured-card > .olivia-featured-media {
    order: -1;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
.olivia-home-featured .wp-block-post-template > .olivia-featured-slot-1 { grid-column: 1; }
.olivia-home-featured .wp-block-post-template > .olivia-featured-slot-2 { grid-column: 2; }
.olivia-home-featured .wp-block-post-template > .olivia-featured-slot-3 { grid-column: 3; }
@media (max-width: 767px) {
  .olivia-home-featured .wp-block-post-template > li[class*="olivia-featured-slot-"] { grid-column: 1; }
}

/* Also clear the divider from header parts previously saved in the editor. */
header.wp-block-template-part,
header.wp-block-template-part > .wp-block-group,
.olivia-header-shell {
  border-bottom: 0 !important;
}
.olivia-home-featured .olivia-featured-category {
  font-family: var(--wp--preset--font-family--body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.olivia-home-featured .wp-block-post-title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 32px;
  font-weight: 200;
  font-style: normal;
  line-height: 1.4;
}

/* Keep emphasized text at its surrounding weight throughout the theme. */
:where(.wp-site-blocks) :where(strong, b) { font-weight: inherit; }

/* The header stays visible and gradually becomes more compact while scrolling. */
body:not(.wp-admin) header.wp-block-template-part:has(.olivia-header-shell) {
  position: sticky;
  top: var(--wp-admin--admin-bar--position-offset, 0px);
  z-index: 100;
  background-color: var(--wp--preset--color--base, #fcfbfa);
}
body:not(.wp-admin) .olivia-header-shell {
  background-color: var(--wp--preset--color--base, #fcfbfa);
  padding-block: calc(var(--wp--preset--spacing--50) - 12px * var(--olivia-header-progress, 0)) !important;
  transition: padding 180ms ease-out;
}
body:not(.wp-admin) .olivia-header-title {
  transform: scale(calc(1 - .25 * var(--olivia-header-progress, 0)));
  transition: transform 180ms ease-out;
}
body:not(.wp-admin) .olivia-header-menu .wp-block-navigation-item__content {
  font-size: calc(12px - 2px * var(--olivia-header-progress, 0));
  transition: font-size 180ms ease-out, color 200ms ease-in-out;
}
@media (max-width: 767px) {
  body:not(.wp-admin) .olivia-header-grid.olivia-mobile-ready > .olivia-header-title {
    transform-origin: left center;
  }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.wp-admin) .olivia-header-shell,
  body:not(.wp-admin) .olivia-header-title,
  body:not(.wp-admin) .olivia-header-menu .wp-block-navigation-item__content {
    transition: none;
  }
}

/* Featured post links fade to a lighter color without an underline. */
.olivia-home-featured .olivia-featured-category a,
.olivia-home-featured .wp-block-post-title a {
  color: var(--wp--preset--color--contrast);
  text-decoration: none;
  transition: color 200ms ease-in-out;
}
.olivia-home-featured .olivia-featured-category a:hover,
.olivia-home-featured .wp-block-post-title a:hover {
  color: #777777;
  color: color-mix(in srgb, var(--wp--preset--color--contrast) 65%, var(--wp--preset--color--base));
  text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  .olivia-home-featured .olivia-featured-category a,
  .olivia-home-featured .wp-block-post-title a { transition: none; }
}

/* Fade home sections as they enter or leave the viewport. */
@media (prefers-reduced-motion: no-preference) {
  .olivia-home-featured-section,
  section.olivia-cta,
  section.olivia-quote,
  .olivia-front-page-content > * {
    transition: opacity 450ms ease;
  }
  .olivia-section-outside:not(:focus-within) { opacity: 0; }
}
