/* ========================================
   coretx.id — Dark Sci-Fi Landing Page
   ======================================== */

:root {
  --emerald: #00E676;
  --emerald-dark: #00C853;
  --emerald-dim: #004D25;
  --emerald-glow: rgba(0, 230, 118, 0.3);
  --emerald-subtle: rgba(0, 230, 118, 0.08);
  --black: #000000;
  --dark: #0a0a0a;
  --dark-2: #111111;
  --gray: #333333;
  --gray-light: #666666;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--emerald);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ---- Scanlines ---- */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 230, 118, 0.015) 2px,
    rgba(0, 230, 118, 0.015) 4px
  );
  animation: scanline-drift 8s linear infinite;
}

@keyframes scanline-drift {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* ---- Particle Canvas ---- */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---- Video Section ---- */
.video-section {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
}

.video-section.active {
  display: block;
}

.video-section video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 20%, var(--black) 80%);
}

/* ---- Main Layout ---- */
main {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* ---- Hero ---- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  max-width: 600px;
}

/* ---- Logo + Glitch ---- */
.glitch-container {
  position: relative;
  width: 180px;
  height: 180px;
}

.logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 0 30px var(--emerald-glow));
  position: absolute;
  top: 0;
  left: 0;
}

.logo:first-child {
  position: relative;
  z-index: 2;
  animation: logo-pulse 4s ease-in-out infinite;
}

.glitch-1 {
  z-index: 1;
  opacity: 0;
  animation: glitch-r 3s infinite;
  mix-blend-mode: screen;
}

.glitch-2 {
  z-index: 1;
  opacity: 0;
  animation: glitch-l 3s infinite 0.1s;
  mix-blend-mode: screen;
}

@keyframes logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 20px var(--emerald-glow)); }
  50% { filter: drop-shadow(0 0 40px var(--emerald-glow)) brightness(1.1); }
}

@keyframes glitch-r {
  0%, 92%, 100% { opacity: 0; transform: translate(0, 0); }
  93% { opacity: 0.6; transform: translate(4px, -2px); filter: hue-rotate(20deg); }
  95% { opacity: 0; transform: translate(-2px, 1px); }
  96% { opacity: 0.4; transform: translate(2px, 3px); filter: hue-rotate(-10deg); }
  98% { opacity: 0; }
}

@keyframes glitch-l {
  0%, 90%, 100% { opacity: 0; transform: translate(0, 0); }
  91% { opacity: 0.5; transform: translate(-3px, 2px); filter: hue-rotate(-30deg); }
  93% { opacity: 0; transform: translate(1px, -1px); }
  94% { opacity: 0.3; transform: translate(-2px, -2px); filter: hue-rotate(15deg); }
  96% { opacity: 0; }
}

/* ---- Brand Name ---- */
.brand-name {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  position: relative;
}

.brand-core {
  color: var(--emerald);
}

.brand-tx {
  color: var(--emerald-dark);
  text-shadow: 0 0 20px var(--emerald-glow);
}

.brand-dot {
  color: var(--emerald);
  opacity: 0.5;
}

.brand-id {
  color: var(--emerald-dark);
  opacity: 0.8;
}

/* ---- Tagline ---- */
.tagline {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--emerald-dark);
  opacity: 0.7;
}

.tagline-sep {
  color: var(--gray-light);
}

/* ---- Status Bar ---- */
.status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--emerald-dim);
  border-radius: 2px;
  background: var(--emerald-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  animation: status-blink 2s ease-in-out infinite;
}

@keyframes status-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--emerald); }
  50% { opacity: 0.3; box-shadow: none; }
}

/* ---- Countdown ---- */
.countdown-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
}

.countdown-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--gray-light);
  text-transform: uppercase;
}

.countdown-digits {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.digit-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.digit {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--emerald);
  text-shadow: 0 0 15px var(--emerald-glow);
  min-width: 2.5rem;
  text-align: center;
  line-height: 1;
}

.digit-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--gray-light);
  margin-top: 0.25rem;
}

.digit-sep {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--emerald-dim);
  margin-top: -0.75rem;
  animation: sep-blink 1s step-end infinite;
}

@keyframes sep-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.2; }
}

/* ---- CTA Buttons ---- */
.cta-group {
  display: flex;
  gap: 1rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid var(--emerald-dim);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-primary {
  background: transparent;
  color: var(--emerald);
}

.cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--emerald-subtle), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.cta-primary:hover {
  border-color: var(--emerald);
  box-shadow: 0 0 20px var(--emerald-glow), inset 0 0 20px var(--emerald-subtle);
  text-shadow: 0 0 8px var(--emerald-glow);
}

.cta-primary:hover::before {
  transform: translateX(100%);
}

.cta-icon {
  font-size: 1rem;
}

/* ---- Tech Badges ---- */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tech-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--gray);
  border-radius: 1px;
  color: var(--gray-light);
  transition: all 0.3s ease;
}

.tech-badge:hover {
  border-color: var(--emerald-dim);
  color: var(--emerald-dark);
}

/* ---- Terminal Footer ---- */
.terminal-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(transparent, var(--black));
  z-index: 50;
}

.terminal-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--emerald-dim);
}

.prompt {
  color: var(--emerald-dark);
}

.cmd {
  color: var(--emerald-dim);
}

.cursor {
  animation: cursor-blink 1s step-end infinite;
  color: var(--emerald);
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .brand-name { font-size: 2.5rem; }
  .digit { font-size: 1.6rem; }
  .glitch-container, .logo { width: 140px; height: 140px; }
  .tagline { font-size: 0.8rem; letter-spacing: 0.2em; }
  main { padding: 1rem; }
}

@media (max-width: 400px) {
  .brand-name { font-size: 2rem; }
  .digit { font-size: 1.3rem; }
  .glitch-container, .logo { width: 110px; height: 110px; }
}
