/* landing.css - ALCHEMY STOCK BUSTER Glitch Homepage */

:root {
  --bg-color: #0b0c10;
  --grid-color: rgba(255, 255, 255, 0.05);
  --text-main: #ffffff;
  --glitch-red: #ff003c;
  --glitch-cyan: #00e5ff;
  --accent-gold: #c6a87c;
  --mono-font: 'SF Mono', 'JetBrains Mono', 'Consolas', monospace;
  --display-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.scroll-locked {
  overflow: hidden;
}

#landing-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--display-font);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 1s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: opacity, visibility;
}

#landing-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ─── Background & Effects ─── */

.grid-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  z-index: 1;
  opacity: 0.5;
}

.scanline {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  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: 10;
  pointer-events: none;
  opacity: 0.3;
}

/* ─── Container ─── */

.landing-container {
  position: relative;
  z-index: 20;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 800px;
}

/* ─── Micro Typography ─── */

.top-text {
  font-family: var(--mono-font);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 40px;
  text-transform: uppercase;
}

.bottom-text {
  font-family: var(--mono-font);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 60px;
  text-transform: uppercase;
}

.status-code {
  color: var(--text-main);
  opacity: 0.8;
}

.status-action {
  color: var(--accent-gold);
}

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ─── Glitch Main Title ─── */

.glitch-wrapper {
  cursor: pointer;
  padding: 20px 40px;
  transition: transform 0.2s ease;
}

.glitch-wrapper:hover {
  transform: scale(1.02);
}

.glitch-text {
  position: relative;
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  color: var(--text-main);
  /* Basic text shadow for the default chromatic aberration */
  text-shadow: 0.05em 0 0 rgba(255,0,0,0.75), -0.05em -0.025em 0 rgba(0,255,255,0.75);
  animation: glitch 2.5s infinite;
}

/* The cyan / red layers for slice animations */
.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
}

.glitch-text::before {
  left: 2px;
  text-shadow: -2px 0 var(--glitch-red);
  clip-path: inset(0 0 0 0);
  animation: glitch-anim-1 3s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -2px;
  text-shadow: -2px 0 var(--glitch-cyan);
  clip-path: inset(0 0 0 0);
  animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}

.sub-title {
  font-family: var(--display-font);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--text-main);
  margin-top: 10px;
  text-transform: uppercase;
  position: relative;
  /* Add a very subtle cyan shift to the subtitle */
  text-shadow: 2px 0 0 rgba(0,255,255,0.4);
}

.cn-slogan {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: rgba(0, 255, 255, 0.7);
  margin-top: 16px;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
  animation: slogan-fade 3s ease-in-out infinite alternate;
}
@keyframes slogan-fade {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* ─── Glitch Keyframes ─── */

@keyframes glitch {
  0% { text-shadow: 0.05em 0 0 rgba(255,0,0,0.75), -0.05em -0.025em 0 rgba(0,255,255,0.75); }
  14% { text-shadow: 0.05em 0 0 rgba(255,0,0,0.75), -0.05em -0.025em 0 rgba(0,255,255,0.75); }
  15% { text-shadow: -0.05em -0.025em 0 rgba(255,0,0,0.75), 0.025em 0.025em 0 rgba(0,255,255,0.75); }
  49% { text-shadow: -0.05em -0.025em 0 rgba(255,0,0,0.75), 0.025em 0.025em 0 rgba(0,255,255,0.75); }
  50% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,0.75), 0.05em 0 0 rgba(0,255,255,0.75); }
  99% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,0.75), 0.05em 0 0 rgba(0,255,255,0.75); }
  100% { text-shadow: -0.025em 0 0 rgba(255,0,0,0.75), -0.025em -0.025em 0 rgba(0,255,255,0.75); }
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(20% 0 80% 0); }
  20% { clip-path: inset(60% 0 10% 0); }
  40% { clip-path: inset(40% 0 50% 0); }
  60% { clip-path: inset(80% 0 5% 0); }
  80% { clip-path: inset(10% 0 70% 0); }
  100% { clip-path: inset(30% 0 50% 0); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(10% 0 60% 0); }
  20% { clip-path: inset(80% 0 5% 0); }
  40% { clip-path: inset(30% 0 20% 0); }
  60% { clip-path: inset(50% 0 30% 0); }
  80% { clip-path: inset(5% 0 80% 0); }
  100% { clip-path: inset(40% 0 10% 0); }
}

/* Responsive */
@media (max-width: 768px) {
  .glitch-text { font-size: 4rem; }
  .sub-title { font-size: 1rem; letter-spacing: 0.2em; }
  .top-text, .bottom-text { font-size: 10px; }
}
