/* ==========================================================================
   PAPERBALA STUDIO - ULTRA PREMIUM LUXURY ONAM STYLESHEET
   Canvas Target: 1080px x 1350px (Scaled responsively)
   ========================================================================== */

:root {
  --primary-gold: #facc15;
  --deep-gold: #b45309;
  --kasavu-cream: #fefce8;
  --royal-red: #991b1b;
  --emerald-green: #064e3b;
  --glass-bg: rgba(15, 23, 42, 0.45);
  --glass-border: rgba(250, 204, 21, 0.35);
  --font-heading: 'Cinzel Decorative', 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  background-color: #090d16;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: var(--font-body);
  color: #ffffff;
  overflow: x-hidden;
}

/* --- CANVAS CONTAINER (1080x1350 Aspect Ratio) --- */
.poster-canvas {
  position: relative;
  width: 540px;          /* Scaled down to fit screens, keeps 4:5 ratio */
  height: 675px;
  background: #022c22;  /* Rich Kerala Emerald Base */
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

/* --- MESH & BACKGROUND GLOWS --- */
.mesh-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.aurora-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: floatGlow 12s infinite alternate ease-in-out;
}

.aurora-1 {
  width: 300px;
  height: 300px;
  background: #15803d;
  top: -50px;
  left: -50px;
}

.aurora-2 {
  width: 250px;
  height: 250px;
  background: #b45309;
  bottom: -40px;
  right: -40px;
  animation-delay: -4s;
}

.aurora-3 {
  width: 200px;
  height: 200px;
  background: #991b1b;
  top: 40%;
  left: 30%;
  animation-delay: -8s;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 40px) scale(1.15); }
}

/* --- KASAVU BORDER ARCHITECTURE --- */
.kasavu-border-outer {
  position: absolute;
  inset: 12px;
  border: 3px solid var(--primary-gold);
  border-radius: 8px;
  z-index: 2;
  pointer-events: none;
}

.kasavu-border-inner {
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(250, 204, 21, 0.5);
  border-radius: 6px;
}

/* --- GLASSMORPHISM CONTAINER PANEL --- */
.glass-card {
  position: relative;
  z-index: 10;
  height: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  box-shadow: inset 0 0 20px rgba(250, 204, 21, 0.05);
}

/* --- HEADER SECTION --- */
.logo-wrapper {
  letter-spacing: 4px;
  font-weight: 700;
  color: var(--kasavu-cream);
  font-size: 0.9rem;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.subtitle-badge {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--primary-gold);
  margin-top: 4px;
  text-transform: uppercase;
}

/* --- CENTERSTAGE (POOKALAM & NILAVILAKKU) --- */
.center-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0;
}

.pookalam-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pookalam-svg {
  width: 100%;
  height: 100%;
  animation: spinSlow 40s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.nilavilakku-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nilavilakku-svg {
  width: 35px;
  height: 70px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.flame {
  width: 8px;
  height: 16px;
  background: radial-gradient(circle, #fef08a 0%, #f97316 60%, transparent 100%);
  border-radius: 50% 50% 20% 20%;
  position: absolute;
  top: -4px;
  animation: flameFlicker 0.15s infinite alternate ease-in-out;
}

@keyframes flameFlicker {
  0% { transform: scale(1) rotate(-1deg); opacity: 0.9; }
  100% { transform: scale(1.15) rotate(2deg); opacity: 1; filter: drop-shadow(0 0 8px #facc15); }
}

/* --- TYPOGRAPHY --- */
.gold-divider {
  color: var(--primary-gold);
  font-size: 0.75rem;
  margin-top: 8px;
  letter-spacing: 4px;
}

.main-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 4px 0;
  background: linear-gradient(180deg, #fff7ed 0%, #facc15 50%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.tagline {
  font-size: 0.75rem;
  color: #e2e8f0;
  line-height: 1.4;
  max-width: 85%;
  font-weight: 400;
  opacity: 0.9;
}

/* --- PHOTO FRAME --- */
.photo-frame-outer {
  padding: 4px;
  background: linear-gradient(135deg, #facc15, #78350f, #facc15);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.photo-frame-inner {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--kasavu-cream);
}

.placeholder-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- FOOTER --- */
.gold-line {
  width: 60px;
  height: 1px;
  background: var(--primary-gold);
  margin: 0 auto 8px auto;
  opacity: 0.5;
}

.greeting-from span {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 1px;
}

.greeting-from strong {
  font-size: 0.75rem;
  color: var(--kasavu-cream);
}

/* --- ANIMATED DECORATIVE SVG PETALS & LEAVES --- */
.decor-leaf {
  position: absolute;
  width: 90px;
  z-index: 3;
  opacity: 0.7;
}

.leaf-left { top: -10px; left: -20px; transform: rotate(15deg); }
.leaf-right { bottom: -10px; right: -20px; transform: rotate(-15deg); }

.sway-animation {
  animation: sway 6s ease-in-out infinite alternate;
  transform-origin: top left;
}

.sway-animation-reverse {
  animation: swayRev 7s ease-in-out infinite alternate;
  transform-origin: bottom right;
}

@keyframes sway {
  0% { transform: rotate(15deg); }
  100% { transform: rotate(25deg); }
}

@keyframes swayRev {
  0% { transform: rotate(-15deg); }
  100% { transform: rotate(-5deg); }
}

/* Falling Petal Keyframe */
.petal {
  position: absolute;
  background: #f97316;
  border-radius: 15px 0px 15px 0px;
  opacity: 0.8;
  pointer-events: none;
  z-index: 4;
  animation: fall linear infinite;
}

@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0.9; }
  100% { transform: translateY(680px) rotate(360deg); opacity: 0; }
}