@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #FFFFFF;
  --surface: #F9FAFB;
  --primary: #E63946;
  --primary-dark: #C1121F;
  --primary-light: #FFF5F5;
  --secondary: #2563EB;
  --success: #10B981;
  --error: #EF4444;
  --text: #111827;
  --muted: #6B7280;
  --border: #E5E7EB;
  --radius-card: 12px;
  --radius-input: 8px;
  --radius-badge: 4px;
  --max-width: 800px;
  --header-height: 60px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.header-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.site-nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-input);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--primary); background: var(--primary-light); }

/* ── Trust bar ── */
.trust-bar {
  background: #F0FDF4;
  border-bottom: 1px solid #BBF7D0;
  padding: 8px 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: #166534;
  font-weight: 500;
}

/* ── Layout ── */
main { flex: 1; }

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

.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Page header ── */
.page-header {
  text-align: center;
  padding: 40px 0 28px;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 10px;
}
.page-header p {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-input);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230,57,70,0.3);
}
.btn-primary:active { transform: translateY(0); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  padding: 7px 14px;
  font-size: 0.875rem;
}
.btn-ghost:hover { background: var(--primary-light); }

.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 15px 28px; font-size: 1.0625rem; width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Cards ── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-badge);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}
.badge-red   { background: #FEE2E2; color: #991B1B; }
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-blue  { background: #DBEAFE; color: #1E40AF; }
.badge-gray  { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.badge-amber { background: #FEF3C7; color: #92400E; }

/* ── Trust pills ── */
.trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

/* ── Ad slots ── */
.ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 8px;
}
.ad-slot-leaderboard { min-height: 90px; max-width: 728px; margin: 16px auto; }
.ad-slot-rectangle   { min-height: 280px; max-width: 336px; margin: 20px auto; }

/* ── Info / Error / Warning boxes ── */
.info-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-input);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: #1E40AF;
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.info-box-icon { flex-shrink: 0; }

.error-box {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-input);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: #991B1B;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.warning-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-input);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: #92400E;
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

/* ── Footer ── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 64px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

.footer-section h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.8125rem; color: var(--muted); }
.footer-privacy-note {
  font-size: 0.8125rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── SEO content ── */
.seo-content {
  border-top: 1px solid var(--border);
  padding-top: 48px;
  margin-top: 48px;
  padding-bottom: 16px;
}
.seo-section { margin-bottom: 40px; }
.seo-content h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.seo-content p  { font-size: 0.9375rem; color: #374151; margin-bottom: 14px; line-height: 1.7; }
.seo-content ol, .seo-content ul { padding-left: 20px; margin-bottom: 14px; }
.seo-content li { font-size: 0.9375rem; color: #374151; margin-bottom: 6px; line-height: 1.6; }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.faq-question {
  width: 100%;
  padding: 16px 20px;
  text-align: left;
  background: var(--bg);
  border: none;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.15s;
}
.faq-question:hover { background: var(--surface); }
.faq-chevron { transition: transform 0.2s; flex-shrink: 0; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 20px 16px;
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* ── Homepage hero ── */
.hero {
  text-align: center;
  padding: 64px 24px 52px;
  background: linear-gradient(180deg, #FFF5F5 0%, #FFFFFF 60%);
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero p {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 24px;
}

/* ── Featured tool block ── */
.featured-tool {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-card);
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.featured-tool-text h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }
.featured-tool-text p  { font-size: 0.9375rem; color: var(--muted); max-width: 480px; }

/* ── Tool grid ── */
.tools-section { padding-bottom: 56px; }
.tools-section-title { font-size: 1.375rem; font-weight: 600; margin-bottom: 20px; color: var(--text); }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.tool-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-card h3 { font-size: 1.0625rem; font-weight: 600; }
.tool-card p  { font-size: 0.875rem; color: var(--muted); flex: 1; }
.tool-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.popular-badge { position: absolute; top: 12px; right: 12px; }

/* ── Prose (about/privacy) ── */
.prose { font-size: 0.9375rem; color: #374151; line-height: 1.7; }
.prose h2 { font-size: 1.25rem; font-weight: 600; color: var(--text); margin: 32px 0 12px; }
.prose h3 { font-size: 1.0625rem; font-weight: 600; color: var(--text); margin: 24px 0 10px; }
.prose p  { margin-bottom: 16px; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 16px; }
.prose li { margin-bottom: 8px; }
.prose a  { color: var(--primary); text-decoration: underline; }

/* ── Contact form ── */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group   { display: flex; flex-direction: column; gap: 6px; }
.form-label   { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}
.form-textarea { resize: vertical; min-height: 140px; }

/* ── Utilities ── */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1       { font-size: 1.875rem; }
  .hero p        { font-size: 1rem; }
  .page-header h1 { font-size: 1.625rem; }
  .tools-grid    { grid-template-columns: 1fr; }
  .featured-tool { flex-direction: column; text-align: center; }
  .featured-tool-text p { margin: 0 auto; }
  .footer-grid   { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .trust-badges  { gap: 8px; }
  .trust-pill    { font-size: 0.8125rem; padding: 5px 12px; }
  .nav-link      { padding: 6px 8px; font-size: 0.875rem; }
  .header-inner  { padding: 0 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero       { padding: 40px 16px 32px; }
  .hero h1   { font-size: 1.5rem; }
  .featured-tool { padding: 20px; }
  .site-footer { padding: 32px 0; margin-top: 40px; }
}
