/*
 * Shared page-entry motion and the homepage-only Suvy Academy intro.
 * Content is hidden only after JavaScript adds the enhancement classes,
 * so the site remains readable if scripts are unavailable.
 */
html.animations-enabled body.intro-active {
  overflow: hidden;
}

html.animations-enabled body.page-enter-ready > .site-header,
html.animations-enabled body.page-enter-ready > main,
html.animations-enabled body.page-enter-ready > .simple-footer {
  opacity: 0;
  will-change: opacity, transform;
}

html.animations-enabled body.page-enter-ready > .site-header {
  transform: translateY(-8px);
}

html.animations-enabled body.page-enter-ready > main {
  transform: translateY(12px);
}

html.animations-enabled body.page-enter-ready > .simple-footer {
  transform: translateY(6px);
}

html.animations-enabled body.page-enter-active > .site-header,
html.animations-enabled body.page-enter-active > main,
html.animations-enabled body.page-enter-active > .simple-footer {
  opacity: 1;
  transform: translateY(0);
}

html.animations-enabled body.page-enter-active > .site-header {
  transition: opacity 420ms ease, transform 420ms ease;
}

html.animations-enabled body.page-enter-active > main {
  transition: opacity 480ms ease 55ms, transform 480ms ease 55ms;
}

html.animations-enabled body.page-enter-active > .simple-footer {
  transition: opacity 420ms ease 100ms, transform 420ms ease 100ms;
}

.suvy-intro {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--background, #f7f3ee);
  color: var(--text-primary, #2f2926);
  opacity: 1;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.suvy-intro::before {
  position: absolute;
  width: min(58vw, 560px);
  aspect-ratio: 1;
  border: 1px solid rgba(183, 139, 103, 0.18);
  border-radius: 50%;
  content: "";
  transform: scale(0.78);
  animation: suvy-intro-halo 1500ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.suvy-intro__content {
  position: relative;
  padding: 2rem;
  text-align: center;
}

.suvy-intro__brand,
.suvy-intro__subtitle,
.suvy-intro__line {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(14px) scale(0.985);
}

.suvy-intro__brand {
  margin: 0;
  color: var(--text-primary, #2f2926);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.3rem, 6vw, 4.7rem);
  font-weight: 500;
  letter-spacing: 0.035em;
  line-height: 1.15;
  animation: suvy-intro-reveal 720ms cubic-bezier(0.22, 1, 0.36, 1) 100ms forwards;
}

.suvy-intro__subtitle {
  margin: 0.65rem 0 0;
  color: var(--accent-dark, #8f674c);
  font-size: clamp(0.68rem, 1.4vw, 0.86rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  animation: suvy-intro-reveal 650ms ease 330ms forwards;
}

.suvy-intro__line {
  width: 0;
  height: 1px;
  margin: 1.35rem auto 0;
  background: linear-gradient(90deg, transparent, var(--accent, #b78b67) 25%, var(--accent-dark, #8f674c) 75%, transparent);
  animation: suvy-intro-line 800ms ease 520ms forwards;
}

.suvy-intro.suvy-intro-exiting {
  visibility: hidden;
  opacity: 0;
}

.suvy-intro.suvy-intro-exiting .suvy-intro__content {
  transform: translateY(-8px) scale(1.015);
  transition: transform 520ms ease;
}

@keyframes suvy-intro-reveal {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes suvy-intro-line {
  to {
    width: min(150px, 44vw);
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes suvy-intro-halo {
  to {
    opacity: 0.75;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.animations-enabled body.page-enter-ready > .site-header,
  html.animations-enabled body.page-enter-ready > main,
  html.animations-enabled body.page-enter-ready > .simple-footer,
  html.animations-enabled body.page-enter-active > .site-header,
  html.animations-enabled body.page-enter-active > main,
  html.animations-enabled body.page-enter-active > .simple-footer {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .suvy-intro,
  .suvy-intro::before,
  .suvy-intro__brand,
  .suvy-intro__subtitle,
  .suvy-intro__line,
  .suvy-intro.suvy-intro-exiting .suvy-intro__content {
    animation: none;
    transition: none;
  }
}
