* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --white: #fdfdfd;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: var(--white);
  overflow-x: hidden;
  position: relative;
}

/* Dedicated full-viewport background layer: always fills the window,
   anchored to the bottom so the monkey stays in view despite cover-cropping */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("assets/background.png") center bottom / cover no-repeat;
}

/* Subtle wash so white text stays readable over the lighter sky areas */
.overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(40, 50, 110, 0.28) 0%,
    rgba(60, 70, 130, 0.1) 35%,
    rgba(40, 50, 110, 0.22) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
}

.nav__brand {
  font-family: "Shippori Mincho", serif;
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  color: var(--white);
  text-decoration: none;
  opacity: 0.92;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

.nav__links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav__links a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  opacity: 0.85;
  position: relative;
  padding-bottom: 4px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s ease;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width 0.35s ease;
}

.nav__links a:hover {
  opacity: 1;
}

.nav__links a:hover::after {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.hero__title {
  font-family: "Shippori Mincho", serif;
  font-weight: 500;
  font-size: clamp(3.5rem, 13vw, 11rem);
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--white);
  text-shadow: 0 2px 40px rgba(30, 40, 90, 0.45);
  animation: rise 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__sub {
  margin-top: 28px;
  font-family: "Shippori Mincho", serif;
  font-weight: 400;
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  letter-spacing: 0.42em;
  text-transform: lowercase;
  color: var(--white);
  opacity: 0;
  text-shadow: 0 1px 20px rgba(30, 40, 90, 0.4);
  animation: fade 2s ease 0.7s forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
    letter-spacing: 0.3em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: 0.12em;
  }
}

@keyframes fade {
  to {
    opacity: 0.88;
  }
}

/* Sound button */
.sound-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  cursor: pointer;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.sound-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.85);
}

.sound-btn__icon {
  display: flex;
  align-items: center;
}

/* Hide the sound waves when muted */
.sound-btn:not(.is-playing) .wave {
  opacity: 0.25;
}

.sound-btn.is-playing .wave--1 {
  animation: pulse 1.4s ease-in-out infinite;
}

.sound-btn.is-playing .wave--2 {
  animation: pulse 1.4s ease-in-out 0.2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .nav {
    padding: 20px 22px;
    flex-direction: column;
    gap: 14px;
  }
  .nav__links {
    gap: 24px;
  }
  .sound-btn__label {
    display: none;
  }
  .sound-btn {
    padding: 14px;
  }
}
