/* Hero. Mobile first: copy, then photo, then the two notes, all in normal flow (no overlaps).
   Desktop (>=1024px): photo fills the right side and the notes sit in the clear sky/building area. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid rgba(108, 31, 61, 0.1);
  background: linear-gradient(180deg, #dff2ff 0%, #f4f8f8 55%, var(--ivory) 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  width: min(var(--page-max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.hero__copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding-top: clamp(1.75rem, 5vw, 3rem);
}

.hero__title {
  max-width: 780px;
  margin-top: 0.9rem;
  font-size: clamp(2.3rem, 8.5vw, 4.05rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero__intro {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: #554f52;
  font-size: clamp(1rem, 2.4vw, 1.16rem);
  line-height: 1.65;
}

.hero__intro span { display: block; }

.hero__actions { margin-top: 1.5rem; }

.hero-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding-inline: 1.5rem;
  border-radius: 999px;
  background: var(--burgundy-dark);
  box-shadow: 0 18px 35px -18px rgba(72, 19, 38, 0.8);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 220ms var(--ease-kriyon), box-shadow 220ms ease;
}

.hero-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px -17px rgba(72, 19, 38, 0.9);
}

/* Mascot + supporting line share one row, anchored to the bottom of the hero. */
.hero__companion {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero__kriyo {
  flex: none;
  width: clamp(6.5rem, 26vw, 9.5rem);
  filter: drop-shadow(0 16px 14px rgba(72, 19, 38, 0.2));
  transform-origin: 50% 100%;
  animation: hero-kriyo-idle 6s ease-in-out infinite;
}

.hero__support {
  max-width: 17rem;
  margin-bottom: 1.25rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--burgundy-soft);
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.6;
}

.hero__photo-wrap {
  position: relative;
  z-index: 1;
  order: 2;
  margin-inline: calc(var(--gutter) * -1);
  pointer-events: none;
}

.hero__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 80% 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%);
  mask-image: linear-gradient(180deg, transparent 0, #000 22%);
}

.hero__notes {
  position: relative;
  z-index: 3;
  order: 3;
  display: grid;
  gap: 0.75rem;
  padding-block: 1rem 1.5rem;
}

.hero-note {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(108, 31, 61, 0.13);
  border-radius: 1rem;
  background: var(--pearl);
  box-shadow: 0 18px 38px -28px rgba(72, 19, 38, 0.5);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
}

.hero-note span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--burgundy);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__bird { display: none; }

@media (min-width: 560px) {
  .hero__notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 720px) {
  .hero__kriyo { width: 10.5rem; }
  .hero__photo { aspect-ratio: 2 / 1; }
}

@media (min-width: 1024px) {
  .hero {
    min-height: clamp(540px, calc(100svh - var(--header-h)), 700px);
    display: flex;
  }

  .hero::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg, rgba(246, 242, 236, 0.96) 0%, rgba(246, 242, 236, 0.86) 30%, rgba(246, 242, 236, 0.35) 46%, transparent 60%);
    content: "";
    pointer-events: none;
  }

  .hero__inner {
    flex: none;
    display: block;
    position: static;
    align-self: stretch;
  }

  .hero__copy {
    height: 100%;
    max-width: 38rem;
    padding-top: 3rem;
  }

  .hero__companion {
    margin-top: auto;
    padding-top: 1.5rem;
  }

  .hero__kriyo { width: clamp(10rem, 14.5vw, 13.5rem); }
  .hero__support { margin-bottom: 1.75rem; }

  .hero__photo-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
  }

  .hero__photo {
    position: absolute;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    height: 100%;
    aspect-ratio: auto;
    object-fit: fill;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26%);
    mask-image: linear-gradient(90deg, transparent 0, #000 26%);
  }

  /* Notes sit in the sky / building area, above the students' heads. */
  .hero__notes {
    display: contents;
  }

  .hero-note {
    position: absolute;
    z-index: 4;
    width: 12.5rem;
    background: rgba(252, 250, 247, 0.94);
    backdrop-filter: blur(10px);
  }

  .hero-note--one {
    top: 8%;
    right: max(var(--gutter), calc((100% - var(--page-max)) / 2));
    animation: hero-float-a 8s ease-in-out infinite;
  }

  .hero-note--two {
    top: 25%;
    right: max(var(--gutter), calc((100% - var(--page-max)) / 2));
    animation: hero-float-b 10s 0.8s ease-in-out infinite;
  }

  .hero__bird {
    position: absolute;
    z-index: 3;
    display: block;
    width: 2rem;
    height: 1.4rem;
    background: var(--burgundy);
    clip-path: polygon(0 38%, 100% 0, 68% 100%, 51% 57%);
    opacity: 0.55;
  }

  .hero__bird--one { top: 12%; left: 56%; animation: hero-bird 12s ease-in-out infinite; }
  .hero__bird--two { top: 19%; left: 61%; scale: 0.6; opacity: 0.3; animation: hero-bird 10s 1.4s ease-in-out infinite reverse; }
}

@keyframes hero-kriyo-idle {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-5px) rotate(-0.8deg); }
}

@keyframes hero-float-a {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes hero-float-b {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes hero-bird {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(18px, -10px) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__kriyo, .hero-note, .hero__bird { animation: none !important; }
}
