/* Approved V1 mark assembly */
.fafau-builder {
  position: relative;
  isolation: isolate;
  width: min(38vw, 510px);
  aspect-ratio: 5184 / 5166;
  filter: drop-shadow(0 28px 54px rgba(0, 0, 0, 0.26));
}

.fafau-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  will-change: opacity, transform, filter;
}

.fafau-waves {
  animation: buildMoana 9s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.fafau-canoe {
  animation: buildVaka 9s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.fafau-binding {
  animation: buildFafau 9s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.fafau-fale {
  animation: buildFale 9s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.fafau-builder-caption {
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: max-content;
  max-width: 92vw;
  margin: 0;
  color: rgba(244, 234, 211, 0.58);
  font: italic 16px Georgia, "Times New Roman", serif;
  opacity: 0;
  transform: translateX(-50%);
  animation: buildCaption 9s ease infinite;
}

.build-sequence {
  width: min(100%, 460px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 31px 0 0;
  padding: 17px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.build-sequence li {
  color: rgba(244, 234, 211, 0.32);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  transition: color 0.28s, transform 0.28s;
}

.build-sequence li span {
  display: block;
  margin-bottom: 6px;
  color: rgba(208, 163, 58, 0.42);
  font: italic 11px Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.build-sequence li.active {
  color: var(--cream);
  transform: translateY(-2px);
}

.build-sequence li.active span {
  color: var(--gold);
}

/* Keep the current section legible in the persistent navigation. */
.site-nav > a {
  position: relative;
}

.site-nav > a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.24s, transform 0.24s;
}

.site-nav > a:not(.nav-cta).active {
  color: var(--cream);
  opacity: 1;
}

.site-nav > a:not(.nav-cta).active::after {
  opacity: 1;
  transform: scaleX(1);
}

.site-nav > .nav-cta.active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
}

@keyframes buildMoana {
  0%, 4% {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(32px) scale(0.92);
  }
  12%, 90% {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
  98%, 100% {
    opacity: 0;
  }
}

@keyframes buildVaka {
  0%, 20% {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(20px) scale(0.8);
  }
  30%, 90% {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
  98%, 100% {
    opacity: 0;
  }
}

@keyframes buildFafau {
  0%, 38% {
    opacity: 0;
    filter: blur(6px);
    transform: scale(0.55) rotate(-22deg);
  }
  49%, 90% {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
  98%, 100% {
    opacity: 0;
  }
}

@keyframes buildFale {
  0%, 56% {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-34px) scale(0.92);
  }
  67%, 90% {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
  98%, 100% {
    opacity: 0;
  }
}

@keyframes buildCaption {
  0%, 68% {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  77%, 90% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  98%, 100% {
    opacity: 0;
    transform: translate(-50%, -3px);
  }
}

/* Calm motion behind the approach number */
.approach-trace {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(72%, 330px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.approach-trace::before,
.approach-trace::after,
.approach-trace i {
  position: absolute;
  content: "";
  border: 1px solid rgba(244, 234, 211, 0.12);
  border-radius: 34% 66% 42% 58%;
  animation: traceTurn 18s linear infinite;
}

.approach-trace::before {
  inset: 0;
}

.approach-trace::after {
  inset: 12%;
  border-color: rgba(208, 163, 58, 0.26);
  animation-direction: reverse;
  animation-duration: 14s;
}

.approach-trace i:nth-child(1) {
  inset: 24%;
  border-color: rgba(46, 154, 146, 0.38);
  animation-duration: 11s;
}

.approach-trace i:nth-child(2) {
  inset: -16%;
  border-color: rgba(244, 234, 211, 0.05);
  animation-direction: reverse;
  animation-duration: 26s;
}

.approach-trace i:nth-child(3) {
  display: none;
}

@keyframes traceTurn {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 800px) {
  html {
    scroll-padding-top: 148px;
  }

  .site-header,
  .site-header.scrolled {
    top: 8px;
    width: calc(100% - 16px);
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 7px 9px 8px;
    border-color: var(--line);
    border-radius: 18px;
    background: rgba(3, 19, 31, 0.9);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(18px);
  }

  .brand {
    justify-self: center;
  }

  .brand-mark {
    width: 36px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    margin-top: 5px;
    font-size: 6px;
  }

  .menu-toggle {
    display: none;
  }

  .site-nav,
  .site-nav.open {
    position: static;
    inset: auto;
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 4px;
    padding: 7px 0 0;
    border-top: 1px solid var(--line);
    background: transparent;
    transform: none;
    transition: none;
  }

  .site-nav > a:not(.nav-cta) {
    padding: 7px 2px;
    border: 0;
    border-radius: 999px;
    font: 700 9px / 1 Inter, system-ui, sans-serif;
    letter-spacing: 0.01em;
    text-align: center;
    opacity: 0.52;
  }

  .site-nav > a:not(.nav-cta)::after {
    display: none;
  }

  .site-nav > a:not(.nav-cta).active {
    background: rgba(208, 163, 58, 0.15);
    color: var(--gold-soft);
    opacity: 1;
  }

  .site-nav .nav-cta {
    grid-column: 1 / -1;
    display: block;
    margin: 1px 0 0;
    padding: 8px 12px;
    border-color: var(--gold);
    background: var(--gold);
    color: var(--navy);
    font: 750 10px / 1 Inter, system-ui, sans-serif;
    letter-spacing: 0.02em;
    text-align: center;
  }

  .hero {
    min-height: 100svh;
    grid-template-areas: "mobile-hero-stage";
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow: clip;
    padding: 150px 0 36px;
  }

  .hero-content,
  .hero-visual {
    grid-area: mobile-hero-stage;
    align-self: center;
  }

  .hero-visual {
    min-height: calc(100svh - 186px);
    pointer-events: none;
  }

  .hero-content {
    position: relative;
    z-index: 2;
    isolation: isolate;
    width: min(100%, 620px);
    max-width: 620px;
    margin-inline: auto;
    padding: 27px 20px 25px;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .hero-content::before {
    position: absolute;
    z-index: 0;
    inset: -8% -5%;
    border-radius: 50%;
    background: radial-gradient(
      circle at 50% 50%,
      rgba(3, 19, 31, 0.95) 0%,
      rgba(3, 19, 31, 0.86) 50%,
      rgba(3, 19, 31, 0.58) 68%,
      rgba(3, 19, 31, 0.2) 82%,
      transparent 91%
    );
    content: "";
    filter: blur(10px);
    pointer-events: none;
  }

  .hero-content > * {
    position: relative;
    z-index: 1;
  }

  .fafau-builder {
    width: min(86vw, 390px);
  }

  .build-sequence {
    width: min(94vw, 420px);
    margin-top: 28px;
  }

  .approach-trace {
    width: 190px;
  }

  .approach-arrow,
  .approach-dots button {
    position: relative;
    z-index: 5;
    touch-action: manipulation;
  }
}

/* Mobile opening: let the mark assemble before the hero message takes over. */
@media (max-width: 800px) and (prefers-reduced-motion: no-preference) {
  .hero-visual {
    animation: mobileLogoStage 7.4s cubic-bezier(0.2, 0.72, 0.2, 1) both;
  }

  .hero-content {
    opacity: 0;
    pointer-events: none;
    animation: mobileCopyStage 7.4s cubic-bezier(0.2, 0.72, 0.2, 1) both;
  }

  .fafau-layer,
  .fafau-builder-caption {
    animation-duration: 6.4s;
    animation-iteration-count: 1;
    animation-fill-mode: both;
  }

  body.mobile-intro-complete .fafau-layer {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }

  body.mobile-intro-complete .fafau-builder-caption,
  body.mobile-intro-complete .build-sequence {
    visibility: hidden;
    opacity: 0;
  }
}

@keyframes mobileLogoStage {
  0%, 76% {
    opacity: 1;
    visibility: visible;
    filter: none;
    transform: none;
  }
  88%, 100% {
    opacity: 0.46;
    visibility: visible;
    filter: saturate(0.9);
    transform: scale(1.08);
  }
}

@keyframes mobileCopyStage {
  0%, 76% {
    opacity: 0;
    pointer-events: none;
    transform: translateY(22px);
  }
  90%, 100% {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

@media (max-width: 390px) {
  .hero-content {
    padding: 24px 17px 22px;
  }

  .fafau-builder {
    width: min(92vw, 350px);
  }

  .fafau-builder-caption {
    bottom: -8px;
    font-size: 14px;
  }

  .build-sequence li {
    font-size: 7px;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 800px) and (prefers-reduced-motion: reduce) {
  .hero-visual {
    opacity: 0.46;
    filter: saturate(0.9);
    transform: scale(1.08);
  }

  .hero .fafau-builder-caption,
  .build-sequence {
    visibility: hidden;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fafau-layer {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .fafau-builder-caption {
    opacity: 1;
    transform: translateX(-50%);
  }

  .build-sequence li {
    color: var(--cream);
    transform: none;
  }

  .build-sequence li span {
    color: var(--gold);
  }

  .approach-trace::before,
  .approach-trace::after,
  .approach-trace i {
    animation: none;
  }
}
