/* ═══════════════════════════════════════════════
   zodiak-epic.css — Neon Zodiac Gallery + Modal
   ═══════════════════════════════════════════════ */

/* ── PARALLAX BG ── */
.zodiak-parallax-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 30% 20%, rgba(10,0,35,1), rgba(2,0,10,1));
}
.zpb-layer {
  position: absolute; inset: -20%; width: 140%; height: 140%;
  pointer-events: none;
}
.zpb-layer.l1 {
  background:
    radial-gradient(ellipse 700px 500px at 15% 25%, rgba(119,51,255,.18) 0%, transparent 70%),
    radial-gradient(ellipse 400px 600px at 85% 75%, rgba(204,68,255,.12) 0%, transparent 70%);
  animation: zpb-drift1 30s ease-in-out infinite alternate;
}
.zpb-layer.l2 {
  background:
    radial-gradient(ellipse 500px 300px at 75% 15%, rgba(255,68,221,.09) 0%, transparent 70%),
    radial-gradient(ellipse 350px 500px at 20% 80%, rgba(34,238,255,.05) 0%, transparent 70%);
  animation: zpb-drift2 22s ease-in-out infinite alternate-reverse;
}
.zpb-layer.l3 {
  background: linear-gradient(rgba(204,68,255,.04) 1px, transparent 1px),
              linear-gradient(90deg, rgba(204,68,255,.03) 1px, transparent 1px);
  background-size: 180px 180px;
  opacity: .5;
  animation: zpb-drift1 60s linear infinite;
}
@keyframes zpb-drift1 {
  0%   { transform: translate(0,0); }
  100% { transform: translate(25px,-18px); }
}
@keyframes zpb-drift2 {
  0%   { transform: translate(0,0); }
  100% { transform: translate(-20px,22px); }
}

/* Shooting stars */
.zpb-shoot {
  position: absolute; width: 2px; height: 2px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 0 6px #cc44ff;
  opacity: 0;
}
.zpb-shoot::after {
  content: ''; position: absolute; right: 100%; top: 50%;
  width: 100px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(204,68,255,.5), #fff);
  transform: translateY(-50%);
}
.zpb-shoot.sh1 { top: 12%; left: 100%; animation: zpb-shoot 10s ease-in-out 1s infinite; }
.zpb-shoot.sh2 { top: 58%; left: 100%; animation: zpb-shoot 10s ease-in-out 6s infinite; }
@keyframes zpb-shoot {
  0%,88%,100% { opacity:0; transform:translateX(0) translateY(0); }
  5%  { opacity:1; }
  40% { opacity:.7; transform:translateX(-100vw) translateY(25vh); }
  41% { opacity:0; }
}

/* ── HERO ── */
.zodiak-hero {
  padding: calc(68px + 3.5rem) 0 4rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(119,51,255,.15), transparent 60%);
  position: relative; z-index: 1;
}
.zodiak-hero h1 { font-size: clamp(2.2rem, 6vw, 5rem); }

/* ── ELEMENT FILTER ── */
.el-filter {
  display: flex; flex-wrap: wrap; gap: .6rem;
  justify-content: center; margin-bottom: 2.5rem;
}
.el-btn {
  padding: .5rem 1.4rem;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(204,68,255,.3);
  border-radius: 9999px;
  color: #e8d8ff; font-size: .82rem; font-weight: 700;
  cursor: pointer; font-family: var(--f-body);
  transition: all .25s ease;
  letter-spacing: .04em;
}
.el-btn:hover { background: rgba(204,68,255,.15); border-color: rgba(204,68,255,.6); color: #fff; }
.el-btn.active {
  background: linear-gradient(135deg, rgba(204,68,255,.35), rgba(119,51,255,.25));
  border-color: #cc44ff; color: #fff;
  box-shadow: 0 0 16px rgba(204,68,255,.4);
}

/* ── GALLERY GRID ── */
.zodiak-gallery-section { position: relative; z-index: 1; }
.zodiak-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
@media(min-width:1200px) { .zodiak-gallery { grid-template-columns: repeat(4, 1fr); } }
@media(max-width:480px) { .zodiak-gallery { grid-template-columns: repeat(2, 1fr); gap: .75rem; } }

/* ── GALLERY CARD ── */
.zg-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(8,0,22,.9);
  border: 1px solid rgba(204,68,255,.2);
  transition: all .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.zg-card:hover {
  border-color: rgba(204,68,255,.7);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 24px 64px rgba(204,68,255,.3), 0 0 0 1px rgba(204,68,255,.4);
}
.zg-card:focus { outline: 3px solid var(--c-cyan); outline-offset: 2px; }

/* Thumb with parallax-like depth */
.zg-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  transition: transform .5s ease;
  position: relative;
}
.zg-card:hover .zg-thumb { transform: scale(1.06); }

/* Neon overlay gradient on hover */
.zg-over {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,0,22,.95) 0%, rgba(8,0,22,.3) 50%, transparent 100%);
  transition: opacity .3s;
}
.zg-neon-ring {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(204,68,255,.12) 0%, transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.zg-card:hover .zg-neon-ring { opacity: 1; }

.zg-sym {
  position: absolute; top: 12px; right: 14px;
  font-size: 1.8rem; color: #fff;
  text-shadow: 0 0 16px rgba(204,68,255,.8), 0 0 32px rgba(204,68,255,.4);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.zg-card:hover .zg-sym { transform: scale(1.3) rotate(15deg); }

.zg-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1rem;
}
.zg-name {
  font-family: var(--f-display);
  font-size: .9rem; font-weight: 700; color: #fff;
  text-shadow: 0 1px 10px rgba(0,0,0,.8);
  margin-bottom: .2rem;
}
.zg-dates { font-size: .68rem; color: rgba(232,216,255,.7); }
.zg-el {
  display: inline-block; margin-top: .4rem;
  font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .18rem .6rem; border-radius: 9999px;
}
.zg-el.fire  { background: rgba(255,80,0,.2); color: #ff9060; border: 1px solid rgba(255,80,0,.4); }
.zg-el.earth { background: rgba(80,200,0,.15); color: #90d050; border: 1px solid rgba(80,200,0,.3); }
.zg-el.air   { background: rgba(0,200,255,.15); color: #50d0ff; border: 1px solid rgba(0,200,255,.3); }
.zg-el.water { background: rgba(40,100,255,.18); color: #70a0ff; border: 1px solid rgba(40,100,255,.4); }

.zg-btn-hint {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.8);
  background: rgba(204,68,255,.8);
  color: #fff; font-size: .72rem; font-weight: 700;
  padding: .5rem 1.2rem; border-radius: 9999px;
  white-space: nowrap; opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
}
.zg-card:hover .zg-btn-hint { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* Scroll reveal */
.scroll-reveal { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.scroll-reveal.in { opacity: 1; transform: none; }
.zg-card:nth-child(1)  { transition-delay: .03s }
.zg-card:nth-child(2)  { transition-delay: .07s }
.zg-card:nth-child(3)  { transition-delay: .11s }
.zg-card:nth-child(4)  { transition-delay: .15s }
.zg-card:nth-child(5)  { transition-delay: .19s }
.zg-card:nth-child(6)  { transition-delay: .23s }
.zg-card:nth-child(7)  { transition-delay: .27s }
.zg-card:nth-child(8)  { transition-delay: .31s }
.zg-card:nth-child(9)  { transition-delay: .35s }
.zg-card:nth-child(10) { transition-delay: .39s }
.zg-card:nth-child(11) { transition-delay: .43s }
.zg-card:nth-child(12) { transition-delay: .47s }

/* Hidden by filter */
.zg-card.filtered { display: none; }

/* ── ZODIAK MODAL ── */
.zodiak-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  visibility: hidden; opacity: 0;
  transition: visibility 0s .4s, opacity .4s ease;
}
.zodiak-modal.open {
  visibility: visible; opacity: 1;
  transition: visibility 0s 0s, opacity .4s ease;
}
.zm-backdrop {
  position: absolute; inset: 0;
  background: rgba(2,0,10,.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}
.zm-panel {
  position: relative; z-index: 1;
  background: rgba(10,0,28,.97);
  border: 1px solid rgba(204,68,255,.4);
  border-radius: 24px;
  max-width: 700px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 0 100px rgba(204,68,255,.3);
  transform: translateY(30px) scale(.96);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
  scrollbar-width: thin; scrollbar-color: rgba(204,68,255,.4) transparent;
}
.zodiak-modal.open .zm-panel { transform: translateY(0) scale(1); }

.zm-close {
  position: sticky; top: 1rem; left: 100%;
  float: right; margin: 1rem 1rem 0 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(204,68,255,.15); border: 1px solid rgba(204,68,255,.4);
  color: #fff; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; z-index: 10;
}
.zm-close:hover { background: rgba(204,68,255,.35); transform: rotate(90deg); }

.zm-parallax-img {
  width: 100%; height: 280px;
  background-size: cover; background-position: center;
  border-radius: 20px 20px 0 0;
  position: relative;
  overflow: hidden;
  transition: transform .1s ease;
}
.zm-parallax-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(10,0,28,.98) 100%);
}
@media(min-width:600px) { .zm-parallax-img { height: 340px; } }

.zm-content { padding: 1.5rem 1.75rem 2rem; }

.zm-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.zm-sym { font-size: 3rem; filter: drop-shadow(0 0 16px rgba(204,68,255,.7)); }
.zm-name { font-family: var(--f-display); font-size: 1.7rem; color: #fff; margin: 0; }
.zm-dates { font-size: .78rem; color: #c4aae8; }

.zm-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.zm-tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  padding: .25rem .8rem; border-radius: 9999px;
  background: rgba(204,68,255,.12); border: 1px solid rgba(204,68,255,.35);
  color: #e8d8ff;
}

.zm-reading {
  font-family: var(--f-serif); font-style: italic;
  color: #e8d8ff; line-height: 1.95; font-size: .96rem;
  background: rgba(204,68,255,.06);
  border-left: 2px solid rgba(204,68,255,.5);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.5rem;
}

.zm-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .7rem; margin-bottom: 1.5rem;
}
.zm-stat {
  background: rgba(204,68,255,.07);
  border: 1px solid rgba(204,68,255,.2);
  border-radius: 10px; padding: .75rem;
  font-size: .78rem; color: #c4aae8;
  display: flex; flex-direction: column; gap: .2rem;
}
.zm-stat strong { color: #fff; font-size: .9rem; }

.zm-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.zm-cta { flex: 1; min-width: 160px; text-align: center; }

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .zpb-layer, .zpb-shoot, .zg-card, .zodiak-modal, .zm-panel { animation: none !important; transition: none !important; }
}
