/* ===== Cover Page ===== */
.page-cover {
  overflow: hidden;
  min-height: 100vh;
  cursor: default;
}

#cover-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.cover-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, transparent 0%, rgba(10, 25, 47, 0.4) 70%, rgba(10, 25, 47, 0.85) 100%),
    radial-gradient(circle at 20% 80%, rgba(100, 255, 218, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(42, 157, 143, 0.08) 0%, transparent 35%);
}

.cover-light {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 255, 218, 0.12) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s;
  filter: blur(40px);
}

.cover {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 80px;
}

.cover__intro {
  text-align: center;
  margin-bottom: clamp(32px, 6vw, 64px);
  animation: coverFadeIn 1.2s ease both;
}

.cover__tag {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: rgba(224, 231, 255, 0.45);
  margin-bottom: 16px;
}

.cover__title {
  font-family: var(--font-title);
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--foam) 0%, var(--jellyfish) 50%, var(--seaweed) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(100, 255, 218, 0.25));
  margin-bottom: 12px;
}

.cover__subtitle {
  font-family: var(--font-title);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: rgba(224, 231, 255, 0.75);
  letter-spacing: 0.3em;
  margin-bottom: 20px;
}

.cover__hint {
  font-size: 0.85rem;
  color: rgba(100, 255, 218, 0.55);
  animation: hintPulse 2.5s ease-in-out infinite;
  margin-top: clamp(16px, 3vw, 28px);
  text-align: center;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

@keyframes coverFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bubble navigation */
.cover__bubbles {
  position: relative;
  width: min(920px, 100%);
  height: clamp(380px, 55vw, 520px);
  animation: coverFadeIn 1.2s 0.3s ease both;
}

.bubble {
  position: absolute;
  left: var(--bx, 50%);
  top: var(--by, 50%);
  width: var(--bs, 140px);
  height: var(--bs, 140px);
  transform: translate(-50%, -50%);
  text-decoration: none;
  color: inherit;
  animation: bubbleFloat var(--bd, 5s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  z-index: 1;
  transition: z-index 0s;
}

.bubble:hover,
.bubble:focus-visible {
  z-index: 10;
  animation-play-state: paused;
}

.bubble__ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(100, 255, 218, 0.2);
  animation: ringPulse 3s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  pointer-events: none;
}

.bubble__ring--2 {
  inset: -16px;
  border-color: rgba(100, 255, 218, 0.08);
  animation-duration: 4s;
}

.bubble__body {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
  background: radial-gradient(circle at 35% 30%,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(100, 255, 218, 0.12) 25%,
    rgba(15, 42, 74, 0.65) 70%,
    rgba(10, 25, 47, 0.85) 100%);
  border: 1.5px solid rgba(100, 255, 218, 0.35);
  box-shadow:
    inset 0 0 30px rgba(100, 255, 218, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(100, 255, 218, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s,
              border-color 0.4s;
  overflow: hidden;
}

.bubble__body::before {
  content: '';
  position: absolute;
  top: 12%;
  left: 22%;
  width: 28%;
  height: 18%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
}

.bubble__body::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 100%, var(--bubble-glow, rgba(100, 255, 218, 0.15)) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.bubble:hover .bubble__body,
.bubble:focus-visible .bubble__body {
  transform: scale(1.14);
  border-color: rgba(100, 255, 218, 0.7);
  box-shadow:
    inset 0 0 40px rgba(100, 255, 218, 0.15),
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 48px var(--bubble-glow, rgba(100, 255, 218, 0.3));
}

.bubble:hover .bubble__body::after,
.bubble:focus-visible .bubble__body::after {
  opacity: 1;
}

.bubble__icon {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
  position: relative;
  z-index: 1;
}

.bubble__label {
  font-family: var(--font-title);
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  font-weight: 700;
  color: var(--foam);
  position: relative;
  z-index: 1;
}

.bubble__desc {
  font-size: 0.65rem;
  color: rgba(224, 231, 255, 0.55);
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

.bubble__depth {
  font-size: 0.6rem;
  color: var(--jellyfish);
  opacity: 0.7;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

/* Bubble positions */
.bubble--shallow { --bx: 22%; --by: 55%; --bs: 150px; --bd: 5.5s; --delay: 0s; --bubble-glow: rgba(255, 200, 100, 0.25); }
.bubble--twilight { --bx: 78%; --by: 38%; --bs: 145px; --bd: 6s; --delay: 0.8s; --bubble-glow: rgba(100, 180, 255, 0.3); }
.bubble--deep { --bx: 72%; --by: 72%; --bs: 155px; --bd: 5s; --delay: 1.6s; --bubble-glow: rgba(42, 157, 143, 0.35); }
.bubble--contact { --bx: 28%; --by: 78%; --bs: 120px; --bd: 6.5s; --delay: 2.4s; --bubble-glow: rgba(255, 107, 107, 0.3); }

.bubble--center {
  --bx: 50%;
  --by: 42%;
  --bs: 100px;
  --bd: 7s;
  --delay: 1.2s;
  pointer-events: none;
  opacity: 0.6;
}

.bubble--center .bubble__body {
  background: radial-gradient(circle at 40% 35%,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(100, 255, 218, 0.06) 40%,
    transparent 70%);
  border-color: rgba(100, 255, 218, 0.15);
  box-shadow: 0 0 60px rgba(100, 255, 218, 0.08);
}

@keyframes bubbleFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0) rotate(0deg); }
  25% { transform: translate(-50%, -50%) translateY(-14px) translateX(6px) rotate(1deg); }
  50% { transform: translate(-50%, -50%) translateY(-6px) translateX(-4px) rotate(-1deg); }
  75% { transform: translate(-50%, -50%) translateY(-18px) translateX(3px) rotate(0.5deg); }
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 0.2; }
}

/* Burst on click */
.bubble.bursting .bubble__body {
  animation: bubbleBurst 0.55s ease forwards;
}

@keyframes bubbleBurst {
  0% { transform: scale(1.14); opacity: 1; }
  40% { transform: scale(1.5); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}

.bubble.bursting .bubble__ring { animation: ringBurst 0.55s ease forwards; }

@keyframes ringBurst {
  to { transform: scale(2.5); opacity: 0; }
}

/* Cover exit transition */
.page-cover.leaving {
  animation: coverLeave 0.6s ease forwards;
}

@keyframes coverLeave {
  to { opacity: 0; transform: scale(1.02); filter: blur(8px); }
}

.cover__footer {
  position: fixed;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
  font-size: 0.72rem;
  color: rgba(224, 231, 255, 0.25);
  letter-spacing: 0.1em;
  animation: coverFadeIn 1.2s 0.8s ease both;
}

@media (max-width: 768px) {
  .cover__bubbles {
    height: 480px;
  }
  .bubble--shallow { --bx: 28%; --by: 32%; --bs: 130px; }
  .bubble--twilight { --bx: 72%; --by: 28%; --bs: 125px; }
  .bubble--deep { --bx: 68%; --by: 68%; --bs: 130px; }
  .bubble--contact { --bx: 32%; --by: 72%; --bs: 110px; }
  .bubble--center { --by: 50%; --bs: 80px; display: none; }
}

@media (max-width: 480px) {
  .cover__bubbles {
    height: 420px;
  }
  .bubble--shallow { --bx: 50%; --by: 18%; }
  .bubble--twilight { --bx: 22%; --by: 52%; }
  .bubble--deep { --bx: 78%; --by: 52%; }
  .bubble--contact { --bx: 50%; --by: 82%; }
}

@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none; }
  .bubble__ring { animation: none; }
  .cover__hint { animation: none; }
}
