/* ==========================================================================
   Miltonesas - Clean Minimalist Platinum Logo Drawing Animation
   ========================================================================== */

:root {
  /* Platinum Luxury Palette (Default) */
  --bg-main: #090b10;
  --bg-card: transparent;
  --card-border: transparent;
  --card-shadow: none;
  
  --stroke-color: #f8fafc;
  --stroke-glow: rgba(255, 255, 255, 0.85);
  --pen-color: #ffffff;
  --pen-aura: rgba(203, 213, 225, 0.5);
  --fill-gradient: url(#platinumGradient);
  --accent-color: #e2e8f0;
  
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  user-select: none;
}

/* Ambient dynamic background lighting */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(140px);
  opacity: 0.22;
  z-index: 0;
}

.glow-top {
  width: 650px;
  height: 650px;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(226, 232, 240, 0.8), transparent 70%);
}

.glow-bottom {
  width: 500px;
  height: 500px;
  bottom: -20%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(148, 163, 184, 0.5), transparent 70%);
}

/* Particles Canvas */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Main Container Scene */
.scene-container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Logo Stage / Display Card */
.logo-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.logo-stage:hover {
  transform: scale(1.02);
}

.stage-backdrop {
  position: absolute;
  inset: -15%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 0%, transparent 65%);
  pointer-events: none;
  border-radius: 50%;
}

/* SVG Logo Presentation */
.svg-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.miltonesas-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.8));
}

/* Fill Layers (Hidden during drawing, revealed during paint phase) */
.logo-fill-shape {
  fill: var(--fill-gradient);
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), filter 1.2s ease;
}

.logo-fill-shape.painted {
  opacity: 1;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.45));
}

/* Vector Stroke Paths */
.draw-stroke {
  fill: none;
  stroke: var(--stroke-color);
  stroke-width: 3.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  filter: drop-shadow(0 0 8px var(--stroke-glow));
  transition: stroke 0.4s ease, opacity 0.8s ease;
}

.emblem-stroke.stroke-main {
  stroke-width: 4.2px;
}

.emblem-stroke.stroke-inner {
  stroke-width: 3.4px;
}

.emblem-stroke.stroke-accent {
  stroke-width: 3.2px;
}

.letter-stroke {
  stroke-width: 2.8px;
}

/* Once drawing finishes and fill takes over, soften strokes */
.strokes-completed .draw-stroke {
  opacity: 0.1;
  stroke-width: 1.5px;
}

/* Precision Drawing Pen Tip */
.drawing-pen {
  pointer-events: none;
  transition: transform 0.03s linear;
}

.pen-outer-aura {
  fill: var(--pen-aura);
  filter: blur(4px);
  animation: pulse-aura 0.9s infinite alternate;
}

.pen-halo {
  fill: var(--stroke-glow);
  filter: blur(1.5px);
}

.pen-core {
  fill: var(--pen-color);
  filter: drop-shadow(0 0 5px #ffffff);
}

@keyframes pulse-aura {
  0% { r: 10px; opacity: 0.4; }
  100% { r: 18px; opacity: 0.9; }
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .logo-stage {
    max-width: 320px;
  }
}
