/* ==========================================================================
   PRELOADER CINEMATOGRÁFICO — Poncetti Solutions
   Inspirado em Malvah Studio (SOTY 2025) + Buttermax (CSSDA WOTY 2024)
   ========================================================================== */

/* Lock scroll during loading */
html.is-loading, html.is-loading body { overflow: hidden !important; }

/* ===== BASE ===== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at 50% 35%, #0a0d14 0%, #040507 45%, #000000 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: all;
}


/* Keep visible content above the intro curtains */
.pre-center,
.pre-footer,
.pre-corner {
  position: relative;
  z-index: 5;
}

/* ===== CURTAIN PANELS (5 strips that fly upward on exit) ===== */
.pre-curtains {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
  z-index: 2;
}
.pre-panel {
  flex: 1;
  height: 100%;
  background: radial-gradient(circle at 50% 35%, #0a0d14 0%, #040507 45%, #000000 100%);
  will-change: transform;
}

/* ===== CONTENT CENTER ===== */
.pre-center {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ===== SVG LOGO ===== */
.pre-svg {
  width: 88px;
  height: 98px;
  margin-bottom: 28px;
  flex-shrink: 0;
}
.pre-poly-outer {
  stroke-dasharray: 310;
  stroke-dashoffset: 310;
}
.pre-poly-inner {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
}
.pre-path-p {
  stroke-dasharray: 110;
  stroke-dashoffset: 110;
}

/* ===== BRAND TEXT ===== */
.pre-brand {
  text-align: center;
}
.pre-name {
  font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  font-size: clamp(20px, 3vw, 36px);
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.pre-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(22px);
  will-change: transform, opacity;
}
.pre-sub {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.55em;
  color: rgba(212,175,55,0.65);
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0;
  text-align: center;
}

/* ===== TAGLINE ===== */
.pre-tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.22);
  margin-top: 16px;
  opacity: 0;
}

/* ===== BOTTOM: PROGRESS ===== */
.pre-footer {
  position: absolute;
  bottom: 44px;
  left: 0;
  right: 0;
  padding: 0 48px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  z-index: 5;
}
.pre-bar-wrap {
  position: relative;
  height: 1px;
  background: rgba(255,255,255,0.07);
}
.pre-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #8B6914, #C9A84C 40%, #ECD06F 70%, #D4AF37);
  transition: none;
  will-change: width;
}
.pre-count-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pre-count-label {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.18);
  text-transform: uppercase;
}
.pre-count {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(212,175,55,0.55);
  display: flex;
  align-items: baseline;
  gap: 1px;
}
.pre-num {
  font-family: 'Cinzel Decorative', serif;
  font-size: 18px;
  font-weight: 700;
  color: rgba(212,175,55,0.85);
  min-width: 36px;
  text-align: right;
  display: inline-block;
}

/* ===== CORNER DECORATIONS ===== */
.pre-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 5;
  opacity: 0.35;
}
.pre-corner--tl { top: 32px; left: 36px; border-top: 1px solid #D4AF37; border-left: 1px solid #D4AF37; }
.pre-corner--tr { top: 32px; right: 36px; border-top: 1px solid #D4AF37; border-right: 1px solid #D4AF37; }
.pre-corner--bl { bottom: 80px; left: 36px; border-bottom: 1px solid #D4AF37; border-left: 1px solid #D4AF37; }
.pre-corner--br { bottom: 80px; right: 36px; border-bottom: 1px solid #D4AF37; border-right: 1px solid #D4AF37; }

/* ===== GRAIN OVERLAY ===== */
.pre-grain {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px;
}

@media (max-width: 480px) {
  .pre-name { font-size: 20px; }
  .pre-footer { padding: 0 24px; bottom: 32px; }
  .pre-corner--tl { top: 20px; left: 20px; }
  .pre-corner--tr { top: 20px; right: 20px; }
  .pre-corner--bl { bottom: 68px; left: 20px; }
  .pre-corner--br { bottom: 68px; right: 20px; }
}
