:root {
  --page-padding: clamp(16px, 3vw, 42px);
  --glass: rgba(4, 24, 39, 0.24);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text: #effcff;
  --shadow: 0 12px 35px rgba(0, 15, 28, 0.28);
}

* { box-sizing: border-box; }

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

body {
  position: relative;
  background: #071a2b;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  cursor: crosshair;
  user-select: none;
}

button,
a { font: inherit; }

.ocean-bg,
.ocean-overlay,
.water-tint {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ocean-bg {
  z-index: -3;
  object-fit: cover;
}

.water-tint {
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 28%, rgba(115, 222, 255, 0.035), transparent 34%),
    linear-gradient(to bottom, rgba(0, 20, 39, 0.05), rgba(1, 12, 25, 0.2));
}

.ocean-overlay {
  z-index: 100;
  object-fit: cover;
  opacity: 0.4;
  mix-blend-mode: screen;
  pointer-events: none;
}

.topbar {
  position: fixed;
  top: var(--page-padding);
  left: var(--page-padding);
  right: var(--page-padding);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-btn {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  opacity: 0.88;
  transition: opacity 200ms ease, border-color 200ms ease;
}

.nav-btn:hover {
  opacity: 1;
  border-bottom-color: rgba(255, 255, 255, 0.75);
}

.nav-btn:focus,
.nav-btn:focus-visible,
.brand:focus,
.brand:focus-visible {
  outline: none;
  box-shadow: none;
}

.intro {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  text-align: center;
  text-shadow: 0 4px 22px rgba(0, 18, 30, 0.45);
  pointer-events: auto;
}

.intro p,
.intro h1 { margin: 0; }

.intro p {
  font-size: clamp(18px, 2.1vw, 30px);
  line-height: 1.2;
}

.intro h1 {
  margin: 4px 0;
  font-size: clamp(44px, 8vw, 118px);
  line-height: 0.95;
  letter-spacing: -0.075em;
  white-space: nowrap;
}

.doeg {
  position: fixed;
  top: 45%;
  left: 56%;
  z-index: 12;
  width: clamp(120px, 17vw, 270px);
  filter: drop-shadow(0 18px 20px rgba(0, 12, 24, 0.28));
  transform: translate(-50%, -50%);
  transform-origin: center;
  pointer-events: none;
  will-change: transform, left, top;
}

.seabed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -1.5vh;
  z-index: 7;
  height: clamp(210px, 32vh, 380px);
  pointer-events: none;
}

.chest-wrap,
.coral-wrap {
  position: absolute;
  bottom: 0;
  pointer-events: auto;
}

.chest-wrap {
  left: clamp(1%, 5vw, 8%);
  width: clamp(170px, 24vw, 410px);
}

.coral-wrap {
  right: clamp(0%, 2vw, 4%);
  width: clamp(260px, 38vw, 660px);
}

.chest,
.coral,
.water-bottle {
  display: block;
  max-width: 100%;
  filter: drop-shadow(0 18px 18px rgba(0, 12, 24, 0.22));
}

.chest,
.coral { width: 100%; }

.water-bottle {
  position: absolute;
  left: 55%;
  bottom: 45%;
  z-index: 2;
  width: clamp(35px, 5vw, 80px);
  transform: translateX(-50%) rotate(-8deg);
  transform-origin: center bottom;
}

.audio-hint {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 25;
  transform: translateX(-50%);
  padding: 8px 0;
  background: transparent;
  font-size: 13px;
  opacity: 0.82;
  transition: opacity 250ms ease, visibility 250ms ease;
}

.audio-hint.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.wave-hover {
  transform-origin: center;
  translate: 0 0;
  rotate: 0deg;
  will-change: translate, rotate;
}


@media (max-width: 720px) {
  :root { --page-padding: 12px; }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .links {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .nav-btn { font-size: 13px; }
  .intro { top: 45%; }
  .intro h1 { white-space: normal; }
  .doeg { width: clamp(110px, 33vw, 180px); }
  .seabed { height: 250px; }
  .chest-wrap { left: -7%; width: 48vw; }
  .coral-wrap { right: -15%; width: 78vw; }
  .audio-hint { bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
