/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0f1a;
  --bg2:       #0f1726;
  --bg3:       #131d30;
  --border:    #1e2d47;
  --text:      #c9d8ef;
  --muted:     #5a7299;
  --cyan:      #22d3ee;
  --green:     #34d399;
  --red:       #f87171;
  --white:     #f0f6ff;
  --radius:    12px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== TYPOGRAPHY ========== */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; color: var(--white); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; color: var(--white); }
h3 { font-size: 1.15rem; font-weight: 600; color: var(--white); }

/* ========== LAYOUT ========== */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }

/* ========== NAV ========== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1140px; margin: 0 auto; padding: 0 24px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.2rem; color: var(--white);
}
.logo svg { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--white); text-decoration: none; }
.btn-nav {
  background: var(--cyan); color: #000; font-weight: 700;
  font-size: 0.85rem; padding: 8px 18px; border-radius: 8px;
  transition: opacity 0.2s;
}
.btn-nav:hover { opacity: 0.85; text-decoration: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  border: none; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--cyan); color: #000; }
.btn-primary:hover { opacity: 0.88; text-decoration: none; }
.btn-secondary {
  background: transparent; color: var(--white);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; }

/* ========== HERO ========== */
#hero {
  padding-top: 160px; padding-bottom: 80px;
  position: relative; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--cyan); font-size: 0.8rem; font-weight: 600;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 20px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
.hero-title { margin-bottom: 20px; }
.hero-title .accent { color: var(--cyan); }
.hero-sub { font-size: 1.15rem; color: var(--muted); margin-bottom: 36px; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 48px; }
.hero-stat-val { font-size: 1.6rem; font-weight: 800; color: var(--white); }
.hero-stat-label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ========== MAP / SVG ========== */
.map-wrapper {
  position: relative;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; padding: 16px;
}
.map-wrapper svg { width: 100%; height: auto; display: block; }
.node-dot {
  fill: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan));
  animation: nodePulse 2s ease-in-out infinite;
}
.node-dot.green { fill: var(--green); filter: drop-shadow(0 0 6px var(--green)); }
.node-dot.red { fill: var(--red); filter: drop-shadow(0 0 5px var(--red)); animation-delay: 0.6s; }
@keyframes nodePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.map-overlay {
  position: absolute; bottom: 16px; left: 16px;
  background: rgba(10,15,26,0.85); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; font-size: 0.78rem;
  display: flex; flex-direction: column; gap: 6px;
}
.map-legend-item { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-cyan { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-red { background: var(--red); box-shadow: 0 0 5px var(--red); }

/* ========== SECTION LABELS ========== */
.section-label {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--cyan); margin-bottom: 12px;
}
.section-title { margin-bottom: 16px; }
.section-sub { color: var(--muted); max-width: 560px; margin: 0 auto; }
.text-center { text-align: center; }
.mb-64 { margin-bottom: 64px; }

/* ========== PROBLEM ========== */
#ongelma { background: var(--bg2); }
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.problem-list { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.problem-item {
  display: flex; gap: 16px; padding: 20px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
.problem-icon { font-size: 1.5rem; flex-shrink: 0; }
.problem-item h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 4px; }
.problem-item p { color: var(--muted); font-size: 0.88rem; }

.code-window {
  background: #060b14; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.code-titlebar {
  background: var(--bg3); padding: 10px 16px;
  display: flex; align-items: center; gap: 8px;
}
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-body { padding: 20px; font-family: 'Fira Code', 'Courier New', monospace; font-size: 0.82rem; }
.code-line { margin-bottom: 4px; }
.c-comment { color: #3d5a80; }
.c-key { color: var(--cyan); }
.c-val { color: var(--green); }
.c-red { color: var(--red); }
.c-muted { color: var(--muted); }

/* ========== PILLARS ========== */
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.pillar-card:hover { border-color: var(--cyan); transform: translateY(-4px); }
.pillar-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: rgba(34,211,238,0.1); display: flex; align-items: center;
  justify-content: center; margin-bottom: 20px;
}
.pillar-icon svg { width: 24px; height: 24px; }
.pillar-card h3 { margin-bottom: 10px; }
.pillar-card p { color: var(--muted); font-size: 0.9rem; }

/* ========== HOW IT WORKS ========== */
#miten { background: var(--bg2); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.steps-grid::before {
  content: ''; position: absolute; top: 36px; left: calc(16.66% + 24px);
  right: calc(16.66% + 24px); height: 1px;
  background: linear-gradient(90deg, var(--border), var(--cyan), var(--border));
}
.step-card { text-align: center; padding: 32px 20px; }
.step-num {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan);
  color: var(--cyan); font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; position: relative; z-index: 1;
}
.step-card h3 { margin-bottom: 10px; }
.step-card p { color: var(--muted); font-size: 0.9rem; }

/* ========== NETWORK ========== */
.network-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 64px; }
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 20px; text-align: center;
}
.stat-number { font-size: 2.2rem; font-weight: 800; color: var(--cyan); font-variant-numeric: tabular-nums; }
.stat-suffix { font-size: 1.2rem; color: var(--muted); }
.stat-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.network-map-wrapper {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px; position: relative;
}

/* ========== PRICING ========== */
#hinnoittelu { background: var(--bg2); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pricing-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 28px;
  display: flex; flex-direction: column;
}
.pricing-card.featured {
  border-color: var(--cyan);
  background: linear-gradient(160deg, rgba(34,211,238,0.06), var(--bg));
  position: relative;
}
.featured-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--cyan); color: #000; font-weight: 700;
  font-size: 0.7rem; padding: 4px 14px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
.plan-name { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.plan-price { font-size: 2.6rem; font-weight: 800; color: var(--white); line-height: 1; }
.plan-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.plan-desc { color: var(--muted); font-size: 0.88rem; margin: 12px 0 24px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; flex: 1; }
.plan-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; }
.check { color: var(--green); flex-shrink: 0; font-size: 1rem; }
.plan-features li.dim { color: var(--muted); }
.plan-features li.dim .check { color: var(--border); }
.btn-plan {
  display: block; text-align: center; padding: 12px;
  border-radius: 8px; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; border: none; transition: all 0.2s;
}
.btn-plan-primary { background: var(--cyan); color: #000; }
.btn-plan-primary:hover { opacity: 0.88; text-decoration: none; }
.btn-plan-outline { background: transparent; color: var(--white); border: 1px solid var(--border); }
.btn-plan-outline:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; }

/* ========== FAQ ========== */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; padding: 20px 24px;
  background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--white); font-size: 0.97rem; font-weight: 600; gap: 16px;
  transition: color 0.2s;
}
.faq-q:hover { color: var(--cyan); }
.faq-arrow { transition: transform 0.3s; color: var(--muted); flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--cyan); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s;
  color: var(--muted); font-size: 0.9rem; padding: 0 24px;
}
.faq-item.open .faq-a { max-height: 300px; padding: 0 24px 20px; }

/* ========== CTA SECTION ========== */
#cta {
  background: linear-gradient(135deg, rgba(34,211,238,0.08) 0%, rgba(52,211,153,0.05) 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  text-align: center;
}
.cta-inner { max-width: 600px; margin: 0 auto; }
.cta-inner h2 { margin-bottom: 16px; }
.cta-inner p { color: var(--muted); margin-bottom: 36px; }
.beta-form { display: flex; gap: 12px; max-width: 440px; margin: 0 auto 20px; }
.beta-input {
  flex: 1; padding: 13px 16px; border-radius: 8px;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--white); font-size: 0.95rem; outline: none; transition: border-color 0.2s;
}
.beta-input:focus { border-color: var(--cyan); }
.beta-input::placeholder { color: var(--muted); }
.btn-submit { padding: 13px 24px; white-space: nowrap; }
.form-note { font-size: 0.8rem; color: var(--muted); }
.form-success { display: none; color: var(--green); font-weight: 600; }

/* ========== FOOTER ========== */
footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
}
.footer-brand { max-width: 280px; }
.footer-brand .logo { margin-bottom: 12px; font-size: 1rem; }
.footer-brand p { font-size: 0.85rem; color: var(--muted); }
.footer-links { display: flex; gap: 48px; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 0.88rem; color: var(--muted); margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--muted); }

/* ========== UTILS ========== */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2);
  color: var(--green); font-size: 0.75rem; font-weight: 600;
  padding: 4px 10px; border-radius: 100px;
}
.uptime-tag {
  background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.25);
  color: var(--green);
}
.compatible {
  margin-top: 20px; display: flex; align-items: center; gap: 12px;
  font-size: 0.85rem; color: var(--muted);
}
.compatible-logo {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 12px; font-size: 0.78rem; color: var(--text); font-weight: 500;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero-grid, .problem-grid { grid-template-columns: 1fr; }
  .pillars-grid, .pricing-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }
  .network-stats { grid-template-columns: repeat(2, 1fr); }
  .map-wrapper { display: none; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
}
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: fixed; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 20px 24px; gap: 16px;
  }
  .nav-toggle { display: flex; }
  .beta-form { flex-direction: column; }
  .network-stats { grid-template-columns: 1fr 1fr; }
  .footer-links { flex-direction: column; gap: 24px; }
  .footer-inner { flex-direction: column; }
}
