/*
Theme Name: Fireblocks
Author: Fireblocks
Author URI: https://www.fireblocks.com
Theme URI: https://www.fireblocks.com
Tags: full-site-editing, block-patterns
Text Domain: fireblocks
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.4
Version: 100.0

License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Styles intended only for the front.*/

:root {
  --overshoot: 9px;
  --rebound: 8.2px;
}

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
	font-size: 16px;
  color: var(--wp--preset--color--network-navy);
}

#wpadminbar {
  overflow-x: hidden;
}

@media screen and (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/* Header styles -- must be here vs header file to load properly */
body.kb-modal-open {
  max-height: 100vh;
}

body.kb-modal-open header.wp-block-template-part:has(.triggered),
body.kb-modal-open header.wp-block-template-part:has(.triggered) > * {
    position: absolute;
    max-height: 100vh;
    height: fit-content;
    background: white;
    z-index: 9999;
    width: 100%;
}

body.kb-modal-open header.wp-block-template-part:has(.triggered) .wp-block-kadence-header-desktop .kb-identity {
  opacity: 0;
  transition: opacity .2s ease-in-out;
}

.kb-navigation:has(.menu-item--toggled-on) > .menu-item:not(.menu-item--toggled-on) {
  display: none !important;
}

.grid {
	display: grid;
	gap: 40px;
	grid-template-columns: repeat(12,1fr);
}

@media only screen and (max-width: 1024px) {
  body:not(.page-template-brand-kit) .entry-content.wp-block-post-content {
    padding: 0 1rem !important;
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* Card Links */
.fb-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    cursor: pointer;
}

/* Product UI cards */
.fb-product-ui-card-mask {
  position: absolute;
  height: 100.5%;
  width: 100%;
  border-radius: 1rem;
  left: 0;
  top: 0;
}

@media only screen and (min-width: 1024px) {
  .fb-product-ui-card .kt-inside-inner-col::before {
    opacity: 0 !important;
  }
}
@media only screen and (max-width: 1024px) {
  .fb-product-ui-card {
    aspect-ratio: 361/495;
    min-height: unset !important;
    width: 100%;
  }
  .fb-product-ui-card .kt-inside-inner-col {
    background-image: none !important;
  }
  .fb-product-ui-card .kb-section-link-overlay {
    opacity: 1 !important;
  }
  .fb-product-ui-card .kt-inside-inner-col p {
    opacity: 1 !important; 
    font-size: 1.25rem !important;
  }
  .fb-product-ui-card .kt-inside-inner-col p,
  .fb-product-ui-card .kt-inside-inner-col h4 {
    position: relative;
    z-index: 1;
    max-width: 65vw !important;
  }
  .fb-product-ui-card .kb-lottie-container {
    position: absolute;
    top: 0;
  }
  .fb-product-ui-card .kt-inside-inner-col::after {
    content: '';
    background: url("/wp-content/themes/fireblocks-block-theme/assets/svg/icons/arrow-right-navy.svg") repeat-x center center;
    position: absolute;
    right: var(--wp--preset--spacing--medium);
    width: 32px;
    height: 32px;
    background-size: 32px 32px;
    display: block;
    background-position: left;
    transition: filter .3s ease;
    z-index: 2;
  }
  .fb-product-ui-card-mask {
    mask: url('/wp-content/themes/fireblocks-block-theme/assets/svg/shapes/mobile/product-ui-card-shape.svg') no-repeat center/100% 100%;
    -webkit-mask: url('/wp-content/themes/fireblocks-block-theme/assets/svg/shapes/mobile/product-ui-card-shape.svg') no-repeat center/100% 100%;
    mask-size: cover;
    -webkit-mask-size: contain;
    background-color: white;
    position: absolute;
    z-index: 0;
    aspect-ratio: 361/495;
  }
}

@media only screen and (max-width: 768px) {
  .fb-product-ui-card {
    max-height: 470px !important;
  }
  .fb-product-ui-card-mask {
    mask-size: cover;
    -webkit-mask-size: cover;
  }
}

/* Hubspot styles */
.hubspot-form-container .hs-button.primary.large {
  padding: var(--wp--preset--spacing--small) !important;
  background: var(--wp--preset--color--mid-periwinkle);
  color: var(--wp--preset--color--white);
  border-color: none;
  line-height: 1;
  transition: all .2s ease-in-out;
  cursor: pointer;
}

.hubspot-form-container .hs-button.primary.large:hover {
  background: var(--wp--preset--color--network-navy);
  transition: all .2s ease-in-out;
}

/* Animations */
/* Optional: motion safety */
@media (prefers-reduced-motion: reduce) {
  [class*="subtle-bounce"] { animation: none !important; }
}

/* Easing: fast out, soft settle */
.subtle-bounce {
  animation-timing-function: cubic-bezier(.22, .61, .36, 1);
}

/* down-right: end at (8px, 8px) */
@keyframes subtle-bounce-down-right {
  0%   { transform: translateY(0) translateX(0); }
  40%  { transform: translateY(var(--overshoot)) translateX(var(--overshoot)); }
  72%  { transform: translateY(var(--rebound)) translateX(var(--rebound)); }
  100% { transform: translateY(8px) translateX(8px); }
}

/* up-left: end at (-8px, -8px) */
@keyframes subtle-bounce-up-left {
  0%   { transform: translateY(0) translateX(0); }
  40%  { transform: translateY(calc(var(--overshoot) * -1)) translateX(calc(var(--overshoot) * -1)); }
  72%  { transform: translateY(calc(var(--rebound) * -1)) translateX(calc(var(--rebound) * -1)); }
  100% { transform: translateY(-8px) translateX(-8px); }
}

/* straight up: end at (-8px, 0) — make it gentle with easing (no bounce needed) */
@keyframes subtle-bounce-up {
  0%   { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-8px) translateX(0); }
}

/* up-right: end at (-8px, 8px) */
@keyframes subtle-bounce-up-right {
  0%   { transform: translateY(0) translateX(0); }
  40%  { transform: translateY(calc(var(--overshoot) * -1)) translateX(var(--overshoot)); }
  72%  { transform: translateY(calc(var(--rebound) * -1)) translateX(var(--rebound)); }
  100% { transform: translateY(-8px) translateX(8px); }
}

/* down-left: end at (8px, -8px) */
@keyframes subtle-bounce-down-left {
  0%   { transform: translateY(0) translateX(0); }
  40%  { transform: translateY(var(--overshoot)) translateX(calc(var(--overshoot) * -1)); }
  72%  { transform: translateY(var(--rebound)) translateX(calc(var(--rebound) * -1)); }
  100% { transform: translateY(8px) translateX(-8px); }
}

@keyframes arrow-loop {
    0% {
        left: -24px;
    }
    100% {
        left: 0;
    }
}

@keyframes large-arrow-loop {
    0% {
        left: -40px;
    }
    100% {
        left: 0;
    }
}