/* ==========================================================================
   🪔 Reality ASM — Shubh Deepavali (शुभ दीपावली) Festive Theme & Decoration
   Celebrates the Indian Festival of Lights: Diyas, Toran, Rangoli, Golden Sparks
   ========================================================================== */

/* Festive Color Palette & Variables */
:root {
  --diwali-gold: #FFD700;
  --diwali-gold-deep: #B45309;
  --diwali-amber: #F59E0B;
  --diwali-saffron: #FF9933;
  --diwali-sindoor: #DC2626;
  --diwali-marigold: #EA580C;
  --diwali-leaf-green: #15803D;
  --diwali-bg-glow: rgba(245, 158, 11, 0.15);
}

/* --------------------------------------------------------------------------
   1. DIWALI ANNOUNCEMENT HEADER BANNER (शुभ दीपावली)
   -------------------------------------------------------------------------- */
.diwali-banner {
  background: linear-gradient(135deg, #1c0a00 0%, #3b1104 35%, #4a0d0d 65%, #1f0404 100%);
  color: #fff;
  border-bottom: 2px solid #F59E0B;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(245, 158, 11, 0.25);
  z-index: 25;
}

.diwali-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(245, 158, 11, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(220, 38, 38, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.diwali-banner-wrap {
  max-width: var(--wrap, 1160px);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.diwali-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.diwali-diya-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.8));
  animation: diyaFloat 3s ease-in-out infinite alternate;
}

.diwali-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.diwali-sub-tag {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FCD34D;
  display: flex;
  align-items: center;
  gap: 6px;
}

.diwali-greeting {
  font-size: 16px;
  font-weight: 750;
  margin: 0;
  color: #FFFFFF;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.diwali-greeting .diwali-gold {
  color: #FBBF24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}

.diwali-quote {
  font-size: 12.5px;
  color: #FDE68A;
  margin: 0;
  opacity: 0.92;
  font-style: italic;
  font-family: system-ui, -apple-system, sans-serif;
}

.diwali-banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.diwali-mini-diya {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.85));
  animation: diyaFloat 2.5s ease-in-out infinite alternate;
}

.diwali-spark-toggle {
  background: linear-gradient(180deg, #FFF2DF, #FFE4C6);
  border: 1px solid rgba(255, 91, 46, 0.38);
  color: #A8390F;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.diwali-spark-toggle:hover {
  background: linear-gradient(180deg, #FFE9CC, #FFD8AE);
  border-color: rgba(255, 91, 46, .6);
  color: #7C2D12;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   2. MARIGOLD & MANGO LEAF TORAN GARLAND (तोरण)
   -------------------------------------------------------------------------- */
.diwali-toran {
  width: 100%;
  height: 22px;
  background-repeat: repeat-x;
  background-size: 80px 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 22' width='80' height='22'%3E%3Cpath d='M0 0 Q40 10 80 0' fill='none' stroke='%23b45309' stroke-width='1.5'/%3E%3Cpath d='M25 0 Q20 16 12 18 Q26 12 25 0' fill='%2315803d'/%3E%3Cpath d='M55 0 Q60 16 68 18 Q54 12 55 0' fill='%2315803d'/%3E%3Ccircle cx='40' cy='11' r='7' fill='%23ea580c'/%3E%3Ccircle cx='40' cy='11' r='4.5' fill='%23f59e0b'/%3E%3Ccircle cx='40' cy='11' r='2' fill='%23fef08a'/%3E%3Ccircle cx='0' cy='2' r='4' fill='%23f59e0b'/%3E%3Ccircle cx='80' cy='2' r='4' fill='%23f59e0b'/%3E%3C/svg%3E");
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
  position: relative;
  z-index: 15;
}

/* --------------------------------------------------------------------------
   3. ANIMATED DIYA SVG FLAME & GLOW
   -------------------------------------------------------------------------- */
@keyframes diyaFlame {
  0% { transform: scale(1) rotate(-1deg); filter: drop-shadow(0 0 8px #f59e0b); }
  50% { transform: scale(1.08, 0.94) rotate(1.5deg); filter: drop-shadow(0 0 14px #fbbf24); }
  100% { transform: scale(0.96, 1.05) rotate(-1deg); filter: drop-shadow(0 0 10px #f97316); }
}

@keyframes diyaFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

.diya-flame {
  transform-origin: center bottom;
  animation: diyaFlame 1.8s ease-in-out infinite alternate;
}

/* --------------------------------------------------------------------------
   4. CELEBRATORY CARD ACCENTS & FESTIVE GLOW
   -------------------------------------------------------------------------- */
.diwali-card-glow {
  position: relative;
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12) !important;
  transition: all 0.25s ease;
}

.diwali-card-glow:hover {
  border-color: #F59E0B !important;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.25) !important;
  transform: translateY(-3px);
}

/* Traditional Rangoli corner pattern */
.diwali-card-glow::after {
  content: "🪔";
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 15px;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   5. INDIAN SCIENTIFIC & ASTRONOMICAL HERITAGE SHOWCASE BAND (BESPOKE BENTO)
   -------------------------------------------------------------------------- */
.diwali-heritage-band {
  background: linear-gradient(180deg, #07090f 0%, #0d121f 50%, #080a12 100%);
  color: #fff;
  padding: 64px 0 72px;
  border-top: 1px solid rgba(245, 158, 11, 0.25);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  position: relative;
  overflow: hidden;
}

.diwali-heritage-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 25%, rgba(245, 158, 11, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 90% 75%, rgba(220, 38, 38, 0.08) 0%, transparent 45%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
}

.bento-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.bento-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FBBF24;
  text-transform: uppercase;
}

.bento-radar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: radarPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes radarPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.bento-sub-badge {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-left: 2px solid rgba(245, 158, 11, 0.4);
}

.diwali-heritage-head {
  max-width: 820px;
  margin-bottom: 32px;
}

.diwali-heritage-head h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 12px;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.diwali-heritage-head h2 .gold-accent {
  background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 60%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.diwali-heritage-head p {
  font-size: 15px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.65;
}

/* ---------------- Bento Grid Layout ---------------- */
.diwali-bento-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.bento-column-stacked {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diwali-bento-card {
  background: rgba(15, 20, 32, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 14px;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.diwali-bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.4), transparent);
}

.diwali-bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.16), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.bento-featured {
  min-height: 440px;
}

.bento-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bento-card-header {
  margin-bottom: 14px;
}

.bento-chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.bento-chip {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bento-chip-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.35);
}

.diwali-bento-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.diwali-bento-card p {
  font-size: 13.5px;
  color: #94a3b8;
  margin: 0 0 16px;
  line-height: 1.55;
}

/* Schematic Visuals */
.bento-schematic-wrap {
  background: rgba(7, 10, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  position: relative;
}

.bento-schematic-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.bento-hud-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
}

.bento-hud-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bento-hud-lbl {
  color: #64748b;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.bento-hud-val {
  color: #38bdf8;
  font-weight: 600;
}

.bento-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bento-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: #FBBF24;
  text-decoration: none;
  transition: all 0.15s ease;
}

.bento-link:hover {
  color: #FDE68A;
  transform: translateX(3px);
}

.bento-meta-pill {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   6. INTERACTIVE FIREWORKS & SPARKS CANVAS
   -------------------------------------------------------------------------- */
#diwaliCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99;
}

/* --------------------------------------------------------------------------
   7. RESPONSIVENESS
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .diwali-bento-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .diwali-banner-wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px;
  }
  .diwali-banner-right {
    width: 100%;
    justify-content: flex-end;
  }
  .diwali-greeting {
    font-size: 14.5px;
  }
  .diwali-quote {
    font-size: 11.5px;
  }
}

@media (max-width: 640px) {
  .diwali-spark-toggle {
    padding: 4px 8px;
    font-size: 12px;
    min-width: 32px;
    justify-content: center;
  }
  .diwali-spark-toggle .btn-text {
    display: none;
  }
  .brand-diwali-tag {
    display: inline-flex !important;
    font-size: 10px !important;
    padding: 1px 6px !important;
    margin-left: 4px !important;
  }
}

@media (max-width: 380px) {
  .diwali-spark-toggle {
    padding: 2px 6px;
    font-size: 11px;
    min-width: 28px;
  }
}

/* --------------------------------------------------------------------------
   The Deepotsav mark beside the brand: a drawn diya, not an emoji, so it keeps
   its shape on every device. The flame breathes; it holds still for anyone who
   asks the system for less motion.
   -------------------------------------------------------------------------- */
.brand-diwali-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 8px;
  padding: 3px 11px 3px 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .01em;
  color: #A8390F;                       /* the site header is light, so the word has to be dark enough to read */
  background: linear-gradient(180deg, #FFF2DF, #FFE4C6);
  border: 1px solid rgba(255, 91, 46, .38);
  border-radius: 999px;
  vertical-align: middle;
  line-height: 1.5;
}
.brand-diwali-tag .diya { flex: none; filter: drop-shadow(0 1px 3px rgba(194, 65, 12, .35)); }

/* On the app's dark bar the same mark glows instead. */
.topbar .brand-diwali-tag {
  color: #FFD08A;
  background: linear-gradient(180deg, rgba(255, 176, 58, .18), rgba(255, 91, 46, .12));
  border-color: rgba(255, 176, 58, .45);
}
.topbar .brand-diwali-tag .diya { filter: drop-shadow(0 0 6px rgba(255, 170, 60, .6)); }
.brand-diwali-tag .diya-flame { transform-origin: 12px 10px; animation: diya-breathe 2.4s ease-in-out infinite; }
.brand-diwali-tag .diya-flame-core { transform-origin: 12px 9px; animation: diya-breathe 1.7s ease-in-out infinite; }

@keyframes diya-breathe {
  0%, 100% { transform: scaleY(1) scaleX(1); opacity: 1; }
  45%      { transform: scaleY(1.12) scaleX(.94); opacity: .92; }
}

.diwali-spark-toggle .spark-ico { flex: none; }

@media (prefers-reduced-motion: reduce) {
  .brand-diwali-tag .diya-flame,
  .brand-diwali-tag .diya-flame-core { animation: none; }
}

/* The same control on the app's dark bar. */
.topbar .diwali-spark-toggle {
  background: rgba(245, 158, 11, .18);
  border-color: rgba(245, 158, 11, .5);
  color: #FDE68A;
}
.topbar .diwali-spark-toggle:hover { background: rgba(245, 158, 11, .32); color: #fff; }
