@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --header-height: 4.5rem;

  --sage-950: hsl(350, 24%, 18%);
  --sage-900: hsl(350, 20%, 25%);
  --sage-700: hsl(350, 15%, 35%);
  --sage-500: hsl(350, 15%, 55%);
  --sage-200: hsl(350, 50%, 90%);
  --sand-100: hsl(36, 30%, 94%);
  --sand-50: hsl(36, 40%, 98%);
  --clay-500: hsl(350, 45%, 65%);
  --clay-400: hsl(350, 55%, 75%);
  --white-color: hsl(0, 0%, 100%);
  --title-color: var(--sage-950);
  --text-color: hsl(350, 15%, 35%);
  --text-color-light: hsl(350, 12%, 50%);
  --body-color: linear-gradient(180deg, hsl(36, 40%, 98%) 0%, hsl(350, 30%, 95%) 100%);
  --container-color: hsla(0, 0%, 100%, 0.78);
  --border-color: hsla(350, 20%, 25%, 0.08);
  --shadow-color: 0 24px 60px hsla(350, 24%, 18%, 0.07);

  --body-font: "Manrope", sans-serif;
  --second-font: "Cormorant Garamond", serif;
  --biggest-font-size: 3.5rem;
  --bigger-font-size: 2.5rem;
  --big-font-size: 1.6rem;
  --h1-font-size: 1.4rem;
  --h2-font-size: 1.15rem;
  --normal-font-size: 0.96rem;
  --small-font-size: 0.86rem;

  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  --z-tooltip: 10;
  --z-fixed: 100;
}

@media screen and (min-width: 1152px) {
  :root {
    --biggest-font-size: 5.7rem;
    --bigger-font-size: 3.75rem;
    --big-font-size: 2rem;
    --h1-font-size: 1.65rem;
    --h2-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.92rem;
  }
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body,
input,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background: var(--body-color);
  color: var(--text-color);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  color: var(--title-color);
  font-weight: var(--font-medium);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.home__img,
.about__img,
.classes__card img,
.benefits__gallery img {
  transition: transform 0.4s ease;
}

.home__img:hover,
.about__img:hover,
.classes__card img:hover,
.benefits__gallery img:hover {
  transform: scale(1.02);
}

button,
input {
  border: none;
  outline: none;
}

.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5.5rem 1rem;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--clay-500);
  font-size: var(--small-font-size);
  font-weight: var(--font-semi-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section__eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background-color: currentColor;
}

.section__eyebrow--center {
  justify-content: center;
  width: 100%;
}

.section__title {
  font-family: var(--second-font);
  font-size: var(--bigger-font-size);
  line-height: 0.95;
  text-align: center;
  margin-bottom: 1.2rem;
}

.section__title--left {
  text-align: left;
}

.main {
  overflow: hidden;
}

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-fixed);
  transition: background-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.blur-header {
  background-color: hsla(36, 40%, 98%, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px hsla(350, 24%, 18%, 0.07);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo,
.footer__logo {
  color: var(--title-color);
  font-family: var(--second-font);
  font-size: 1.7rem;
  font-weight: var(--font-semi-bold);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__toggle {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: var(--title-color);
  background-color: var(--white-color);
  box-shadow: 0 12px 30px hsla(350, 24%, 18%, 0.08);
  cursor: pointer;
}

.nav__menu-cta {
  display: none;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    top: 5rem;
    left: 1rem;
    right: 1rem;
    padding: 1.5rem;
    background-color: hsla(36, 40%, 98%, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-color);
    transform: translateY(-1rem);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
  }
  
  .nav__action-btn {
    display: none !important;
  }
  
  .nav__menu-cta {
    display: block;
    margin-top: 1.5rem;
    text-align: center;
  }
  
  .nav__menu-cta .button {
    width: 100%;
    justify-content: center;
  }
}

.show-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav__list {
  display: grid;
  gap: 1rem;
}

.nav__link {
  color: var(--text-color);
  font-weight: var(--font-medium);
  transition: color 0.3s;
}

.nav__link:hover,
.active-link {
  color: var(--clay-500);
}

.home {
  position: relative;
  overflow: hidden;
  padding-top: 7.5rem;
}

/* Sparkles Raining Animation */
.sparkles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  background-color: var(--sparkle-color, hsl(44, 95%, 65%));
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  opacity: 0;
  animation: fall-and-fade linear infinite;
  pointer-events: none;
  filter: drop-shadow(0 0 5px var(--sparkle-color, hsl(44, 95%, 65%)));
}

@keyframes fall-and-fade {
  0% {
    top: -20px;
    transform: rotate(0deg) scale(0.3);
    opacity: 0;
    background-color: var(--sparkle-color, hsl(44, 95%, 65%));
    filter: drop-shadow(0 0 2px var(--sparkle-color, hsl(44, 95%, 65%)));
  }
  10% {
    opacity: 0.8;
    background-color: var(--sparkle-color, hsl(44, 95%, 65%));
    filter: drop-shadow(0 0 4px var(--sparkle-color, hsl(44, 95%, 65%)));
  }
  18% {
    /* Flash white burst */
    opacity: 1;
    transform: rotate(60deg) scale(1.4);
    background-color: #fff;
    filter: drop-shadow(0 0 10px #fff);
  }
  22% {
    /* Return to normal */
    opacity: 0.8;
    background-color: var(--sparkle-color, hsl(44, 95%, 65%));
    filter: drop-shadow(0 0 4px var(--sparkle-color, hsl(44, 95%, 65%)));
  }
  30% {
    opacity: 0.2;
    transform: rotate(100deg) scale(0.8);
  }
  38% {
    /* Flash white burst */
    opacity: 1;
    transform: rotate(130deg) scale(1.4);
    background-color: #fff;
    filter: drop-shadow(0 0 10px #fff);
  }
  42% {
    opacity: 0.8;
    background-color: var(--sparkle-color, hsl(44, 95%, 65%));
    filter: drop-shadow(0 0 4px var(--sparkle-color, hsl(44, 95%, 65%)));
  }
  50% {
    opacity: 0.2;
    transform: rotate(180deg) scale(0.8);
  }
  58% {
    /* Flash white burst */
    opacity: 1;
    transform: rotate(210deg) scale(1.4);
    background-color: #fff;
    filter: drop-shadow(0 0 10px #fff);
  }
  62% {
    opacity: 0.8;
    background-color: var(--sparkle-color, hsl(44, 95%, 65%));
    filter: drop-shadow(0 0 4px var(--sparkle-color, hsl(44, 95%, 65%)));
  }
  70% {
    opacity: 0.2;
    transform: rotate(260deg) scale(0.8);
  }
  78% {
    /* Flash white burst */
    opacity: 1;
    transform: rotate(290deg) scale(1.4);
    background-color: #fff;
    filter: drop-shadow(0 0 10px #fff);
  }
  82% {
    opacity: 0.8;
    background-color: var(--sparkle-color, hsl(44, 95%, 65%));
    filter: drop-shadow(0 0 4px var(--sparkle-color, hsl(44, 95%, 65%)));
  }
  90% {
    opacity: 0.2;
    transform: rotate(320deg) scale(0.8);
  }
  100% {
    top: 105%;
    transform: rotate(360deg) scale(1.1);
    opacity: 0;
    background-color: var(--sparkle-color, hsl(44, 95%, 65%));
    filter: drop-shadow(0 0 2px var(--sparkle-color, hsl(44, 95%, 65%)));
  }
}

.home__container,
.about__container,
.benefits__container,
.join__container,
.footer__container {
  align-items: center;
}

.home__title {
  font-family: var(--second-font);
  font-size: var(--biggest-font-size);
  line-height: 0.9;
  margin-bottom: 1rem;
}

.home__title span {
  color: var(--clay-500);
}

.home__description,
.about__description,
.benefits__description,
.join__description,
.footer__description {
  line-height: 1.8;
  color: var(--text-color);
}

.home__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--clay-500), var(--clay-400));
  color: var(--white-color);
  font-weight: var(--font-semi-bold);
  box-shadow: 0 16px 32px hsla(350, 45%, 65%, 0.28);
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px hsla(350, 45%, 65%, 0.34);
}

.button--ghost {
  background: transparent;
  color: var(--title-color);
  border: 1px solid hsla(350, 20%, 25%, 0.16);
  box-shadow: none;
}

.button--small {
  padding: 0.85rem 1.2rem;
}

.home__stats {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 1.5rem 2rem;
}

.home__stats h2 {
  font-family: var(--second-font);
  font-size: var(--big-font-size);
}

.home__stats span {
  color: var(--text-color-light);
  font-size: var(--small-font-size);
}

.home__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 28rem;
}

.home__shape {
  position: absolute;
  width: min(100%, 30rem);
  aspect-ratio: 1;
  border-radius: 53% 47% 52% 48% / 47% 53% 47% 53%;
  background:
    radial-gradient(circle at top, hsla(328, 73%, 68%, 0.14), transparent 55%),
    radial-gradient(circle at bottom, hsla(328, 20%, 55%, 0.2), transparent 60%),
    var(--white-color);
  box-shadow: var(--shadow-color);
  animation: bubble 8s ease-in-out infinite;
}

.home__img {
  position: relative;
  z-index: 2;
  width: min(100%, 32rem);
}

.home__card {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  background-color: hsla(0, 0%, 100%, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid hsla(0, 0%, 100%, 0.6);
  border-radius: 999px;
  box-shadow: 0 14px 35px hsla(350, 24%, 18%, 0.12);
  color: var(--sage-900);
  font-size: var(--small-font-size);
}

.home__card i {
  color: var(--clay-500);
  font-size: 1.15rem;
}

.home__card--top {
  top: 1.5rem;
  right: 0;
}

.home__card--bottom {
  bottom: 1.75rem;
  left: 0;
}

.about__images {
  position: relative;
  min-height: 24rem;
}

.about__img {
  border-radius: 1.8rem;
  object-fit: cover;
  box-shadow: var(--shadow-color);
}

.about__img--small {
  width: 12rem;
  background-color: hsl(36, 40%, 97%);
}

.about__img--large {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16rem;
  background:
    linear-gradient(180deg, hsla(350, 50%, 90%, 0.55), hsla(0, 0%, 100%, 0.8));
}

.about__points,
.benefits__list {
  display: grid;
  gap: 1rem;
  margin-top: 1.8rem;
}

.about__points article {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.about__points i {
  color: var(--clay-500);
  margin-top: 0.15rem;
}

.classes__grid {
  margin-top: 2.5rem;
}

.classes__card,
.testimonial__card,
.join__container,
.benefits__gallery img,
.footer {
  border-radius: 2rem;
}

.classes__card {
  padding: 1rem;
  background-color: var(--container-color);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-color);
}

.classes__card img {
  width: 100%;
  height: 15rem;
  object-fit: cover;
  border-radius: 1.4rem;
  margin-bottom: 1rem;
}

.classes__card h3,
.benefits__list h3,
.footer__title,
.testimonial__card h3 {
  font-size: var(--h1-font-size);
  margin-bottom: 0.6rem;
}

.classes__card p,
.benefits__list p,
.footer__info {
  line-height: 1.8;
  color: var(--text-color-light);
}

.footer__info a {
  color: inherit;
  transition: color 0.3s;
}

.footer__info a:hover {
  color: var(--clay-500);
}

.benefits__gallery {
  display: grid;
  gap: 1rem;
}

.benefits__gallery img {
  width: 100%;
  max-height: 18rem;
  object-fit: cover;
  box-shadow: var(--shadow-color);
}

.testimonial__card {
  padding: 2rem;
  text-align: center;
  background-color: var(--sage-950);
  box-shadow: var(--shadow-color);
}

.testimonial__card p {
  color: hsla(36, 40%, 98%, 0.88);
  font-family: var(--second-font);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.testimonial__card h3 {
  color: var(--sage-200);
  margin-top: 1.5rem;
  font-size: var(--normal-font-size);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.join__container {
  padding: 2rem;
  background:
    radial-gradient(circle at top right, hsla(350, 45%, 65%, 0.18), transparent 30%),
    linear-gradient(135deg, hsla(350, 50%, 90%, 0.55), hsla(0, 0%, 100%, 0.92));
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-color);
}

.join__form {
  display: grid;
  gap: 1rem;
}

.join__input {
  width: 100%;
  padding: 1rem 1.2rem;
  border-radius: 999px;
  background-color: hsla(0, 0%, 100%, 0.86);
  color: var(--title-color);
}

.footer {
  margin: 5rem 1rem 1rem;
  padding: 3rem 0 1.5rem;
  background-color: var(--sage-950);
}

.footer__container {
  gap: 2rem;
}

.footer__logo,
.footer__title {
  color: var(--sand-50);
}

.footer__description,
.footer__info,
.footer__copy {
  color: hsla(36, 40%, 98%, 0.72);
}

.footer__social {
  display: flex;
  gap: 0.75rem;
}

.footer__social-link {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: hsla(36, 40%, 98%, 0.08);
  color: var(--sand-50);
  transition: transform 0.3s, background-color 0.3s;
}

.footer__social-link:hover {
  transform: translateY(-3px);
  background-color: hsla(350, 45%, 65%, 0.3);
}

.footer__copy {
  display: block;
  margin-top: 3rem;
  text-align: center;
  font-size: var(--small-font-size);
}

.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -50%;
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--sage-950);
  color: var(--sand-50);
  box-shadow: 0 12px 28px hsla(350, 24%, 18%, 0.24);
  transition: bottom 0.3s, transform 0.3s;
  z-index: var(--z-tooltip);
}

.scrollup:hover {
  transform: translateY(-0.2rem);
}

.show-scroll {
  bottom: 2rem;
}

@media screen and (max-width: 340px) {
  .container {
    margin-inline: 1rem;
  }

  .home__stats {
    grid-template-columns: max-content;
  }
}

@media screen and (min-width: 768px) {
  .nav__toggle {
    display: none;
  }

  .nav__menu {
    margin-left: auto;
    margin-right: 1.5rem;
  }

  .nav__list {
    display: flex;
    gap: 1.5rem;
  }

  .home__container,
  .about__container,
  .benefits__container,
  .join__container,
  .footer__container {
    grid-template-columns: repeat(2, 1fr);
  }

  .classes__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits__gallery {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
}

@media screen and (min-width: 1152px) {
  .container {
    margin-inline: auto;
  }

  .section {
    padding-block: 7rem 2rem;
  }

  .home__container,
  .about__container,
  .benefits__container {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
  }

  .home__visual {
    min-height: 38rem;
  }

  .about__img--small {
    width: 16rem;
  }

  .about__img--large {
    width: 22rem;
  }

  .classes__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .join__container {
    grid-template-columns: 1fr 0.85fr;
    padding: 3rem;
  }

  .footer__container {
    grid-template-columns: 1.2fr repeat(3, max-content);
    justify-content: space-between;
  }
}

@keyframes bubble {
  0%, 100% { border-radius: 53% 47% 52% 48% / 47% 53% 47% 53%; }
  50% { border-radius: 47% 53% 45% 55% / 55% 45% 55% 45%; }
}

/* Mobile responsive fixes */
@media screen and (max-width: 767px) {
  :root {
    --biggest-font-size: 2.5rem;
    --bigger-font-size: 2rem;
    --big-font-size: 1.4rem;
    --h1-font-size: 1.25rem;
    --h2-font-size: 1.05rem;
    --normal-font-size: 0.9rem;
    --small-font-size: 0.8rem;
  }
  
  .section {
    padding-block: 4rem 1rem;
  }
  
  .about__images {
    min-height: 18rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
  }
  
  .about__img--small {
    width: 8rem;
  }
  
  .about__img--large {
    position: relative;
    right: auto;
    bottom: auto;
    width: 12rem;
    margin-left: -2rem;
  }
  
  .home__content {
    text-align: center;
  }
  
  .home__content .section__eyebrow {
    margin-inline: auto;
  }
  
  .home__buttons {
    justify-content: center;
  }
  
  .home__stats {
    justify-content: center;
  }

  .section__title--left {
    text-align: center;
  }

  .section__eyebrow {
    display: flex;
    justify-content: center;
    margin-inline: auto;
  }

  .about__description,
  .benefits__description,
  .join__description {
    text-align: center;
  }

  .about__points article {
    justify-content: center;
  }

  .benefits__list article {
    text-align: center;
  }

  .footer__container {
    text-align: center;
  }

  .footer__social {
    justify-content: center;
  }

  .benefits__gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .home__visual {
    min-height: 22rem;
  }
  
  .home__shape {
    width: 18rem;
  }
  
  .home__img {
    width: 19rem;
  }
  
  .home__card {
    font-size: 0.75rem;
    padding: 0.6rem 0.8rem;
  }
  
  .home__card--top {
    top: 3.5rem;
    right: -1rem;
  }
  
  .home__card--bottom {
    bottom: 3.5rem;
    left: -1rem;
  }
}

@media screen and (max-width: 480px) {
  .home__stats {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
}
