/* ══════════════════════════════════════════
   KC-04 XV FLORAL INFERNO — HERO & PORTAL
   Gate Coronación, Shatter Glass & Hero Sections
   Khal Calloway Studio © 2026
   ══════════════════════════════════════════ */

/* ── PORTAL 0: ENTER GATE (PRELUDIO) ── */
#hero {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background-color: var(--bg-obsidian);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 1s cubic-bezier(0.76, 0, 0.24, 1), visibility 1s;
}

#hero.gate-exit {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* 3D Crown Container */
#crown-wrap {
  width: 260px;
  height: 180px;
  position: relative;
  z-index: 3;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 20px rgba(161, 29, 42, 0.4));
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#crown-wrap:hover {
  transform: scale(1.08) rotate(-1deg);
}

#crown-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Fallback SVG crown styling if WebGL fails */
#crown-svg {
  width: 100%;
  height: 100%;
  display: block;
}

#hero-content {
  text-align: center;
  position: relative;
  z-index: 150;
  padding: 20px;
  max-width: 500px;
}

#hero-pretext {
  font-family: var(--ff-accent);
  font-size: 2.2rem;
  color: var(--rose-blush);
  margin-bottom: -10px;
  text-shadow: 0 0 10px rgba(232, 164, 184, 0.3);
}

#hero-name {
  font-family: var(--ff-hero);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: 10px 0;
  text-transform: uppercase;
}

#hero-apellido {
  font-family: var(--ff-body);
  font-size: 0.95rem;
  color: var(--color-champagne);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  opacity: 0.8;
}

/* Entrance Gate Button */
#hero-enter-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 18px 44px;
  color: var(--gold-kc);
  font-family: var(--ff-label);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  z-index: 12;
  outline: none;
  border-radius: 4px;
}

#hero-btn-bg {
  position: absolute;
  inset: 0;
  background: rgba(15, 7, 7, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 4px;
  z-index: -1;
  transition: var(--transition-smooth);
}

#hero-btn-glow {
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle, rgba(161, 29, 42, 0.8) 0%, transparent 80%);
  z-index: -2;
  opacity: 0;
  border-radius: 4px;
  transition: opacity 0.4s ease;
}

#hero-enter-btn:hover #hero-btn-bg {
  border-color: var(--gold-kc);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  transform: scale(1.02);
}

#hero-enter-btn:hover #hero-btn-glow {
  opacity: 1;
}

/* ── SHATTER GLASS PORTAL DOOR ── */
#shatter-container {
  position: absolute;
  inset: 0;
  z-index: 99;
  pointer-events: none;
}

.shatter-shard {
  position: absolute;
  background: rgba(11, 5, 5, 0.96);
  border: 1px solid rgba(212, 175, 55, 0.12);
  box-shadow: inset 0 0 40px rgba(161, 29, 42, 0.2);
  transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.8s ease-out;
  transform-origin: center center;
}

/* Shard Polygons via clip-path */
.shard-0 { width: 50vw; height: 50vh; top: 0; left: 0; clip-path: polygon(0% 0%, 100% 0%, 75% 75%, 0% 100%); }
.shard-1 { width: 50vw; height: 50vh; top: 0; right: 0; clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 75% 75%); }
.shard-2 { width: 50vw; height: 50vh; bottom: 0; left: 0; clip-path: polygon(0% 0%, 75% 25%, 100% 100%, 0% 100%); }
.shard-3 { width: 50vw; height: 50vh; bottom: 0; right: 0; clip-path: polygon(75% 25%, 100% 0%, 100% 100%, 0% 100%); }

/* ── PORTAL 1: HERO DISPLAY (MAIN CONTENT HEADER) ── */
#main-content {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

#main-content.revealed {
  opacity: 1;
}

#hero-section {
  width: 100vw;
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #020101;
  overflow: hidden;
}

#hero-bg-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

#hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.65;
  transform: scale(1.05);
  filter: contrast(1.15) brightness(0.85);
  transition: transform 15s ease-out;
}

#hero-section.active #hero-bg-img {
  transform: scale(1.15);
}

/* Atmospheric smoke & vignette overlays */
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 40%, rgba(5, 3, 3, 0.8) 80%, #050303 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-smoke {
  position: absolute;
  inset: 0;
  background: url('../fotos/decor_texture_overlay.png');
  background-size: cover;
  background-position: center;
  mix-blend-mode: color-dodge;
  opacity: 0.22;
  z-index: 2;
  pointer-events: none;
}

#hero-section-content {
  text-align: center;
  position: relative;
  z-index: 10;
  max-width: 600px;
  padding: 0 20px;
}

.hero-main-title {
  font-family: var(--ff-hero);
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(161, 29, 42, 0.6), 0 0 4px var(--gold-kc);
}

.hero-sub-title {
  font-family: var(--ff-body);
  font-size: 1.1rem;
  color: var(--color-champagne);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-date-accent {
  font-family: var(--ff-accent);
  font-size: 2.5rem;
  color: var(--rose-blush);
  margin-bottom: 3rem;
  text-shadow: 0 0 10px rgba(232, 164, 184, 0.2);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-text {
  font-family: var(--ff-label);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-champagne);
}

.scroll-arrow {
  width: 14px;
  height: 24px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  position: relative;
}

.scroll-dot {
  width: 4px;
  height: 4px;
  background-color: var(--gold-kc);
  border-radius: 50%;
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollDotPulse 1.8s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollDotPulse {
  0% { top: 4px; opacity: 1; }
  50% { top: 14px; opacity: 0.3; }
  100% { top: 4px; opacity: 1; }
}

@media (max-width: 480px) {
  #hero-name { font-size: 2.2rem; }
  .hero-main-title { font-size: 2.8rem; }
  #hero-pretext { font-size: 1.8rem; }
}
