/* SAFU — terminal aesthetic, red + cyan on black */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --bg:     #0a0a0a;
  --red:    #ff0033;
  --cyan:   #00ffff;
  --white:  #ffffff;
  --dim:    #444444;
  --muted:  #888888;
  --border: #1a1a1a;
  --panel:  #0d0d0d;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

/* CRT scanline overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ── NAV ────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  padding: 1rem 0;
}
nav .container { display: flex; justify-content: space-between; align-items: center; }

.logo {
  font-size: 1.2rem; font-weight: 700;
  color: var(--red);
  text-shadow: 0 0 14px var(--red);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.cursor {
  display: inline-block;
  width: 9px; height: 1.1em;
  background: var(--cyan);
  margin-left: 1px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 8px var(--cyan);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  color: var(--dim); text-decoration: none;
  font-size: 0.8rem; letter-spacing: 0.08em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--cyan); }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  font-family: inherit; font-size: 0.9rem;
  letter-spacing: 0.08em; padding: 0.75rem 2rem;
  cursor: pointer; border: 1px solid; background: transparent;
  transition: all 0.2s; text-decoration: none; display: inline-block;
}
.btn-cyan {
  color: var(--cyan); border-color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
  box-shadow: 0 0 14px rgba(0,255,255,0.2);
}
.btn-cyan:hover { background: rgba(0,255,255,0.07); box-shadow: 0 0 28px rgba(0,255,255,0.4); }
.btn-red {
  color: var(--red); border-color: var(--red);
  text-shadow: 0 0 8px var(--red);
}
.btn-red:hover { background: rgba(255,0,51,0.07); box-shadow: 0 0 20px rgba(255,0,51,0.3); }
.btn-dim { color: var(--dim); border-color: var(--dim); }
.btn-dim:hover { color: var(--muted); border-color: var(--muted); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; text-shadow: none; }

#btn-connect {
  background: transparent; border: 1px solid var(--cyan);
  color: var(--cyan); font-family: inherit; font-size: 0.78rem;
  padding: 0.45rem 1.2rem; cursor: pointer; letter-spacing: 0.08em;
  text-shadow: 0 0 6px var(--cyan); box-shadow: 0 0 10px rgba(0,255,255,0.15);
  transition: all 0.2s;
}
#btn-connect:hover { background: rgba(0,255,255,0.07); box-shadow: 0 0 20px rgba(0,255,255,0.35); }
#btn-connect.connected { border-color: var(--dim); color: var(--dim); text-shadow: none; box-shadow: none; font-size: 0.72rem; cursor: default; pointer-events: none; }
#btn-disconnect { background: transparent; border: 1px solid var(--red); color: var(--red); font-family: inherit; font-size: 0.72rem; padding: 0.35rem 0.85rem; cursor: pointer; letter-spacing: 0.06em; text-shadow: 0 0 6px var(--red); transition: all 0.2s; }
#btn-disconnect:hover { background: rgba(255,0,51,0.12); box-shadow: 0 0 14px rgba(255,0,51,0.35); }

/* ── HERO ───────────────────────────────────────────────────── */
.hero { padding: 6rem 0 4rem; min-height: 70vh; display: flex; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 700; line-height: 1.15; margin-bottom: 1.8rem; }
.hero h1 .red  { color: var(--red);  text-shadow: 0 0 24px var(--red),  0 0 60px rgba(255,0,51,0.25); }
.hero h1 .cyan { color: var(--cyan); text-shadow: 0 0 24px var(--cyan), 0 0 60px rgba(0,255,255,0.25); }
.hero-sub { color: var(--muted); font-size: 0.95rem; line-height: 1.8; max-width: 520px; margin-bottom: 2.5rem; }
.hero-sub strong { color: var(--white); font-weight: 400; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── STATS BAR ──────────────────────────────────────────────── */
.stats-bar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.5rem 0; margin-bottom: 5rem; }
.stats-bar .container { display: flex; gap: 3rem; flex-wrap: wrap; justify-content: space-between; }
.stat-val { font-size: 1.4rem; font-weight: 700; color: var(--red); text-shadow: 0 0 12px var(--red); }
.stat-lbl { font-size: 0.7rem; color: var(--dim); letter-spacing: 0.12em; margin-top: 0.2rem; }
.stat-note { font-size: 0.65rem; color: var(--dim); margin-top: 0.15rem; }

/* ── SECTIONS ───────────────────────────────────────────────── */
section { padding: 4rem 0 5rem; }
.section-label { font-size: 0.72rem; letter-spacing: 0.2em; color: var(--dim); text-transform: uppercase; margin-bottom: 0.75rem; }
.section-label span { color: var(--cyan); }
section h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 2.5rem; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── TERMINAL PANELS ────────────────────────────────────────── */
.terminal { border: 1px solid var(--border); background: var(--panel); padding: 2rem; }
.terminal-bar { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff3b30; } .dot-y { background: #ffcc00; } .dot-g { background: #28c940; }
.terminal-title { margin-left: 0.5rem; font-size: 0.75rem; color: var(--dim); letter-spacing: 0.06em; }

.step { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.75rem; }
.step-num { font-size: 0.7rem; color: var(--cyan); text-shadow: 0 0 6px var(--cyan); white-space: nowrap; margin-top: 0.2rem; min-width: 32px; }
.step-content { flex: 1; }
.step-title { font-size: 0.9rem; color: var(--white); margin-bottom: 0.35rem; }
.step-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.6; }
.step-desc strong { color: var(--cyan); font-weight: 400; }

/* ── INPUTS ─────────────────────────────────────────────────── */
.input-row { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
.term-input {
  flex: 1; min-width: 0;
  background: #111; border: 1px solid var(--border);
  color: var(--white); font-family: inherit; font-size: 0.82rem;
  padding: 0.65rem 1rem; outline: none; letter-spacing: 0.03em;
  transition: border-color 0.2s;
}
.term-input:focus { border-color: var(--cyan); }
.term-input::placeholder { color: var(--dim); }
textarea.term-input { resize: vertical; min-height: 80px; }

/* ── STATUS BOXES ───────────────────────────────────────────── */
.status-box { margin-top: 1.25rem; padding: 0.85rem 1rem; border: 1px solid var(--border); font-size: 0.8rem; line-height: 1.6; display: none; }
.status-box.show { display: block; }
.status-box.ok   { border-color: #28c940; color: #28c940; }
.status-box.err  { border-color: var(--red);  color: var(--red); }
.status-box.info { border-color: var(--cyan); color: var(--cyan); }
.status-box.warn { border-color: #ffcc00; color: #ffcc00; }

.loader-text::after { content: ''; animation: dots 1.2s steps(3,end) infinite; }
@keyframes dots { 0%{content:'.'} 33%{content:'..'} 66%{content:'...'} 100%{content:'.'} }

/* ── ABOUT CARDS ────────────────────────────────────────────── */
.about-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.about-card { border: 1px solid var(--border); padding: 1.5rem; background: var(--panel); }
.about-card h3 { font-size: 0.9rem; color: var(--cyan); text-shadow: 0 0 8px rgba(0,255,255,0.4); margin-bottom: 0.75rem; }
.about-card p { font-size: 0.8rem; color: var(--muted); line-height: 1.7; }
.about-card p strong { color: var(--white); font-weight: 400; }

/* ── FOOTER ─────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 1.5rem 0; }
footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; font-size: 0.72rem; color: var(--dim); }
footer a { color: var(--dim); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--cyan); }
.footer-social { display: flex; gap: 1.25rem; align-items: center; }
.footer-social a { display: flex; align-items: center; gap: 0.4rem; }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }
.contract-addr { font-size: 0.68rem; letter-spacing: 0.02em; }

/* ── WALLET MODAL ───────────────────────────────────────────── */
.wallet-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 500; align-items: center; justify-content: center; }
.wallet-modal.open { display: flex; }
.wallet-box { background: var(--panel); border: 1px solid var(--border); padding: 2rem; min-width: 320px; max-width: 90vw; }
.wallet-box h3 { font-size: 0.9rem; color: var(--white); margin-bottom: 1.5rem; letter-spacing: 0.05em; }
.wallet-option { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1rem; border: 1px solid var(--border); cursor: pointer; margin-bottom: 0.75rem; font-size: 0.82rem; color: var(--muted); transition: all 0.15s; background: transparent; width: 100%; font-family: inherit; text-align: left; }
.wallet-option:hover { border-color: var(--cyan); color: var(--cyan); }
.wallet-option .wname { flex: 1; }
.wallet-option .wtag { font-size: 0.65rem; color: var(--dim); border: 1px solid var(--dim); padding: 0.1rem 0.4rem; }
.wallet-close { margin-top: 1rem; width: 100%; font-size: 0.75rem; padding: 0.5rem; background: transparent; border: 1px solid var(--border); color: var(--dim); cursor: pointer; font-family: inherit; letter-spacing: 0.06em; }
.wallet-close:hover { border-color: var(--muted); color: var(--muted); }

/* ── UTILITY ─────────────────────────────────────────────────── */
.d-none       { display: none; }
.mt-xs        { margin-top: 0.5rem; }
.mt-sm        { margin-top: 0.75rem; }
.mt-lg        { margin-top: 1.5rem; }
.mt-xl        { margin-top: 2rem; }
.mb-sm        { margin-bottom: 1rem; }
.text-cyan    { color: var(--cyan); }
.text-dim     { color: var(--dim); }
.text-warn    { color: #ffcc00; }
.link-inherit { color: inherit; text-decoration: none; }
.note         { font-size: 0.7rem; color: var(--dim); }
.footer-links { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.input-col    { flex-direction: column; gap: 0.75rem; margin-top: 0.75rem; }

/* ── SECURITY SECTION ───────────────────────────────────────── */
.sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.sec-panel { display: flex; flex-direction: column; }
.sec-label-inner { font-size: 0.78rem; color: var(--cyan); text-shadow: 0 0 8px rgba(0,255,255,0.4); margin-bottom: 1rem; }

.sec-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.sec-table tr { border-bottom: 1px solid var(--border); }
.sec-table td { padding: 0.45rem 0.5rem; font-size: 0.75rem; vertical-align: middle; }
.sev { font-size: 0.65rem; letter-spacing: 0.08em; padding: 0.15rem 0.45rem; border: 1px solid; white-space: nowrap; }
.sev-cr { color: #ff3b30; border-color: #ff3b30; }
.sev-hi { color: #ff8c00; border-color: #ff8c00; }
.sev-me { color: #ffcc00; border-color: #ffcc00; }
.sev-lo { color: #00bfff; border-color: #00bfff; }
.sev-in { color: var(--dim); border-color: var(--dim); }
.sev-count { color: var(--white); padding-left: 0.75rem; min-width: 52px; }
.sev-note { color: var(--muted); font-size: 0.7rem; padding-left: 0.5rem; }

.sec-verdict-ok { font-size: 0.75rem; color: #28c940; margin-top: auto; padding-top: 0.75rem; }
.sec-ext-link { display: inline-block; margin-top: 0.5rem; font-size: 0.72rem; color: var(--dim); text-decoration: none; transition: color 0.2s; }
.sec-ext-link:hover { color: var(--cyan); }

.halmos-score { font-size: 2rem; font-weight: 700; color: #28c940; text-shadow: 0 0 16px rgba(40,201,64,0.4); margin: 0.25rem 0 0.15rem; }
.halmos-sub { font-size: 0.72rem; color: var(--muted); margin-bottom: 1rem; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { font-size: 0.75rem; color: var(--muted); padding: 0.3rem 0; border-bottom: 1px solid var(--border); line-height: 1.5; }
.check-list li::before { content: '✓ '; color: #28c940; }
.check-list li:last-child { border-bottom: none; }

.sec-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.sec-mini-card { border: 1px solid var(--border); padding: 1.25rem; background: var(--panel); }
.sec-mini-title { font-size: 0.72rem; color: var(--cyan); text-shadow: 0 0 6px rgba(0,255,255,0.3); margin-bottom: 0.75rem; }
.sec-mini-big { font-size: 1.8rem; font-weight: 700; color: #28c940; text-shadow: 0 0 12px rgba(40,201,64,0.35); }
.sec-mini-sub { font-size: 0.72rem; color: var(--muted); margin-top: 0.35rem; line-height: 1.6; }
.sec-sev-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }

.sec-guarantee { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.sec-guarantee-item { border: 1px solid var(--border); padding: 1.25rem; background: var(--panel); }

/* ── TEAM ───────────────────────────────────────────────────── */
.team-card {
  max-width: 560px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 2rem;
}
.team-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}
.team-role {
  font-size: 0.68rem;
  color: #00ffff;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  text-shadow: 0 0 8px rgba(0,255,255,0.3);
}
.team-bio {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.team-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.team-links a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.team-links a:hover { color: var(--cyan); }
.team-links svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1120px) {
  .nav-hide-md { display: none; }
}

@media (max-width: 600px) {
  .nav-links { gap: 1rem; }
  .nav-hide { display: none; }
  .hero { min-height: auto; padding: 3rem 0 2rem; }
  .stats-bar .container { gap: 1.5rem; }
  footer .container { flex-direction: column; align-items: flex-start; }
  .sec-grid { grid-template-columns: 1fr; }
  .sec-mini-grid { grid-template-columns: 1fr; }
  .sec-guarantee { grid-template-columns: 1fr; }
}
