@font-face {
  font-family: "Zivaro Rubik";
  src: url("https://zivaro.kids/wp-content/uploads/zivaro-site-assets/1b3a7437ba2a/Rubik-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "Zivaro Fredoka One";
  src: url("https://zivaro.kids/wp-content/uploads/zivaro-site-assets/a6e9aba8aa56/FredokaOne-Hebrew.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Zivaro Secular One";
  src: url("https://zivaro.kids/wp-content/uploads/zivaro-site-assets/2f45092a521d/SecularOne-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Zivaro Varela Round";
  src: url("https://zivaro.kids/wp-content/uploads/zivaro-site-assets/e1e47eb66dbc/VarelaRound-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/*
 * Homepage hero lockup.
 * The heading stays quiet and highly readable; restrained motion lives in
 * the accent rule and two small decorative shapes.
 */
.home-title-lockup {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: min(100%, 52rem);
  margin-block-end: clamp(1.25rem, 2.5vw, 1.8rem);
  padding: clamp(1.6rem, 3.6vw, 2.7rem) clamp(0.4rem, 1.5vw, 1rem)
    clamp(0.8rem, 1.8vw, 1.25rem);
  overflow: visible;
  text-align: start;
}

.home-title-lockup .zv-title {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  color: #172c4f;
  font-family: "Zivaro Rubik", "Noto Sans Hebrew", Arial, sans-serif;
  font-size: clamp(3.35rem, 5.75vw, 5.8rem);
  font-weight: 850;
  font-variation-settings: "wght" 850;
  line-height: 0.96;
  letter-spacing: -0.022em;
}

.home-title-line {
  display: flex;
  width: 100%;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.16em;
  margin-inline: auto;
  direction: rtl;
  white-space: nowrap;
  transform: scaleY(1.08);
  transform-origin: 50% 50%;
}

.home-title-word {
  display: inline-block;
  color: #24548c;
  background:
    linear-gradient(
      90deg,
      #18aaa6 0%,
      #3a82df 10%,
      #6d60dc 20%,
      #b851b3 30%,
      #ec647f 40%,
      #f49a64 48%,
      #18aaa6 50%,
      #3a82df 60%,
      #6d60dc 70%,
      #b851b3 80%,
      #ec647f 90%,
      #18aaa6 100%
    );
  background-size: 200% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 0 0.018em #173a65)
    drop-shadow(0 0.052em 0 #123866)
    drop-shadow(0 0.11em 0.08em rgb(15 40 74 / 22%));
  will-change: background-position;
  animation: home-title-aurora-flow 10s linear var(--aurora-delay, 0s) infinite;
}

.home-title-line + .home-title-line {
  margin-block-start: 0.18em;
}

.home-title-line--primary {
  font-size: 1.05em;
}

.home-title-line--accent {
  --aurora-delay: -2.7s;
  font-size: 0.78em;
  letter-spacing: -0.01em;
}

.home-title-line--closing {
  --aurora-delay: -5.3s;
  position: relative;
  height: 0.82em;
  min-height: 0.82em;
  font-size: 1.35em;
}

.home-title-word--growing {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform-origin: 50% 100%;
  will-change: transform, background-position;
  animation:
    home-title-aurora-flow 10s linear var(--aurora-delay, 0s) infinite,
    home-title-word-grow 12s ease-in-out 0s infinite;
}

.home-title-physics-active .home-title-line--primary,
.home-title-physics-active .home-title-line--accent {
  position: relative;
  z-index: 4;
}

.home-title-physics-active .home-title-line--closing {
  z-index: 3;
}

.home-title-physics-active
  .home-title-line:not(.home-title-line--closing)
  .home-title-word {
  background: none !important;
  animation: none !important;
}

.home-title-letter {
  position: relative;
  display: inline-block;
  color: #24548c;
  background:
    linear-gradient(
      90deg,
      #18aaa6 0%,
      #3a82df 10%,
      #6d60dc 20%,
      #b851b3 30%,
      #ec647f 40%,
      #f49a64 48%,
      #18aaa6 50%,
      #3a82df 60%,
      #6d60dc 70%,
      #b851b3 80%,
      #ec647f 90%,
      #18aaa6 100%
    );
  background-size: var(--letter-aurora-size, 200%) 100%;
  background-position: var(--letter-aurora-from, 0%) 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transform-origin: 50% 55%;
  will-change: auto;
  animation: none;
  pointer-events: none;
}

#home-title[data-physics-state="colliding"] .home-title-letter,
#home-title[data-physics-state="restoring"] .home-title-letter {
  will-change: transform, background-position;
}

.home-title-rule {
  position: relative;
  z-index: 3;
  display: block;
  width: clamp(7.5rem, 24vw, 12.5rem);
  height: 0.38rem;
  margin: clamp(1rem, 2vw, 1.35rem) auto 0;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      #17a79d 0%,
      #6554d5 32%,
      #df5363 64%,
      #f0a12e 82%,
      #17a79d 100%
    );
  background-size: 220% 100%;
  box-shadow: 0 0.35rem 0.8rem rgb(48 72 123 / 16%);
  animation: home-title-rule-flow 7s ease-in-out infinite;
}

.home-title-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgb(255 255 255 / 78%) 48%,
    transparent 100%
  );
  transform: translateX(-130%);
  animation: home-title-rule-glint 5.5s ease-in-out infinite;
}

.home-title-lockup .zv-eyebrow {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  width: auto;
  max-width: min(100%, 33rem);
  margin: clamp(1rem, 2vw, 1.35rem) 0 0;
  padding: 0.68rem 0.9rem 0.72rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 1.15rem;
  background:
    linear-gradient(
        135deg,
        rgb(255 255 255 / 96%),
        rgb(246 250 255 / 91%)
      )
      padding-box,
    linear-gradient(
        105deg,
        rgb(24 170 166 / 62%),
        rgb(101 84 213 / 62%),
        rgb(236 100 127 / 58%)
      )
      border-box;
  box-shadow:
    0 0.55rem 1.4rem rgb(31 60 105 / 10%),
    inset 0 1px 0 rgb(255 255 255 / 82%);
  color: #294a70;
  font-family: "Zivaro Rubik", "Noto Sans Hebrew", Arial, sans-serif;
  font-size: clamp(1.05rem, 1.65vw, 1.28rem);
  font-weight: 780;
  line-height: 1.42;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.home-subtitle-mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 0.65rem;
  background: linear-gradient(145deg, #18aaa6, #6554d5 58%, #b851b3);
  box-shadow:
    0 0.3rem 0.7rem rgb(53 70 143 / 22%),
    inset 0 1px 0 rgb(255 255 255 / 42%);
  transform: rotate(5deg);
}

.home-subtitle-mark::before {
  content: "✦";
  color: #ffffff;
  font-size: 1rem;
  line-height: 1;
  text-shadow: 0 1px 0 rgb(24 48 91 / 28%);
  transform: rotate(-5deg);
}

@keyframes home-title-rule-flow {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes home-title-rule-glint {
  0%,
  18% {
    transform: translateX(-130%);
  }

  46%,
  100% {
    transform: translateX(130%);
  }
}

@keyframes home-title-word-grow {
  0%,
  100% { transform: translateX(-50%) scale(0.46) rotate(0deg); }
  9% { transform: translateX(-50%) scale(0.54) rotate(-0.9deg); }
  18% { transform: translateX(-50%) scale(0.66) rotate(0.8deg); }
  27% { transform: translateX(-50%) scale(0.8) rotate(-0.7deg); }
  36% { transform: translateX(-50%) scale(0.96) rotate(0.6deg); }
  45% { transform: translateX(-50%) scale(1.12) rotate(-0.45deg); }
  54% { transform: translateX(-50%) scale(1.28) rotate(0.35deg); }
  61% { transform: translateX(-50%) scale(1.42) rotate(-0.25deg); }
  66% { transform: translateX(-50%) scale(1.52) rotate(0deg); }
  72% { transform: translateX(-50%) scale(1.48) rotate(0deg); }
  86% { transform: translateX(-50%) scale(0.96) rotate(0deg); }
}

@keyframes home-title-aurora-flow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

@media (max-width: 56.25rem) {
  .home-title-lockup {
    margin-inline: auto;
    text-align: center;
  }

  .home-title-lockup .zv-eyebrow {
    margin-inline: auto;
  }
}

@media (max-width: 40rem) {
  .zv-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    max-width: 100%;
  }

  .zv-hero-copy,
  .home-title-lockup,
  .home-title-lockup .zv-title,
  .home-title-line {
    min-width: 0;
    max-width: 100%;
  }

  .zv-hero-copy,
  .home-title-lockup {
    width: 100%;
  }

  .home-title-lockup {
    padding: 1.35rem 0.2rem 0.7rem;
  }

  .home-title-lockup .zv-title {
    font-size: clamp(2.85rem, 12.2vw, 4.3rem);
    line-height: 0.96;
    letter-spacing: -0.01em;
  }

  .home-title-line--accent {
    font-size: 0.7em;
  }

  .home-title-line--primary {
    font-size: 0.96em;
    letter-spacing: -0.02em;
  }

  .home-title-line--closing {
    font-size: 1.22em;
  }

  .home-title-lockup .zv-eyebrow {
    width: min(100%, 23rem);
    gap: 0.55rem;
    font-size: clamp(0.98rem, 4.2vw, 1.1rem);
    line-height: 1.45;
  }

}

@media (max-width: 24rem) {
  .home-title-lockup .zv-title {
    font-size: clamp(2.55rem, 11.9vw, 3.2rem);
  }

  .home-title-line--accent {
    font-size: 0.68em;
  }

  .home-title-line--primary {
    font-size: 0.94em;
  }

  .home-title-line--closing {
    font-size: 1.18em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-title-rule,
  .home-title-rule::after {
    animation: none;
  }

  .home-title-word--growing {
    animation-name: home-title-aurora-flow, home-title-word-grow !important;
    animation-duration: 10s, 12s !important;
    animation-timing-function: linear, ease-in-out !important;
    animation-delay: var(--aurora-delay, 0s), 0s !important;
    animation-direction: normal, normal !important;
    animation-iteration-count: infinite, infinite !important;
  }

  .home-title-word:not(.home-title-word--growing) {
    animation-name: home-title-aurora-flow !important;
    animation-duration: 10s !important;
    animation-timing-function: linear !important;
    animation-delay: var(--aurora-delay, 0s) !important;
    animation-direction: normal !important;
    animation-iteration-count: infinite !important;
  }

}
