/* ICAS - Institute for Cognitive Assessment Standards
   Design System: Institutional, authoritative, restrained */

:root {
  /* Primary palette */
  --navy: #1a2744;
  --navy-light: #243352;
  --navy-dark: #111b30;
  --slate: #475569;
  --slate-light: #64748b;
  --slate-muted: #94a3b8;

  /* Backgrounds */
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #f1f5f9;
  --bg-navy: #1a2744;

  /* Borders */
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Text */
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;

  /* Accent */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --gold: #b45309;
  --gold-light: #fef3c7;
  --green: #15803d;
  --green-light: #dcfce7;
  --red: #dc2626;
  --red-light: #fee2e2;

  /* Typography */
  --font-heading: Georgia, 'Times New Roman', 'Noto Serif', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;

  /* Spacing */
  --max-width: 1200px;
  --content-width: 800px;
  --nav-height: 72px;

  /* Misc */
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --transition: 150ms ease;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.875rem; letter-spacing: -0.01em; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p + p { margin-top: 1.25em; }

/* ===== NAVIGATION ===== */
.site-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.nav-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.875rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
  background: var(--bg-muted);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--navy);
}

.nav-toggle svg { display: block; }

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1.5rem 1rem;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 0.625rem 0.875rem;
    width: 100%;
  }
}

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section--muted {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section--navy {
  background: var(--bg-navy);
  color: var(--text-inverse);
}

.section--navy h2,
.section--navy h3 {
  color: var(--text-inverse);
}

/* ===== HERO ===== */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero h1 {
  max-width: 720px;
  margin: 0 auto 1.25rem;
}

.hero .lead {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn--primary {
  background: var(--navy);
  color: var(--text-inverse);
  border-color: var(--navy);
}

.btn--primary:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
  color: var(--text-inverse);
}

.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}

.btn--outline:hover {
  background: var(--bg-subtle);
  border-color: var(--slate-muted);
}

/* ===== CARDS ===== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ===== CRITERIA TABLE ===== */
.criteria-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.criteria-table th,
.criteria-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.criteria-table thead th {
  background: var(--bg-subtle);
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--navy);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
}

.criteria-table tbody tr:hover {
  background: var(--bg-subtle);
}

.criteria-table .weight {
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

/* ===== SCORE BADGES ===== */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.125rem;
  font-family: var(--font-body);
}

.score-badge--high {
  background: var(--green-light);
  color: var(--green);
}

.score-badge--mid {
  background: var(--gold-light);
  color: var(--gold);
}

.score-badge--low {
  background: var(--red-light);
  color: var(--red);
}

/* Overall score - larger */
.score-overall {
  width: 80px;
  height: 80px;
  font-size: 1.5rem;
  border-radius: 50%;
  border: 3px solid;
}

.score-overall--high { border-color: var(--green); }
.score-overall--mid { border-color: var(--gold); }
.score-overall--low { border-color: var(--red); }

/* ===== PLATFORM CARDS ===== */
.platform-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}

.platform-card:hover {
  box-shadow: var(--shadow-md);
  color: inherit;
}

.platform-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.platform-card .platform-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.platform-card .platform-score {
  text-align: center;
}

.platform-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 600px) {
  .platform-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ===== BADGE PREVIEW ===== */
.badge-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--navy);
  text-decoration: none;
  transition: box-shadow var(--transition);
}

.badge-preview:hover {
  box-shadow: var(--shadow);
  color: var(--navy);
}

.badge-preview .badge-icon {
  width: 28px;
  height: 28px;
  background: var(--navy);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-preview .badge-icon svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.badge-snippet {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
}

.badge-snippet code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text);
  white-space: pre;
  line-height: 1.6;
}

/* ===== PROSE CONTENT ===== */
.prose {
  max-width: var(--content-width);
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose blockquote {
  border-left: 3px solid var(--navy);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-style: italic;
}

/* ===== TEAM / ABOUT ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.team-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.team-card .avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-muted);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-muted);
  font-size: 1.5rem;
  font-family: var(--font-heading);
}

.team-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.team-card .role {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.team-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.placeholder-note {
  display: inline-block;
  background: var(--gold-light);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== CONTACT FORM ===== */
.contact-form {
  max-width: 560px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-navy);
  color: var(--slate-muted);
  padding: 3rem 0 2rem;
  font-size: 0.875rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-inverse);
  margin-bottom: 0.75rem;
}

.footer-desc {
  line-height: 1.6;
  max-width: 360px;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-light);
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--slate-muted);
  transition: color var(--transition);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-inverse);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.875rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header .lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.65;
}

/* ===== METHODOLOGY SPECIFICS ===== */
.criterion-detail {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-light);
}

.criterion-detail:last-child {
  border-bottom: none;
}

.criterion-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.criterion-header h3 {
  flex: 1;
}

.criterion-weight {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--bg-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  white-space: nowrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 3rem 0; }
  .criteria-table { font-size: 0.8125rem; }
  .criteria-table th, .criteria-table td { padding: 0.625rem 0.5rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  .container, .container--narrow { padding: 0 1rem; }
  .nav-inner { padding: 0 1rem; }
}
