*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0e17;
  --surface: #111827;
  --surface2: #1a2332;
  --border: #2a3548;
  --text: #e8edf5;
  --muted: #8896ab;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --success: #22c55e;
  --warning: #f59e0b;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.nav { display: flex; gap: 1.5rem; }
.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav a:hover, .nav a.active { color: var(--text); }

/* Hero */
.hero {
  padding: 3rem 0 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-sub {
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* Speed test card */
.speedtest-section { padding: 1rem 0 3rem; }

.speedtest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.gauge-wrap { position: relative; width: 220px; margin: 0 auto 1.5rem; }

.gauge { width: 100%; height: auto; }

.gauge-bg { stroke: var(--surface2); }

.gauge-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 0.4s ease, stroke 0.3s;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.gauge-value {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.gauge-value span:first-child {
  font-size: 2.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.unit { display: block; font-size: 0.85rem; color: var(--muted); }

.gauge-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric {
  background: var(--surface2);
  border-radius: 10px;
  padding: 1rem 0.5rem;
}

.metric-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.metric-unit { font-size: 0.75rem; color: var(--muted); }

.btn-start {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-start:hover { background: #2563eb; transform: scale(1.03); }
.btn-start:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.status {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.info-card h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.info-card p { font-size: 0.85rem; color: var(--muted); }

/* Features */
.features { padding: 2rem 0 3rem; }

.features h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature {
  text-align: center;
  padding: 1.5rem;
}

.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.feature p { font-size: 0.85rem; color: var(--muted); }

/* Content pages */
.page-header {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-header h1 { font-size: 2rem; }
.page-header p { color: var(--muted); margin-top: 0.5rem; }

.content {
  padding-bottom: 3rem;
  max-width: 720px;
  margin: 0 auto;
}

.content h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.content p, .content li {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.content ul { padding-left: 1.5rem; margin-bottom: 1rem; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-form label {
  font-size: 0.85rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.contact-form textarea { min-height: 120px; resize: vertical; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner nav { display: flex; gap: 1.25rem; }
.footer-inner nav a { color: var(--muted); text-decoration: none; }
.footer-inner nav a:hover { color: var(--text); }

@media (max-width: 768px) {
  .nav { gap: 0.75rem; font-size: 0.8rem; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .info-grid, .features-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
}
