/* ═══════════════════════════════════════════
   HALLOWEEN TEMPORAL — Redwood College
   Para quitar el tema: borrar este archivo,
   halloween.js, y las líneas marcadas
   HALLOWEEN TEMPORAL en cada HTML.
   styles.css y main.js no se modificaron.
   ═══════════════════════════════════════════ */

:root {
  --white: #24141f;
  --off: #1a0f18;
  --light: #3d2434;
  --mid: #d7b48f;
  --dark: #f4e6d6;
  --black: #fff6ec;
  --rule: rgba(232, 106, 26, 0.28);
  --hw-night: #120810;
  --hw-card: #2a1624;
  --hw-pumpkin: #e86a1a;
  --hw-gold: #ffb35c;
}

body {
  background:
    radial-gradient(ellipse at 8% -10%, rgba(232, 106, 26, 0.16), transparent 36%),
    radial-gradient(ellipse at 100% 0%, rgba(88, 24, 120, 0.22), transparent 32%),
    #140c16;
  color: var(--black);
}

::selection {
  background: var(--hw-pumpkin);
  color: #1a0b14;
}

h1.htitle em,
.page-hero-title em,
h2.sh em {
  color: var(--hw-gold);
}

.eyebrow,
.docs-lead,
.page-hero-eyebrow {
  color: var(--hw-gold);
}
.eyebrow::before,
.eyeline { background: var(--hw-pumpkin); }

/* ─── Nav ─── */
nav {
  background: rgba(18, 8, 16, 0.42);
  border-bottom-color: rgba(232, 106, 26, 0.28);
}
nav.scrolled {
  background: rgba(18, 8, 16, 0.94);
  border-bottom-color: rgba(232, 106, 26, 0.5);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
nav.scrolled .nav-logo-name,
nav.scrolled .nav-link,
nav.scrolled .nav-item:hover > .nav-link {
  color: var(--black);
}
nav.scrolled .nav-logo-sub { color: var(--mid); }
nav.scrolled .nav-item:hover > .nav-link { border-bottom-color: var(--hw-gold); }
nav.scrolled .nav-hamburger span { background: var(--black); }
.nav-link--active {
  color: var(--hw-gold) !important;
  border-bottom-color: var(--hw-pumpkin) !important;
}
.drop-head { color: var(--hw-gold); }
.drawer-link,
.drawer-sub a { color: var(--dark); }

/* ─── Botones calabaza ─── */
.bprimary,
.bprimary:hover,
.nav-cta,
.nav-cta:hover,
nav.scrolled .nav-cta,
.fsub,
.fsub:hover,
.drawer-cta,
.lib-box a,
.lib-box a:hover,
.nivel-lector-download,
.nivel-lector-download:hover,
.nivel-horario-download,
.nivel-horario-download:hover,
.utiles-card-btn,
.utiles-card-btn:hover,
.utiles-card-btn--inv,
.utiles-card-btn--inv:hover,
.modal-btn,
.modal-btn:hover {
  background: var(--hw-pumpkin);
  color: #1a0b14;
  border-color: var(--hw-pumpkin);
}

/* ─── Bloques que tienen que seguir oscuros ─── */
footer,
.marquee,
.page-quicknav,
.eco-box,
.mv-card--dark,
.about-chip,
.director-chip,
.team-download,
.cra-reglas-sancion,
.sned-award-card,
.sned-beneficio--dark,
.sned-beneficio--dark:hover,
.nivel-libro--eleccion,
.utiles-card--dark,
.unif-tabla th {
  background: var(--hw-night);
  color: var(--black);
}
footer { box-shadow: inset 0 3px 0 var(--hw-pumpkin); }
.marquee { box-shadow: inset 0 -2px 0 rgba(232, 106, 26, 0.7); }
.mitem { color: rgba(255, 196, 120, 0.82); }
.mdot { background: var(--hw-pumpkin); }
.page-quicknav { border-bottom-color: rgba(232, 106, 26, 0.35); }
.page-quicknav-inner a:hover,
.page-quicknav-inner a.qn-active {
  color: var(--hw-gold);
  border-bottom-color: var(--hw-pumpkin);
}
.eco-box { border: 1px solid rgba(232, 106, 26, 0.35); }
.about-chip,
.director-chip { background: var(--hw-pumpkin); color: #1a0b14; }
.chip-l,
.director-chip-role { color: rgba(26, 11, 20, 0.72); }

/* ─── Tarjetas y secciones ─── */
.niv-card,
.news-card,
.pilar,
.doc-card,
.cra-servicio,
.cra-digital-feat,
.cra-books-carousel,
.stat,
.cont-form,
.lib-box {
  background: var(--hw-card);
  color: var(--black);
  border-color: var(--rule);
}
.news-ig {
  border: 1px solid rgba(232, 106, 26, 0.28);
  background: rgba(18, 8, 16, 0.35);
  padding: clamp(0.4rem, 1.5vw, 0.85rem);
}
.docs-card,
.news-card,
.niv-card,
.doc-card,
.cont-form {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.docs-card:hover,
.pill:hover,
.niv-card:hover,
.soc-btn:hover,
.pilar:hover,
.gf-btn:hover,
.gf-btn.active,
.cra-servicio:hover,
.sned-factor:hover,
.stat:hover,
.news-card:hover,
.doc-card:hover {
  background: #3a182c;
  color: var(--black);
  border-color: var(--hw-pumpkin);
}
.niv-card:hover .niv-desc,
.niv-card:hover .niv-sub,
.niv-card:hover .niv-courses a,
.docs-card:hover .docs-meta,
.docs-card:hover .docs-arrow,
.pilar:hover .pilar-label {
  color: rgba(255, 246, 236, 0.72);
}
.niv-courses a:hover,
.news-header a:hover,
.nlink:hover,
.drop a:hover,
.drawer-sub a:hover,
.foot-links a:hover {
  color: var(--hw-gold);
}
.doc-card::before,
.sig-line { background: var(--hw-pumpkin); }

.fg input,
.fg textarea {
  background: #140c16;
  color: var(--black);
  border-color: rgba(232, 106, 26, 0.35);
}
.fg input:focus,
.fg textarea:focus { border-color: var(--hw-gold); }
.fg label,
.cont-label,
.ntag,
.ndate,
.stat-l,
.docs-meta { color: var(--mid); }

.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(28, 6, 18, 0.34) 0%,
    rgba(18, 6, 12, 0.22) 42%,
    rgba(16, 4, 10, 0.78) 100%
  ) !important;
}
.page-hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(36, 8, 22, 0.34) 0%,
    rgba(16, 4, 12, 0.74) 100%
  ) !important;
}
.hero-badge {
  border-color: rgba(255, 179, 92, 0.45);
  background: rgba(18, 8, 16, 0.45);
}

.modal-box {
  background: var(--hw-card);
  border: 1px solid rgba(232, 106, 26, 0.4);
}
.modal-title { color: var(--black); }
.modal-text { color: var(--dark); }

/* ─── Decoración fija ─── */
#hw-root {
  position: fixed;
  inset: 0;
  z-index: 180;
  pointer-events: none;
  overflow: hidden;
}

.hw-web {
  position: absolute;
  width: min(210px, 36vw);
  height: min(210px, 36vw);
  opacity: 0.82;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}
.hw-web svg { width: 100%; height: 100%; display: block; }
.hw-web--tl { top: 0; left: 0; }
.hw-web--tr { top: 0; right: 0; transform: scaleX(-1); }
.hw-web--bl { bottom: 0; left: 0; transform: scaleY(-1); opacity: 0.5; width: 150px; height: 150px; }
.hw-web--br { bottom: 0; right: 0; transform: scale(-1); opacity: 0.5; width: 150px; height: 150px; }

.hw-spider {
  position: absolute;
  top: 78px;
  left: 86px;
  width: 26px;
  height: 18px;
  transform-origin: 50% -58px;
  animation: hw-swing 3.4s ease-in-out infinite;
}
.hw-spider::before {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 100%;
  width: 1px;
  height: 58px;
  background: rgba(240, 236, 230, 0.9);
}
.hw-web--tr .hw-spider { left: auto; right: 86px; }

.hw-corner-skull {
  position: absolute;
  font-size: 1.7rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
  animation: hw-bob 3.2s ease-in-out infinite;
}
.hw-corner-skull--l { top: 118px; left: 18px; }
.hw-corner-skull--r { top: 118px; right: 18px; animation-delay: -1.2s; }

@keyframes hw-swing {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}
@keyframes hw-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

.hw-fall,
.hw-bat {
  position: absolute;
  top: -12vh;
  line-height: 1;
  user-select: none;
  will-change: transform;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.22));
}
.hw-fall { animation: hw-fall linear infinite; }
.hw-bat {
  animation: hw-bat linear infinite;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.15));
}

@keyframes hw-fall {
  0% { transform: translate3d(0, -12vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--hw-drift, 40px), 118vh, 0) rotate(var(--hw-spin, 240deg)); }
}
@keyframes hw-bat {
  0% { transform: translate3d(-12vw, 8vh, 0) scaleX(1); }
  45% { transform: translate3d(42vw, 28vh, 0) scaleX(1); }
  55% { transform: translate3d(52vw, 22vh, 0) scaleX(-1); }
  100% { transform: translate3d(112vw, 6vh, 0) scaleX(-1); }
}

/* ─── Pantalla de entrada ─── */
#hw-splash {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 75% 18%, rgba(255, 214, 140, 0.22), transparent 28%),
    radial-gradient(ellipse at 50% 120%, rgba(232, 106, 26, 0.35), transparent 46%),
    #140810;
  color: #fff8ef;
  opacity: 1;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#hw-splash.hw-out {
  opacity: 0;
  visibility: hidden;
}
#hw-splash[hidden] { display: none; }

/* Mientras está la entrada, el aviso de matrícula no tapa la pantalla */
body:has(#hw-splash:not([hidden])) #modal-matricula {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.hw-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 68%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 30%, #fff8e0 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 62%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 16%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 78%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 80%, #ffe0b0 50%, transparent 51%);
  opacity: 0.85;
}

.hw-moon {
  position: absolute;
  top: 8vh;
  right: 12vw;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d8, #f0c56a 62%, #d9a24a);
  box-shadow: 0 0 40px 12px rgba(255, 214, 140, 0.35);
}
.hw-moon::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(180, 130, 60, 0.28);
  top: 22px;
  left: 24px;
  box-shadow: 22px 16px 0 -4px rgba(180, 130, 60, 0.22), 8px 36px 0 -6px rgba(180, 130, 60, 0.2);
}

.hw-splash-card {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.4rem 1.6rem;
  max-width: 680px;
}
.hw-kicker {
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--hw-gold);
  margin-bottom: 0.8rem;
}
.hw-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.hw-title em {
  font-style: italic;
  color: var(--hw-gold);
}
.hw-lead {
  margin: 1.1rem auto 0;
  max-width: 36ch;
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(255, 248, 239, 0.82);
}
.hw-enter {
  margin-top: 1.6rem;
  background: var(--hw-pumpkin);
  color: #1a0b14;
  border: none;
  padding: 0.85rem 1.8rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
}
.hw-enter:hover { background: #f08a3a; }
.hw-enter:focus-visible {
  outline: 2px solid #fff6d8;
  outline-offset: 3px;
}
.hw-icons {
  margin-top: 1.35rem;
  font-size: 1.7rem;
  letter-spacing: 0.45rem;
}
.hw-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  background: var(--hw-pumpkin);
  animation: hw-bar 4.6s linear forwards;
}
@keyframes hw-bar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.hw-splash-bat {
  position: absolute;
  font-size: 1.8rem;
  animation: hw-bat 7s linear infinite;
  pointer-events: none;
}

#hw-yt-slot {
  position: fixed;
  width: 240px;
  height: 135px;
  left: 0;
  bottom: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
#hw-music {
  position: fixed;
  left: max(0.85rem, env(safe-area-inset-left));
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  z-index: 5100;
  background: #e86a1a;
  color: #1a0b14;
  border: 1px solid #e86a1a;
  padding: 0.7rem 0.95rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
#hw-music[aria-pressed="true"] {
  background: #140810;
  color: #ffb35c;
}
#hw-music:hover { background: #f08a3a; }
#hw-music[aria-pressed="true"]:hover { background: #1c0c16; }
#hw-music:focus-visible {
  outline: 2px solid #fff6d8;
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .hw-web { width: 120px; height: 120px; }
  .hw-web--bl,
  .hw-web--br { width: 90px; height: 90px; }
  .hw-spider,
  .hw-corner-skull { display: none; }
  .hw-moon { width: 64px; height: 64px; top: 6vh; right: 6vw; }
}

@media (prefers-reduced-motion: reduce) {
  .hw-fall,
  .hw-bat,
  .hw-spider,
  .hw-corner-skull,
  .hw-splash-bat,
  .hw-bar { animation: none; }
  .hw-fall,
  .hw-bat,
  .hw-splash-bat { display: none; }
}
