/* James Mhoon | Practical Tools - Clean, accessible styles */

:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --text: #1a1d23;
  --text-muted: #5a6270;
  --border: #e2e6ee;
  --accent: #2c5aa0;
  --accent-hover: #1e4178;
  --badge-bg: #e8f0fe;
  --badge-text: #1e4a8c;
  --category-1: #eef4ff;
  --category-2: #f0f7f0;
  --category-3: #fdf4ef;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --radius: 12px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo span {
  font-weight: 500;
  color: var(--text-muted);
}

/* Main content */
main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  width: 100%;
}

/* Hero */
.hero {
  margin-bottom: 3.5rem;
  max-width: 720px;
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Categories */
.category {
  margin-bottom: 3.25rem;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.category-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.category-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--border);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: #c5cdd9;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1.25rem;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  transition: background 0.15s ease;
  border: none;
  cursor: pointer;
  width: fit-content;
}

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

.card-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Subtle category tinting */
.category-counseling .card {
  border-top: 3px solid #7ba3e0;
}

.category-family .card {
  border-top: 3px solid #7cb87c;
}

.category-special .card {
  border-top: 3px solid #e0a07b;
}

/* Footer */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
}

footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.45rem;
  }

  .hero p {
    font-size: 1.05rem;
  }

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

  main {
    padding: 2rem 1.15rem 3rem;
  }
}
