/* ===== Hero: a living steppe aul ===== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: max(700px, 100svh);
  padding-top: calc(var(--header-h) + clamp(20px, 4vh, 56px));
  background: linear-gradient(180deg, #9FE2F3 0%, #CFF1F9 42%, #EAF9FC 100%);
}

.hero__content { position: relative; z-index: 3; flex: none; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 1.2rem + 4.6vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.035em;
  color: var(--night);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; white-space: nowrap; }
.hero__title .line > span { display: inline-block; }
.hero__title .line:nth-child(2) { padding-left: .9em; }

.hero__lead { margin-top: 22px; max-width: 31em; font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__note { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 4px 14px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, .75); font-weight: 700; font-size: var(--step--1); }
.hero__note svg { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--steppe); color: var(--white); }

/* --- Sky: sun, clouds, eagle --- */
.hero__sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.sun {
  position: absolute; z-index: 1;
  top: calc(var(--header-h) + 12px);
  right: clamp(12px, 9vw, 160px);
  width: clamp(92px, 15vw, 200px);
  aspect-ratio: 1;
  padding: 0; border: 0; background: none; border-radius: 50%;
  cursor: pointer;
  animation: sunRise 1.4s var(--ease-bounce) .25s both;
}
.sun svg { width: 100%; height: 100%; overflow: visible; }
.sun__rays { transform-box: fill-box; transform-origin: center; animation: spin 48s linear infinite; }
.sun__eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite 2s; }
.sun:hover .sun__rays { animation-duration: 12s; }
.sun.is-happy svg { animation: sunJoy .9s var(--ease-bounce); }
.sun.is-happy .sun__eye--r { animation: wink .9s var(--ease-out); }
.sun.is-happy .sun__rays { animation-duration: 3s; }

.cloud {
  position: absolute; left: 0;
  width: 170px; height: 52px; border-radius: 999px;
  background: var(--white);
  opacity: .92;
  animation: drift 70s linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.cloud::before { width: 72px; height: 72px; left: 26px; top: -36px; }
.cloud::after { width: 52px; height: 52px; left: 86px; top: -24px; }
.cloud--1 { top: 19%; animation-delay: -18s; }
.cloud--2 { top: 34%; transform: scale(.7); animation-duration: 95s; animation-delay: -60s; opacity: .8; }
.cloud--3 { top: 11%; animation-duration: 120s; animation-delay: -90s; opacity: .75; }

.eagle {
  position: absolute; left: 0; top: 24%;
  width: clamp(56px, 6vw, 92px);
  fill: #C98E00;
  animation: fly 34s linear infinite 3s both;
}
.eagle path { transform-box: fill-box; transform-origin: center; animation: flap 2.6s ease-in-out infinite; }

/* --- Landscape --- */
/* In normal flow: the landscape takes whatever height the text leaves, tucking under the buttons. */
.scene {
  position: relative; z-index: 2;
  flex: 1 1 0;
  width: 100%;
  min-height: 300px;
  margin-top: -110px;
  margin-bottom: -1px;
  overflow: visible;
  pointer-events: none;
  animation: sceneIn 1.5s var(--ease-out) .1s both;
}
.scene .layer { will-change: transform; }
.tulip { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4.2s ease-in-out infinite alternate; }
.lamb { transform-box: fill-box; transform-origin: 50% 100%; animation: hop 3.2s var(--ease-out) infinite; }
.smoke circle { transform-box: fill-box; transform-origin: center; opacity: 0; animation: smoke 4.5s ease-out infinite; }
.smoke circle:nth-child(2) { animation-delay: 1.5s; }
.smoke circle:nth-child(3) { animation-delay: 3s; }

/* --- Page-load sequence (the one orchestrated moment) --- */
.hero__title .line > span { animation: lineUp 1s var(--ease-out) both; }
.hero__title .line:nth-child(1) > span { animation-delay: .25s; }
.hero__title .line:nth-child(2) > span { animation-delay: .38s; }
.hero__lead { animation: rise .9s var(--ease-out) .75s both; }
.hero__actions { animation: rise .9s var(--ease-out) .88s both; }
.hero__note { animation: rise .9s var(--ease-out) 1s both; }

@keyframes lineUp { from { transform: translateY(105%) rotate(4deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes sceneIn { from { opacity: 0; transform: translateY(70px); } }
@keyframes sunRise { from { opacity: 0; transform: translateY(60px) scale(.4) rotate(-40deg); } }
@keyframes sunJoy { 40% { transform: scale(1.14) rotate(-8deg); } 70% { transform: scale(.96) rotate(4deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes wink { 30%, 70% { transform: scaleY(.1); } }
@keyframes drift { from { transform: translateX(-25vw); } to { transform: translateX(110vw); } }
@keyframes fly {
  from { transform: translate(105vw, 0); }
  25% { transform: translate(75vw, -26px); }
  50% { transform: translate(45vw, 10px); }
  75% { transform: translate(15vw, -18px); }
  to { transform: translate(-15vw, 0); }
}
@keyframes flap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.62); } }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-9px); } 80% { transform: translateY(0); } 86% { transform: translateY(-4px); } 92% { transform: translateY(0); } }
@keyframes smoke { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: .8; } 100% { opacity: 0; transform: translate(14px, -70px) scale(2.4); } }

@media (max-width: 720px) {
  .hero { padding-top: calc(var(--header-h) + 14px); }
  .sun { top: calc(var(--header-h) + 104px); right: 8px; width: 72px; }
  .hero__title { font-size: clamp(2.2rem, 1.4rem + 4vw, 3rem); }
  .hero__title .line { white-space: normal; }
  .hero__title .line:nth-child(2) { padding-left: 0; }
  .hero__lead { margin-top: 16px; font-size: 1.05rem; }
  .hero__actions { margin-top: 22px; gap: 10px; }
  .hero__actions .btn { flex: 1 1 220px; padding: 13px 20px; font-size: 1.05rem; }
  .hero__note { display: none; }
  .scene { min-height: 230px; margin-top: -30px; }
}
