/* Critical CSS for first paint: loader, entry modal, and hero section */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  width: 100%;
  overflow-y: scroll;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: auto;
  overflow: visible;
  background-color: #000;
  color: #fff;
  font-family: "Inter", "Kanit", sans-serif;
  font-weight: 700;
}

.z-top {
  position: relative;
  z-index: 10;
}

.section-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.watchdog-heal {
  animation: watchdogFadeIn 0.18s ease-out;
}

@keyframes watchdogFadeIn {
  from {
    opacity: 0.82;
  }
  to {
    opacity: 1;
  }
}

#page-loader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.7s ease,
    visibility 0.7s ease;
}

#page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loader-logo {
  width: clamp(90px, 13vw, 170px);
  height: auto;
  opacity: 1;
  margin-bottom: 28px;
}

.loader-num {
  font-family: "Zen Dots", cursive;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  color: #fff;
  line-height: 1;
  letter-spacing: 0.02em;
  margin-top: 18px;
}

.loader-track {
  width: clamp(180px, 24vw, 290px);
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}

#entry-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.entry-modal-panel {
  width: min(92vw, 760px);
  border: 1.5px solid rgba(255, 255, 255, 0.86);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 44px);
  background: rgba(10, 10, 10, 0.55);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.entry-modal-title {
  margin: 0;
  color: #fff;
  font-family: "Zen Dots", serif;
  font-size: clamp(2.1rem, 3vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.entry-modal-body {
  margin: 18px auto 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.92);
  font-family: "Kanit", sans-serif;
  font-size: clamp(1rem, 2.25vw, 1.16rem);
  line-height: 1.72;
  font-weight: 400;
}

.entry-modal-btn {
  margin-top: 28px;
  padding: 12px 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: #fff;
  color: #111;
  font-family: "Kanit", "Sarabun", sans-serif;
  font-size: 1.03rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.full-screen-section {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #000;
}

.video-bg {
  position: absolute;
  inset: 0;
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.9);
  transform: translateZ(0);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

#nopInterviewSection,
#penaltyCardsSection,
#voiceActorSection,
#vaCardsSection,
#vaInterviewSection {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  position: relative;
  z-index: 6;
  isolation: isolate;
}

#nopInterviewSection .interview-layout,
#penaltyCardsSection .pc-inner,
#voiceActorSection .va-img-container,
#vaCardsSection .va-cards-wrapper {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  position: relative;
  z-index: 8;
}

.overlay-dark {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
}

.hero-section {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh !important;
  z-index: 1;
  justify-content: center !important;
  align-items: center !important;
  text-align: center;
}

.hero-section.hero-past {
  position: absolute !important;
  top: 0;
}

.hero-sticky-wrapper {
  position: relative;
  height: 100vh;
  z-index: 1;
}

.hero-content-wrapper {
  max-width: 90%;
  width: 100%;
  margin-top: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.hero-title-img {
  width: 85%;
  max-width: 1000px;
  height: auto;
  margin-bottom: 25px;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
}

.hero-desc-container {
  border-left: none !important;
  padding-left: 0 !important;
  margin: 2vh auto 0;
  max-width: 1600px;
}

.hero-description {
  font-family: "Kanit", sans-serif;
  font-size: clamp(1rem, 1.2vw, 1.3rem);
  font-weight: 300;
  line-height: 1.6;
  color: #f0f0f0;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 1);
}
