:root{
  --bg-base: #8feeca;

  /* ✅ твоя текстура/зерно: чим менше число — тим менше видно “квадрати” */
  --texture-size: 420px;

  --text-top:  #EDE6FF;
  --text-main: #FFFCEB;
  --text-sub:  #D9A8FF;

  --container-desktop: 1280px;
  --container-tablet: 780px;
}

*{ box-sizing: border-box; }
html, body{ margin: 0; height: 100%; }
body{
  font-family: "Neucha", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ===== Hero background ===== */
.hero{
  position: relative;
  min-height: 100vh;
  overflow: hidden;

  background-color: var(--bg-base);
  background-image: url("./img/image.png"); /* текстура/зерно */
  background-repeat: repeat;
  background-size: var(--texture-size) auto;
  background-position: center;
  background-blend-mode: multiply;
}

/* Overlay */
.hero__overlay{
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(0,0,0,0) 35%,
    rgba(0,0,0,.35) 60%,
    rgba(0,0,0,.65) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero__container{
  position: relative;
  min-height: 100vh;
  max-width: var(--container-desktop);
  margin: 0 auto;
  padding-inline: 16px;
  z-index: 2; /* щоб бути над overlay */
}

/* ===== Decorations ===== */
.decor{
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.decor--picture{
  left: 17%;
  top: 25%;
  transform: translateX(-50%) rotate(-1deg);

  /* ✅ адаптивний px-розмір */
  width: clamp(220px, 22vw, 360px);
  height: auto;
  max-height: clamp(220px, 38vh, 520px);

  filter: drop-shadow(0 6px 14px rgba(0,0,0,.18));
  transform-origin: 50% 0%;
  animation: frameSwing 8s ease-in-out infinite;
}

/* ===== Character ===== */
.hero__character{
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) scale(1);
  transform-origin: 50% 100%;
  width: 15vw;
  height: auto;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.35));
  animation: felixGrow 5.5s ease-in-out infinite;
}

/* ===== Title ===== */
.hero__title{
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 24px;
  margin-inline: auto;
  max-width: 1100px;
}

.hero__suptitle{
  margin: 10px 0 6px;
  font-size: clamp(14px, 2.2vw, 18px);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-top);
  text-shadow: 0 2px 4px rgba(0,0,0,.35);
}

.hero__headline{
  margin: 0 0 6px;
  font-size: clamp(28px, 6.6vw, 72px);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--text-main);
  text-shadow: 0 3px 8px rgba(0,0,0,.5);
  letter-spacing: .02em;
  white-space: nowrap;
}

.hero__subtitle{
  margin: 0;
  font-size: clamp(14px, 3vw, 28px);
  color: var(--text-sub);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
}

/* ===== CTA Stars ===== */
.cta{
  position: absolute;
  z-index: 5;

  /* ✅ дефолтні змінні */
  --star-w: 23vw;
  --text-size: 19px;
  --text-width: 80%;
}

.cta--primary{ top: 22%; right: 2%; }
.cta--secondary{ top: 56%; right: 1%; }

/* ✅ різні розміри зірок під різний текст */
.cta--md{
  --star-w: 18vw;
  --text-size: 37px;
  --text-width: 72%;
}

.cta--lg{
  --star-w: 19vw;
  --text-size: 21px;
  --text-width: 84%;
}

/* ✅ КЛЮЧ: Зірка тепер КВАДРАТНА по ширині (не 37vh!) */
.cta__link{
  display: block;
  width: var(--star-w);
  aspect-ratio: 1 / 1;   /* ✅ висота = ширині */
  height: auto;          /* ✅ прибрали залежність від vh */

  background-image: url("./img/star.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  text-decoration: none;
  position: relative;

  transition: transform .2s ease;
  animation: pulse 2.2s ease-in-out infinite;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.25));
}

.cta--secondary .cta__link{ animation-delay: .9s; }

.cta__link:hover{
  transform: scale(1.06) rotate(2deg);
  animation-play-state: paused;
}

.cta__text{
  position: absolute;
  top: 53%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #111;
  font-weight: 800;
  font-size: var(--text-size);
  text-align: center;
  width: var(--text-width);
  line-height: 1.1;
  letter-spacing: .06em;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
  animation: textPop 2.2s ease-in-out infinite;
}

.cta--secondary .cta__text{ animation-delay: .9s; }

/* ===== Animations ===== */
@keyframes pulse{
  0%, 100% { transform: scale(1) rotate(-1deg); filter: drop-shadow(0 8px 18px rgba(0,0,0,.22)); }
  50%      { transform: scale(1.08) rotate(1deg);  filter: drop-shadow(0 12px 26px rgba(0,0,0,.32)); }
}

@keyframes textPop{
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.06); }
}

@keyframes felixGrow{
  0%   { transform: translateX(-50%) scale(1); }
  50%  { transform: translateX(-50%) scale(1.15); }
  100% { transform: translateX(-50%) scale(1); }
}

@keyframes frameSwing{
  0%, 100% { transform: translateX(-50%) rotate(-1deg); }
  50%      { transform: translateX(-50%) rotate(2deg); }
}

/* ===== Tablet 768–1279 ===== */
@media (min-width: 768px) and (max-width: 1279px){

  .hero__container{
    max-width: 900px;
    padding-inline: 24px;
  }

  .decor--picture{
    left: 22%;
    top: 14%;
    width: clamp(200px, 26vw, 280px);
    max-height: clamp(200px, 30vh, 340px);
  }

  .hero__character{
    width: clamp(340px, 44vw, 460px);
    left: 46%;
    bottom: -10px;
  }

  .hero__title{
    padding-top: 18px;
    max-width: 760px;
  }

  .hero__headline{
    font-size: clamp(44px, 6vw, 62px);
    white-space: normal;
    line-height: 1.05;
  }

  .hero__subtitle{
    font-size: clamp(18px, 2.4vw, 26px);
  }

  .cta--primary{ top: 220px; right: 40px; }
  .cta--secondary{ top: 520px; right: 34px; }

  .cta--md{
    --star-w: clamp(210px, 28vw, 270px);
    --text-size: clamp(21px, 2vw, 24px);
    --text-width: 72%;
  }

  .cta--lg{
    --star-w: clamp(230px, 32vw, 290px);
    --text-size: clamp(18px, 1.6vw, 18px);
    --text-width: 84%;
  }

  .cta__text{ top: 50%; }
}

/* ===== Mobile ≤767px ===== */
@media (max-width: 767px){
  .decor--picture{
    left: 16%;
    top: 17%;
    width: 44vw;
  }
body{
  height: 100vh;
}
  .hero__character{ width: 70vw; }

  /* ✅ Розвели зірки + квадратна зона клику */
  .cta--primary{left: 10%; top: 70%; }
  .cta--secondary{ right: 10%; top: 68%; }

  /* ✅ ширина зірок на мобілці (висота автоматом через aspect-ratio) */
  .cta--md{ --star-w: 37vw; --text-size: 16px; }
  .cta--lg{ --star-w: 42vw; --text-size: 12.2px; }

  .hero__headline{ white-space: normal; line-height: 1.08; }
}

/* ===== Mobile softer animations (повільніше + менша амплітуда) ===== */
@media (max-width: 767px){

  .hero__character{ animation-duration: 10s; }
  .decor--picture{ animation-duration: 14s; }

  .cta__link{ animation-duration: 4.2s; }
  .cta__text{ animation-duration: 4.2s; }

  @keyframes felixGrow{
    0%, 100% { transform: translateX(-50%) scale(1); }
    50%      { transform: translateX(-50%) scale(1.06); }
  }

  @keyframes frameSwing{
    0%, 100% { transform: translateX(-50%) rotate(-0.6deg); }
    50%      { transform: translateX(-50%) rotate(0.9deg); }
  }

  @keyframes pulse{
    0%, 100% { transform: scale(1) rotate(-0.6deg); }
    50%      { transform: scale(1.04) rotate(0.6deg); }
  }

  @keyframes textPop{
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(1.03); }
  }
}
