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

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --border: #1e1e2a;
  --border-bright: #2a2a3a;
  --text: #e4e4ef;
  --text-dim: #ababbe;
  --text-muted: #8585a0;
  --accent: #6ee7b7;
  --accent-dim: #34d399;
  --accent-glow: rgba(110, 231, 183, 0.12);
  --accent-glow-strong: rgba(110, 231, 183, 0.25);
  --red: #f87171;
  --yellow: #fbbf24;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Instrument Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-link {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s;
}
.nav-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

/* Grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 70%);
  opacity: 0.5;
}

/* Accent glow */
.hero::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow-strong) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero-badge {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(110, 231, 183, 0.2);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 32px;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: fadeInUp 0.6s ease both;
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

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

.hero-sub {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--text-dim);
  max-width: 580px;
  margin-bottom: 48px;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-cta {
  display: flex;
  gap: 12px;
  align-items: center;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.btn-primary {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary:hover {
  background: #5cdba8;
  box-shadow: 0 0 30px var(--accent-glow-strong);
  transform: translateY(-1px);
}

.hero-terminal {
  margin-top: 64px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  text-align: left;
  overflow: hidden;
  animation: fadeInUp 0.6s ease 0.4s both;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.terminal-dot.r { background: var(--red); }
.terminal-dot.y { background: var(--yellow); }
.terminal-dot.g { background: var(--accent-dim); }
.terminal-title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2;
}
.terminal-body .prompt { color: var(--accent); }
.terminal-body .cmd { color: var(--text); }
.terminal-body .comment { color: var(--text-muted); }
.terminal-body .string { color: var(--yellow); }
.terminal-body .output { color: var(--text-dim); }

/* ── SECTIONS ── */
section {
  padding: 100px 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-desc {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 560px;
  margin-bottom: 56px;
  line-height: 1.7;
}

/* ── HOW IT WORKS ── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  position: relative;
  transition: all 0.3s;
}
.step:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  transform: translateY(-4px);
}

.step-num {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--border-bright);
  line-height: 1;
  margin-bottom: 20px;
}
.step:hover .step-num { color: var(--accent); transition: color 0.3s; }

.step-title {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

.step-code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: rgba(110, 231, 183, 0.06);
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 16px;
  border: 1px solid rgba(110, 231, 183, 0.1);
}

/* ── COMPATIBILITY ── */
.compat-section {
  text-align: center;
  border-top: 1px solid var(--border);
}

.compat-section .section-desc {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 48px;
}

.compat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto 40px;
}

.compat-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  text-align: center;
  transition: all 0.3s;
}
.compat-group:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
}

.compat-group-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 20px;
}

.compat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.compat-tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  padding: 6px 14px;
  border-radius: 100px;
  transition: all 0.2s;
}
.compat-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.compat-tag.more {
  color: var(--accent);
  border-color: rgba(110, 231, 183, 0.25);
  background: rgba(110, 231, 183, 0.06);
  font-weight: 500;
}

.compat-note {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
  font-style: italic;
}

.compat-cta {
  margin-top: 36px;
}

@media (max-width: 768px) {
  .compat-grid { grid-template-columns: 1fr; }
}

/* ── COMPARISON ── */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.comparison-table thead th {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--bg-elevated);
}

.comparison-table thead th:first-child { border-radius: 12px 0 0 0; }
.comparison-table thead th:last-child { border-radius: 0 12px 0 0; }

.comparison-table tbody tr:last-child td { border-bottom: none; }

.comparison-table td:first-child {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text);
}

.comparison-table td { color: var(--text-dim); }

/* Ohita column highlight */
.comparison-table td.ohita,
.comparison-table th.ohita {
  background: rgba(110, 231, 183, 0.04);
  color: var(--accent);
  font-weight: 500;
}
.comparison-table th.ohita {
  color: var(--accent);
  font-weight: 700;
}

.check { color: var(--accent); font-size: 16px; }
.cross { color: var(--text-muted); font-size: 16px; }
.partial { color: var(--yellow); font-size: 16px; }

/* ── CTA / SIGNUP ── */
.cta-section {
  text-align: center;
  padding: 100px 24px 120px;
  max-width: 600px;
  margin: 0 auto;
}

.signup-form {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.signup-input {
  flex: 1;
  font-family: var(--mono);
  font-size: 14px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.signup-input::placeholder { color: var(--text-muted); }
.signup-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.signup-btn {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.signup-btn:hover {
  background: #5cdba8;
  box-shadow: 0 0 30px var(--accent-glow-strong);
}
.signup-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.signup-msg {
  font-family: var(--mono);
  font-size: 13px;
  margin-top: 16px;
  min-height: 20px;
}
.signup-msg.success { color: var(--accent); }
.signup-msg.error { color: var(--red); }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

footer .finnish {
  color: var(--text-muted);
  font-style: italic;
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 12px 16px; }
  .steps { grid-template-columns: 1fr; }
  .comparison-table { font-size: 12px; }
  .comparison-table th, .comparison-table td { padding: 12px 10px; }
  .signup-form { flex-direction: column; }
  .hero { padding: 100px 16px 60px; }
}
