/* ============================================
   AIMR — American Institute for Medical Research
   Static site styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1f2937;
  background: #fff;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #381d92; text-decoration: none; transition: color 0.2s; }
a:hover { color: #2a1570; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; color: #111; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }
hr { border: none; border-top: 1px solid #e5e7eb; margin: 2.5rem 0; }
blockquote { border-left: 3px solid #381d92; padding: 1rem 1.5rem; margin: 1.5rem 0; background: #f9fafb; color: #374151; }
strong { font-weight: 600; }

/* --- Layout --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 780px; margin: 0 auto; padding: 0 1.5rem; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.site-logo {
  font-size: 1.15rem; font-weight: 700; color: #111;
  display: flex; align-items: center; gap: 0.6rem;
  letter-spacing: -0.01em;
}
.site-logo img { height: 36px; width: auto; }
.site-logo span { white-space: nowrap; }
.site-nav { display: flex; gap: 2rem; align-items: center; }
.site-nav a {
  font-size: 0.9rem; font-weight: 500; color: #4b5563;
  transition: color 0.2s; letter-spacing: 0.01em;
}
.site-nav a:hover, .site-nav a.active { color: #381d92; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle svg { width: 24px; height: 24px; stroke: #111; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #0f0a1e 0%, #1a1145 40%, #2d1b69 100%);
  color: #fff;
  padding: 6rem 0 5rem;
  text-align: center;
}
.hero h1 {
  color: #fff; font-size: 2.8rem; max-width: 800px; margin: 0 auto 1.5rem;
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
}
.hero p {
  color: rgba(255,255,255,0.8); font-size: 1.15rem; max-width: 600px;
  margin: 0 auto; line-height: 1.7;
}

/* --- Sections --- */
.section { padding: 5rem 0; }
.section--alt { background: #f9fafb; }
.section--dark { background: #0f0a1e; color: #fff; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { color: #6b7280; max-width: 600px; margin: 0.75rem auto 0; font-size: 1.05rem; }

/* --- Columns --- */
.cols { display: grid; gap: 1.5rem; }
.cols--2 { grid-template-columns: repeat(2, 1fr); }
.cols--3 { grid-template-columns: repeat(3, 1fr); }

/* --- Cards --- */
.card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 2rem; transition: box-shadow 0.3s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px);
}
.card a { text-decoration: none; color: inherit; display: block; }
.card-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.card-title { font-size: 1.25rem; margin-bottom: 0.5rem; color: #111; }
.card-badge {
  display: inline-block; background: #f0f4ff; color: #381d92;
  font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.65rem;
  border-radius: 1rem; text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.card-text { color: #4b5563; font-size: 0.92rem; line-height: 1.7; margin-bottom: 1rem; }
.card-link { color: #381d92; font-weight: 600; font-size: 0.9rem; }
.card:hover .card-link { text-decoration: underline; }

/* --- Pillars (Mission/Vision/Values) --- */
.pillar { border: 1px solid #e5e7eb; border-radius: 10px; padding: 1.75rem; }
.pillar h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.pillar p, .pillar ul { color: #4b5563; font-size: 0.9rem; }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 0.75rem 2rem;
  border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: all 0.2s; border: none;
  text-decoration: none;
}
.btn--primary { background: #381d92; color: #fff; }
.btn--primary:hover { background: #2a1570; color: #fff; transform: translateY(-1px); }
.btn--outline { background: transparent; color: #381d92; border: 2px solid #381d92; }
.btn--outline:hover { background: #381d92; color: #fff; }
.btn--sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }

/* --- Article List (Notes) --- */
.article-item {
  padding: 1.75rem 0; border-bottom: 1px solid #e5e7eb;
}
.article-item:last-child { border-bottom: none; }
.article-date { font-size: 0.8rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.35rem; }
.article-title { font-size: 1.2rem; margin-bottom: 0.4rem; }
.article-title a { color: #111; }
.article-title a:hover { color: #381d92; }
.article-excerpt { color: #6b7280; font-size: 0.92rem; line-height: 1.6; }

/* --- Article (single) --- */
.article-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e5e7eb; }
.article-header h1 { font-size: 2.2rem; margin-bottom: 0.75rem; }
.article-meta { color: #9ca3af; font-size: 0.85rem; }
.article-body h2 { margin: 2rem 0 0.75rem; font-size: 1.5rem; }
.article-body h3 { margin: 1.75rem 0 0.6rem; font-size: 1.2rem; }
.article-body p { margin-bottom: 1.1rem; }
.article-body ul, .article-body ol { margin-bottom: 1.2rem; }
.article-body a { text-decoration: underline; text-decoration-color: rgba(56,29,146,0.3); text-underline-offset: 2px; }
.article-body a:hover { text-decoration-color: #381d92; }

/* --- Forms --- */
.form-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: end; }
.form-field { flex: 1; min-width: 180px; }
.form-field--captcha { flex: 0 0 auto; min-width: 130px; max-width: 160px; }
.form-label {
  display: block; font-size: 0.75rem; font-weight: 600; color: #6b7280;
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
.form-input {
  width: 100%; padding: 0.65rem 0.85rem; border: 1px solid #d1d5db;
  border-radius: 8px; font-size: 0.95rem; font-family: inherit; color: #1f2937;
  background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}
.form-input:focus { outline: none; border-color: #381d92; box-shadow: 0 0 0 3px rgba(56,29,146,0.1); }
.form-input::-webkit-inner-spin-button,
.form-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
textarea.form-input { resize: vertical; min-height: 120px; }
.form-success {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #86efac; border-radius: 12px;
  padding: 1.5rem; text-align: center; color: #065f46;
}
.hp { position: absolute; left: -9999px; }

/* --- Subscribe Block --- */
.subscribe-block {
  background: #f9fafb; border-radius: 12px; padding: 2.5rem;
  text-align: center; margin-top: 3rem;
}
.subscribe-block h3 { margin-bottom: 0.4rem; }
.subscribe-block > p { color: #6b7280; margin-bottom: 1.25rem; }

/* --- Footer --- */
.site-footer {
  background: #0f0a1e; color: rgba(255,255,255,0.6);
  padding: 2.5rem 0; font-size: 0.85rem;
}
.site-footer .container {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: #fff; }

/* --- Tool Landing --- */
.tool-hero { padding: 4rem 0; }
.tool-hero .container { display: flex; align-items: center; gap: 3rem; }
.tool-hero-content { flex: 1; }
.tool-hero-visual { flex: 0 0 200px; text-align: center; font-size: 8rem; line-height: 1; }
.tool-badge-lg {
  display: inline-block; background: #f0f4ff; color: #381d92;
  font-size: 0.75rem; font-weight: 600; padding: 0.3rem 0.85rem;
  border-radius: 1rem; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature-card {
  border: 1px solid #e5e7eb; border-radius: 10px; padding: 1.5rem;
}
.feature-card h4 { margin-bottom: 0.4rem; }
.feature-card p { color: #6b7280; font-size: 0.88rem; margin: 0; }

/* --- Pagination --- */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2.5rem; }
.pagination a, .pagination span {
  display: inline-block; padding: 0.5rem 1rem; border: 1px solid #e5e7eb;
  border-radius: 6px; font-size: 0.85rem; color: #4b5563;
}
.pagination .current { background: #381d92; color: #fff; border-color: #381d92; }
.pagination a:hover { border-color: #381d92; color: #381d92; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero { padding: 4rem 0 3rem; }
  .hero h1 { font-size: 2rem; }
  .cols--2, .cols--3 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .tool-hero .container { flex-direction: column; text-align: center; }
  .tool-hero-visual { font-size: 5rem; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e5e7eb; padding: 1.5rem; gap: 1rem; }
  .nav-toggle { display: block; }
  .form-row { flex-direction: column; }
  .form-field--captcha { max-width: 100%; }
  .site-footer .container { flex-direction: column; text-align: center; }
  h1 { font-size: 2rem; }
}

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