/* ============================================================
   AquaVerdia — "The Dive" homepage experience
   A scuba descent: surface → reef → mid water → deep → abyss
   ============================================================ */

.dive-world { position: relative; z-index: 1; }

/* Let the ocean show through on the homepage */
body.home { background: transparent; }
body.home .site-header { background: rgba(4, 30, 46, .55); backdrop-filter: blur(10px); }

/* ---------- Fixed ocean backdrop ---------- */
.dive-ocean {
  position: fixed; inset: -4%; z-index: -2;
  background: linear-gradient(180deg, #7fe3f0 0%, #3fb9d4 30%, #1a8fb5 60%, #0e6e94 100%);
  transition: none;
  overflow: hidden;
  animation: oceanDrift 26s ease-in-out infinite alternate;
}
/* slow camera drift — you are floating, not watching a wallpaper */
@keyframes oceanDrift {
  from { transform: translate3d(-1.2%, -0.6%, 0) scale(1.02); }
  to   { transform: translate3d(1.2%, 0.8%, 0) scale(1.04); }
}
/* living sea canvas — fish, plankton, caustics, kelp */
#diveSea {
  position: fixed; inset: -4%; z-index: -1; pointer-events: none;
  animation: oceanDrift 34s ease-in-out infinite alternate-reverse;
}
/* underwater vignette — lens feel */
.dive-vignette {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(1, 14, 24, .38) 100%);
}
/* water surface seen from below */
.dive-surface { position: absolute; top: -2px; left: 0; right: 0; height: 130px; z-index: 1; pointer-events: none; overflow: hidden; opacity: .8; }
.dive-surface svg { width: 200%; height: 100%; display: block; animation: surfaceSlide 14s linear infinite; }
@keyframes surfaceSlide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* animated water shimmer */
.dive-surface-shimmer {
  position: absolute; inset: -20% 0 0 0; height: 45%;
  background:
    radial-gradient(ellipse 60% 18% at 20% 30%, rgba(255,255,255,.35), transparent 70%),
    radial-gradient(ellipse 50% 14% at 70% 60%, rgba(255,255,255,.25), transparent 70%),
    radial-gradient(ellipse 40% 12% at 45% 15%, rgba(255,255,255,.30), transparent 70%);
  animation: shimmer 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes shimmer {
  from { transform: translateX(-4%) translateY(0); opacity: .8; }
  to   { transform: translateX(4%) translateY(2%); opacity: 1; }
}
/* god rays */
.dive-rays { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.dive-rays .ray {
  position: absolute; top: -10%; height: 75%; width: 90px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 85%);
  filter: blur(14px);
  transform-origin: top center;
  animation: raySway 11s ease-in-out infinite alternate;
}
.dive-rays .r1 { left: 8%;  transform: rotate(14deg); animation-delay: 0s; }
.dive-rays .r2 { left: 26%; transform: rotate(9deg);  animation-delay: -3s; width: 130px; }
.dive-rays .r3 { left: 52%; transform: rotate(-8deg); animation-delay: -6s; }
.dive-rays .r4 { left: 70%; transform: rotate(-14deg);animation-delay: -2s; width: 120px; }
.dive-rays .r5 { left: 88%; transform: rotate(11deg); animation-delay: -8s; }
@keyframes raySway {
  from { transform: rotate(14deg) translateX(0); opacity: .7; }
  to   { transform: rotate(6deg) translateX(-30px); opacity: 1; }
}

/* ---------- Dive computer HUD ---------- */
.dive-hud {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(2, 20, 32, .55); border: 1px solid rgba(127, 227, 240, .35);
  border-radius: 16px; padding: 12px 10px; backdrop-filter: blur(8px);
  color: #bff3ff; font-family: ui-monospace, monospace;
}
.hud-depth { font-size: 26px; font-weight: 700; line-height: 1; color: #fff; text-shadow: 0 0 12px #38e1ff; }
.hud-depth small { font-size: 12px; color: #7fe3f0; }
.hud-gauge { width: 8px; height: 150px; border-radius: 6px; background: linear-gradient(180deg,#7fe3f0,#1a8fb5 40%,#06283a); position: relative; }
.hud-marker {
  position: absolute; left: -4px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px #38e1ff; top: 0;
}
.hud-label { font-size: 9px; letter-spacing: 2px; color: #7fe3f0; white-space: nowrap; }
/* On the dive homepage the theme footer is hidden: the abyss zone is the
   end of the descent, so no dead scrollable space sits below it. */
body.home .site-footer { display: none; }
@media (max-width: 640px){ .dive-hud{ right: 8px; padding: 8px 6px; } .hud-gauge{ height: 100px; } .hud-depth{ font-size: 20px; } }

/* ---------- Scroll hint bubbles ---------- */
.dive-scroll-hint {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: #eaffff; font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0,40,60,.6); transition: opacity .6s;
}
.dive-scroll-hint .bub {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85); background: rgba(255,255,255,.15);
  animation: hintRise 2.2s ease-in infinite;
}
.dive-scroll-hint .bub:nth-child(2){ animation-delay: .4s; width: 7px; height: 7px; }
.dive-scroll-hint .bub:nth-child(3){ animation-delay: .8s; width: 12px; height: 12px; }
@keyframes hintRise {
  0% { transform: translateY(24px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(-30px); opacity: 0; }
}

/* ---------- Zones ---------- */
.dive-zone { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 90px 0; overflow: hidden; }
.zone-inner { position: relative; z-index: 3; width: min(1120px, 92%); margin: 0 auto; text-align: center; color: #fff; }
.dive-kicker { letter-spacing: 4px; text-transform: uppercase; font-size: 13px; color: #d9fbff; margin-bottom: 14px; text-shadow: 0 2px 10px rgba(0,40,60,.5); }
.dive-zone h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.05; margin: 0 0 18px; text-shadow: 0 4px 30px rgba(0,50,80,.55); }
.dive-zone h1 span, .dive-title span {
  background: linear-gradient(90deg, #aef7ff, #5eead4, #aef7ff); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmerText 6s linear infinite;
}
@keyframes shimmerText { to { background-position: 200% center; } }
.dive-title { font-size: clamp(1.9rem, 4.5vw, 3.2rem); margin: 0 0 14px; text-shadow: 0 4px 24px rgba(0,30,50,.6); }
.dive-sub { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 640px; margin: 0 auto 30px; color: #e8fbff; text-shadow: 0 2px 12px rgba(0,40,60,.55); line-height: 1.65; }
.dive-depth-tag { display: inline-block; font-family: ui-monospace, monospace; font-size: 12px; letter-spacing: 3px; color: #bff3ff; border: 1px solid rgba(191,243,255,.4); border-radius: 999px; padding: 6px 16px; margin-bottom: 20px; background: rgba(2,25,40,.35); backdrop-filter: blur(6px); }
.dive-btn {
  display: inline-block; padding: 15px 38px; border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #0ea5a5); color: #03232e;
  font-weight: 700; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 8px 30px rgba(34,211,238,.45), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .25s, box-shadow .25s;
}
.dive-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 40px rgba(34,211,238,.6), inset 0 1px 0 rgba(255,255,255,.5); color: #03232e; }

/* ---------- Flowing aqua currents ---------- */
.dive-current { position: absolute; left: -20%; right: -20%; height: 120px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10) 30%, rgba(174,247,255,.16) 50%, rgba(255,255,255,.10) 70%, transparent);
  filter: blur(18px); animation: currentDrift 26s ease-in-out infinite alternate; }
.dive-current.c1 { top: 12%; animation-duration: 30s; }
.dive-current.c2 { top: 46%; animation-duration: 38s; animation-delay: -12s; opacity: .8; }
.dive-current.c3 { top: 74%; animation-duration: 24s; animation-delay: -6s; opacity: .6; }
@keyframes currentDrift { from { transform: translateX(-6%); } to { transform: translateX(6%); } }

/* ---------- Rising bubbles ---------- */
.bubble-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; bottom: -4%; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55); background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.5), rgba(255,255,255,.06) 60%);
  animation: bubbleRise linear infinite; }
@keyframes bubbleRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .85; }
  100% { transform: translateY(-108vh) translateX(3vw); opacity: 0; }
}

/* ---------- Fish now swim on the #diveSea canvas (boids schools) ---------- */
/* ---------- Sea turtle · mid water ---------- */
.turtle { position: absolute; z-index: 2; pointer-events: none; opacity: .75; animation: turtleGlide 46s linear infinite; }
.turtle svg { width: 150px; height: auto; overflow: visible; filter: drop-shadow(0 4px 10px rgba(0,30,50,.4)); }
.turtle .flipper { transform-box: fill-box; transform-origin: 80% 20%; animation: flipperRow 2.6s ease-in-out infinite alternate; }
@keyframes flipperRow { from { transform: rotate(-14deg); } to { transform: rotate(18deg); } }
@keyframes turtleGlide {
  0% { left: -12%; top: 30%; transform: scaleX(1); }
  48% { left: 104%; top: 22%; transform: scaleX(1); }
  50% { transform: scaleX(-1); }
  98% { left: -12%; top: 34%; transform: scaleX(-1); }
  100% { left: -12%; top: 30%; transform: scaleX(1); }
}
/* ---------- Seahorse · reef ---------- */
.seahorse { position: absolute; z-index: 2; pointer-events: none; opacity: .8; animation: horseSway 6s ease-in-out infinite alternate; }
.seahorse svg { width: 64px; height: auto; overflow: visible; filter: drop-shadow(0 3px 8px rgba(0,30,50,.4)); }
@keyframes horseSway { from { transform: rotate(-8deg) translateY(0); } to { transform: rotate(8deg) translateY(-14px); } }

/* ---------- Glass-flow panels & cards ---------- */
.dive-glass-panel {
  display: inline-block; max-width: 860px; margin: 0 auto;
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(174,247,255,.07) 45%, rgba(255,255,255,.10));
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 32px; padding: 54px 60px;
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 24px 80px rgba(0,40,70,.35), inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(255,255,255,.12);
  position: relative; overflow: hidden;
}
.dive-glass-panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(255,255,255,.35), transparent 70%);
}
.dive-card {
  display: block; text-decoration: none; color: #fff; text-align: left;
  background: linear-gradient(150deg, rgba(255,255,255,.20), rgba(174,247,255,.08) 55%, rgba(255,255,255,.12));
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 22px; padding: 24px 22px;
  backdrop-filter: blur(16px) saturate(1.25); -webkit-backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 12px 44px rgba(0,40,70,.30), inset 0 1px 0 rgba(255,255,255,.55);
  transition: transform .3s, box-shadow .3s;
  position: relative; overflow: hidden;
}
.dive-card::before {
  content:""; position:absolute; inset:0;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.35), transparent 55%);
  pointer-events:none;
}
.dive-card::after {
  content:""; position:absolute; top:0; bottom:0; width:60px; left:-80px;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); transition: left .7s ease; pointer-events:none;
}
.dive-card:hover::after { left: 120%; }
.dive-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 20px 60px rgba(0,60,100,.45), 0 0 34px rgba(94,234,212,.25), inset 0 1px 0 rgba(255,255,255,.6); }
.dive-post { border-radius: 22px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(3,30,48,.55) 70%);
  border: 1px solid rgba(255,255,255,.30);
  backdrop-filter: blur(16px) saturate(1.25); -webkit-backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 12px 44px rgba(0,20,40,.4), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .3s, box-shadow .3s; }
.dive-post:hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0,20,40,.55), 0 0 34px rgba(56,225,255,.22), inset 0 1px 0 rgba(255,255,255,.5); }
/* glassier dive computer */
.dive-hud {
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(2,20,32,.6));
  border: 1px solid rgba(174,247,255,.45);
  box-shadow: 0 10px 34px rgba(0,30,50,.45), inset 0 1px 0 rgba(255,255,255,.4);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
}

/* ---------- Category cards · reef (glass) — see Glass-flow panels & cards above ---------- */
.dive-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 10px; }
.dive-card-emoji { font-size: 2rem; display:block; margin-bottom: 10px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.dive-card h3 { margin: 0 0 8px; font-size: 1.15rem; color: #fff; }
.dive-card p { margin: 0 0 12px; font-size: .92rem; color: #d9f4fb; line-height: 1.55; }
.dive-card-count { font-size: .8rem; letter-spacing: 1px; text-transform: uppercase; color: #aef7ff; font-weight: 600; }

/* ---------- Article cards · mid water (glass) — see Glass-flow panels & cards above ---------- */
.dive-post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 10px; }
.dive-post a { display: block; text-decoration: none; color: #fff; }
.dive-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; background: #06283a; }
.dive-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; display:block; }
.dive-post:hover .dive-thumb img { transform: scale(1.06); }
.dive-post-body { display: block; padding: 20px 22px 22px; text-align: left; }
.dive-kicker-sm { font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: #5eead4; font-weight: 700; }
.dive-post-body h3 { margin: 8px 0 10px; font-size: 1.12rem; line-height: 1.4; color: #fff; }
.dive-post-body p { margin: 0 0 12px; font-size: .92rem; color: #c4e6f2; line-height: 1.6; }
.dive-meta { font-size: .78rem; color: #8fd8ec; }

/* ---------- Jellyfish ---------- */
.jelly { position: absolute; z-index: 2; pointer-events: none; opacity: .8; animation: jellyFloat 14s ease-in-out infinite; }
.jelly svg { width: 100%; height: auto; overflow: visible; }
.jelly .bell { fill: rgba(255, 150, 220, .35); stroke: rgba(255,180,230,.7); stroke-width: 2; filter: drop-shadow(0 0 18px rgba(255,120,220,.8)); animation: bellPulse 3.2s ease-in-out infinite; transform-origin: 50% 20%; }
.jelly .tent { fill: none; stroke: rgba(255,180,230,.55); stroke-width: 2; stroke-linecap: round; animation: tentSway 4s ease-in-out infinite alternate; }
@keyframes bellPulse { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.82); } }
@keyframes tentSway { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
@keyframes jellyFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-46px); } }
.jelly.j1 { right: 6%; top: 12%; width: 110px; }
.jelly.j2 { left: 5%; top: 18%; width: 140px; animation-delay: -5s; }
.jelly.j3 { right: 12%; bottom: 26%; width: 80px; animation-delay: -9s; opacity:.6; }

/* ---------- Marine snow · deep ---------- */
.marine-snow { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.mote { position: absolute; top: -3%; border-radius: 50%; background: rgba(220,245,255,.7); animation: snowFall linear infinite; }
@keyframes snowFall { to { transform: translateY(110vh) translateX(4vw); } }
.mote.m1{left:4%;width:4px;height:4px;animation-duration:16s;}
.mote.m2{left:11%;width:3px;height:3px;animation-duration:22s;animation-delay:-6s;}
.mote.m3{left:18%;width:5px;height:5px;animation-duration:19s;animation-delay:-11s;}
.mote.m4{left:26%;width:3px;height:3px;animation-duration:25s;animation-delay:-3s;}
.mote.m5{left:33%;width:4px;height:4px;animation-duration:17s;animation-delay:-14s;}
.mote.m6{left:41%;width:3px;height:3px;animation-duration:21s;animation-delay:-8s;}
.mote.m7{left:48%;width:5px;height:5px;animation-duration:18s;animation-delay:-2s;}
.mote.m8{left:55%;width:3px;height:3px;animation-duration:24s;animation-delay:-16s;}
.mote.m9{left:62%;width:4px;height:4px;animation-duration:20s;animation-delay:-10s;}
.mote.m10{left:70%;width:3px;height:3px;animation-duration:26s;animation-delay:-5s;}
.mote.m11{left:77%;width:5px;height:5px;animation-duration:17s;animation-delay:-12s;}
.mote.m12{left:84%;width:3px;height:3px;animation-duration:23s;animation-delay:-7s;}
.mote.m13{left:91%;width:4px;height:4px;animation-duration:19s;animation-delay:-15s;}
.mote.m14{left:97%;width:3px;height:3px;animation-duration:27s;animation-delay:-4s;}
.mote.m15{left:7%;width:3px;height:3px;animation-duration:20s;animation-delay:-18s;}
.mote.m16{left:22%;width:4px;height:4px;animation-duration:24s;animation-delay:-9s;}
.mote.m17{left:37%;width:3px;height:3px;animation-duration:18s;animation-delay:-13s;}
.mote.m18{left:52%;width:5px;height:5px;animation-duration:22s;animation-delay:-1s;}
.mote.m19{left:66%;width:3px;height:3px;animation-duration:25s;animation-delay:-17s;}
.mote.m20{left:80%;width:4px;height:4px;animation-duration:19s;animation-delay:-6s;}
.mote.m21{left:94%;width:3px;height:3px;animation-duration:21s;animation-delay:-11s;}
.mote.m22{left:15%;width:4px;height:4px;animation-duration:23s;animation-delay:-19s;}
.mote.m23{left:45%;width:3px;height:3px;animation-duration:26s;animation-delay:-14s;}
.mote.m24{left:73%;width:4px;height:4px;animation-duration:18s;animation-delay:-8s;}

/* ---------- Seaweed · abyss floor ---------- */
.seaweed { position: absolute; bottom: -6px; left: 0; right: 0; z-index: 2; pointer-events: none; }
.seaweed svg { width: 100%; height: 220px; display: block; }
.seaweed .weed { fill: none; stroke-linecap: round; transform-origin: bottom center; animation: weedSway 7s ease-in-out infinite alternate; }
.seaweed .w1 { stroke: #0d5c46; stroke-width: 14; animation-delay: 0s; }
.seaweed .w2 { stroke: #12805f; stroke-width: 11; animation-delay: -2s; }
.seaweed .w3 { stroke: #0d5c46; stroke-width: 16; animation-delay: -4s; }
.seaweed .w4 { stroke: #15a06f; stroke-width: 10; animation-delay: -1s; }
.seaweed .w5 { stroke: #0d5c46; stroke-width: 13; animation-delay: -5s; }
@keyframes weedSway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Zone-specific ambience ---------- */
.zone-abyss .zone-inner { padding-bottom: 120px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .dive-zone { padding: 70px 0; }
  .dive-glass-panel { padding: 36px 26px; border-radius: 24px; }
  .jelly.j1 { width: 80px; } .jelly.j2 { width: 100px; }
  .dive-vignette { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .turtle, .seahorse, .jelly, .mote, .bubble, .dive-current,
  .dive-rays .ray, .dive-surface-shimmer, .seaweed .weed,
  .dive-ocean, #diveSea, .dive-surface svg { animation: none !important; }
  #diveSea { display: none; }
}
