:root {
  --bg-color: #050505;
  --text-color: #e0e0e0;
  --accent-color: #ffffff;
  --secondary-accent: #333333;
  --glitch-color-1: #ff0000;
  --glitch-color-2: #00ffff;
  --font-heading: 'Chakra Petch', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.landing-shell {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-heading);
  overflow-x: hidden;
  overflow-y: hidden;
  min-height: 100%;
  line-height: 1.6;
}

.landing-shell html {
  height: 100%;
}

.landing-main {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.landing-scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.2)
  );
  background-size: 100% 4px;
  z-index: 999;
  pointer-events: none;
  opacity: 0.6;
}

.landing-red-smoke {
  position: fixed;
  top: -20%;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center top, rgba(140, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

.landing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, #000 90%);
  z-index: 2;
  pointer-events: none;
}

.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  font-family: var(--font-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.landing-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 4px;
  font-size: 1.5rem;
  text-shadow: 2px 2px 0px #1a1a1a;
  cursor: pointer;
}

.landing-nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.landing-nav a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  overflow: hidden;
  padding-bottom: 2px;
  font-weight: 900;
  letter-spacing: 2.5px;
  font-size: 1rem;
  text-transform: uppercase;
}

.landing-nav a:hover,
.landing-nav a.landing-active {
  color: #ff0000;
  text-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
}

.landing-nav-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.landing-page {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
  visibility: hidden;
  z-index: 0;
}

.landing-page.landing-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
  transition-delay: 0s;
  z-index: 2;
}

.landing-ctf-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  height: 100%;
  padding: 0 8%;
}

.landing-ctf-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 0;
  z-index: 2;
  height: 100%;
}

.landing-ctf-box {
  width: 100%;
  max-width: 920px;
  background: rgba(0, 0, 0, 0.7);
  border-left: 2px solid rgba(0, 255, 140, 0.5);
  box-shadow: 0 0 18px rgba(0, 255, 140, 0.12);
  padding: 1.65rem;
  font-family: var(--font-mono);
  color: #f0f0f0;
  line-height: 1.6;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

.landing-ctf-box p {
  margin: 0;
}

.landing-ctf-actions {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  background: #00ff8c;
  color: #000;
  border: 1px solid #00ff8c;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-mono);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(0, 255, 140, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.landing-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 255, 140, 0.5);
}

.landing-nav-arrows {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1100;
}

.landing-arrow-btn {
  width: 34px;
  height: 34px;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, visibility 0.2s,
    border-color 0.2s ease;
  pointer-events: auto;
}

.landing-arrow-btn img {
  width: 16px;
  height: 16px;
  filter: invert(1) drop-shadow(0 0 6px rgba(255, 0, 0, 0.4));
}

.landing-arrow-btn.landing-prev {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.landing-arrow-btn.landing-next {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.landing-arrow-btn:hover {
  transform: translateY(-50%);
  box-shadow: 0 0 24px rgba(255, 0, 0, 0.6);
  border-color: var(--glitch-color-1);
}

.landing-arrow-btn:active {
  transform: translateY(-50%) scale(0.93);
}

.landing-arrow-btn.landing-disabled {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border-color: transparent;
  box-shadow: none;
}

.landing-hero-section {
  height: 100vh;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: right;
  position: relative;
  padding-top: 15vh;
  padding-right: 5%;
  overflow: hidden;
}

.landing-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 45%;
  margin-right: 2%;
}

.landing-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.landing-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.6;
  filter: grayscale(100%) contrast(1.2) brightness(0.8) blur(1px);
  mix-blend-mode: luminosity;
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 90%);
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 90%);
  transform: scale(1.1);
}

.landing-hero-title {
  font-size: 9rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  position: relative;
  display: inline-block;
  letter-spacing: 4px;
  margin-bottom: 0px;
  line-height: 1;
  text-shadow: 6px 6px 0px #000000;
  z-index: 10;
}

.landing-ctf-title {
  font-size: 8.5rem;
  letter-spacing: 4px;
  margin-bottom: 0.2rem;
  margin-top: -0.5rem;
  line-height: 1;
  white-space: nowrap;
}

.landing-ctf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 750px;
}

.landing-ctf-tags span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #00ff8c;
  border: 1px solid rgba(0, 255, 140, 0.4);
  padding: 0.5rem 0.75rem;
  background: rgba(0, 255, 140, 0.05);
  box-shadow: 0 0 12px rgba(0, 255, 140, 0.12);
  border-radius: 8px;
  text-align: center;
  backdrop-filter: blur(3px);
}

.landing-ctf-slogan {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: #fff;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  letter-spacing: 8px;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  text-align: center;
  width: 100%;
  white-space: nowrap;
}

.landing-dot {
  color: #00ff8c;
  margin: 0 0.5rem;
  display: inline-block;
  transform: scale(1.2);
  text-shadow: 0 0 8px rgba(0, 255, 140, 0.8);
}

@media (max-width: 768px) {
  .landing-hero-title {
    font-size: 4rem;
    letter-spacing: 6px;
  }

  .landing-header {
    padding: 1.5rem;
    flex-direction: column;
    gap: 1rem;
  }
}

.landing-subtitle {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  letter-spacing: 8px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  margin-top: 0px;
  text-transform: uppercase;
}

.landing-hero-description {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #f0f0f0;
  width: 100%;
  max-width: 800px;
  text-align: justify;
  margin-top: 2rem;
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.7);
  padding: 1.5rem;
  border-left: 2px solid var(--glitch-color-1);
  border-right: 2px solid var(--glitch-color-1);
  backdrop-filter: blur(4px);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  will-change: opacity, transform;
}

.landing-secondary-description {
  margin-top: 5rem;
  border-right: 2px solid var(--glitch-color-1);
  border-left: 2px solid var(--glitch-color-1);
  margin-left: 15%;
  width: 85%;
  white-space: pre-wrap;
}

.landing-hero-description.landing-visible {
  opacity: 1;
  transform: translateY(0);
}

.landing-word-fly {
  display: inline-block;
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease, filter 0.6s ease;
  will-change: transform, opacity, filter;
}

.landing-word-fly.landing-assembled {
  opacity: 1;
  transform: translate(0, 0) rotate(0deg) !important;
  filter: blur(0) !important;
}

.landing-fall-target {
  opacity: 0;
  transform: translateY(-120px);
  transition: transform 0.6s ease, opacity 0.6s ease;
  will-change: transform, opacity;
}

.landing-fall-target.landing-fall-in {
  opacity: 1;
  transform: translateY(0);
}

.landing-typing-mask {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  position: relative;
  animation: landing-typing-reveal var(--typing-duration, 0.85s) steps(var(--typing-steps, 18)) forwards;
  animation-delay: var(--typing-delay, 0s);
  animation-play-state: paused;
}

.landing-typing-mask::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 6px;
  background: var(--accent-color);
  vertical-align: -0.08em;
  animation: landing-caret-blink 0.9s steps(1) infinite;
}

.landing-typing-mask.landing-typing-done::after {
  opacity: 0;
  animation: none;
}

.landing-typing-mask.landing-typing-start {
  animation-play-state: running;
}

.landing-subtitle-mask {
  --typing-duration: 0.9s;
  --typing-steps: 18;
  --typing-delay: 0.05s;
}

@keyframes landing-typing-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes landing-caret-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.landing-footer {
  text-align: center;
  padding: 2rem;
  color: #555;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}
