:root {
  --motion-ease: cubic-bezier(.2, .72, .22, 1);
  --motion-soft: cubic-bezier(.22, 1, .36, 1);
  --header-compact-offset: 72px;
}

html {
  scroll-padding-top: calc(var(--header-compact-offset) + 18px);
}

[id] {
  scroll-margin-top: calc(var(--header-compact-offset) + 24px);
}

.site-header {
  transition:
    background-color .32s ease,
    box-shadow .32s ease,
    border-color .32s ease,
    backdrop-filter .32s ease;
}

.site-header__inner,
.site-header__brand,
.site-header__logo,
.profile-header__logo,
.ticket-button,
.nav-toggle {
  transition:
    min-height .32s ease,
    transform .32s ease,
    opacity .24s ease,
    box-shadow .24s ease,
    background-color .24s ease;
}

.site-header.is-scroll-compact {
  background: rgba(255, 255, 255, .84);
  border-color: rgba(42, 148, 214, .18);
  box-shadow: 0 10px 28px rgba(12, 111, 172, .1);
  backdrop-filter: blur(18px);
}

.site-header.is-scroll-compact .site-header__inner {
  min-height: 54px;
}

.site-header.is-scroll-compact .site-header__brand {
  transform: scale(.94);
  transform-origin: left center;
}

.site-header.is-scroll-compact .ticket-button {
  box-shadow: 0 9px 18px rgba(23, 111, 197, .14);
  transform: translateY(-1px);
}

.js-reveal,
.js-reveal-left,
.js-reveal-right,
.js-reveal-zoom {
  opacity: 0;
  transition:
    opacity .72s var(--motion-soft),
    transform .72s var(--motion-soft),
    filter .72s var(--motion-soft);
}

.js-reveal {
  transform: translate3d(0, 24px, 0);
}

.js-reveal-left {
  transform: translate3d(-34px, 12px, 0);
}

.js-reveal-right {
  transform: translate3d(34px, 12px, 0);
}

.js-reveal-zoom {
  filter: saturate(.92);
  transform: scale(.965);
}

.js-reveal.is-visible,
.js-reveal-left.is-visible,
.js-reveal-right.is-visible,
.js-reveal-zoom.is-visible {
  opacity: 1;
  filter: none;
  transform: translate3d(0, 0, 0) scale(1);
}

.js-reveal-delay-1 {
  transition-delay: .08s;
}

.js-reveal-delay-2 {
  transition-delay: .16s;
}

.js-reveal-delay-3 {
  transition-delay: .24s;
}

.js-heading-drop {
  position: relative;
  opacity: 0;
  transform: translate3d(0, -40px, 0) scale(.985);
  transform-origin: center top;
  transition:
    opacity .68s ease,
    transform .82s cubic-bezier(.2, 1.18, .34, 1);
}

.js-heading-drop::before,
.js-heading-drop::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
  border-radius: 999px;
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(.72);
  transition:
    opacity .48s ease .18s,
    transform .72s cubic-bezier(.2, 1.18, .34, 1) .18s;
}

.js-heading-drop::before {
  top: -.45em;
  left: max(-.65em, -26px);
  width: clamp(22px, 3.2vw, 42px);
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 38% 34%, rgba(255, 255, 255, .86), transparent 26%),
    rgba(159, 233, 246, .34);
  box-shadow:
    clamp(18px, 3vw, 38px) -.25em 0 -.55em rgba(159, 233, 246, .42),
    clamp(30px, 5vw, 64px) .3em 0 -.42em rgba(42, 148, 214, .16);
}

.js-heading-drop::after {
  right: max(-.4em, -18px);
  bottom: -.35em;
  width: clamp(36px, 8vw, 96px);
  height: clamp(8px, 1.1vw, 14px);
  background: linear-gradient(90deg, transparent, rgba(159, 233, 246, .65), transparent);
}

.js-heading-drop.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.js-heading-drop.is-visible::before,
.js-heading-drop.is-visible::after {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.js-heading-drop .heading-drop__char {
  display: inline-block;
  opacity: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  transform: translate3d(0, -22px, 0);
  vertical-align: baseline;
  transition:
    opacity .48s ease,
    transform .72s cubic-bezier(.18, 1.22, .28, 1);
  transition-delay: calc(.055s + min(var(--char-index), 18) * .032s);
}

.js-heading-drop.is-visible .heading-drop__char {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.mobile-section-nav {
  position: sticky;
  top: var(--header-compact-offset);
  z-index: 18;
  display: none;
  width: 100%;
  padding: .56rem .75rem .68rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  background:
    radial-gradient(circle at 1.2rem .8rem, rgba(159, 233, 246, .34), transparent 1.5rem),
    rgba(255, 255, 255, .9);
  border-top: 1px solid rgba(42, 148, 214, .16);
  border-bottom: 1px solid rgba(42, 148, 214, .18);
  box-shadow: 0 10px 22px rgba(12, 111, 172, .08);
  backdrop-filter: blur(14px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-section-nav::-webkit-scrollbar {
  display: none;
}

.mobile-section-nav__list {
  display: flex;
  gap: .45rem;
  min-width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-section-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .48rem .88rem;
  color: #075eae;
  font-size: .83rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  background: rgba(245, 252, 255, .94);
  border: 1px solid rgba(42, 148, 214, .2);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
  transition:
    color .22s ease,
    background-color .22s ease,
    border-color .22s ease,
    transform .22s ease,
    box-shadow .22s ease;
}

.mobile-section-nav a::before {
  width: .46rem;
  aspect-ratio: 1;
  margin-right: .38rem;
  content: "";
  background: rgba(159, 233, 246, .74);
  border-radius: 50%;
  box-shadow: .28rem -.16rem 0 rgba(159, 233, 246, .36);
}

.mobile-section-nav a.is-active,
.mobile-section-nav a[aria-current="true"] {
  color: #fff;
  background: linear-gradient(180deg, #43a9dc 0%, #1d76c7 100%);
  border-color: rgba(0, 72, 143, .16);
  box-shadow: 0 9px 18px rgba(23, 111, 197, .18);
}

.mobile-section-nav a.is-active::before,
.mobile-section-nav a[aria-current="true"]::before {
  background: #fff;
  box-shadow: .28rem -.16rem 0 rgba(255, 255, 255, .44);
}

.mobile-section-nav a:focus-visible,
#top-back-btn:focus-visible {
  outline: 3px solid rgba(42, 148, 214, .44);
  outline-offset: 3px;
}

.faq-accordion__panel {
  overflow: hidden;
}

details.js-faq-accordion > summary {
  cursor: pointer;
}

details.js-faq-accordion.is-animating .faq-accordion__panel {
  transition: height .34s var(--motion-ease);
}

#top-back-btn {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  max-width: none;
  padding: 0;
  color: #fff;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .55), transparent 24%),
    linear-gradient(180deg, #58bce6 0%, #1f7ed1 100%);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  box-shadow: 0 12px 26px rgba(12, 111, 172, .22);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 16px, 0) scale(.92);
  transition:
    opacity .28s ease,
    transform .28s ease,
    box-shadow .22s ease;
}

#top-back-btn::before {
  width: .7rem;
  height: .7rem;
  content: "";
  border-top: 3px solid currentColor;
  border-left: 3px solid currentColor;
  transform: translateY(3px) rotate(45deg);
}

#top-back-btn.is-show {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

#top-back-btn:hover {
  box-shadow: 0 14px 30px rgba(12, 111, 172, .28);
  transform: translate3d(0, -2px, 0) scale(1);
}

.ticket-button,
.text-link,
.lower-link,
.lower-back__button,
.profile-button,
.faq-reset,
.faq-filter__button,
.faq-toggle-all {
  position: relative;
  overflow: hidden;
}

.ticket-button::before,
.lower-link::before,
.lower-back__button::before,
.profile-button::before {
  position: absolute;
  inset: -40% auto -40% -65%;
  width: 46%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-18deg);
  transition: left .55s ease;
}

.ticket-button:hover::before,
.ticket-button:focus-visible::before,
.lower-link:hover::before,
.lower-link:focus-visible::before,
.lower-back__button:hover::before,
.lower-back__button:focus-visible::before,
.profile-button:hover::before,
.profile-button:focus-visible::before {
  left: 120%;
}

@media (hover: hover) {
  .profile-card,
  .feature-card,
  .info-card,
  .lower-card,
  .lower-related__card,
  .lower-pager__item,
  .daily-summary__card,
  .ecology-summary__card,
  .faq-category-card,
  .faq-pickup-card,
  .glossary-term-card,
  .history-highlight-card,
  .keeper-mission-card {
    transition:
      transform .24s ease,
      box-shadow .24s ease,
      border-color .24s ease;
  }

  .profile-card:hover,
  .feature-card:hover,
  .info-card:hover,
  .lower-card:hover,
  .daily-summary__card:hover,
  .ecology-summary__card:hover,
  .keeper-mission-card:hover {
    transform: translateY(-3px);
  }
}

.js-reveal,
.js-reveal-left,
.js-reveal-right,
.js-reveal-zoom {
  transition:
    opacity .72s var(--motion-soft),
    transform .72s var(--motion-soft),
    filter .72s var(--motion-soft),
    box-shadow .24s ease,
    border-color .24s ease;
}

.hero__label,
.section-heading__bubble,
.terms-illustration,
.footer-shell {
  animation: rakko-drift 6.8s ease-in-out infinite;
}

.footer-fish {
  animation: rakko-glide 9s ease-in-out infinite;
}

.footer-kelp {
  animation: rakko-sway 7.5s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes rakko-drift {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -6px;
  }
}

@keyframes rakko-glide {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 10px -4px;
  }
}

@keyframes rakko-sway {
  0%,
  100% {
    rotate: 0deg;
  }

  50% {
    rotate: 1.8deg;
  }
}

@media (max-width: 768px) {
  :root {
    --header-compact-offset: 58px;
  }

  html {
    scroll-padding-top: 116px;
  }

  [id] {
    scroll-margin-top: 126px;
  }

  .site-header.is-scroll-compact .site-header__inner {
    min-height: 52px;
  }

  .mobile-section-nav {
    display: block;
  }

  .lower-page-nav,
  .profile-mini-nav {
    display: none;
  }

  .js-reveal,
  .js-reveal-left,
  .js-reveal-right {
    transform: translate3d(0, 16px, 0);
  }

  .js-reveal-zoom {
    transform: scale(.985);
  }

  .js-heading-drop {
    transform: translate3d(0, -22px, 0) scale(.992);
    transition-duration: .58s;
  }

  .heading-drop__char {
    transform: translate3d(0, -12px, 0);
    transition-duration: .52s;
    transition-delay: calc(.035s + min(var(--char-index), 18) * .018s);
  }

  #top-back-btn {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .mobile-section-nav {
    padding-inline: .58rem;
  }

  .mobile-section-nav a {
    min-height: 40px;
    padding-inline: .76rem;
    font-size: .8rem;
  }
}

@media (max-width: 767px) {
  .page-profile .profile-section--gallery .gallery-card,
  .page-profile .profile-section--gallery .gallery-card.js-reveal-zoom {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .js-reveal,
  .js-reveal-left,
  .js-reveal-right,
  .js-reveal-zoom,
  .js-heading-drop,
  .reveal {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

  .heading-drop__char {
    opacity: 1 !important;
    transform: none !important;
  }

  .mobile-section-nav {
    scroll-behavior: auto;
  }
}
