@import "theme_colors_and_fonts.css";
/* ............................... */
/* ~~~ SCSS VARIABLES ~~~ */
/* ............................... */
/* + + + + + style + + + + + */
/* + + + + + spacing + + + + + */
:root {
  --max-width: $maxwidth;
}
.is-style-container {
  padding: calc(var(--wp--preset--spacing--xs) / 2) var(--wp--preset--spacing--sml);
  gap: var(--wp--preset--spacing--xs);
}
html {
  scroll-behavior: smooth;
}
.userway_buttons_wrapper #userwayAccessibilityIcon.userway_dark {
  background: var(--pink) !important;
}
::-webkit-scrollbar {
  width: 0.7rem;
  /* Mostly for vertical scrollbars */
  height: 10px;
  /* Mostly for horizontal scrollbars */
}
::-webkit-scrollbar-thumb {
  /* Foreground */
  background: var(--grellow);
  border-radius: 2px;
}
::-webkit-scrollbar-track {
  /* Background */
  background: var(--navy);
}
::-moz-selection {
  /* Code for Firefox */
  color: var(--grellow);
  background: var(--pink);
}
::selection {
  color: var(--navy);
  background: var(--grellow);
}
/* ............................... */
/* ~~~ TYPOGRAPHY ~~~ */
/* ............................... */
h2 {
  font-size: clamp(3.2em, 10vw, 9em);
  line-height: 1em;
  text-transform: uppercase;
  text-wrap: balance;
}
h3 {
  font-size: clamp(1.2em, 5vw, 1.7em);
  line-height: 1.2em;
}
p {
  font-family: "montserrat", sans-serif;
  text-wrap: pretty;
}
p a {
  text-decoration: none;
}
p a:hover {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--grellow);
  text-underline-offset: 2px;
}
a:focus, a:focus-within, a:focus-visible {
  border: 4px dotted var(--grellow);
  outline: none;
}
.wp-block-social-link {
  border-radius: 0.5rem;
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~ PARAGRAPH ~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
.ontario-header strong {
  font-weight: 900;
}
/* --> Block/Stat Subheadings <---------- */
p.is-style-acumin {
  font-family: "acumin-variable", serif;
  font-weight: 900;
  line-height: 1.2em;
  margin: 0.5rem 0 0 0;
  text-wrap: balance;
  text-transform: uppercase;
}
.ontario-header {
  text-wrap: balance;
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~ COVER ~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* --> ROUNDED CORNERS <---------- */
.wp-block-cover.is-style-rounded, .wp-block-group.is-style-rounded, .wp-block-group.is-style-rounded iframe {
  border-radius: 1.875rem;
  height: 100%;
}
.wp-block-cover.is-style-rounded img {
  transition: transform 1s ease, transform 1s ease;
  transform: scale(1.05);
  object-position: center center;
}
.wp-block-cover.is-style-rounded span.wp-block-cover__background {
  opacity: 0;
  transition: opacity 1s ease;
}
.wp-block-cover.is-style-rounded:hover img {
  transform: scale(1.05) translate(-2%, 2%);
}
.wp-block-cover.is-style-rounded:hover span.wp-block-cover__background {
  opacity: 0.6 !important;
}
.wp-block-group.is-style-rounded {
  border-radius: 1.875rem;
  position: relative;
  padding-bottom: 71%;
  padding-top: 25px;
  height: 0;
}
.wp-block-group.is-style-rounded iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~ GROUP ~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
.is-style-pink-border-bottom {
  border-bottom: 15px solid var(--pink);
  position: relative;
}
.is-style-pink-border-bottom::before {
  aspect-ratio: 1;
  content: "";
  position: absolute;
  display: block;
  clip-path: circle(40%);
  background-color: var(--pink);
  width: 100%;
  height: 25rem;
  top: -4rem;
}
.is-style-orange-border-bottom {
  border-bottom: 15px solid var(--orange);
}
.is-style-pull-up {
  transform: translateY(-4.5rem);
  position: absolute;
  left: 0;
  right: 0;
  margin-inline: auto;
  margin: 0 var(--wp--preset--spacing--sml);
  z-index: 3;
}
.is-style-pull-up p.is-style-acumin {
  font-size: clamp(1.1rem, 4vw, 2.3rem);
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~ LISTS ~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
ol.wp-block-list, ul.wp-block-list {
  margin: var(--wp--preset--spacing--sml) !important;
  padding-left: 1.3rem !important;
}
ol.wp-block-list li, ul.wp-block-list li {
  font-weight: 300;
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~ BUTTONS ~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
.wp-block-button a {
  border-radius: 0;
  font-style: normal;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  transition: all 0.35s linear;
  padding: var(--wp--preset--spacing--xxs) var(--wp--preset--spacing--md) !important;
  position: relative;
  z-index: 0;
  overflow: hidden;
}
.wp-block-button a::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 190%;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  transform: scale(1.1);
  opacity: 0;
  z-index: -1;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s ease, opacity 0.4s ease, transform 0.8s ease, background-position 0.8s ease;
}
.wp-block-button a:hover, .wp-block-button a:focus {
  letter-spacing: 1px;
}
.wp-block-button a:hover::before, .wp-block-button a:focus::before {
  opacity: 1;
  transform: scale(1);
  background-position: 10% 61%;
  clip-path: inset(0 0 0 0);
}
.wp-block-button a.has-navy-background-color::before {
  background-image: url("https://staging.ontarioreads.com/wp-content/uploads/2025/08/navy-btn.webp");
}
.wp-block-button a.has-pink-background-color::before {
  background-image: url("https://staging.ontarioreads.com/wp-content/uploads/2025/08/pink-btn.webp");
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~ SEPARATOR ~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
hr.wp-block-separator.is-style-wide {
  border-top: none;
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~ HEADER ~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
header#masthead {
  background-color: var(--navy);
}
header#masthead .site-branding img {
  max-width: 15rem;
}
header#masthead #primary-menu {
  justify-content: flex-end;
}
header#masthead #primary-menu li a {
  background-color: var(--orange);
  padding: var(--wp--preset--spacing--xxs) var(--wp--preset--spacing--md) !important;
  color: var(--white);
  border-radius: 0;
  font-style: normal;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: all 0.35s linear;
}
header#masthead #primary-menu li a:hover {
  letter-spacing: 1px;
}
header#masthead #primary-menu li a::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://staging.ontarioreads.com/wp-content/uploads/2025/08/biographies.webp");
  background-size: 170%;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  transform: scale(1.1);
  /* start zoomed */
  opacity: 0;
  z-index: -1;
  clip-path: inset(0 100% 0 0);
  /* start fully hidden */
  transition: clip-path 0.6s ease, opacity 0.4s ease, transform 0.8s ease, background-position 0.8s ease;
}
header#masthead #primary-menu li a:hover::before {
  opacity: 1;
  transform: scale(1);
  background-position: 10% 61%;
  clip-path: inset(0 0 0 0);
}
/* .................................................. */
/* ~~~ SPANISH PAGE ~~~ */
/* .................................................. */
.page-template-page-spanish #primary.spanish-version p.is-style-acumin {
  font-size: clamp(1.1rem, 3vw, 1.7rem);
}
.page-template-page-spanish #primary.spanish-version #fantasy h2, .page-template-page-spanish #primary.spanish-version #manga h2 {
  font-size: clamp(1.5rem, 4vw, 4.8rem) !important;
}
.page-template-page-spanish #primary.spanish-version #mystery h2 {
  font-size: clamp(1.5rem, 6vw, 7rem) !important;
}
.page-template-page-spanish #primary.spanish-version #self-help h2 {
  font-size: clamp(2.7rem, 7vw, 7rem) !important;
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~ NAV ~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
@media screen and (max-width: 50rem) {
  body .uwy.userway_p1 .userway_buttons_wrapper {
    top: 90% !important;
  }
  #masthead:has(.toggled) {
    padding-bottom: 0;
  }
  #masthead:has(.toggled) > .is-style-container {
    position: relative;
    top: 0;
    left: 0;
    width: 100vw;
  }
  #masthead .is-style-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  #masthead .is-style-container .site-branding img {
    max-width: 30vw;
    min-width: 200px;
  }
  #masthead .main-navigation #primary-menu {
    position: fixed;
    width: 100vw;
    height: auto;
    overflow-y: scroll;
    left: 0;
    right: 0;
    margin-top: 1.4rem;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    z-index: 10;
  }
  #masthead .main-navigation #primary-menu li {
    width: 100%;
  }
  #masthead .main-navigation #primary-menu li.menu-item-has-children > .sub-menu {
    position: relative;
    top: 0;
    left: 0;
    grid-column: 1/4;
    grid-row: 2/3;
  }
  #masthead .main-navigation.toggled #primary-menu {
    transform: translateX(0%);
    padding: 0;
    background: var(--navy);
    box-shadow: -2px 0px 6px rgba(0, 0, 0, 0.2);
  }
  #masthead .menu-toggle {
    border-radius: 3px;
    font-size: 1em;
    font-weight: 500;
    padding: 0.4em var(--wp--preset--spacing--sml);
    text-transform: uppercase;
    transition: all 0.3s ease-out;
    background-position: right center;
    background-size: 202%;
    margin-right: 0;
    margin-left: auto;
    color: transparent;
    font-size: 0;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    overflow: hidden;
    background-color: var(--navy);
    border: none;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
  }
  #masthead .menu-toggle[aria-expanded="false"] {
    background-image: url(assets/images/book.svg);
  }
  #masthead .menu-toggle[aria-expanded="true"] {
    background-image: url(assets/images/book-open.svg);
    transform: rotateY(180deg);
  }
}
/* .................................................. */
/* ~~~ ANIMATION ~~~ */
/* .................................................. */
#self-help, #fantasy, #mystery, #adults, #biographies, #manga, #teens, #lewis, #ovitt, #lewis-map, #ovitt-map {
  opacity: 0;
}
/* swing in from left */
.swing-left {
  animation: swing-left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@keyframes swing-left {
  0% {
    transform: rotateY(0);
    transform-origin: left bottom;
    opacity: 0;
  }
  50% {
    transform: rotateY(-20deg);
    transform-origin: left bottom;
    opacity: 1;
  }
  100% {
    transform: rotateY(0);
    transform-origin: left bottom;
    opacity: 1;
  }
}
/* swing in from right */
.swing-right {
  animation: swing-right 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@keyframes swing-right {
  0% {
    transform: rotateY(0);
    transform-origin: right bottom;
    opacity: 0;
  }
  50% {
    transform: rotateY(20deg);
    transform-origin: right bottom;
    opacity: 1;
  }
  100% {
    transform: rotateY(0);
    transform-origin: right bottom;
    opacity: 1;
  }
}
/* swing in from top */
.swing-top {
  animation: swing-top 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@keyframes swing-top {
  0% {
    transform: rotateX(0);
    transform-origin: top center;
    opacity: 0;
  }
  50% {
    transform: rotateX(-15deg);
    transform-origin: top center;
    opacity: 1;
  }
  100% {
    transform: rotateX(0);
    transform-origin: top center;
    opacity: 1;
  }
}
/* swing in from bottom */
.swing-bottom {
  animation: swing-bottom 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@keyframes swing-bottom {
  0% {
    transform: rotateX(0);
    transform-origin: bottom center;
    opacity: 0;
  }
  50% {
    transform: rotateX(15deg);
    transform-origin: bottom center;
    opacity: 1;
  }
  100% {
    transform: rotateX(0);
    transform-origin: bottom center;
    opacity: 1;
  }
}
/* .................................................. */
/* ~~~ RESPONSIVE ~~~ */
/* .................................................. */
/* Force the columns in THIS row to stretch */
.wp-block-columns.is-style-container {
  align-items: stretch !important;
}
/* Each column: stop overriding with "top/center/bottom" */
.wp-block-columns.is-style-container > .wp-block-column.is-vertically-aligned-top, .wp-block-columns.is-style-container > .wp-block-column {
  align-self: stretch !important;
  display: flex;
  flex-direction: column;
  /* keeps normal stacking */
}
.wp-block-columns.is-style-container > .wp-block-column > .wp-block-cover {
  flex: 1 1 auto;
  height: auto;
  /* let flex sizing win */
  min-height: 0;
  /* allow shrinking when needed */
  display: flex;
  flex-direction: column;
}
@media screen and (max-width: 1147px) {
  #join-us-banner .wp-block-group {
    justify-content: center;
  }
  #join-us-banner .wp-block-group h2, #join-us-banner .wp-block-group p {
    text-align: center !important;
  }
  .is-style-pull-up {
    transform: translateY(-6rem);
  }
}
@media screen and (max-width: 781px) {
  .flex-reverse-mobile {
    flex-direction: column-reverse;
    margin-top: var(--wp--preset--spacing--md);
  }
  .flex-reverse-mobile .wp-block-column {
    width: 100%;
  }
  .flex-reverse-mobile .wp-block-group.is-style-rounded {
    border-radius: 1.875rem;
    overflow: hidden;
  }
  .flex-reverse-mobile .wp-block-group.is-style-rounded iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
  }
  #get-a-library-card .wp-block-columns:has(.wp-block-cover) {
    gap: var(--wp--preset--spacing--sml);
  }
  #city-of-readers {
    text-align: center;
  }
  .wp-block-columns:has(#fantasy), .wp-block-columns:has(#biographies) {
    flex-wrap: nowrap !important;
  }
  .wp-block-columns:has(#fantasy) #fantasy h2, .wp-block-columns:has(#fantasy) #mystery h2, .wp-block-columns:has(#biographies) #fantasy h2, .wp-block-columns:has(#biographies) #mystery h2 {
    font-size: clamp(1.8rem, 5vw, 5rem) !important;
  }
  .wp-block-columns:has(#fantasy) #fantasy p, .wp-block-columns:has(#fantasy) #mystery p, .wp-block-columns:has(#biographies) #fantasy p, .wp-block-columns:has(#biographies) #mystery p {
    font-size: clamp(1rem, 2vw, 1.9rem) !important;
  }
  .wp-block-columns:has(#fantasy) #biographies h2, .wp-block-columns:has(#fantasy) #manga h2, .wp-block-columns:has(#biographies) #biographies h2, .wp-block-columns:has(#biographies) #manga h2 {
    font-size: clamp(1rem, 5vw, 5rem) !important;
  }
  .wp-block-columns:has(#fantasy) #biographies p, .wp-block-columns:has(#fantasy) #manga p, .wp-block-columns:has(#biographies) #biographies p, .wp-block-columns:has(#biographies) #manga p {
    font-size: clamp(1rem, 2vw, 1.9rem) !important;
  }
  #self-help h2, #adults h2, #teens h2 {
    font-size: clamp(3rem, 5vw, 5rem) !important;
  }
  #self-help p, #adults p, #teens p {
    font-size: clamp(1.5rem, 2vw, 1.9rem) !important;
  }
  #self-help p + p, #adults p + p, #teens p + p {
    font-size: clamp(1rem, 2vw, 1.5rem) !important;
  }
}
