/* ============ SCAMMOOR — hacker themed styles ============ */

:root {
  --bg: #02060a;
  --bg-2: #050d12;
  --green: #00ff7f;
  --green-dim: #06b35a;
  --green-soft: rgba(0, 255, 127, 0.15);
  --red: #ff2b4a;
  --amber: #ffb02e;
  --text: #c9ffd9;
  --muted: #5a8a72;
  --line: rgba(0, 255, 127, 0.25);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Share Tech Mono', 'VT323', ui-monospace, monospace;
  min-height: 100vh;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 255, 127, 0.07), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 43, 74, 0.06), transparent 60%),
    var(--bg);
}

a { color: var(--green); text-decoration: none; }
a:hover { color: #fff; text-shadow: 0 0 8px var(--green); }

/* ============ Background layers ============ */

#matrix {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.scanlines {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 127, 0.03) 0px,
    rgba(0, 255, 127, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none; z-index: 2;
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.85) 100%);
  pointer-events: none; z-index: 3;
}

.noise {
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0   0 0 0 0 0   0 0 0 0 0   0 0 0 0.3 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.25;
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: overlay;
  animation: noise 1.6s steps(6) infinite;
}
@keyframes noise {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(-2%,1%); }
  40%  { transform: translate(1%,-2%); }
  60%  { transform: translate(-1%,2%); }
  80%  { transform: translate(2%,-1%); }
  100% { transform: translate(0,0); }
}

/* ============ Layout ============ */

main, header, footer { position: relative; z-index: 5; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(2px);
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
}

.brand {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: var(--green);
  text-shadow: 0 0 10px var(--green);
  letter-spacing: 1px;
}

.cursor-blink { animation: blink 1s steps(2) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

.nav { display: flex; gap: 22px; }
.nav a {
  font-size: 14px;
  letter-spacing: 1.5px;
  color: var(--text);
  border-bottom: 1px dashed transparent;
  padding-bottom: 2px;
}
.nav a:hover { border-bottom-color: var(--green); }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ============ Hero ============ */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0 80px;
}

.alert {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--red);
  background: rgba(255, 43, 74, 0.08);
  color: var(--red);
  font-size: 13px;
  letter-spacing: 1.5px;
  margin-bottom: 22px;
  text-shadow: 0 0 6px rgba(255,43,74,0.6);
  animation: alert 3s ease-in-out infinite;
}
.alert .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulse 1.2s infinite;
}
@keyframes alert {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.7; }
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(1.4); opacity: 0.6; }
}

.title {
  font-family: 'Major Mono Display', 'VT323', monospace;
  font-size: clamp(56px, 9vw, 128px);
  line-height: 0.95;
  letter-spacing: -1px;
  color: #fff;
  text-shadow:
    0 0 12px var(--green),
    0 0 30px rgba(0, 255, 127, 0.45);
}

/* Glitch effect */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
}
.glitch::before {
  color: var(--red);
  transform: translate(2px, 0);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  animation: glitchTop 2.6s infinite linear alternate-reverse;
  mix-blend-mode: screen;
}
.glitch::after {
  color: var(--green);
  transform: translate(-2px, 0);
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  animation: glitchBot 2.2s infinite linear alternate-reverse;
  mix-blend-mode: screen;
}
@keyframes glitchTop {
  0%   { transform: translate(2px, -1px); }
  20%  { transform: translate(-3px, 0); }
  40%  { transform: translate(4px, 1px); }
  60%  { transform: translate(-2px, -2px); }
  80%  { transform: translate(3px, 0); }
  100% { transform: translate(-1px, 1px); }
}
@keyframes glitchBot {
  0%   { transform: translate(-2px, 1px); }
  20%  { transform: translate(3px, 0); }
  40%  { transform: translate(-4px, -1px); }
  60%  { transform: translate(2px, 2px); }
  80%  { transform: translate(-3px, 0); }
  100% { transform: translate(1px, -1px); }
}

.subtitle {
  margin-top: 18px;
  font-size: 18px;
  color: var(--green);
  letter-spacing: 1px;
  min-height: 26px;
}
.caret {
  display: inline-block;
  margin-left: 2px;
  color: var(--green);
  animation: blink 1s steps(2) infinite;
}

.cta-row {
  margin-top: 28px;
  display: flex; gap: 14px; flex-wrap: wrap;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 1.2px;
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
  cursor: pointer;
  text-transform: lowercase;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(0,255,127,0.25) 50%, transparent 100%);
  transform: translateX(-120%);
  transition: transform 0.45s ease;
}
.btn:hover::before { transform: translateX(120%); }
.btn:hover {
  background: var(--green-soft);
  color: #fff;
  text-shadow: 0 0 8px var(--green);
  box-shadow: 0 0 16px rgba(0,255,127,0.35), inset 0 0 12px rgba(0,255,127,0.15);
}
.btn.primary {
  background: rgba(0,255,127,0.08);
  box-shadow: inset 0 0 0 1px var(--green), 0 0 12px rgba(0,255,127,0.25);
}
.btn.ghost { border-style: dashed; }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn.big {
  font-size: 18px; padding: 16px 26px;
  letter-spacing: 2px;
}

.stats {
  list-style: none;
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
  max-width: 520px;
}
.stats li {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 13px;
}
.stats .k { color: var(--muted); letter-spacing: 1px; }
.stats .v { color: var(--text); font-size: 16px; }
.stats .v.glow { color: var(--green); text-shadow: 0 0 8px var(--green); }

/* Frame for character */
.frame {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0,255,127,0.04), rgba(0,0,0,0.5));
  box-shadow:
    0 0 0 1px rgba(0,255,127,0.08),
    0 0 60px rgba(0,255,127,0.12),
    inset 0 0 80px rgba(0,255,127,0.05);
  border-radius: 6px;
  overflow: hidden;
}
.frame-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: rgba(0, 255, 127, 0.07);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.frame-bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--muted);
}
.frame-bar span:nth-child(1) { background: var(--red); box-shadow: 0 0 6px var(--red); }
.frame-bar span:nth-child(2) { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.frame-bar span:nth-child(3) { background: var(--green); box-shadow: 0 0 6px var(--green); }
.frame-bar em { margin-left: auto; font-style: normal; }

.frame-body {
  padding: 26px 22px 22px;
  text-align: center;
}

.char-wrap {
  position: relative;
  width: 320px; max-width: 100%;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.char-wrap::before {
  content: "";
  position: absolute;
  inset: -10% -10% -2% -10%;
  background:
    radial-gradient(ellipse at center, rgba(0,255,127,0.18), transparent 65%);
  filter: blur(8px);
  z-index: 0;
  animation: pulseGlow 4s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,100% { opacity: 0.7; transform: scale(1); }
  50%     { opacity: 1;   transform: scale(1.06); }
}

#char {
  position: relative; z-index: 1;
  width: 100%; height: auto;
  filter:
    drop-shadow(0 0 14px rgba(0,255,127,0.45))
    contrast(1.05);
  animation:
    breathe 4.6s ease-in-out infinite,
    sway   7s ease-in-out infinite;
  transition: filter 0.25s ease;
}

@keyframes breathe {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-6px) scale(1.015); }
}
@keyframes sway {
  0%,100% { transform: rotate(-0.6deg); }
  50%     { transform: rotate(0.6deg); }
}

/* glitch flicker (random via JS) */
.char-wrap.glitching #char {
  filter:
    drop-shadow(2px 0 0 var(--red))
    drop-shadow(-2px 0 0 var(--green))
    drop-shadow(0 0 14px rgba(0,255,127,0.45));
  transform: translate(2px, -1px) skewX(-2deg);
}

.glow-ring {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  border: 1px dashed rgba(0,255,127,0.35);
  z-index: 0;
  animation: spin 18s linear infinite;
  pointer-events: none;
}
.glow-ring::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 43, 74, 0.2);
  animation: spin 26s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

.caption {
  margin-top: 18px;
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: var(--text);
  text-align: left;
  display: inline-block;
  border-left: 2px solid var(--green);
  padding-left: 12px;
}
.caption span { color: var(--muted); }
.caption em { color: var(--red); font-style: normal; text-shadow: 0 0 6px var(--red); }

/* ============ Section heads ============ */

.section-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 26px;
}
.section-head h2 {
  font-family: 'Major Mono Display', monospace;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 10px var(--green);
}
.section-head .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--green), transparent);
}

/* ============ Lore ============ */

.lore { padding: 60px 0; }

.lore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.lore-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0,255,127,0.04), rgba(0,0,0,0.4));
  padding: 18px 18px 20px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.lore-card:hover {
  transform: translateY(-3px);
  border-color: var(--green);
  box-shadow: 0 6px 24px rgba(0,255,127,0.15);
}
.lore-card header {
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: var(--green);
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(0,255,127,0.5);
}
.lore-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}
.lore-card b { color: #fff; }
.hl {
  background: rgba(255, 43, 74, 0.15);
  color: var(--red);
  padding: 0 4px;
  text-shadow: 0 0 6px rgba(255,43,74,0.4);
}

.manifesto {
  margin-top: 28px;
  padding: 14px 16px;
  border-left: 2px solid var(--red);
  background: rgba(255, 43, 74, 0.05);
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: #fff;
  letter-spacing: 0.5px;
}
.manifesto em { color: var(--red); font-style: italic; }

/* ============ CA ============ */

.ca { padding: 40px 0; }

.ca-box {
  border: 1px solid var(--green);
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(0,255,127,0.06), rgba(0,0,0,0.5));
  box-shadow:
    inset 0 0 0 1px rgba(0,255,127,0.15),
    0 0 30px rgba(0,255,127,0.15);
}

.ca-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
.ca-label .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
}
.ca-label .dot.live { background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.5s infinite; }

.ca-row {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px dashed var(--line);
}
#ca {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: #fff;
  word-break: break-all;
  flex: 1;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(0,255,127,0.4);
}

.ca-links {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.chip {
  display: inline-block;
  padding: 6px 12px;
  border: 1px dashed var(--line);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text);
  transition: all 0.15s ease;
}
.chip:hover {
  border-color: var(--green);
  background: var(--green-soft);
  color: #fff;
  text-shadow: 0 0 6px var(--green);
}

/* ============ Join ============ */

.join { padding: 60px 0 30px; text-align: center; }
.join .section-head { justify-content: center; }
.join-text {
  font-family: 'VT323', monospace;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 24px;
}
.join .btn.big { display: inline-flex; }

/* ============ Footer ============ */

.foot {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 18px 28px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.foot .terminal-line .prompt { color: var(--green); }

/* ============ Toast ============ */

.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.85);
  border: 1px solid var(--green);
  color: var(--green);
  padding: 10px 18px;
  font-family: 'VT323', monospace;
  font-size: 18px;
  letter-spacing: 1px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 0 20px rgba(0,255,127,0.35);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============ Responsive ============ */

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 20px 0 40px; }
  .hero-right { order: -1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .glow-ring { width: 240px; height: 240px; }
  .char-wrap { width: 260px; }
}

@media (max-width: 480px) {
  main { padding: 24px 16px 60px; }
  .topbar { padding: 14px 16px; }
  .stats { grid-template-columns: 1fr; }
  #ca { font-size: 16px; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
