/* SciHelp v2: palette-led surfaces, illustrated waves, and gentle motion. */
:root {
  --sh-deep-teal: #3d7163;
  --sh-shadow: 0 22px 0 rgba(23, 63, 56, 0.08), 0 28px 46px rgba(23, 63, 56, 0.16);
  --sh-shadow-small: 0 7px 0 rgba(23, 63, 56, 0.1), 0 14px 25px rgba(23, 63, 56, 0.1);
  --sh-border: #bdd3b6;
  --sh-radius: 31px;
  --sh-radius-small: 19px;
}

body {
  background: var(--sh-cream);
}

::selection {
  color: var(--sh-forest);
  background: var(--sh-sun);
}

.site-topbar {
  background: var(--sh-berry);
  color: #fff;
}

.site-header {
  background: rgba(255, 253, 247, 0.98);
  border-bottom: 4px solid var(--sh-sun);
  box-shadow: 0 7px 0 rgba(244, 162, 89, 0.28);
}

.primary-menu a {
  font-weight: 850;
}

.primary-menu > li > a::after {
  height: 6px;
  bottom: -11px;
  background: var(--sh-berry);
  border-radius: 60% 40% 55% 45%;
}

.header-cta,
.wp-element-button,
.wp-block-button__link {
  min-height: 52px;
  border-width: 3px;
  box-shadow: 0 6px 0 #8d3037, 0 14px 22px rgba(111, 31, 37, 0.2);
  transition: transform 220ms cubic-bezier(.2, 1.5, .42, 1), box-shadow 220ms ease, background 180ms ease, color 180ms ease;
}

.header-cta:hover,
.wp-element-button:hover,
.wp-block-button__link:hover {
  transform: translateY(-5px) rotate(-1deg) scale(1.035);
  box-shadow: 0 11px 0 #8d3037, 0 20px 28px rgba(111, 31, 37, 0.22);
}

.header-cta:active,
.wp-element-button:active,
.wp-block-button__link:active {
  transform: translateY(3px) scale(.98);
  box-shadow: 0 2px 0 #8d3037;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background: var(--sh-cream);
  border: 3px solid var(--sh-forest);
  box-shadow: 0 6px 0 var(--sh-forest);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--sh-sun);
  color: var(--sh-forest);
  box-shadow: 0 11px 0 var(--sh-forest);
}

.scihelp-section,
.scihelp-page-hero,
.scihelp-hero {
  isolation: isolate;
}

.scihelp-section > .wrap,
.scihelp-page-hero > .wrap,
.scihelp-hero > .wrap {
  position: relative;
  z-index: 2;
}

.scihelp-hero,
.scihelp-page-hero {
  background: var(--sh-leaf);
}

.scihelp-hero {
  padding-top: clamp(86px, 9vw, 132px);
  padding-bottom: clamp(165px, 17vw, 245px);
  background:
    radial-gradient(circle at 48% 12%, var(--sh-sun) 0 2.1%, transparent 2.2%),
    radial-gradient(circle at 95% 29%, var(--sh-berry) 0 2.7%, transparent 2.8%),
    radial-gradient(circle at 7% 81%, var(--sh-orange) 0 4.5%, transparent 4.6%),
    var(--sh-leaf);
}

.scihelp-hero::before,
.scihelp-page-hero::before {
  position: absolute;
  z-index: 0;
  top: 8%;
  right: 4%;
  width: clamp(120px, 21vw, 320px);
  aspect-ratio: 1;
  content: "";
  border: clamp(14px, 2.5vw, 32px) solid var(--sh-sun);
  border-radius: 45% 55% 64% 36% / 48% 37% 63% 52%;
  opacity: .75;
  transform: rotate(-19deg);
  animation: scihelp-orbit 8s ease-in-out infinite alternate;
}

.scihelp-hero::after,
.scihelp-page-hero::after {
  z-index: 2;
  height: clamp(90px, 10vw, 150px);
  background: var(--sh-cream);
  clip-path: none;
  -webkit-mask: url("../images/wave-mask.svg") center bottom / 100% 100% no-repeat;
  mask: url("../images/wave-mask.svg") center bottom / 100% 100% no-repeat;
}

.scihelp-hero h1,
.scihelp-page-hero h1 {
  color: var(--sh-forest);
  letter-spacing: -.047em;
  text-shadow: 3px 4px 0 rgba(255, 255, 255, .45);
}

.scihelp-hero .scihelp-lede,
.scihelp-page-hero p:last-child {
  color: var(--sh-forest);
  font-weight: 650;
}

.scihelp-accent-text::before {
  height: .43em;
  bottom: .01em;
  background: var(--sh-sun);
  border-radius: 45% 55% 55% 45%;
  transform: rotate(-2.5deg) scale(1.03);
}

.scihelp-rating {
  padding: 10px 16px;
  background: var(--sh-cream);
  border: 3px solid var(--sh-forest);
  box-shadow: 5px 6px 0 var(--sh-forest);
  transform: rotate(-2deg);
}

.scihelp-stars {
  color: var(--sh-berry);
}

.scihelp-hero-media::before {
  top: -2%;
  right: -7%;
  background: var(--sh-sun);
  opacity: 1;
  animation: scihelp-float 6s ease-in-out infinite;
}

.scihelp-hero-media::after {
  bottom: -8%;
  left: -12%;
  background: var(--sh-berry);
  opacity: 1;
  animation: scihelp-float 7s ease-in-out infinite reverse;
}

.scihelp-hero-image,
.scihelp-photo {
  border-width: 12px;
  border-color: var(--sh-cream);
  box-shadow: 12px 15px 0 var(--sh-forest), 22px 28px 35px rgba(23, 63, 56, .22);
  transition: transform 350ms cubic-bezier(.2, 1.35, .38, 1), box-shadow 350ms ease;
}

.scihelp-hero-image:hover,
.scihelp-photo:hover {
  transform: rotate(-1.5deg) translateY(-6px) scale(1.015);
  box-shadow: 16px 21px 0 var(--sh-forest), 25px 35px 42px rgba(23, 63, 56, .25);
}

.scihelp-badge {
  right: -8px;
  bottom: 17px;
  width: 136px;
  background: var(--sh-orange);
  border-color: var(--sh-forest);
  box-shadow: 6px 7px 0 var(--sh-forest);
  animation: scihelp-bob 3.8s ease-in-out infinite;
}

.scihelp-page-hero {
  padding-top: clamp(84px, 10vw, 135px);
  padding-bottom: clamp(145px, 16vw, 220px);
  background:
    radial-gradient(circle at 74% 15%, var(--sh-sun) 0 8%, transparent 8.1%),
    radial-gradient(circle at 91% 73%, var(--sh-orange) 0 12%, transparent 12.1%),
    var(--sh-leaf);
}

.scihelp-page-hero .scihelp-eyebrow,
.scihelp-hero .scihelp-eyebrow {
  color: var(--sh-forest);
}

.scihelp-eyebrow,
.eyebrow {
  color: var(--sh-berry);
  font-size: .81rem;
  letter-spacing: .16em;
}

.scihelp-section-head h2 {
  letter-spacing: -.04em;
}

.scihelp-card,
.scihelp-price-card,
.scihelp-review-card,
.scihelp-panel,
.scihelp-post-card {
  border: 3px solid var(--sh-forest);
  box-shadow: 7px 9px 0 rgba(23, 63, 56, .8);
  transition: transform 280ms cubic-bezier(.2, 1.5, .42, 1), box-shadow 280ms ease, border-color 220ms ease;
}

.scihelp-card:nth-child(3n + 2),
.scihelp-review-card:nth-child(3n + 2) {
  transform: rotate(1.1deg);
}

.scihelp-card:nth-child(3n + 3),
.scihelp-review-card:nth-child(3n + 3) {
  transform: rotate(-1deg);
}

.scihelp-card:hover,
.scihelp-price-card:hover,
.scihelp-review-card:hover,
.scihelp-panel:hover,
.scihelp-post-card:hover {
  border-color: var(--sh-berry);
  box-shadow: 12px 16px 0 rgba(23, 63, 56, .75), 0 24px 35px rgba(23, 63, 56, .15);
  transform: translateY(-10px) rotate(-1.4deg) scale(1.018);
}

.scihelp-card::before,
.scihelp-review-card::before {
  top: -26px;
  right: -24px;
  width: 102px;
  background: var(--sh-sun);
  opacity: 1;
  transform: rotate(18deg);
}

.scihelp-card-icon {
  width: 68px;
  font-size: 1.9rem;
  background: var(--sh-sun);
  border: 3px solid var(--sh-forest);
  box-shadow: 4px 5px 0 var(--sh-forest);
  transition: transform 320ms cubic-bezier(.2, 1.5, .42, 1);
}

.scihelp-card:hover .scihelp-card-icon {
  transform: translateY(-5px) rotate(13deg) scale(1.12);
}

.scihelp-card:nth-child(3n + 2) .scihelp-card-icon {
  background: var(--sh-orange);
}

.scihelp-card:nth-child(3n + 3) .scihelp-card-icon {
  background: var(--sh-leaf);
}

.scihelp-stats {
  padding: 12px;
  border: 3px solid var(--sh-forest);
  box-shadow: 9px 10px 0 var(--sh-forest);
}

.scihelp-stat {
  transition: transform 220ms cubic-bezier(.2, 1.5, .42, 1), background 220ms ease;
}

.scihelp-stat:hover {
  background: var(--sh-sun);
  border-radius: 18px;
  transform: translateY(-5px) rotate(-2deg);
}

.scihelp-stat strong {
  color: var(--sh-berry);
}

.scihelp-soft {
  background: var(--sh-sun);
}

.scihelp-sun {
  background: var(--sh-orange);
}

.scihelp-teal {
  background: var(--sh-deep-teal);
}

.scihelp-wave-top,
.scihelp-paper-top {
  margin-top: clamp(66px, 8vw, 112px) !important;
}

.scihelp-wave-top::before,
.scihelp-paper-top::before {
  top: calc(-1 * clamp(66px, 8vw, 112px) + 1px);
  height: clamp(68px, 8vw, 114px);
  background: inherit;
  clip-path: none;
  -webkit-mask: url("../images/wave-mask.svg") center bottom / 100% 100% no-repeat;
  mask: url("../images/wave-mask.svg") center bottom / 100% 100% no-repeat;
}

.scihelp-pills {
  gap: 12px;
}

.scihelp-pills .wp-block-list-item,
.scihelp-pills > li {
  padding: 10px 16px;
  background: var(--sh-sun);
  border: 2px solid var(--sh-forest);
  box-shadow: 3px 4px 0 rgba(23, 63, 56, .7);
  transition: transform 220ms cubic-bezier(.2, 1.5, .42, 1), background 220ms ease;
}

.scihelp-pills li:hover {
  background: var(--sh-orange);
  transform: translateY(-4px) rotate(-2deg);
}

.scihelp-teal .scihelp-pills .wp-block-list-item,
.scihelp-teal .scihelp-pills > li {
  color: var(--sh-forest);
  background: var(--sh-sun);
  border-color: var(--sh-forest);
}

.scihelp-price-card.is-featured {
  background: var(--sh-forest);
  border-color: var(--sh-forest);
  box-shadow: 9px 11px 0 var(--sh-berry);
}

.scihelp-price-card.is-featured:hover {
  box-shadow: 14px 18px 0 var(--sh-berry);
  transform: translateY(-17px) rotate(-1deg) scale(1.018);
}

.scihelp-price-card.is-featured .wp-block-button__link {
  background: var(--sh-orange);
  border-color: var(--sh-orange);
  color: var(--sh-forest);
  box-shadow: 0 6px 0 #be6b2d;
}

.scihelp-rate-table th {
  background: var(--sh-forest);
}

.scihelp-rate-table tr:nth-child(even) td {
  background: #f7f3e8;
}

.scihelp-form-preview,
.scihelp-form-slot .forminator-ui {
  border: 3px solid var(--sh-forest) !important;
  box-shadow: 10px 12px 0 var(--sh-forest) !important;
}

.scihelp-form-slot .forminator-button-submit {
  box-shadow: 0 5px 0 #8d3037 !important;
  transition: transform 200ms ease !important;
}

.scihelp-form-slot .forminator-button-submit:hover {
  transform: translateY(-3px) !important;
}

/* The home page follows the same saturated, editable core-block rhythm in both
   fresh v2 installs and sites upgraded from v1. */
.scihelp-front-page .site-main > .scihelp-section:nth-child(2),
.scihelp-home-stats {
  background: var(--sh-cream);
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(3),
.scihelp-home-help {
  margin-top: clamp(66px, 8vw, 112px) !important;
  background: var(--sh-orange);
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(3)::before,
.scihelp-home-help::before,
.scihelp-front-page .site-main > .scihelp-section:nth-child(6)::before,
.scihelp-home-reviews::before {
  position: absolute;
  z-index: 1;
  top: calc(-1 * clamp(66px, 8vw, 112px) + 1px);
  right: 0;
  left: 0;
  height: clamp(68px, 8vw, 114px);
  content: "";
  background: inherit;
  -webkit-mask: url("../images/wave-mask.svg") center bottom / 100% 100% no-repeat;
  mask: url("../images/wave-mask.svg") center bottom / 100% 100% no-repeat;
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(3) .scihelp-eyebrow,
.scihelp-home-help .scihelp-eyebrow {
  color: var(--sh-forest);
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(4),
.scihelp-home-about {
  background: var(--sh-sun);
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(5),
.scihelp-home-courses {
  background: var(--sh-deep-teal);
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(6),
.scihelp-home-reviews {
  margin-top: clamp(66px, 8vw, 112px) !important;
  background: var(--sh-berry);
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(6) h2,
.scihelp-front-page .site-main > .scihelp-section:nth-child(6) > .wrap > .scihelp-section-head p,
.scihelp-home-reviews h2,
.scihelp-home-reviews > .wrap > .scihelp-section-head p {
  color: #fff;
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(6) .scihelp-eyebrow,
.scihelp-home-reviews .scihelp-eyebrow {
  color: var(--sh-sun) !important;
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(7),
.scihelp-home-pricing {
  background: var(--sh-orange);
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(8),
.scihelp-home-contact {
  background: var(--sh-deep-teal);
}

.scihelp-front-page .site-main > .scihelp-section:nth-child(8) .scihelp-eyebrow,
.scihelp-home-contact .scihelp-eyebrow {
  color: var(--sh-sun);
}

.site-footer {
  padding-top: 115px;
  background: var(--sh-forest);
}

.site-footer::before {
  top: -110px;
  height: 112px;
  background: var(--sh-forest);
  clip-path: none;
  -webkit-mask: url("../images/wave-mask.svg") center bottom / 100% 100% no-repeat;
  mask: url("../images/wave-mask.svg") center bottom / 100% 100% no-repeat;
}

.site-footer::after {
  position: absolute;
  top: 52px;
  right: 6%;
  width: 70px;
  aspect-ratio: 1;
  content: "";
  border: 13px solid var(--sh-sun);
  border-radius: 48% 52% 57% 43%;
  transform: rotate(22deg);
}

.site-brand--footer {
  border: 3px solid var(--sh-sun);
  box-shadow: 6px 7px 0 var(--sh-berry);
}

.site-footer a:hover {
  color: var(--sh-sun);
}

.scihelp-post-card {
  background: var(--sh-cream);
}

@keyframes scihelp-float {
  0%, 100% { transform: translateY(0) rotate(14deg); }
  50% { transform: translateY(-12px) rotate(9deg); }
}

@keyframes scihelp-bob {
  0%, 100% { transform: translateY(0) rotate(7deg); }
  50% { transform: translateY(-9px) rotate(1deg); }
}

@keyframes scihelp-orbit {
  from { transform: rotate(-19deg) translateY(0); }
  to { transform: rotate(-7deg) translateY(14px); }
}

@media (max-width: 1024px) {
  .primary-navigation {
    background: var(--sh-sun);
    border-top: 4px solid var(--sh-forest);
  }

  .primary-menu a {
    border-bottom-color: rgba(23, 63, 56, .25);
  }

  .menu-toggle {
    background: var(--sh-sun);
    border: 3px solid var(--sh-forest);
    box-shadow: 4px 5px 0 var(--sh-forest);
  }

  .scihelp-hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: clamp(25px, 4vw, 55px);
  }

  .scihelp-hero h1 {
    font-size: clamp(2.8rem, 6.8vw, 4.9rem);
  }
}

@media (max-width: 782px) {
  .scihelp-hero-grid {
    grid-template-columns: 1fr;
  }

  .scihelp-hero-media {
    width: min(570px, 88%);
  }

  .scihelp-hero {
    padding-bottom: 165px;
  }

  .scihelp-page-hero {
    padding-bottom: 155px;
  }

  .scihelp-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scihelp-price-card.is-featured,
  .scihelp-price-card.is-featured:hover {
    transform: none;
  }
}

@media (max-width: 600px) {
  .site-topbar {
    font-size: .7rem;
  }

  .site-header__inner {
    min-height: 74px;
  }

  .scihelp-hero {
    padding-top: 64px;
    padding-bottom: 145px;
    background: var(--sh-leaf);
  }

  .scihelp-hero::before,
  .scihelp-page-hero::before {
    display: none;
  }

  .scihelp-hero h1 {
    font-size: clamp(2.5rem, 12.5vw, 4.2rem);
    line-height: 1.03;
  }

  .scihelp-page-hero {
    padding-top: 76px;
    padding-bottom: 145px;
  }

  .scihelp-page-hero h1 {
    font-size: clamp(2.45rem, 11vw, 3.8rem);
  }

  .scihelp-hero-media {
    width: min(100% - 20px, 450px);
    height: 390px;
    min-height: 390px;
  }

  .scihelp-hero-image {
    height: 390px;
    min-height: 390px;
    border-width: 8px;
    box-shadow: 8px 10px 0 var(--sh-forest);
  }

  .scihelp-badge {
    right: -5px;
    bottom: 0;
    width: 105px;
    border-width: 4px;
  }

  .scihelp-section {
    padding-top: 76px;
    padding-bottom: 90px;
  }

  .scihelp-section--compact {
    padding-top: 20px;
    padding-bottom: 38px;
  }

  .scihelp-card,
  .scihelp-price-card,
  .scihelp-review-card,
  .scihelp-panel {
    padding: 25px 23px;
    border-radius: 25px;
  }

  .scihelp-card:nth-child(n),
  .scihelp-review-card:nth-child(n) {
    transform: none;
  }

  .scihelp-card:hover,
  .scihelp-review-card:hover,
  .scihelp-price-card:hover {
    transform: translateY(-6px) scale(1.01);
  }

  .scihelp-grid-4 {
    grid-template-columns: 1fr;
  }

  .scihelp-stats {
    padding: 5px;
    box-shadow: 5px 7px 0 var(--sh-forest);
  }

  .scihelp-stat {
    padding: 20px 8px;
  }

  .scihelp-photo,
  .scihelp-photo img {
    min-height: 340px;
  }

  .site-footer {
    padding-top: 85px;
  }

  .site-footer::before {
    top: -75px;
    height: 77px;
  }

  .site-footer::after {
    width: 45px;
    border-width: 8px;
  }
}

@media (max-width: 380px) {
  .scihelp-hero h1 {
    font-size: 2.35rem;
  }

  .scihelp-rating {
    font-size: .74rem;
  }

  .scihelp-stat strong {
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scihelp-hero::before,
  .scihelp-page-hero::before,
  .scihelp-hero-media::before,
  .scihelp-hero-media::after,
  .scihelp-badge {
    animation: none !important;
  }

  .scihelp-card:hover,
  .scihelp-price-card:hover,
  .scihelp-review-card:hover,
  .scihelp-panel:hover,
  .scihelp-post-card:hover,
  .scihelp-hero-image:hover,
  .scihelp-photo:hover,
  .header-cta:hover,
  .wp-element-button:hover,
  .wp-block-button__link:hover,
  .scihelp-pills li:hover,
  .scihelp-stat:hover {
    transform: none !important;
  }
}
