/* ============================================================
   cast.css — page-scoped styles for the baked Cast (heroes hub).
   Extracted ONCE from the inline <style> of website/pages/cast.html.
   Loaded ONLY by /he|en/cast.html (declared in data/cast.json css[]).
   4-layer rule: design layer. Do not inline back into HTML.
   Collision-filter: source `body{background:#050508}` DROPPED — global
   body already paints var(--navy) (#070a10); sections paint their own
   gradients. Dead keyframes (heroGlow/scanDown) omitted.
   ============================================================ */

@keyframes castReveal { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmerCard { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes slowZoomCast { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes borderPulse { 0%,100% { border-color: var(--gold-alpha-06); } 50% { border-color: var(--gold-alpha-15); } }

/* ===== HERO BANNER ===== */
.cast-hero {
  position: relative; min-height: 65vh;
  display: flex; align-items: flex-end; justify-content: flex-start;
  text-align: left; padding: 0; overflow: hidden;
}
[dir="rtl"] .cast-hero { text-align: right; justify-content: flex-end; }
.cast-hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.cast-hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center 35%;
  animation: slowZoomCast 20s ease-in-out infinite alternate;
}
.cast-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, var(--gold-alpha-06) 0%, transparent 55%),
    linear-gradient(180deg, rgba(5,5,8,0.5) 0%, rgba(5,5,8,0.15) 35%, rgba(5,5,8,0.5) 65%, rgba(5,5,8,0.98) 100%);
}
/* Floating particles */
.cast-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(2px 2px at 15% 25%, var(--gold-alpha-40), transparent),
    radial-gradient(1px 1px at 75% 35%, var(--gold-alpha-30), transparent),
    radial-gradient(2px 2px at 45% 65%, var(--gold-alpha-35), transparent),
    radial-gradient(1px 1px at 85% 75%, var(--gold-alpha-20), transparent);
}
.cast-hero .container {
  position: relative; z-index: 2;
  padding: 0 5% 80px;
  max-width: 600px;
  text-align: left;
  animation: castReveal 1.2s ease-out both;
}
[dir="rtl"] .cast-hero .container { text-align: right; }
.cast-hero .section-title {
  font-size: clamp(3rem, 9vw, 7rem) !important;
  letter-spacing: 10px !important; margin-bottom: 8px !important;
  text-shadow: 0 0 80px var(--gold-alpha-15), 0 4px 30px rgba(0,0,0,0.7);
  text-align: left;
}
[dir="rtl"] .cast-hero .section-title { text-align: right; }
.cast-hero .section-eyebrow { text-align: left; }
[dir="rtl"] .cast-hero .section-eyebrow { text-align: right; }
.cast-hero .divider {
  width: 80px; height: 2px; margin: 10px 0 10px;
}
[dir="rtl"] .cast-hero .divider { margin: 10px 0 10px auto; }
/* hero copy lines (ex-inline) */
.cast-hero__line-1 { font-family: var(--font-heading); font-size: 1.15rem; letter-spacing: 4px; text-transform: uppercase; color: var(--cream-alpha-85); margin: 0 0 6px; line-height: 1.6; }
.cast-hero__line-2 { font-family: var(--font-body); font-size: 0.65rem; letter-spacing: 2px; color: var(--cream-alpha-75); text-transform: uppercase; margin: 0; }
/* Scroll indicator */
/* scroll cue — always rendered static (cast-scroll cast-scroll--static) */
.cast-scroll {
  z-index: 3; font-family: var(--font-heading); font-size: 0.55rem;
  letter-spacing: 4px; text-transform: uppercase; color: var(--gold-alpha-35);
}
.cast-scroll--static { margin-top: 16px; }

/* ===== CHARACTER GRID ===== */
.cast-section {
  padding: 80px 0 120px;
  background: linear-gradient(180deg, #050508 0%, var(--navy) 15%, var(--navy) 85%, var(--navy-deep) 100%);
  position: relative;
}
.cast-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 28px; max-width: 1100px; margin: 0 auto;
  list-style: none; padding: 0;
}
.cast-grid-title { font-size: 1rem; letter-spacing: 3px; margin-bottom: 30px; }

/* ===== CHARACTER CARD ===== */
.cast-card {
  position: relative; overflow: hidden; display: block;
  border: 1px solid var(--gold-alpha-06);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  transition: all 0.5s cubic-bezier(0.19,1,0.22,1);
  text-decoration: none; color: inherit;
  animation: borderPulse 6s ease-in-out infinite;
}
/* Top gold accent line */
.cast-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 10;
  background: linear-gradient(90deg, transparent, var(--gold-alpha-40), transparent);
  opacity: 0; transition: opacity 0.5s ease;
}
/* Shimmer overlay on hover */
.cast-card::after {
  content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: linear-gradient(170deg, transparent 30%, var(--gold-alpha-04) 50%, transparent 70%);
  background-size: 200% 200%;
  opacity: 0; transition: opacity 0.3s ease;
}
.cast-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--gold-alpha-30);
  box-shadow: 0 30px 70px rgba(0,0,0,0.5), 0 0 50px var(--gold-alpha-06),
              inset 0 1px 0 var(--gold-alpha-15);
}
.cast-card:hover::before { opacity: 1; }
.cast-card:hover::after { opacity: 1; animation: shimmerCard 1.5s ease-in-out; }
.cast-card-img { width: 100%; aspect-ratio: 3/4; overflow: hidden; position: relative; }
/* coming-soon card image (render pending; img path still _TODO) — intentional teaser */
.cast-card-img .cast-soon {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(157deg, #17181d 0%, #070708 75%);
}
.cast-card-img .cast-soon__badge {
  font-family: var(--font-heading); font-size: 0.7rem; letter-spacing: 3px;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--gold-alpha-30); padding: 0.6em 1.3em;
}
.cast-card-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 0.7s cubic-bezier(0.19,1,0.22,1), filter 0.5s ease;
}
.cast-card-img img.is-focal-c20 { object-position: center 20%; }
.cast-card-img img.is-focal-ctop { object-position: center top; }
.cast-card:hover .cast-card-img img { transform: scale(1.08); }

/* Card info overlay */
.cast-card-info {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 6;
  padding: 60px 22px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(5,5,8,0.7) 40%, rgba(5,5,8,0.95) 100%);
}
.cast-card-info h3 {
  font-family: var(--font-hero); font-size: 1.5rem; color: var(--white);
  letter-spacing: 3px; text-transform: uppercase; margin-bottom: 4px;
  transition: text-shadow 0.4s ease;
}
.cast-card:hover .cast-card-info h3 {
  text-shadow: 0 0 20px var(--gold-alpha-20);
}
.cast-card-tagline {
  font-family: var(--font-heading); font-size: 0.7rem; font-weight: 400;
  color: var(--gold); letter-spacing: 2px; text-transform: uppercase;
  opacity: 0.8;
}
/* Explore badge on active cards */
.cast-card-explore {
  display: inline-block; margin-top: 12px; padding: 4px 14px;
  border: 1px solid var(--gold-alpha-15);
  font-family: var(--font-heading); font-size: 0.5rem; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase; color: var(--gold-alpha-40);
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
  opacity: 0.5; transform: translateY(0);
  transition: all 0.4s ease 0.1s;
}
.cast-card:hover .cast-card-explore {
  opacity: 1;
  border-color: var(--gold-alpha-35); color: var(--gold);
}

/* Type badges (HERO/VILLAIN/FACTION) */
.cast-type-badge {
  position: absolute; top: 16px; left: 16px; z-index: 8;
  padding: 4px 12px;
  font-family: var(--font-heading); font-size: 0.5rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
}
[dir="rtl"] .cast-type-badge { left: auto; right: 16px; }
.cast-type-badge.hero { background: var(--gold-alpha-20); color: var(--gold); border: 1px solid var(--gold-alpha-30); }
.cast-type-badge.villain { background: rgba(139,26,26,0.3); color: #ff6b6b; border: 1px solid rgba(139,26,26,0.4); }
.cast-type-badge.faction { background: rgba(59,130,246,0.2); color: #60a5fa; border: 1px solid var(--faction-blue-alpha-30); }
.cast-type-badge.heroine { background: rgba(168,85,247,0.2); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }
.cast-type-badge.shadow { background: rgba(148,163,184,0.15); color: #94a3b8; border: 1px solid rgba(148,163,184,0.25); }

/* Locked card */
.cast-card.locked { cursor: default; animation: none; }
.cast-card.locked:hover { transform: none; border-color: var(--gold-alpha-06); box-shadow: none; }
.cast-card.locked .cast-card-img img { filter: saturate(0.2) brightness(0.5); }
.cast-card.locked:hover .cast-card-img img { transform: none; }
.cast-card.locked::before, .cast-card.locked::after { display: none; }
.cast-card-locked-img { background: var(--navy-alt); display: flex; align-items: center; justify-content: center; }
.cast-card-locked-icon { font-size: 3rem; opacity: 0.3; }

/* ===== CTA SECTION ===== */
.cast-cta {
  padding: 100px 0; text-align: center; position: relative;
  background: linear-gradient(180deg, var(--navy-deep), #050508);
}
.cast-cta::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-alpha-04), transparent 70%);
  pointer-events: none;
}
.cast-cta__sub { margin-top: 20px; max-width: 550px; margin-inline: auto; }
.cast-cta__btn { margin-top: 30px; }

/* mobile-only locked cards (scoped — was global .mobile-only) */
.cast-mobile-only { display: none; }

/* ===== NOTIFY MODAL (hidden, inert — no trigger wired) ===== */
.notify-modal { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.8); align-items: center; justify-content: center; }
.notify-modal__box { background: var(--navy-mid); border: 1px solid var(--gold-alpha-25); padding: 40px; max-width: 420px; width: 90%; text-align: center; position: relative; }
.notify-modal__close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: var(--text-light); font-size: 1.5rem; cursor: pointer; }
[dir="rtl"] .notify-modal__close { right: auto; left: 16px; }
.notify-modal__title { font-family: var(--font-heading); font-size: 1rem; letter-spacing: 3px; color: var(--gold); margin-bottom: 10px; }
.notify-modal__desc { font-size: 0.85rem; color: var(--text-light); margin-bottom: 20px; line-height: 1.6; }
.notify-modal__form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.notify-modal__input { flex: 1; min-width: 200px; padding: 10px 14px; background: var(--white-alpha-05); border: 1px solid var(--gold-alpha-30); color: var(--cream); font-size: 0.85rem; outline: none; }
.notify-modal__submit { padding: 10px 22px; background: var(--gold); color: var(--navy); font-family: var(--font-heading); font-size: 0.72rem; letter-spacing: 2px; border: none; cursor: pointer; transition: var(--ease); }
.notify-modal__msg { display: none; margin-top: 12px; font-size: 0.85rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .cast-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .cast-mobile-only { display: block; }
  .cast-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cast-card-img { aspect-ratio: 3/5; }
  .cast-card-info { padding: 40px 14px 16px; }
  .cast-card-info h3 { font-size: 1.1rem; letter-spacing: 2px; }
  .cast-card-tagline { font-size: 0.6rem; }
  .cast-hero { min-height: 50vh; }
  .cast-hero-bg img { object-position: center 20%; object-fit: cover; }
  .cast-hero .container { padding: 0 5% 30px; }
  .cast-hero .section-title { font-size: clamp(2.5rem, 8vw, 5rem) !important; letter-spacing: 3px !important; }
}
@media (max-width: 480px) {
  .cast-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cast-card-info h3 { font-size: 0.9rem; letter-spacing: 1px; }
  .cast-card-tagline { font-size: 0.55rem; letter-spacing: 1px; }
  .cast-card-explore { font-size: 0.4rem; padding: 3px 8px; }
  .cast-hero { min-height: 55vh; }
  .cast-hero-bg img { object-position: center 20%; transform: scale(1); animation: none; }
}

/* a11y — honor reduced-motion (kills the infinite slow-zoom / border-pulse / reveal) */
@media (prefers-reduced-motion: reduce) {
  .cast-hero-bg img, .cast-card, .cast-hero .container { animation: none; }
  .cast-card:hover { transform: none; }
}
