/* === Vestibule — Clean Wirecutter-style Design === */

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

:root {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-secondary: #64748b;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-bg: #ffffff;
  --color-bg-light: #f8fafc;
  --max-width: 1200px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-bg);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Navigation === */
.nav {
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
}

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

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 15px;
  transition: color 0.2s, border-color 0.2s;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

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

.nav-links a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* === Buttons === */
.btn-primary {
  background: var(--color-primary);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}

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

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  border-color: var(--color-text-muted);
  background: var(--color-bg-light);
}

.btn-large {
  padding: 14px 28px;
  font-size: 16px;
}

/* === Hero Section === */
.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Categories Grid === */
.categories {
  padding: 80px 0;
  background: var(--color-bg-light);
}

.categories h2 {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.category-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.2s, transform 0.2s;
}

.category-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.category-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.category-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* === Featured Tools === */
.featured {
  padding: 80px 0;
}

.featured h2 {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tool-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
  transition: box-shadow 0.2s;
}

.tool-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tool-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tool-category {
  font-size: 13px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.tool-description {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.tool-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--color-text-muted);
}

.tool-rating {
  color: var(--color-text);
  font-weight: 600;
}

.loading {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px;
}

/* === Newsletter === */
.newsletter {
  padding: 80px 0;
  background: var(--color-bg-light);
  text-align: center;
}

.newsletter h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.newsletter > p {
  font-size: 18px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto 16px;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 16px;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.newsletter-message {
  font-size: 15px;
  margin-top: 16px;
  min-height: 24px;
}

.newsletter-message.success {
  color: #059669;
}

.newsletter-message.error {
  color: #dc2626;
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 60px 0 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 15px;
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-links h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 8px;
  transition: color 0.2s;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 14px;
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .categories h2,
  .featured h2,
  .newsletter h2 {
    font-size: 28px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .nav-links {
    gap: 16px;
    font-size: 14px;
  }

  .nav-links .btn-primary {
    padding: 8px 16px;
    font-size: 14px;
  }
}
