/* =========================================================
   Deep Blue Festival — Ocean Styles
   ========================================================= */
:root {
  --c-sky: #7dd3fc;
  --c-surface: #38bdf8;
  --c-shallow: #14b8a6;
  --c-mid: #1e40af;
  --c-deep: #1e1b4b;
  --c-abyss: #0b1026;
  --c-sand: #d6b98c;
}

html { scroll-behavior: smooth; }
body { background: var(--c-surface); min-height: 100vh; }

/* ---------- 背景レイヤー ---------- */
#ocean-bg {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(180deg, #bae6fd 0%, #38bdf8 100%);
  transition: background 0.2s linear;
}
#particle-canvas {
  position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%;
  pointer-events: none;
}

/* ---------- ヘッダー ---------- */
#site-header.scrolled {
  background: rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-octo .tentacle { animation: none; }

/* ---------- ガラスカード ---------- */
.glass-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.3);
}
.prose-ocean h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: .75rem; }
.prose-ocean p { margin-bottom: .75rem; }
.prose-ocean strong { color: #fde047; }

/* ---------- Reveal (GSAP初期状態) ---------- */
.reveal { opacity: 0; transform: translateY(40px); }
.hero-fade { opacity: 0; }
html.no-js .reveal, html.no-js .hero-fade { opacity: 1; transform: none; }

/* ---------- 太陽・雲 ---------- */
.sun { animation: sunPulse 6s ease-in-out infinite; }
@keyframes sunPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.cloud {
  width: 120px; height: 40px; background: #fff; border-radius: 40px; opacity: .9;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.08));
}
.cloud::before, .cloud::after {
  content: ''; position: absolute; background: #fff; border-radius: 50%;
}
.cloud::before { width: 50px; height: 50px; top: -25px; left: 20px; }
.cloud::after { width: 70px; height: 70px; top: -35px; left: 50px; }
.cloud-1 { animation: cloudDrift 60s linear infinite; }
.cloud-2 { transform: scale(.7); animation: cloudDrift 80s linear infinite reverse; }
@keyframes cloudDrift { from { translate: -20vw 0; } to { translate: 110vw 0; } }

/* ---------- 海面の波 (CSSのみ) ---------- */
.surface-wave {
  position: absolute; bottom: 0; left: 0; width: 200%; height: 100%;
  background-repeat: repeat-x; background-size: 50% 100%;
  background-position: bottom;
}
.wave-back {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200' preserveAspectRatio='none'><path fill='%230ea5e9' fill-opacity='0.5' d='M0,120 C240,200 480,40 720,110 C960,180 1200,60 1440,120 L1440,200 L0,200 Z'/></svg>");
  animation: waveMove 18s linear infinite;
}
.wave-mid {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200' preserveAspectRatio='none'><path fill='%230284c7' fill-opacity='0.6' d='M0,140 C300,80 500,190 720,130 C940,70 1200,180 1440,130 L1440,200 L0,200 Z'/></svg>");
  animation: waveMove 12s linear infinite reverse;
}
.wave-front {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200' preserveAspectRatio='none'><path fill='%2314b8a6' fill-opacity='0.85' d='M0,160 C200,120 400,200 720,150 C1040,100 1240,190 1440,150 L1440,200 L0,200 Z'/></svg>");
  animation: waveMove 8s linear infinite;
}
@keyframes waveMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 深海の光の筋 ---------- */
.light-ray {
  background: linear-gradient(180deg, rgba(103,232,249,.25), transparent 70%);
  filter: blur(18px);
  transform: skewX(-12deg);
  animation: rayShimmer 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rayShimmer { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

/* ---------- 生き物アニメーション ---------- */
.octopus .tentacles { transform-origin: 100px 150px; }
.octopus .t1 { animation: tentacle 2.4s ease-in-out infinite; }
.octopus .t2 { animation: tentacle 2.4s ease-in-out infinite -0.4s; }
.octopus .t3 { animation: tentacle 2.4s ease-in-out infinite -0.8s; }
.octopus .t4 { animation: tentacle 2.4s ease-in-out infinite -1.2s; }
.octopus .t5 { animation: tentacle 2.4s ease-in-out infinite -1.6s; }
.octopus .t6 { animation: tentacle 2.4s ease-in-out infinite -2.0s; }
.octopus .tentacle { transform-origin: top center; transform-box: fill-box; }
@keyframes tentacle { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.octopus .pupil { animation: blink 4s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }

#hero-octo { animation: floatY 4s ease-in-out infinite; }
@keyframes floatY { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(3deg); } }

.fish-swim { animation: fishSwim 14s linear infinite; }
.fish-swim-rev { transform: scaleX(-1); animation: fishSwimRev 18s linear infinite; }
@keyframes fishSwim { from { translate: -10vw 0; } to { translate: 110vw 0; } }
@keyframes fishSwimRev { from { translate: 20vw 0; } to { translate: -110vw 0; } }

.jelly-float { animation: jellyFloat 6s ease-in-out infinite; }
@keyframes jellyFloat { 0%,100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-30px) scale(1.05, .95); } }
.jelly-leg { animation: legWave 2s ease-in-out infinite; transform-box: fill-box; transform-origin: top; }
@keyframes legWave { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
.glow-cyan { filter: drop-shadow(0 0 14px rgba(103,232,249,.8)); }

.sway { transform-origin: bottom center; animation: sway 4s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

.treasure-bob { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.propeller { animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotateY(360deg); } }

/* ---------- 海底 (砂地) ---------- */
.sand {
  background:
    radial-gradient(ellipse at 20% 0%, #e7d3aa 0 18%, transparent 19%),
    radial-gradient(ellipse at 60% 0%, #e7d3aa 0 22%, transparent 23%),
    radial-gradient(ellipse at 90% 0%, #e7d3aa 0 15%, transparent 16%),
    linear-gradient(180deg, #d6b98c, #b08d5a);
  z-index: 15;
}
.sand::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(#00000012 1px, transparent 1.5px);
  background-size: 14px 14px;
}

/* ---------- 企画カード ---------- */
.event-filter {
  padding: .5rem 1.1rem; border-radius: 9999px; font-weight: 700; font-size: .85rem;
  color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  transition: all .2s;
}
.event-filter:hover { background: rgba(255,255,255,.22); }
.event-filter.active { background: #fde047; color: #0f172a; border-color: #fde047; }
.event-card.hidden-card { display: none; }
.thumb-bubbles {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.7) 2px, transparent 3px),
    radial-gradient(circle, rgba(255,255,255,.5) 3px, transparent 4px);
  background-size: 40px 60px, 70px 90px;
  transition: opacity .3s;
}
.group:hover .thumb-bubbles { opacity: 1; animation: bubblesUp 2s linear infinite; }
@keyframes bubblesUp { to { background-position: 0 -60px, 0 -90px; } }

/* ---------- スタンプ ---------- */
.stamp-slot.acquired .stamp-circle { border-style: solid; border-color: #fda4af; background: rgba(255,255,255,.9); }
.stamp-slot.acquired .stamp-placeholder { opacity: 0; }
.stamp-slot.acquired .stamp-mark { opacity: 1; transform: scale(1) rotate(-12deg); }
.stamp-mark { transition: opacity .35s cubic-bezier(.2,.9,.3,1.4), transform .35s cubic-bezier(.2,.9,.3,1.4); }
.stamp-slot.just-stamped .stamp-circle { animation: stampHit .45s ease-out; }
@keyframes stampHit { 0% { transform: scale(1); } 40% { transform: scale(.85); } 70% { transform: scale(1.1); } 100% { transform: scale(1); } }
.shake { animation: shake .4s; }
@keyframes shake { 0%,100% { transform: translateX(0);} 25% { transform: translateX(-8px);} 75% { transform: translateX(8px);} }

/* ---------- 特典モーダル ---------- */
.reward-bg { animation: hueShift 12s linear infinite; }
@keyframes hueShift { 0% { filter: hue-rotate(0deg);} 100% { filter: hue-rotate(360deg);} }
.reward-chest { animation: chestPop .8s cubic-bezier(.2,.9,.3,1.4) both, bob 3s ease-in-out .8s infinite; }
@keyframes chestPop { from { transform: scale(0) rotate(-20deg); } to { transform: scale(1) rotate(0); } }
.reward-ticket { animation: ticketIn .6s .3s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes ticketIn { from { opacity: 0; transform: translateY(40px) scale(.9);} to { opacity: 1; transform: none; } }
.reward-octo-swim { animation: octoSwim 3s ease-in-out infinite; }
@keyframes octoSwim { 0%,100% { transform: translate(0,0) rotate(-8deg);} 50% { transform: translate(-8px,-10px) rotate(8deg);} }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; display: inline-block; animation: liveBlink 1s infinite; }
@keyframes liveBlink { 50% { opacity: .2; } }
.confetti-piece {
  position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall { to { transform: translateY(110vh) rotate(720deg); opacity: .6; } }

/* ---------- Scroll hint ---------- */
.scroll-hint { animation: hintFade 2s ease-in-out infinite; }
@keyframes hintFade { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* ---------- Motion reduce ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal, .hero-fade { opacity: 1; transform: none; }
}
