/* ===== Durga Puja Countdown — theme ===== */
:root{
  --maroon:#3b0410;
  --maroon-deep:#1c0208;
  --red:#c8102e;
  --red-bright:#e8253f;
  --gold:#ffcb6b;
  --gold-deep:#d4a017;
  --cream:#fff3d6;
  --white:#fffaf0;
  --shadow:#00000066;
}

*{margin:0;padding:0;box-sizing:border-box;}

html{scroll-behavior:smooth;}

body{
  font-family:'Hind Siliguri', sans-serif;
  background:radial-gradient(ellipse at 50% -10%, #5a0a1c 0%, var(--maroon) 45%, var(--maroon-deep) 100%);
  color:var(--cream);
  overflow-x:hidden;
  position:relative;
  min-height:100vh;
}

#bg-canvas{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
}

/* cursor-follow spotlight: soft glow that trails the pointer, hover.dev-style ambient light */
.cursor-spotlight{
  position:fixed;
  top:0; left:0;
  width:520px;
  height:520px;
  margin:-260px 0 0 -260px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,203,107,.14) 0%, rgba(232,37,63,.08) 45%, transparent 70%);
  z-index:1;
  pointer-events:none;
  transform:translate(var(--sx, -1000px), var(--sy, -1000px));
  transition:transform .12s ease-out, opacity .3s ease;
  opacity:0;
}
.cursor-spotlight.active{ opacity:1; }

.glow-orb{
  position:fixed;
  border-radius:50%;
  filter:blur(80px);
  opacity:.35;
  z-index:0;
  pointer-events:none;
  animation:drift 14s ease-in-out infinite alternate;
}
.orb1{width:420px;height:420px;background:var(--gold);top:-10%;left:-10%;}
.orb2{width:520px;height:520px;background:var(--red);bottom:-15%;right:-10%;animation-duration:18s;}
@keyframes drift{
  from{transform:translate(0,0) scale(1);}
  to{transform:translate(60px,40px) scale(1.15);}
}

/* ===== Flower marquee: angled, looping strip of mixed Bengali festival flowers ===== */
.flower-marquee{
  position:relative;
  z-index:2;
  overflow:hidden;
  height:46px;
  margin:.5rem 0 0;
  transform:rotate(-1.6deg) scale(1.04);
  transform-origin:center;
  mask-image:linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image:linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.flower-track{
  --gap:1.6rem;
  display:flex;
  align-items:center;
  gap:var(--gap);
  width:max-content;
}
/* each .fl-group is a full copy of the flower set; JS stamps out enough copies to
   cover the viewport, then every copy runs the SAME animation in lockstep — group 2
   slides left by exactly its own width+gap and lands on group 1's start position at
   the instant the loop resets, so the reset is invisible (the standard marquee trick). */
.fl-group{
  display:flex;
  align-items:center;
  gap:var(--gap);
  flex:0 0 auto;
  animation:marqueeScroll 22s linear infinite;
}
.flower-track .fl{
  width:30px;
  height:30px;
  flex:0 0 auto;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.45));
  animation:petalBob 2.4s ease-in-out infinite;
}
@keyframes marqueeScroll{
  from{ transform:translateX(0); }
  to{ transform:translateX(calc(-100% - var(--gap))); }
}
@keyframes petalBob{
  0%,100%{ transform:translateY(0) rotate(0deg); }
  50%{ transform:translateY(-4px) rotate(6deg); }
}

/* ===== Hero ===== */
.hero{
  position:relative;
  z-index:2;
  text-align:center;
  padding:5rem 1.5rem 2.5rem;
}

.dhak{
  font-size:3rem;
  display:inline-block;
  animation:sway 1.6s ease-in-out infinite;
  filter:drop-shadow(0 0 14px var(--gold));
}
@keyframes sway{
  0%,100%{transform:rotate(-8deg);}
  50%{transform:rotate(8deg);}
}

.eyebrow{
  margin-top:.5rem;
  letter-spacing:.35em;
  text-transform:uppercase;
  font-size:.8rem;
  color:var(--gold);
  opacity:.9;
}

.title{margin-top:1rem;}
.line1{
  display:block;
  font-family:'Hind Siliguri', sans-serif;
  font-weight:700;
  font-size:clamp(2.2rem, 7vw, 4.2rem);
  background:linear-gradient(180deg, var(--gold) 0%, #fff2c9 40%, var(--gold-deep) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-shadow:0 0 40px rgba(255,203,107,.35);
  animation:reveal 1s ease both;
}
.line2{
  display:block;
  margin-top:.3rem;
  font-family:'Cinzel', serif;
  font-weight:700;
  letter-spacing:.12em;
  font-size:clamp(1rem, 3vw, 1.6rem);
  color:var(--white);
}
.line2 .ch{
  display:inline-block;
  opacity:0;
  transform:translateY(.6em) rotateX(-60deg);
  animation:letterIn .6s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes letterIn{
  to{ opacity:1; transform:translateY(0) rotateX(0deg); }
}
.year{
  color:var(--gold);
  text-shadow:0 0 20px var(--gold);
}
@keyframes reveal{
  from{opacity:0; transform:translateY(18px);}
  to{opacity:1; transform:translateY(0);}
}

.subtitle{
  margin-top:1.1rem;
  font-size:1.05rem;
  color:var(--cream);
  opacity:.85;
  font-family:'Marcellus', serif;
  animation:reveal 1s .3s ease both;
}

.phase-pill{
  display:inline-block;
  margin-top:1.6rem;
  padding:.55rem 1.4rem;
  border-radius:999px;
  background:linear-gradient(90deg, var(--red), var(--red-bright));
  border:1px solid rgba(255,203,107,.5);
  font-weight:600;
  font-size:.9rem;
  box-shadow:0 8px 24px -8px var(--red-bright);
  animation:pulseGlow 2.4s ease-in-out infinite;
}
@keyframes pulseGlow{
  0%,100%{box-shadow:0 8px 24px -8px var(--red-bright);}
  50%{box-shadow:0 8px 34px -4px var(--gold);}
}

/* ===== Countdown ===== */
.countdown-wrap{
  position:relative;
  z-index:2;
  max-width:760px;
  margin:0 auto;
  padding:0 1.5rem 3rem;
  text-align:center;
}

.countdown{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.6rem;
  flex-wrap:wrap;
}

.time-box{
  background:linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border:1px solid rgba(255,203,107,.3);
  border-radius:18px;
  padding:1rem 1.1rem;
  min-width:88px;
  backdrop-filter:blur(6px);
  box-shadow:0 10px 30px -10px var(--shadow), inset 0 1px 0 rgba(255,255,255,.1);
  transition:transform .2s ease;
}
.time-box:hover{transform:translateY(-4px);}

.num{
  display:block;
  font-family:'Cinzel', serif;
  font-weight:900;
  font-size:clamp(1.9rem, 6vw, 3.2rem);
  color:var(--gold);
  text-shadow:0 0 24px rgba(255,203,107,.5);
  font-variant-numeric:tabular-nums;
}
.num.flip{animation:flip .5s ease;}
@keyframes flip{
  0%{transform:rotateX(90deg); opacity:0;}
  100%{transform:rotateX(0deg); opacity:1;}
}

.label{
  display:block;
  margin-top:.3rem;
  font-size:.7rem;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--cream);
  opacity:.7;
}

.colon{
  font-family:'Cinzel', serif;
  font-size:2rem;
  color:var(--gold);
  opacity:.6;
  animation:blink 1s step-start infinite;
}
@keyframes blink{50%{opacity:.15;}}

.countdown-target{
  margin-top:1.2rem;
  font-size:.9rem;
  opacity:.75;
}

.progress-track{
  margin-top:1.4rem;
  height:6px;
  border-radius:999px;
  background:rgba(255,255,255,.1);
  overflow:hidden;
}
.progress-fill{
  height:100%;
  width:100%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--red), var(--gold));
  box-shadow:0 0 12px var(--gold);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform 1s linear;
}

/* ===== Timeline / schedule ===== */
.section-title{
  text-align:center;
  font-family:'Cinzel', serif;
  font-size:clamp(1.4rem, 4vw, 2rem);
  letter-spacing:.05em;
  color:var(--gold);
  margin-bottom:2.4rem;
}

.schedule{
  position:relative;
  z-index:2;
  max-width:960px;
  margin:2rem auto;
  padding:2rem 1.5rem;
}

.timeline{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:1.1rem;
}
.timeline::before{
  content:"";
  position:absolute;
  /* must land on the icon's true center: row padding-left (1.2rem = 19.2px) + icon radius (56px/2 = 28px) */
  left:47px;
  top:8px;
  bottom:8px;
  width:2px;
  background:linear-gradient(180deg, var(--gold), transparent);
  opacity:.4;
  z-index:0;
  display: none;
}
.day-icon{ position:relative; z-index:1; } /* sit above the rail line, not floating beside it */

.day-row{
  position:relative;
  display:grid;
  grid-template-columns:56px 1fr auto;
  align-items:center;
  gap:1rem;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,203,107,.18);
  border-radius:16px;
  padding:1rem 1.2rem;
  opacity:0;
  transform:translateX(-24px);
  animation:slideIn .6s ease forwards;
}
@keyframes slideIn{
  to{opacity:1; transform:translateX(0);}
}

.day-icon{
  width:56px;
  height:56px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.5rem;
  background:radial-gradient(circle, rgba(255,203,107,.25), rgba(255,203,107,.05));
  border:1px solid var(--gold);
  z-index:1;
}

.day-info{ min-width:0; } /* grid child must opt out of default min-width:auto or long text blows past the card edge */
.day-info h4{
  font-family:'Cinzel', serif;
  color:var(--white);
  font-size:1.05rem;
  letter-spacing:.02em;
  overflow-wrap:break-word;
}
.day-info p{
  font-size:.85rem;
  opacity:.7;
  margin-top:.15rem;
  overflow-wrap:break-word;
}

.day-icon-svg{ width:28px; height:28px; fill:var(--gold); filter:drop-shadow(0 0 6px rgba(255,203,107,.6)); }

.day-date{
  text-align:right;
  font-family:'Cinzel', serif;
  font-weight:700;
  color:var(--gold);
  font-size:.95rem;
  white-space:nowrap;
}
.day-date small{
  display:block;
  font-family:'Hind Siliguri', sans-serif;
  font-weight:400;
  color:var(--cream);
  opacity:.6;
  font-size:.7rem;
}

.day-row.today{
  border-color:var(--gold);
  background:linear-gradient(90deg, rgba(255,203,107,.14), rgba(255,255,255,.03));
  box-shadow:0 0 30px -6px var(--gold);
}
.day-row.past{opacity:.45 !important;}
.day-row.past .day-icon{filter:grayscale(1);}

/* ===== Details cards ===== */
.details{
  position:relative;
  z-index:2;
  max-width:1100px;
  margin:3rem auto;
  padding:1.5rem;
}
.cards{
  display:grid;
  grid-template-columns:repeat(3, 1fr); /* 6 cards, always 3-3 not the auto-fit 4-2 wrap */
  gap:1.2rem;
}
@media (max-width:860px){ .cards{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width:560px){ .cards{ grid-template-columns:1fr; } }
.card{
  position:relative;
  background:linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border:1px solid rgba(255,203,107,.2);
  border-radius:18px;
  padding:1.6rem;
  opacity:0;
  overflow:hidden;
  transform:translateY(28px) scale(.97);
  transition:transform .15s ease, box-shadow .3s ease, border-color .3s ease, opacity .6s ease;
  transform-style:preserve-3d;
  perspective:600px;
}
.card.in-view{
  opacity:1;
  transform:translateY(0) scale(1);
}
/* shine sweep — a light bar that slides across on hover, hover.dev-style */
.card::after{
  content:"";
  position:absolute;
  top:0; left:-60%;
  width:40%;
  height:100%;
  background:linear-gradient(115deg, transparent, rgba(255,255,255,.16), transparent);
  transform:skewX(-20deg);
  transition:left .7s ease;
  pointer-events:none;
}
.card:hover::after{ left:130%; }
.card:hover{
  transform:translateY(-6px) scale(1.02);
  border-color:var(--gold);
  box-shadow:0 16px 40px -14px var(--shadow);
}
.card-icon{
  font-size:2rem;
  margin-bottom:.7rem;
  filter:drop-shadow(0 0 10px rgba(255,203,107,.4));
}
.card h3{
  font-family:'Cinzel', serif;
  color:var(--gold);
  font-size:1.05rem;
  margin-bottom:.5rem;
}
.card p{
  font-size:.88rem;
  line-height:1.55;
  opacity:.85;
}

/* ===== Footer ===== */
.footer{
  position:relative;
  z-index:2;
  text-align:center;
  padding:3rem 1.5rem 4rem;
  opacity:.8;
}
.conch{
  font-size:1.8rem;
  animation:sway 2.4s ease-in-out infinite;
  display:inline-block;
}
.footer p{margin-top:.6rem; font-size:.85rem; letter-spacing:.03em;}

/* ===== Entry gate ===== */
.entry-gate{
  position:fixed;
  inset:0;
  z-index:200;
  display:flex;
  align-items:center;
  justify-content:center;
  background:radial-gradient(ellipse at 50% 40%, #5a0a1c 0%, var(--maroon) 55%, var(--maroon-deep) 100%);
  transition:opacity .6s ease, visibility .6s ease;
}
.entry-gate.hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.entry-content{
  text-align:center;
  padding:2rem;
  animation:reveal .8s ease both;
}
.entry-dhak{
  font-size:3.5rem;
  animation:sway 1.6s ease-in-out infinite;
  filter:drop-shadow(0 0 18px var(--gold));
}
.entry-content h2{
  margin-top:1rem;
  font-family:'Hind Siliguri', sans-serif;
  font-weight:700;
  font-size:clamp(1.6rem, 5vw, 2.4rem);
  color:var(--gold);
  text-shadow:0 0 24px rgba(255,203,107,.4);
}
.entry-content p{
  margin-top:.5rem;
  opacity:.75;
  font-family:'Marcellus', serif;
}
.entry-btn{
  margin-top:1.8rem;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.8rem 2rem;
  border-radius:999px;
  border:1px solid rgba(255,203,107,.6);
  background:linear-gradient(90deg, var(--red), var(--red-bright));
  color:var(--white);
  font-family:'Cinzel', serif;
  font-weight:700;
  letter-spacing:.08em;
  font-size:1rem;
  cursor:pointer;
  animation:pulseGlow 2.2s ease-in-out infinite;
  transition:transform .2s ease;
}
.entry-btn:hover{ transform:scale(1.06) translate(var(--mx, 0), var(--my, 0)); }
.entry-btn svg{ width:18px; height:18px; fill:var(--white); }

body.gate-open{ overflow:hidden; }

/* ===== Music toggle ===== */
.music-toggle{
  position:fixed;
  right:1.3rem;
  bottom:1.3rem;
  z-index:50;
  width:52px;
  height:52px;
  border-radius:50%;
  border:1px solid rgba(255,203,107,.5);
  background:radial-gradient(circle at 35% 30%, #6a0f24, var(--maroon-deep));
  color:var(--gold);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 24px -8px var(--shadow), 0 0 0 0 rgba(255,203,107,.5);
  transition:transform .2s ease, box-shadow .2s ease;
}
.music-toggle:hover{ transform:scale(1.08) translate(var(--mx, 0), var(--my, 0)); }
.music-toggle svg{ width:20px; height:20px; fill:var(--gold); }
.music-toggle .icon-pause{ display:none; }
.music-toggle.playing .icon-play{ display:none; }
.music-toggle.playing .icon-pause{ display:block; }
.music-toggle.playing{ animation:musicPulse 1.8s ease-in-out infinite; }
@keyframes musicPulse{
  0%,100%{ box-shadow:0 8px 24px -8px var(--shadow), 0 0 0 0 rgba(255,203,107,.45); }
  50%{ box-shadow:0 8px 24px -8px var(--shadow), 0 0 0 10px rgba(255,203,107,0); }
}

@media (max-width:520px){
  .time-box{min-width:70px; padding:.8rem .6rem;}
  .day-row{grid-template-columns:44px 1fr; row-gap:.4rem;}
  .day-date{grid-column:1 / -1; text-align:left;}
  .timeline::before{ left:41px; } /* icon shrinks to 44px here: 19.2 + 22 */
}
