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

:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-accent: #4f46e5;
  --color-accent-hover: #4338ca;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --radius: 12px;
  --max-width: 960px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
}

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

/* Nav */
nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 1.25rem;
  height: 52px;
  display: flex;
  align-items: center;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-accent);
  text-decoration: none;
}

/* Header */
header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 3.5rem 1rem 2.5rem;
  text-align: center;
}

header h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.tagline {
  color: var(--color-muted);
  margin-top: 0.6rem;
  font-size: 1.05rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Main */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

/* Section label */
.tools-grid h2 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

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

/* Tool card */
.tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.tool-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.12);
  transform: translateY(-2px);
}

.tool-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.tool-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tool-card__desc {
  color: var(--color-muted);
  font-size: 0.875rem;
  flex: 1;
  line-height: 1.55;
}

.tool-card__cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 0.5rem;
}

/* About section */
.about-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.about-section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.about-section p {
  color: var(--color-muted);
  font-size: 0.9rem;
  max-width: 600px;
}

/* Ads */
.ad-unit { margin: 2rem 0; min-height: 90px; }

/* Footer */
footer {
  text-align: center;
  padding: 1.75rem 1rem;
  color: var(--color-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

@media (prefers-reduced-motion: reduce) {
  .tool-card { transition: none; }
  .tool-card:hover { transform: none; }
}
