:root {
  --bg: #f9fafb;
  --text: #000000;
  --text-muted: #666666;
  --border: #e5e5e5;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 680px;
  --spacing: 24px;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --text: #ffffff;
  --text-muted: #888888;
  --border: #222222;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, color 0.2s;
}

/* Header — logo left, nav right */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px var(--spacing);
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

.wordmark {
  display: inline-block;
  text-decoration: none;
}

.logo {
  height: 28px;
  width: auto;
  transition: filter 0.2s;
}

.logo {
  filter: invert(1);
}

[data-theme="dark"] .logo {
  filter: none;
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Theme toggle */

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 16px;
  height: 16px;
}

.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }

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

/* Main */

main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* Intro */

.intro {
  padding: 80px 0 64px;
}

.intro h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.intro p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
}

/* Products */

.products {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  transition: border-color 0.2s;
}

.product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.15s ease, border-color 0.2s;
}

.product:hover {
  opacity: 0.7;
}

.product h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.product p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer */

footer {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 48px var(--spacing);
}

.philosophy {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-bottom: 32px;
  transition: border-color 0.2s;
}

.philosophy p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  font-style: italic;
  max-width: 480px;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-text {
  font-size: 13px;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #888888;
  flex-shrink: 0;
  transition: background 0.3s;
}

.status-dot.up {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e, 0 0 12px rgba(34, 197, 94, 0.4);
  animation: pulse-green 5s ease-in-out infinite;
}

.status-dot.down {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444, 0 0 12px rgba(239, 68, 68, 0.4);
  animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #22c55e, 0 0 12px rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 3px #22c55e, 0 0 6px rgba(34, 197, 94, 0.2); }
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #ef4444, 0 0 12px rgba(239, 68, 68, 0.4); }
  50% { opacity: 0.4; box-shadow: 0 0 2px #ef4444, 0 0 4px rgba(239, 68, 68, 0.2); }
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.social a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

@media (max-width: 480px) {
  .status-text {
    display: none;
  }
}
