:root {
  --bg: #0a0a0b;
  --bg-raised: #111113;
  --text: #e4e4e7;
  --text-secondary: #a1a1aa;
  --muted: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-subtle: rgba(59, 130, 246, 0.1);
  --green: #22c55e;
  --green-subtle: rgba(34, 197, 94, 0.1);
  --card-bg: #18181b;
  --border: #27272a;
  --border-subtle: #1e1e21;
  --radius: 0.75rem;
  --max-w: 1120px;
}

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

html { overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-width: 0;
}

/* --- Nav --- */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  line-height: 0;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.25rem;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--muted); }

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 0.9375rem;
}

/* --- Sections --- */

section {
  padding: 6rem 2rem;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  overflow: hidden;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 560px;
}

.section-header-center {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header-center .section-subtitle {
  margin: 0 auto;
}

/* --- Hero --- */

.hero {
  padding: 10rem 2rem 6rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green-subtle);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--green);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 1rem;
  border-radius: 2rem;
  margin-bottom: 2rem;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 1.5rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero .subtitle {
  font-size: 1.1875rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 5rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* --- Code block --- */

.code-section {
  background: var(--bg-raised);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.code-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.code-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.code-body {
  padding: 1.25rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-secondary);
}

.code-body .str { color: #34d399; }
.code-body .cm { color: #52525b; }

/* --- Product cards --- */

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  transition: border-color 0.15s;
}

.product-card:hover { border-color: var(--muted); }

.product-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.product-icon svg {
  width: 22px;
  height: 22px;
}

.product-icon-email {
  background: var(--accent-subtle);
  color: var(--accent);
}

.product-icon-uptime {
  background: var(--green-subtle);
  color: var(--green);
}

.product-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.product-desc {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.product-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.product-highlights li {
  padding-left: 1.25rem;
  position: relative;
}

.product-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

/* --- Features grid --- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.15s;
}

.feature-card:hover { border-color: var(--muted); }

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-subtle);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.feature-icon svg {
  width: 18px;
  height: 18px;
}

.feature-icon-green {
  background: var(--green-subtle);
  color: var(--green);
}

.feature-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.6;
}

/* --- How it works --- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: step;
}

.step {
  counter-increment: step;
  position: relative;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.steps-vertical {
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* --- Extension callout --- */

.extension-section {
  background: var(--bg-raised);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.extension-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.extension-features {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.extension-feature {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.extension-feature-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--green);
  margin-top: 0.125rem;
}

.extension-feature h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.extension-feature p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

.extension-preview-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.extension-preview {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.extension-preview-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.extension-preview-row:last-child { border-bottom: none; }

.extension-preview-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.extension-preview-content {
  flex: 1;
  min-width: 0;
}

.extension-preview-subject {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.extension-preview-snippet {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.extension-preview-badge {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--green);
}

.extension-preview-time {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* --- Pricing --- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
}

.pricing-card-popular {
  border-color: var(--accent);
}

.pricing-popular-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.875rem;
  border-radius: 2rem;
  white-space: nowrap;
}

.pricing-tier {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-desc {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pricing-period {
  font-size: 0.875rem;
  color: var(--muted);
}

.pricing-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.pricing-category {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.625rem;
  padding-top: 0.25rem;
}

.pricing-card .btn + .pricing-category {
  margin-top: 0;
}

.pricing-features + .pricing-category {
  margin-top: 1.25rem;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.pricing-features li svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
}

.pricing-features li.highlight svg {
  color: var(--accent);
}

.pricing-annual {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* --- FAQ --- */

.faq-list {
  max-width: 680px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  padding: 1.25rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: inherit;
}

.faq-question:hover { color: var(--accent); }

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding-bottom: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  display: block;
}

/* --- Final CTA --- */

.final-cta {
  text-align: center;
  background: var(--bg-raised);
  border-top: 1px solid var(--border-subtle);
}

.section-inner-narrow {
  max-width: 640px;
}

.final-cta .section-title {
  max-width: 480px;
  margin: 0 auto 1rem;
}

.final-cta .section-subtitle {
  margin: 0 auto 2.5rem;
}

/* --- Footer --- */

footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text); }

/* --- Legal content (privacy, terms) --- */

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
  overflow-wrap: break-word;
}

.legal-content h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.legal-content .legal-updated {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.legal-content ul,
.legal-content ol {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.375rem;
}

.legal-content a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

.legal-content a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.legal-content strong {
  color: var(--text);
  font-weight: 600;
}

/* --- Monitor preview --- */

.monitor-preview {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.monitor-preview-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.monitor-preview-row:last-child { border-bottom: none; }

.monitor-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.monitor-status-up { background: var(--green); }
.monitor-status-down { background: #ef4444; }

.monitor-preview-content {
  flex: 1;
  min-width: 0;
}

.monitor-preview-name {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.monitor-preview-url {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.monitor-preview-uptime {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 3.5rem;
  text-align: right;
}

.monitor-preview-down .monitor-preview-uptime {
  color: #ef4444;
}

.monitor-preview-latency {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 3rem;
  text-align: right;
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.75rem 2rem;
    font-size: 0.9375rem;
  }
  .nav-links a:hover { background: var(--card-bg); }
  .nav-links .btn-secondary {
    margin: 0.5rem 2rem;
    text-align: center;
    width: auto;
  }
  .products-grid,
  .code-grid,
  .extension-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .hero-stats { gap: 2rem; }
  section { padding: 4rem 1.5rem; }
  .hero { padding: 8rem 1.5rem 4rem; }
  .legal-content { padding: 7rem 1.5rem 3rem; }

  .code-block { max-width: calc(100vw - 3rem); }
  .code-body { font-size: 0.7rem; padding: 1rem; }

  .product-card { padding: 1.75rem; }

  .extension-preview,
  .monitor-preview { padding: 1.25rem; }
  .extension-preview-row,
  .monitor-preview-row { gap: 0.625rem; }
  .extension-preview-badge { width: 1rem; height: 1rem; }

  .monitor-preview-uptime { min-width: 2.5rem; font-size: 0.75rem; }
  .monitor-preview-latency { min-width: 2rem; font-size: 0.6875rem; }

  .hero h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
  .hero .subtitle { font-size: 1rem; }

  .pricing-card { padding: 1.5rem; }

  .btn-lg { padding: 0.625rem 1.5rem; font-size: 0.875rem; }

  footer { padding: 2rem 1.5rem; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid .pricing-card:last-child {
    grid-column: 1 / -1;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
}
