/**
 * Theme Name:        kupu Base
 * Theme URI:         https://kupu.co.uk
 * Version:           1.0.0
 * Author:            Steve Newbury
 * Author URI:        https://kupu.co.uk
 * Text Domain:       kupu
 * Tested up to:      6.7.2
 * Requires at least: 6.0
 * Requires PHP:      8.0
 */

/* VARS */
:root {
  --site-header-height: 130px;
  --site-header-height--scrolled: 90px;
  --site-header-height--scrolled-mobile: 95px;
  --site-header-height--scrolled-tablet: 80px;
  --site-header-height--mobile: 110px;
  --site-footer-height: 95px;

  --loader-size: 75px;

  --error-color: rgba(239, 83, 80, 1);
  --error-text-color: var(--wp--preset--color--white-smoke);
  --success-color: var(--wp--preset--color--dodger-blue);
  --success-text-color: var(--wp--preset--color--white-smoke);
  --warning-color: rgba(238, 210, 2, 1);
  --warning-text-color: var(--wp--preset--color--dark-charcoal);
}

/* NORMALISE */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin-top: 0 !important;
}

ul,
ol {
  padding-left: var(--wp--preset--spacing--16);
}

ul {
  list-style-type: disc;
}

.screen-reader-text,
.screen-reader-response {
  display: none;
}

p {
  font-size: var(--wp--preset--font-size--16);
  margin: 0;
}

/* BASE */
body {
  background-color: var(--wp--preset--color--white-smoke);
}

.page-body {
  width: var(--wp--preset--layout--wide-size);
}

a:focus {
  box-shadow: 0 0 0 2px var(--wp--preset--color--dodger-blue);
}

a:hover {
  cursor: pointer;
}

@media (width <= 782px) {
  .font-size__heading--mobile--28 {
    font-size: var(--wp--preset--font-size--28) !important;
  }

  .font-size__heading--mobile--48 {
    font-size: var(--wp--preset--font-size--48) !important;
  }

  .font-size__heading--mobile {
    font-size: var(--wp--preset--font-size--36) !important;
  }

  .font-size__paragraph--mobile {
    font-size: var(--wp--preset--font-size--16) !important;
  }
}

/* STICKY FOOTER */
html,
body {
  box-sizing: border-box;
  height: 100%;
}

.wrapper {
  box-sizing: border-box;
  min-height: 100%;

  display: flex;
  flex-direction: column;
}

.site-header,
.site-footer {
  flex-grow: 0;
  flex-shrink: 0;
}

.page-body {
  flex-grow: 1;
  margin-top: var(--site-header-height--mobile);
}

@media (width >= 1220px) {
  .page-body {
    margin-top: var(--site-header-height);
  }
}

.logged-in.admin-bar .page-body {
  margin-top: calc(var(--site-header-height) + 32px);
}

/* HEADER */
.site-header {
  background-color: var(--wp--preset--color--white-smoke);
  height: var(--site-header-height--mobile);
  margin: 0 auto;
  padding: var(--wp--preset--spacing--16);
  position: fixed;
  width: 100%;
  z-index: 100;
}

@media (width >= 1220px) {
  .site-header {
    height: var(--site-header-height);
    padding: var(--wp--preset--spacing--16) 0;
  }
}

.logged-in.admin-bar .site-header {
  margin-top: 46px;
}

@media (width > 782px) {
  .logged-in.admin-bar .site-header {
    margin-top: 32px;
  }
}

/* LOGO */
.logo__link {
  color: var(--wp--preset--color--dark-charcoal);
  font-family: var(--wp--preset--font-family--new-amsterdam);
  text-decoration: none;
}

.logo__link:hover {
  color: var(--wp--preset--color--dark-charcoal);
}

.logo__link--top {
  font-size: var(--wp--preset--font-size--48);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}

@media (width >= 1220px) {
  .logo__link--top {
    font-size: var(--wp--preset--font-size--56);
  }
}

.logo__link--bottom {
  font-size: var(--wp--preset--font-size--24);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}

@media (width >= 1220px) {
  .logo__link--bottom {
    font-size: var(--wp--preset--font-size--32);
  }
}

/* STICKY HEADER */
.site-header.is-scrolled {
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
  height: var(--site-header-height--scrolled-mobile);
  transition: all 0.15s ease-out;
}

@media (782px <= width <= 1220px) {
  .site-header.is-scrolled {
    height: var(--site-header-height--scrolled-tablet);
  }
}

@media (width <= 782px) {
  .site-header.is-scrolled {
    padding-top: var(--wp--preset--spacing--10);
  }
}

@media (width <= 600px) {
  .logged-in.admin-bar .site-header.is-scrolled {
    margin-top: 0;
    padding-top: var(--wp--preset--spacing--8);
  }
}

.site-header.is-scrolled .logo__link--top {
  font-size: var(--wp--preset--font-size--24);
}

@media (width >= 1220px) {
  .site-header.is-scrolled .logo__link--top {
    font-size: var(--wp--preset--font-size--32);
  }
}

.site-header.is-scrolled .logo__link--bottom {
  font-size: var(--wp--preset--font-size--18);
}

@media (width >= 1220px) {
  .site-header.is-scrolled .logo__link--bottom {
    font-size: var(--wp--preset--font-size--20);
  }
}

/* FOOTER */
.site-footer {
  align-items: center;
  background-color: var(--wp--preset--color--dark-charcoal);
  color: var(--wp--preset--color--white-smoke);
  display: flex;
  flex-direction: column;
  height: var(--site-footer-height);
  justify-content: center;
  text-align: center;
}

/* NAVIGATION */
.nav-wrapper {
  align-items: center;
  justify-content: space-between;
  display: flex;
  margin: 0 auto;
  max-width: var(--wp--style--global--content-size);
  width: 100%;
}

.nav-wrapper nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--32);
  left: -200%;
  list-style-type: none;
  margin: 0;
  padding-left: var(--wp--preset--font-size--32);
  position: fixed;
  width: 100%;
}

.nav-wrapper nav ul.active {
  background-color: var(--wp--preset--color--dodger-blue);
  gap: var(--wp--preset--spacing--24);
  left: 0;
  margin: 0;
  padding-top: 20px;
  transition: all 0.15s ease-out;
}

@media (width >= 782px) {
  .nav-wrapper nav ul {
    flex-direction: row;
    left: 0;
    padding-left: 0;
    position: relative;
  }
}

.nav-wrapper nav ul li {
  margin: 0;
}

.nav-wrapper nav ul li.current-menu-item a,
.nav-wrapper nav ul li a:hover {
  border-bottom: 2px solid var(--wp--preset--color--dodger-blue);
  color: var(--wp--preset--color--dodger-blue);
}

.nav-wrapper nav ul li a {
  color: var(--wp--preset--color--dark-charcoal);
  font-size: var(--wp--preset--font-size--18);
  padding: 0;
  text-decoration: none;
}

.nav-wrapper .cheeseburger {
  display: none;
  margin: 24px;
}

.nav-wrapper .cheeseburger .bar {
  background-color: var(--wp--preset--color--dark-charcoal);
  display: block;
  height: 3px;
  margin: 5px auto;
  transition: all 0.15s ease-in-out;
  width: 25px;
}

.nav-wrapper .cheeseburger:not(.active) .bar:nth-child(2) {
  width: 20px;
}

.nav-wrapper .cheeseburger:not(.active) .bar:nth-child(3) {
  width: 15px;
}

@media (width <= 781px) {
  .nav-wrapper .cheeseburger {
    cursor: pointer;
    display: block;
    position: relative;
    z-index: 1;
  }

  .nav-wrapper .cheeseburger.active {
    display: block;
  }

  .nav-wrapper .cheeseburger.active .bar {
    margin: 5px auto;
  }

  .nav-wrapper .cheeseburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-wrapper .cheeseburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-wrapper .cheeseburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* NAV MOBILE OVERLAY */
.nav-overlay {
  background-color: var(--wp--preset--color--white-smoke);
  display: flex;
  flex-direction: column;
  height: 100vh;
  left: -9999px;
  position: absolute;
  top: 0;
  width: 100%;
}

.nav-overlay.active {
  left: 0;
}

.nav-overlay--top {
  background-color: var(--wp--preset--color--white-smoke);
  margin: var(--wp--preset--spacing--16);
}

.nav-overlay--middle {
  margin-top: -17%;
}

.nav-overlay--middle svg {
  display: block;
}

.nav-overlay--bottom {
  background-color: var(--wp--preset--color--dodger-blue);
  height: 100%;
  margin-top: -10%;
}

.nav-overlay nav ul {
  list-style-type: none;
}

.nav-overlay nav ul li {
  margin-bottom: var(--wp--preset--spacing--24);
}

.nav-overlay nav ul li a {
  color: var(--wp--preset--color--white-smoke);
  font-size: var(--wp--preset--font-size--20);
  text-decoration: none;
}

/* CONTACT FORM */
.spn-form--hide,
.spn-notice--hide {
  display: none !important;
}

.spn-form-intro-copy {
  margin: 0 0 var(--wp--preset--spacing--32);
}

.spn-form-intro-copy p {
  font-size: var(--wp--preset--font-size--18);
  margin-bottom: var(--wp--preset--spacing--16);
  margin-top: 0;
}

@media (width <= 782px) {
  .spn-form-intro-copy p {
    font-size: var(--wp--preset--font-size--16);
  }
}

.spn-form-disclaimer {
  font-size: var(--wp--preset--font-size--16);
  margin: var(--wp--preset--spacing--32) 0;
  padding: 0;
}

@media (width <= 1220px) {
  .spn-form-disclaimer {
    padding: 0 var(--wp--preset--spacing--16);
  }
}

.spn-form {
  display: flex;
  flex-direction: column;
  margin: 0;
}

@media (width <= 1220px) {
  .spn-form-intro-copy,
  .spn-form {
    padding: 0 var(--wp--preset--spacing--16);
  }
}

.spn-form .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--wp--preset--spacing--32);
}

.spn-form label {
  font-family: var(--wp--preset--font-family--new-amsterdam);
  font-size: var(--wp--preset--font-size--24);
}

.spn-form input[type='text'],
.spn-form input[type='email'],
.spn-form input[type='tel'],
.spn-form textarea,
.spn-form select {
  background-color: transparent;
  border: none;
  border-bottom: 2px solid var(--wp--preset--color--dark-charcoal);
  border-radius: 0;
  color: var(--wp--preset--color--dark-charcoal);
  font-size: var(--wp--preset--font-size--16);
  font-weight: 300;
  padding: var(--wp--preset--spacing--8) 0;
}

.spn-form input[type='text']:focus,
.spn-form input[type='email']:focus,
.spn-form input[type='tel']:focus,
.spn-form textarea:focus,
.spn-form select:focus,
.spn-form select:focus-visible {
  border-color: var(--wp--preset--color--dodger-blue);
  box-shadow: none;
  outline: none;
}

.spn-form input[type='text']::placeholder,
.spn-form input[type='email']::placeholder,
.spn-form input[type='tel']::placeholder,
.spn-form textarea::placeholder,
.spn-form select {
  color: var(--wp--preset--color--dark-charcoal);
  font-size: var(--wp--preset--font-size--16);
  font-weight: 300;
}

/* CONTACT FORM LOADER */
.spn-form-loader {
  margin-bottom: var(--wp--preset--spacing--16);
}

.spn-form-loader circle {
  transform-origin: center;
  transform-box: fill-box;
  transform-origin: center;
  animation: rotate-loader linear infinite;
  stroke: var(--wp--preset--color--dodger-blue);
  stroke-width: 4;
  fill: none;
}

.spn-form-loader circle:nth-child(1) {
  animation-duration: 1.6s;
  stroke: var(--wp--preset--color--dark-charcoal);
}

.spn-form-loader circle:nth-child(2) {
  animation-duration: 1.2s;
}

.spn-form-loader circle:nth-child(3) {
  animation-duration: 0.8s;
}

@keyframes rotate-loader {
  100% {
    transform: rotate(360deg);
  }
}

.spn-form-loader svg {
  width: var(--loader-size);
  height: var(--loader-size);
}

/* CONTACT FORM NOTICES */
.spn-notice {
  display: flex;
  justify-content: center;
  margin: 0 0 var(--wp--preset--spacing--32);
  padding: var(--wp--preset--spacing--24);
  text-align: center;
}

.spn-notice--danger {
  background-color: var(--error-color);
  color: var(--error-text-color);
}

.spn-notice--success {
  align-items: center;
  background-color: var(--success-color);
  color: var(--success-text-color);
  display: flex;
  flex-direction: column;
}

.spn-notice--success p {
  font-size: var(--wp--preset--font-size--16);
}

.spn-notice--success p,
.spn-notice--success h2,
.spn-notice--success h3 {
  color: var(--wp--preset--color--white-smoke);
  margin: 0 0 var(--wp--preset--spacing--8);
}

@media (width <= 781px) {
  .spn-notice--success {
    flex-direction: column;
  }
}

.spn-notice--warning {
  background-color: var(--warning-color);
  color: var(--warning-text-color);
}

.spn-form--has-error {
  border-bottom: 2px solid var(--error-color) !important;
}

/* BUTTONS */
.btn {
  background-color: var(--wp--preset--color--dark-charcoal);
  border-radius: 0;
  border: 2px solid transparent;
  color: var(--wp--preset--color--off-yellow);
  cursor: pointer;
  font-size: var(--wp--preset--font-size--20);
  font-family: var(--wp--preset--font-family--new-amsterdam);
  padding: var(--wp--preset--spacing--16) var(--wp--preset--spacing--32);
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.15s ease-in-out;
  width: fit-content;
}

.btn:hover {
  background-color: var(--wp--preset--color--off-yellow);
  border-color: var(--wp--preset--color--dark-charcoal);
  color: var(--wp--preset--color--dark-charcoal);
}

/* WORDPRESS BLOCK STYLE OVERRIDES */
.wp-block-social-links
  .wp-block-social-link.wp-social-link
  a.wp-block-social-link-anchor:hover {
  background-color: var(--wp--preset--color--off-yellow);
  color: var(--wp--preset--color--dodger-blue);
  transition: all 0.15s ease-in-out;
}

@media (width <= 990px) {
  .sn-wp-block-column {
    padding-left: 0 !important;
  }

  .sn-wp-block-column p {
    padding-left: 0 !important;
  }

  .sn-wp-block-social-links {
    padding-left: 0 !important;
  }
}

.sn-wp-block-group {
  box-shadow: 0px 12px 20px rgba(0, 0, 0, 0.3) !important;
}

@media (width <= 1150px) {
  .sn-wp-block-group-wrapper {
    flex-wrap: wrap !important;
  }

  .sn-wp-block-group {
    flex-basis: 100% !important;
  }
}

.wp-block-button .wp-block-button__link.wp-element-button:hover {
  background-color: var(--wp--preset--color--off-yellow);
  border-color: var(--wp--preset--color--dark-charcoal);
  color: var(--wp--preset--color--dark-charcoal);
  transition: all 0.15s ease-in-out;
}

.wp-block-button.is-style-outline
  .wp-block-button__link.wp-element-button:hover {
  background-color: var(--wp--preset--color--dark-charcoal);
  border-color: var(--wp--preset--color--dark-charcoal);
  color: var(--wp--preset--color--off-yellow);
  transition: all 0.15s ease-in-out;
}

/* WORDPRESS BLOCK VARIATIONS */
.wp-block-button.kupu-dodger-blue-button
  .wp-block-button__link.wp-element-button {
  background-color: var(--wp--preset--color--dodger-blue);
  border-color: var(--wp--preset--color--dodger-blue);
  color: var(--wp--preset--color--white-smoke);
  transition: all 0.15s ease-in-out;
}

.wp-block-button.kupu-dodger-blue-button
  .wp-block-button__link.wp-element-button:hover {
  background-color: var(--wp--preset--color--white-smoke);
  border-color: var(--wp--preset--color--dodger-blue);
  color: var(--wp--preset--color--dodger-blue);
}

.wp-block-button.kupu-small-button .wp-block-button__link.wp-element-button {
  font-size: var(--wp--preset--font-size--16);
  padding: var(--wp--preset--spacing--8) var(--wp--preset--spacing--16);
}

.wp-block-button.kupu-small-blue-button
  .wp-block-button__link.wp-element-button {
  background-color: var(--wp--preset--color--dodger-blue);
  border-color: var(--wp--preset--color--dodger-blue);
  color: var(--wp--preset--color--white-smoke);
  font-size: var(--wp--preset--font-size--16);
  padding: var(--wp--preset--spacing--8) var(--wp--preset--spacing--16);
}

.wp-block-button.kupu-small-blue-button
  .wp-block-button__link.wp-element-button:hover {
  background-color: var(--wp--preset--color--white-smoke);
  border-color: var(--wp--preset--color--dodger-blue);
  color: var(--wp--preset--color--dodger-blue);
  transition: all 0.15s ease-in-out;
}

@media (width <= 781px) {
  .btn,
  .wp-block-button__link {
    padding: var(--wp--preset--spacing--12) var(--wp--preset--spacing--24);
  }
}

@media (width <= 781px) {
  .wp-block-column--reset-width {
    padding-left: var(--wp--preset--spacing--32) !important;
    padding-right: var(--wp--preset--spacing--32) !important;
  }

  .wp-block-group--reset-width > * {
    max-width: 100% !important;
  }
}

@media (width <= 990px) {
  .wp-block-columns {
    flex-wrap: wrap !important;
  }

  .wp-block-column {
    flex-basis: 100% !important;
  }

  .wp-block-column img {
    width: 100%;
  }

  .wp-block-group h2,
  .wp-block-column h2 {
    text-align: center;
  }
}
