/* main.css — dementiacarethailand.com
   WHY clinical design: Domain targets families making healthcare decisions.
   Clean, professional aesthetic builds trust. Avoids decorative elements
   that would undermine credibility for medical information.
   WHY NOT thaibelle CSS: That was a food blog design (pink accents, emoji
   brand marks, decorative borders). This is healthcare. */

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-muted: #f1f3f5;
  --accent: #2b6cb0;
  --accent-deep: #1a4971;
  --accent-soft: #ebf4ff;
  --text: #1a202c;
  --text-soft: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  color-scheme: light;
}

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

html {
  font-size: 16px;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* Layout */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.site-title a {
  color: inherit;
}

.site-nav a {
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* Hero */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.25;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--text-soft);
  margin: 0 0 1.5rem;
  max-width: 700px;
}

.hero-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Key takeaways */
.takeaways {
  padding: 2.5rem 0;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
}

.takeaways h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

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

.takeaway-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.takeaway-card h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: var(--accent-deep);
}

.takeaway-card p,
.takeaway-card ul {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin: 0;
}

.takeaway-card ul {
  padding-left: 1.25rem;
}

/* Content sections */
.content-section {
  padding: 2.5rem 0;
}

.content-section + .content-section {
  border-top: 1px solid var(--border);
}

.content-section h2 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}

.section-lead {
  color: var(--text-soft);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

/* Data artifact callout */
.data-callout {
  background: var(--accent-soft);
  border: 1px solid #bee3f8;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.data-callout a {
  font-weight: 600;
}

/* Ranking list */
.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rank-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 1rem;
  align-items: start;
  box-shadow: var(--shadow);
}

.rank-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  padding-top: 0.15rem;
}

.rank-main h3 {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

.rank-main h3 a {
  color: var(--text);
}

.rank-main h3 a:hover {
  color: var(--accent);
}

.rank-location {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.rank-meta {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin: 0 0 0.25rem;
}

.rank-highlight {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

.rank-score {
  text-align: center;
  min-width: 60px;
}

.score-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-deep);
  line-height: 1;
}

.score-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Methodology + signals lists */
.content-section ul {
  padding-left: 1.25rem;
}

.content-section li {
  margin-bottom: 0.5rem;
}

.content-section li strong {
  color: var(--text);
}

.content-section code {
  background: var(--surface-muted);
  padding: 0.15em 0.35em;
  border-radius: 3px;
  font-size: 0.85em;
}

/* FAQ section */
.faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.faq-list dt {
  font-weight: 600;
  margin: 1.25rem 0 0.25rem;
  font-size: 1.05rem;
}

.faq-list dt:first-child {
  margin-top: 0;
}

.faq-list dd {
  margin: 0 0 0.75rem;
  color: var(--text-soft);
}

/* Footer */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 2rem 0;
  margin-top: 3rem;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-inner a:hover {
  color: #fff;
}

.license {
  font-size: 0.8rem;
  opacity: 0.6;
}

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

  .rank-item {
    grid-template-columns: 2rem 1fr;
  }

  .rank-score {
    grid-column: 2;
    text-align: left;
  }

  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
  }

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