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

:root {
  --bg: #080a0d;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(255, 255, 255, 0.18);
  --text: #e8eaed;
  --text-muted: #6b7280;
  --text-dim: #374151;
  --accent: #7dd3fc;
  --accent-dim: rgba(125, 211, 252, 0.15);
  --heading: #ffffff;
  --install-bg: rgba(0, 0, 0, 0.35);
  --install-text: #9ca3af;
  --install-code: #d1d5db;
  --gradient-1: rgba(125, 211, 252, 0.06);
  --gradient-2: rgba(99, 102, 241, 0.04);
  --toggle-bg: rgba(255, 255, 255, 0.06);
  --toggle-bg-hover: rgba(255, 255, 255, 0.11);
  --toggle-border: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
  --bg: #f2f5f9;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --border: rgba(0, 0, 0, 0.08);
  --border-accent: rgba(0, 0, 0, 0.16);
  --text: #1a2233;
  --text-muted: #4b5563;
  --text-dim: #9ca3af;
  --accent: #0284c7;
  --accent-dim: rgba(2, 132, 199, 0.1);
  --heading: #111827;
  --install-bg: rgba(0, 0, 0, 0.05);
  --install-text: #9ca3af;
  --install-code: #374151;
  --gradient-1: rgba(125, 211, 252, 0.18);
  --gradient-2: rgba(99, 102, 241, 0.08);
  --toggle-bg: rgba(0, 0, 0, 0.05);
  --toggle-bg-hover: rgba(0, 0, 0, 0.09);
  --toggle-border: rgba(0, 0, 0, 0.1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--gradient-1), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, var(--gradient-2), transparent);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s, color 0.2s;
}

main {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

/* Theme toggle */

.theme-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--toggle-bg);
  border: 1px solid var(--toggle-border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  padding: 0;
}

.theme-toggle:hover {
  background: var(--toggle-bg-hover);
  border-color: var(--border-accent);
  color: var(--text);
}

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Show sun in dark mode (click → go light), moon in light mode (click → go dark) */
.icon-moon { display: none; }
.icon-sun  { display: block; }

[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: none; }

/* Brand header */

.brand {
  margin-bottom: 5rem;
}

.brand-name {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin-bottom: 1.25rem;
  line-height: 1.1;
}

.brand-name span {
  background: linear-gradient(135deg, #e0f2fe 0%, var(--accent) 60%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-statement {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-muted);
  /* max-width: 480px; */
}

/* Products */

.products-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.products {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  transition: background 0.2s, border-color 0.2s;
}

.product:hover {
  background: var(--surface-hover);
  border-color: var(--border-accent);
}

.product-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.product-name {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.product-type {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

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

.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(125, 211, 252, 0.12);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.link:hover {
  background: rgba(125, 211, 252, 0.22);
  border-color: rgba(125, 211, 252, 0.3);
}

[data-theme="light"] .link {
  border-color: rgba(2, 132, 199, 0.15);
}

[data-theme="light"] .link:hover {
  background: rgba(2, 132, 199, 0.18);
  border-color: rgba(2, 132, 199, 0.3);
}

.link-secondary {
  color: var(--text-muted);
  background: transparent;
  border-color: var(--border);
}

.link-secondary:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-accent);
}

/* Install snippet */

.install {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--install-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4375rem 0.75rem;
  font-family: "SF Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: 0.75rem;
  color: var(--install-text);
  white-space: nowrap;
  overflow-x: auto;
  max-width: 100%;
}

.install .prompt {
  color: var(--text-dim);
  user-select: none;
  flex-shrink: 0;
}

.install code {
  color: var(--install-code);
}

/* Footer */

footer {
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin-bottom: 1rem;
}

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

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

.footer-copy {
  color: var(--text-dim);
  font-size: 0.8125rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  main {
    padding: 4rem 1.25rem 3rem;
  }

  .product {
    padding: 1.5rem;
  }

  .install {
    font-size: 0.6875rem;
  }
}
