*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif SC", serif;
  color: #cfc8ba;
  background: #030405;
}

.nav {
  position: fixed;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.4rem 2.2rem;
  pointer-events: none;
}

.logo {
  font-size: 0.86rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

.scene-switch {
  display: flex;
  gap: 1.35rem;
  align-items: baseline;
}

.nav a {
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  opacity: 0.72;
  transition: opacity 0.25s ease;
}

.nav a:hover,
.nav a:focus-visible {
  opacity: 1;
}

.nav a[aria-current="page"] {
  opacity: 1;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.15rem;
}

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #030405;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% 28%, rgba(55, 70, 88, 0.28) 0%, transparent 72%),
    linear-gradient(180deg, #05070a 0%, #0a1016 34%, #070b10 58%, #030508 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 55%, transparent 48%, rgba(0, 0, 0, 0.42) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, transparent 16%, transparent 78%, rgba(0, 0, 0, 0.4) 100%);
  mix-blend-mode: multiply;
}

.rift {
  position: absolute;
  left: 48%;
  top: 8%;
  width: min(42vw, 420px);
  height: 38%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(150, 170, 190, 0.08) 0%,
    rgba(120, 145, 170, 0.03) 55%,
    transparent 75%
  );
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}

.scene-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Keep the heavy SVG static — animating it drops frames */
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Boat motion: water.js (SVG CSS anim fails on iOS Safari) */

/* Cheap water motion: CSS only (not the heavy SVG) */
.sea-motion {
  position: absolute;
  left: 0;
  right: 0;
  top: 36%;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.55;
}

.sea-band {
  position: absolute;
  left: -8%;
  width: 116%;
  height: 70%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(190, 205, 220, 0.1) 28%,
    transparent 52%,
    rgba(170, 190, 210, 0.07) 72%,
    transparent 100%
  );
  animation: sea-band 16s ease-in-out infinite;
}

.sea-band-a {
  top: 0;
}

.sea-band-b {
  top: 22%;
  opacity: 0.7;
  animation-duration: 22s;
  animation-direction: reverse;
}

@keyframes sea-band {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 14px, 0);
  }
}

@media (max-width: 800px) {
  .scene {
    inset: auto;
    top: 0;
    left: 50%;
    width: 230%;
    height: 100%;
    transform: translate3d(-46%, 0, 0);
  }

  .sea-motion {
    display: none;
  }
}

@media (max-width: 700px) {
  .nav {
    padding: 1rem 1.15rem;
  }

  .logo {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sea-band {
    animation: none;
  }
}
