:root {
  --bg: #080808;
  --surface: #101010;
  --surface2: #171717;
  --border: #202020;
  --accent: #c8f135;
  --accent2: #3df5b0;
  --text: #efefef;
  --muted: #505050;
  --dim: #2a2a2a;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  overflow-x: hidden;
  cursor: crosshair;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
}

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: rgba(8,8,8,0.9);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -1px;
  color: var(--accent);
  text-decoration: none;
}

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-dl {
  background: var(--accent) !important;
  color: #000 !important;
  padding: 7px 16px;
  border-radius: 2px;
  font-weight: 700 !important;
}
.nav-dl:hover { opacity: 0.88; color: #000 !important; }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(200,241,53,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,241,53,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: 800px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent2);
  border: 1px solid rgba(61,245,176,0.2);
  background: rgba(61,245,176,0.05);
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease both;
}

.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent2);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.5; transform:scale(0.75); }
}

.hero-title {
  font-size: clamp(64px, 14vw, 140px);
  font-weight: 800;
  letter-spacing: -6px;
  line-height: 0.9;
  color: var(--text);
  margin-bottom: 28px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero-title span { color: var(--accent); }

.hero-sub {
  font-family: 'Space Mono', monospace;
  font-size: clamp(12px, 2vw, 15px);
  color: var(--muted);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 48px;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-btns {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  animation: fadeUp 0.6s 0.3s ease both;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent);
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: 2px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  cursor: pointer;
  border: none;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 16px 24px;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--accent2); color: var(--accent2); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.preview-section {
  position: relative; z-index: 1;
  padding: 0 24px 100px;
  display: flex;
  justify-content: center;
}

.app-window {
  width: min(720px, 96vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.8), 0 0 0 1px rgba(200,241,53,0.06);
  animation: fadeUp 0.8s 0.4s ease both;
}

.win-bar {
  background: #0d0d0d;
  display: flex; align-items: center;
  padding: 12px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.win-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.win-dot.r { background: #ff5f57; }
.win-dot.y { background: #febc2e; }
.win-dot.g { background: #28c840; }

.win-title {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  margin-left: auto; margin-right: auto;
  letter-spacing: 1px;
}

.win-body { display: flex; height: 380px; }

.win-sidebar {
  width: 200px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  overflow: hidden;
  display: flex; flex-direction: column;
}

.sidebar-head {
  background: var(--accent);
  padding: 14px 16px;
}
.sidebar-head .sh-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #000;
  letter-spacing: -0.5px;
}
.sidebar-head .sh-sub {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  color: rgba(0,0,0,0.5);
  letter-spacing: 1px;
  margin-top: 2px;
}

.room-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.room-item.active { background: var(--surface2); }
.room-item .ri-hash {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--accent2);
}
.room-item .ri-name {
  font-size: 12px;
  color: var(--text);
}

.win-chat { flex: 1; display: flex; flex-direction: column; background: var(--bg); }

.chat-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.chat-topbar .ct-room {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent2);
}
.chat-topbar .ct-user {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--muted);
}

.chat-msgs {
  flex: 1; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden;
}

.msg-row { display: flex; flex-direction: column; max-width: 75%; }
.msg-row.out { align-self: flex-end; align-items: flex-end; }
.msg-row.in { align-self: flex-start; }

.msg-sender {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  color: var(--muted);
  margin-bottom: 3px;
}
.msg-row.out .msg-sender { color: var(--accent); }
.msg-row.in .msg-sender { color: var(--accent2); }

.msg-bubble {
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 2px;
}
.msg-row.out .msg-bubble { background: var(--accent); color: #000; font-weight: 600; }
.msg-row.in .msg-bubble { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

.sys-msg-preview {
  align-self: center;
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 2px;
  text-transform: uppercase;
}

.chat-input-preview {
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  display: flex; gap: 8px; align-items: center;
  background: var(--surface);
}
.input-mock {
  flex: 1; background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 7px 10px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
}
.send-mock {
  background: var(--accent);
  color: #000;
  width: 30px; height: 30px;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.section {
  max-width: 1000px; margin: 0 auto;
  padding: 80px 24px;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 56px;
  line-height: 1;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.feature-card {
  background: var(--surface);
  padding: 32px 28px;
  transition: background 0.2s;
}
.feature-card:hover { background: var(--surface2); }

.feat-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.feat-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.feat-desc {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}

.install-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.install-inner {
  max-width: 1000px; margin: 0 auto;
  padding: 80px 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: start;
}

@media (max-width: 700px) {
  .install-inner { grid-template-columns: 1fr; }
}

.step {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 28px;
}

.step-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  background: rgba(200,241,53,0.08);
  border: 1px solid rgba(200,241,53,0.2);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
  flex-shrink: 0;
}

.step-text { flex: 1; }
.step-text strong {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.step-text p {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}

.step-text a { color: var(--accent2); text-decoration: none; }
.step-text a:hover { text-decoration: underline; }

code {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  background: var(--bg);
  color: var(--accent2);
  padding: 10px 14px;
  display: block;
  border: 1px solid var(--border);
  border-radius: 2px;
  margin-top: 8px;
  white-space: pre;
  overflow-x: auto;
}

.cta-section {
  padding: 100px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: 'RELAY';
  position: absolute;
  font-size: clamp(120px, 25vw, 300px);
  font-weight: 800;
  color: rgba(200,241,53,0.025);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  letter-spacing: -10px;
  white-space: nowrap;
}

.cta-section h2 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -3px;
  color: var(--text);
  margin-bottom: 16px;
  position: relative;
}

.cta-section p {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 40px;
  position: relative;
}

.dl-cards {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px 28px;
  min-width: 200px;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  border-radius: 2px;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.dl-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.dl-card.primary { border-color: var(--accent); background: rgba(200,241,53,0.04); }

.dl-platform {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.dl-card.primary .dl-platform { color: var(--accent); }

.dl-name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.dl-meta {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
}

.dl-arrow {
  font-size: 20px;
  margin-top: 12px;
  color: var(--accent);
  display: block;
}

footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  flex-wrap: wrap; gap: 12px;
}

.footer-logo { color: var(--accent); font-weight: 700; font-family: 'Syne', sans-serif; font-size: 14px; }

#dl-modal {
  display: none;
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
#dl-modal.open { display: flex; }

.modal-box {
  width: min(540px, 94vw);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 2px;
  overflow: hidden;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-hdr {
  background: var(--accent);
  padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-hdr strong {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  color: #000;
  font-size: 15px;
  letter-spacing: -0.3px;
}
.modal-close {
  background: none; border: none;
  font-size: 20px; cursor: pointer; color: #000;
  opacity: 0.5; transition: opacity 0.15s;
}
.modal-close:hover { opacity: 1; }

.modal-body {
  padding: 24px;
  display: flex; flex-direction: column; gap: 18px;
}

.modal-body p {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}

.modal-step {
  display: flex; gap: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: 2px;
}

.modal-step-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  min-width: 24px;
  font-weight: 700;
}

.modal-step-text {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text);
  line-height: 1.7;
}

.modal-step-text a { color: var(--accent2); text-decoration: none; }
.modal-step-text a:hover { text-decoration: underline; }

.modal-dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent);
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 16px;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.modal-dl-btn:hover { opacity: 0.88; }

@media (max-width: 600px) {
  nav { padding: 0 16px; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-dl) { display: none; }
  footer { padding: 24px 16px; }
}
