/* ========================================================================
   NaviSolarc Escola de Magia — Estilos compartilhados
   Tema: castelo medieval noturno, dourado vibrante, vitrais coloridos
   ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&family=Pirata+One&family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=IM+Fell+English+SC&family=Tangerine:wght@400;700&display=swap');

:root {
  --ink-deep:   #142048;
  --ink-night:  #1a2a5e;
  --ink-royal:  #1e3a8a;
  --ink-mid:    #2a4ba8;
  --gold-1:     #ffe18a;
  --gold-2:     #e6b756;
  --gold-3:     #9a7a35;
  --gold-glow:  #ffd166;
  --parchment:  #faecbd;
  --parchment-2:#e9d39a;

  /* Cores dos vitrais / bandeirolas */
  --crimson:    #b81e2c;
  --crimson-2:  #e0364a;
  --wax-red:    #8b1e2b;
  --wax-red-2:  #c43a47;
  --emerald:    #1e8a5b;
  --emerald-2:  #3eb87f;
  --royal-purple:#5a2ba6;
  --royal-purple-2:#8a4bd6;
  --teal:       #1a9d8a;
  --teal-2:     #3ecabd;

  --font-display: 'MedievalSharp', serif;
  --font-gothic:  'Pirata One', serif;
  --font-roman:   'Cinzel', serif;
  --font-body:    'Cormorant Garamond', serif;
  --font-small:   'IM Fell English SC', serif;
  --font-script:  'Tangerine', cursive;

  --glow-sm: 0 0 12px rgba(255, 209, 102, 0.35);
  --glow-md: 0 0 28px rgba(255, 209, 102, 0.55), 0 0 6px rgba(255, 209, 102, 0.9);
  --glow-lg: 0 0 60px rgba(255, 209, 102, 0.6), 0 0 18px rgba(255, 209, 102, 0.95);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--ink-deep);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.55;
  min-height: 100%;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─────────── Fundo: céu noturno + nebulosa ─────────── */
.sky {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(90, 130, 230, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(230, 183, 86, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, var(--ink-night) 0%, var(--ink-deep) 70%);
}
.sky::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff, transparent),
    radial-gradient(1px 1px at 30% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 50% 35%, #fffbe6, transparent),
    radial-gradient(1px 1px at 70% 60%, #fff, transparent),
    radial-gradient(2px 2px at 85% 15%, #ffe9a3, transparent),
    radial-gradient(1px 1px at 15% 90%, #fff, transparent),
    radial-gradient(1px 1px at 60% 10%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 90% 50%, #fffbe6, transparent),
    radial-gradient(1px 1px at 40% 50%, #fff, transparent),
    radial-gradient(1px 1px at 25% 65%, #fff, transparent),
    radial-gradient(2px 2px at 75% 85%, #ffe9a3, transparent),
    radial-gradient(1px 1px at 5% 50%, #fff, transparent),
    radial-gradient(1px 1px at 95% 35%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 45% 75%, #fffbe6, transparent),
    radial-gradient(1px 1px at 65% 25%, #fff, transparent);
  opacity: 0.85;
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.5; } to { opacity: 0.95; } }

.constellations {
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none;
  opacity: 0.55;
}

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

/* ─────────── Moldura "dentro do castelo" ─────────── */

/* Colunas de pedra azulada (sem madeira) nas laterais */
.castle-column {
  position: fixed;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 50;
  pointer-events: none;
  background:
    /* Blocos de pedra escura azulada */
    repeating-linear-gradient(180deg,
      transparent 0px,
      transparent 90px,
      rgba(0,0,0,0.45) 90px,
      rgba(0,0,0,0.45) 92px,
      transparent 92px,
      transparent 180px,
      rgba(0,0,0,0.45) 180px,
      rgba(0,0,0,0.45) 182px),
    /* Veias verticais sutis */
    linear-gradient(90deg,
      rgba(0,0,0,0.6) 0%,
      rgba(20, 30, 60, 0.7) 30%,
      rgba(30, 45, 90, 0.8) 50%,
      rgba(20, 30, 60, 0.7) 70%,
      rgba(0,0,0,0.6) 100%),
    /* Base gradiente */
    linear-gradient(180deg, #0a1338 0%, #050a20 100%);
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.8),
    0 0 50px rgba(0,0,0,0.6);
}
.castle-column.left  { left: 0; }
.castle-column.right { right: 0; }
.castle-column::before {
  /* Borda dourada interna sutil */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(212, 164, 75, 0.5) 15%,
    rgba(212, 164, 75, 0.3) 50%,
    rgba(212, 164, 75, 0.5) 85%,
    transparent 100%);
  box-shadow: 0 0 12px rgba(212, 164, 75, 0.3);
}
.castle-column.left::before  { right: 0; }
.castle-column.right::before { left:  0; }
.castle-column::after {
  /* Capitel decorativo no topo */
  content: "";
  position: absolute;
  top: 0; left: -4px; right: -4px;
  height: 30px;
  background:
    linear-gradient(180deg, #1a2860 0%, #050a20 100%);
  border-bottom: 2px solid rgba(212, 164, 75, 0.5);
  box-shadow: 0 6px 14px rgba(0,0,0,0.7), 0 0 14px rgba(212, 164, 75, 0.15);
}

/* Brackets/candelabros nas colunas */
.column-candle {
  position: fixed;
  z-index: 51;
  pointer-events: none;
  width: 70px;
}
.column-candle.left  { left: 50px; }
.column-candle.right { right: 50px; }
.column-candle.high  { top: 18vh; }
.column-candle.mid   { top: 52vh; }
.column-candle.low   { top: 82vh; }

/* Bandeirola heráldica colorida */
.banner {
  position: absolute;
  width: 110px;
  pointer-events: none;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.7));
  z-index: 4;
  animation: bannerSway 5s ease-in-out infinite alternate;
  transform-origin: top center;
}
@keyframes bannerSway {
  from { transform: rotate(-2deg); }
  to   { transform: rotate(2deg); }
}

/* Vitral ogival decorativo */
.stained-glass {
  position: absolute;
  pointer-events: none;
  opacity: 0.85;
  filter: drop-shadow(0 0 50px rgba(255, 209, 102, 0.5));
  z-index: 0;
}

/* Arco ogival no topo do hero */
.archway {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(900px, 92vw);
  pointer-events: none;
  z-index: 3;
  opacity: 0.9;
}

/* ─────────── Cursor varinha ─────────── */
.wand-cursor {
  position: fixed; top: 0; left: 0;
  width: 40px; height: 40px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-4px, -4px);
  transition: transform 0.08s ease-out;
}
.wand-cursor svg { width: 100%; height: 100%; filter: drop-shadow(0 0 4px rgba(255,209,102,0.9)); }

.wand-spark {
  position: fixed;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe6 0%, var(--gold-glow) 40%, transparent 70%);
  pointer-events: none;
  z-index: 9998;
}

/* ─────────── Navegação ─────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 88px;
  background: linear-gradient(180deg, rgba(6, 11, 31, 0.9) 0%, rgba(6, 11, 31, 0.0) 100%);
  backdrop-filter: blur(4px);
}
.nav-brand {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--gold-1);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.nav-brand-crest {
  width: 44px; height: 44px;
  filter: drop-shadow(0 0 8px rgba(255, 209, 102, 0.7));
}
.nav-links {
  display: flex; gap: 8px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 10px 22px;
  font-family: var(--font-roman);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--parchment);
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.25s ease;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 4px;
  width: 0; height: 1px;
  background: var(--gold-1);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-1);
  text-shadow: 0 0 8px rgba(255, 209, 102, 0.6);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 60%; }

/* ─────────── Botões mágicos (chunky, vibrantes, pulsantes) ─────────── */
.magic-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.06em;
  color: var(--ink-deep);
  background: linear-gradient(180deg, #fff5c8 0%, var(--gold-1) 30%, var(--gold-2) 100%);
  border: 2px solid var(--gold-3);
  border-radius: 4px;
  cursor: none;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 0 rgba(0, 0, 0, 0.2),
    0 0 0 1px var(--gold-3),
    0 6px 0 var(--gold-3),
    0 12px 28px rgba(0, 0, 0, 0.6),
    var(--glow-sm);
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1.4), box-shadow 0.25s ease;
  font-weight: 400;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  animation: btnPulseGlow 2.6s ease-in-out infinite;
}
@keyframes btnPulseGlow {
  0%, 100% {
    box-shadow:
      inset 0 2px 0 rgba(255, 255, 255, 0.5),
      inset 0 -3px 0 rgba(0, 0, 0, 0.2),
      0 0 0 1px var(--gold-3),
      0 6px 0 var(--gold-3),
      0 12px 28px rgba(0, 0, 0, 0.6),
      0 0 14px rgba(255, 209, 102, 0.4);
  }
  50% {
    box-shadow:
      inset 0 2px 0 rgba(255, 255, 255, 0.5),
      inset 0 -3px 0 rgba(0, 0, 0, 0.2),
      0 0 0 1px var(--gold-3),
      0 6px 0 var(--gold-3),
      0 12px 28px rgba(0, 0, 0, 0.6),
      0 0 40px rgba(255, 209, 102, 0.85),
      0 0 80px rgba(255, 209, 102, 0.35);
  }
}
.magic-btn::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  transition: left 0.6s ease;
}
.magic-btn:hover::before { left: 100%; }
.magic-btn:hover {
  animation: none;
  transform: translateY(-3px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 0 rgba(0, 0, 0, 0.2),
    0 0 0 1px var(--gold-3),
    0 9px 0 var(--gold-3),
    0 16px 34px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(255, 209, 102, 1),
    0 0 100px rgba(255, 209, 102, 0.5);
}
.magic-btn:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 0 rgba(0, 0, 0, 0.2),
    0 0 0 1px var(--gold-3),
    0 2px 0 var(--gold-3),
    0 4px 10px rgba(0, 0, 0, 0.5);
}

.magic-btn-ghost {
  background: transparent;
  color: var(--gold-1);
  border: 2px solid var(--gold-2);
  box-shadow:
    inset 0 0 0 1px rgba(247, 215, 116, 0.15),
    0 6px 0 var(--gold-3),
    0 12px 28px rgba(0,0,0,0.5),
    var(--glow-sm);
  text-shadow: 0 0 12px var(--gold-glow);
}
.magic-btn-ghost:hover {
  background: rgba(247, 215, 116, 0.1);
  color: var(--gold-glow);
  box-shadow:
    inset 0 0 0 1px rgba(247, 215, 116, 0.25),
    0 9px 0 var(--gold-3),
    0 16px 34px rgba(0,0,0,0.6),
    var(--glow-md);
}

/* Botão carmesim */
.magic-btn-crimson {
  background: linear-gradient(180deg, #e0364a 0%, var(--crimson) 50%, #6e1019 100%);
  color: var(--gold-1);
  border-color: #6e1019;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -3px 0 rgba(0, 0, 0, 0.3),
    0 0 0 1px #6e1019,
    0 6px 0 #4a0a12,
    0 12px 28px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(224, 54, 74, 0.4);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}
.magic-btn-crimson:hover {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -3px 0 rgba(0, 0, 0, 0.3),
    0 0 0 1px #6e1019,
    0 9px 0 #4a0a12,
    0 16px 34px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(224, 54, 74, 0.6);
}

/* ─────────── Tipografia ─────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--gold-1);
  margin: 0;
  text-shadow: 0 0 20px rgba(255, 209, 102, 0.4), 3px 3px 0 rgba(0,0,0,0.6);
  letter-spacing: 0.01em;
  font-weight: 400;
}
h1 { font-size: clamp(56px, 8.5vw, 120px); line-height: 1.0; }
h2 { font-size: clamp(42px, 5vw, 72px); }
h3 { font-size: clamp(22px, 2vw, 28px); font-family: var(--font-roman); letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; }

.subtitle {
  font-family: var(--font-script);
  color: var(--gold-1);
  font-size: clamp(38px, 4.2vw, 60px);
  line-height: 1;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.eyebrow {
  font-family: var(--font-small);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold-2);
  font-size: 13px;
  display: inline-block;
}

.divider-ornate {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  color: var(--gold-2);
  margin: 22px 0;
}
.divider-ornate::before, .divider-ornate::after {
  content: "";
  height: 1px;
  width: 80px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}

/* ─────────── Selo de cera ─────────── */
.wax-seal {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--wax-red-2) 0%, var(--wax-red) 40%, #5d1219 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  color: var(--gold-1);
  font-size: 38px;
  box-shadow:
    inset 0 4px 8px rgba(255, 200, 200, 0.3),
    inset 0 -6px 10px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.5);
  position: relative;
}
.wax-seal::before {
  content: "";
  position: absolute; inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(247, 215, 116, 0.4);
}

/* ─────────── Estrelas pulsando ─────────── */
.big-star {
  position: absolute;
  color: var(--gold-1);
  font-size: 28px;
  text-shadow: 0 0 12px var(--gold-glow);
  animation: bigStarPulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bigStarPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50%      { opacity: 1;   transform: scale(1.15) rotate(15deg); }
}

/* ─────────── Container ─────────── */
.section {
  position: relative;
  padding: 120px 88px;
  max-width: 1400px;
  margin: 0 auto;
}
.container-narrow { max-width: 880px; margin: 0 auto; }

/* ─────────── Pergaminho ─────────── */
.parchment-card {
  background:
    radial-gradient(ellipse at top left, #fef3d0 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, #e4cd92 0%, transparent 60%),
    linear-gradient(180deg, var(--parchment) 0%, var(--parchment-2) 100%);
  color: #2a1d0c;
  padding: 48px 56px;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(138, 106, 42, 0.4),
    0 0 0 6px rgba(138, 106, 42, 0.15),
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 0 60px rgba(138, 106, 42, 0.18);
  position: relative;
}
.parchment-card::before,
.parchment-card::after {
  content: "";
  position: absolute; inset: 14px;
  border: 1px solid rgba(138, 106, 42, 0.3);
  pointer-events: none;
}
.parchment-card::after { inset: 20px; border: 1px solid rgba(138, 106, 42, 0.15); }
.parchment-card h1, .parchment-card h2, .parchment-card h3 {
  color: #4d2a0a;
  text-shadow: none;
}

/* ─────────── Tochas ─────────── */
.torch { position: absolute; width: 40px; pointer-events: none; }
.torch .flame {
  width: 22px; height: 38px;
  background: radial-gradient(circle at 50% 70%, #fff5a8 0%, var(--gold-glow) 30%, #f09038 60%, transparent 80%);
  border-radius: 50% 50% 35% 35% / 70% 70% 30% 30%;
  margin: 0 auto;
  filter: blur(0.6px);
  animation: flameDance 1.2s ease-in-out infinite alternate;
  box-shadow: 0 0 30px rgba(255, 180, 80, 0.7), 0 0 60px rgba(255, 150, 50, 0.4);
}
.torch .stick {
  width: 8px; height: 60px;
  background: linear-gradient(180deg, #6b4423 0%, #3d2410 100%);
  margin: -4px auto 0;
  border-radius: 1px;
}
@keyframes flameDance {
  0%   { transform: scaleY(1)    rotate(-2deg); }
  50%  { transform: scaleY(1.15) rotate(1deg);  }
  100% { transform: scaleY(0.95) rotate(2deg);  }
}

/* ─────────── Painel Tweaks ─────────── */
.tweaks-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 280px;
  background: rgba(6, 11, 31, 0.92);
  border: 1px solid var(--gold-2);
  border-radius: 4px;
  color: var(--parchment);
  font-family: var(--font-roman);
  z-index: 200;
  box-shadow: 0 16px 50px rgba(0,0,0,0.7), var(--glow-sm);
  display: none;
  overflow: hidden;
}
.tweaks-panel.open { display: block; }
.tweaks-head {
  background: linear-gradient(180deg, var(--gold-2), var(--gold-3));
  color: var(--ink-deep);
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.08em;
}
.tweaks-body { padding: 14px 16px 18px; }
.tweaks-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin: 12px 0 8px;
  display: block;
}
.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: none;
  border: 2px solid rgba(255,255,255,0.15);
  position: relative;
  transition: transform 0.2s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.active { border-color: var(--gold-1); box-shadow: 0 0 0 2px var(--gold-1), var(--glow-sm); }
.tweaks-close {
  background: transparent; border: none; color: var(--ink-deep); font-size: 20px;
  cursor: none; line-height: 1; padding: 0;
}
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}
.toggle {
  width: 36px; height: 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  position: relative;
  cursor: none;
  transition: background 0.2s;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--parchment);
  transition: left 0.2s;
}
.toggle.on { background: var(--gold-2); }
.toggle.on::after { left: 18px; }

/* ─────────── Responsivo ─────────── */
@media (max-width: 800px) {
  .nav { padding: 14px 20px; flex-wrap: wrap; gap: 12px; }
  .nav-links a { padding: 8px 12px; font-size: 12px; }
  .section { padding: 80px 30px; }
  .castle-column { width: 28px; }
}

/* ═══════════════════════ INTRO CINEMÁTICA ═══════════════════════ */
.castle-intro {
  position: fixed; inset: 0;
  z-index: 10000;
  overflow: hidden;
  background: #000;
  cursor: none;
  transition: opacity 1.2s ease-out;
}
.castle-intro.gone { opacity: 0; pointer-events: none; }

.intro-sky {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 55%, #1a2860 0%, #050a1f 60%, #000 100%);
  opacity: 0;
  animation: introFadeIn 1.2s ease-out forwards 0.2s;
}
@keyframes introFadeIn { to { opacity: 1; } }

.intro-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 5% 8%, #fff, transparent),
    radial-gradient(2px 2px at 12% 22%, #ffe9a3, transparent),
    radial-gradient(1px 1px at 22% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 36% 30%, #fff, transparent),
    radial-gradient(2.5px 2.5px at 48% 8%, #ffe9a3, transparent),
    radial-gradient(1px 1px at 60% 22%, #fff, transparent),
    radial-gradient(2px 2px at 72% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 85% 28%, #ffe9a3, transparent),
    radial-gradient(1px 1px at 92% 16%, #fff, transparent),
    radial-gradient(2px 2px at 18% 42%, #fffbe6, transparent),
    radial-gradient(1.5px 1.5px at 78% 38%, #fff, transparent),
    radial-gradient(1px 1px at 42% 48%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 50%, #fff, transparent),
    radial-gradient(1px 1px at 8% 30%, #fff, transparent);
  opacity: 0;
  animation: introFadeIn 1.5s ease-out forwards 0.6s;
}

/* Cena com castelo (zoom in) */
.intro-scene {
  position: absolute;
  left: 50%; bottom: 0;
  width: 100%;
  max-width: 1600px;
  transform: translateX(-50%) scale(0.55);
  transform-origin: 50% 75%;
  opacity: 0;
  animation:
    introFadeIn 1.5s ease-out forwards 1.4s,
    introZoom 4.5s cubic-bezier(0.5, 0, 0.8, 0.5) forwards 3.2s;
}
@keyframes introZoom {
  0%   { transform: translateX(-50%) scale(0.55); }
  100% { transform: translateX(-50%) scale(4.5); opacity: 1; }
}

/* Portões em primeiro plano */
.intro-gates {
  position: absolute;
  left: 50%; bottom: 0;
  width: 100%;
  max-width: 1400px;
  height: 100vh;
  transform: translateX(-50%);
  opacity: 0;
  z-index: 3;
  animation: introFadeIn 0.7s ease-out forwards 6.4s;
}
.intro-gate {
  position: absolute;
  top: 8vh; bottom: 0;
  width: 50%;
  background:
    repeating-linear-gradient(180deg,
      #3a2a18 0px, #2a1d10 4px, #4a3624 8px, #2a1d10 12px),
    linear-gradient(180deg, #4a3624 0%, #1a0e06 100%);
  border: 4px solid #6b4a22;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
  transition: transform 1.6s cubic-bezier(0.4, 0, 0.4, 1);
}
.intro-gate.left  { left: 0;  border-radius: 0 240px 0 0; transform-origin: left center; }
.intro-gate.right { right: 0; border-radius: 240px 0 0 0; transform-origin: right center; }
.intro-gate::before {
  content: "";
  position: absolute; inset: 24px;
  border: 3px solid rgba(212, 164, 75, 0.35);
  border-radius: inherit;
  pointer-events: none;
}
.intro-gate::after {
  /* Argola dourada */
  content: "";
  position: absolute;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 5px solid #d4a44b;
  background: radial-gradient(circle, #8a6a2a 0%, #4a3010 100%);
  top: 50%;
  box-shadow: 0 0 30px rgba(212, 164, 75, 0.6);
  margin-top: -28px;
}
.intro-gate.left::after  { right: 36px; }
.intro-gate.right::after { left: 36px; }

.castle-intro.opening .intro-gate.left  { transform: perspective(1000px) rotateY(-100deg); }
.castle-intro.opening .intro-gate.right { transform: perspective(1000px) rotateY(100deg); }

/* Luz dourada que invade */
.intro-light {
  position: absolute;
  left: 50%; top: 50%;
  width: 120px; height: 120px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe6 0%, #ffd166 25%, #d4a44b 50%, transparent 75%);
  opacity: 0;
  z-index: 4;
  animation: introLight 1.8s ease-in forwards 7.8s;
}
@keyframes introLight {
  0%   { opacity: 0; width: 120px;  height: 120px;  }
  60%  { opacity: 1; width: 200vw;  height: 200vw;  background: radial-gradient(circle, #fffbe6 0%, #ffd166 50%, transparent 80%); }
  100% { opacity: 1; width: 400vw;  height: 400vw;  background: #fffbe6; }
}

/* Título do intro */
.intro-title {
  position: absolute;
  top: 20vh; left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #f7d774;
  font-family: var(--font-display);
  font-size: clamp(54px, 9vw, 120px);
  letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(255, 209, 102, 0.85), 0 0 70px rgba(255, 209, 102, 0.55);
  opacity: 0;
  z-index: 5;
  animation: introTitleIn 1.5s ease-out forwards 1.6s, introTitleOut 1.2s ease-out forwards 3.2s;
}
.intro-title .sub {
  display: block;
  font-family: var(--font-script);
  font-size: 0.55em;
  font-weight: 700;
  color: #ffd166;
  margin-top: 4px;
  letter-spacing: 0;
  text-shadow: 0 0 20px rgba(255, 209, 102, 0.7);
}
@keyframes introTitleIn  { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes introTitleOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -30px); } }

/* Botão Pular */
.intro-skip {
  position: absolute;
  bottom: 28px; right: 28px;
  z-index: 20;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(247, 215, 116, 0.4);
  color: #f7d774;
  padding: 10px 22px;
  font-family: var(--font-roman);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: none;
  border-radius: 2px;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}
.intro-skip:hover {
  background: rgba(247, 215, 116, 0.15);
  color: #fff;
  box-shadow: var(--glow-sm);
}
