/* ── MedObvious — Complete Stylesheet ────────────────── */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --line: #dbe4ee;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --emerald: #059669;
  --rose: #e11d48;
  --amber: #d97706;
  --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 14px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 22px 60px rgba(15, 23, 42, 0.12);
  --radius: 20px;
  --radius-sm: 14px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 32%),
    radial-gradient(circle at bottom left, rgba(5, 150, 105, 0.06), transparent 26%),
    var(--bg);
  line-height: 1.65;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }

.container { width: min(var(--container), calc(100% - 2rem)); margin: 0 auto; }

/* ── NAV ──────────────────────────────────────────────── */
.site-header { padding-bottom: 2rem; }

.nav {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0;
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px);
}

.brand {
  font-family: Outfit, Inter, sans-serif;
  font-weight: 800; font-size: 1.45rem;
  text-decoration: none; letter-spacing: -0.03em;
}
.brand span { color: var(--primary); }

.nav-links { display: flex; gap: 1.2rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.96rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

.nav-toggle { display: none; border: 0; background: transparent; padding: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* ── HERO ─────────────────────────────────────────────── */
.hero {
  width: min(var(--container), calc(100% - 2rem));
  margin: 2rem auto 0;
  display: grid; grid-template-columns: 1.15fr 0.95fr; gap: 2.5rem; align-items: center;
}
.hero-copy { padding: 1rem 0; }

.eyebrow, .section-label {
  display: inline-block; margin: 0 0 0.9rem;
  font-size: 0.82rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary);
}

h1, h2, h3 { font-family: Outfit, Inter, sans-serif; letter-spacing: -0.04em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.8rem, 5vw, 5rem); }
h2 { font-size: clamp(2rem, 3vw, 3rem); margin-bottom: 0.9rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

.hero-subtitle { font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--muted); margin: 0.8rem 0 1rem; }
.hero-text { font-size: 1.05rem; max-width: 64ch; color: var(--muted); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.6rem 0 1.8rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border-radius: 999px; padding: 0.9rem 1.25rem;
  font-weight: 700; text-decoration: none; border: 1px solid transparent; font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #4f46e5); color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--line); }

.hero-stats {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem;
}
.hero-stats li {
  background: rgba(255,255,255,0.75); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.8rem 0.9rem;
  box-shadow: var(--shadow-sm);
}
.hero-stats strong { display: block; font-size: 1.15rem; font-family: Outfit, Inter, sans-serif; }
.hero-stats span { display: block; color: var(--muted); font-size: 0.85rem; }

/* ── SECTIONS ─────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-alt {
  background: rgba(255,255,255,0.55);
  border-top: 1px solid rgba(219, 228, 238, 0.8);
  border-bottom: 1px solid rgba(219, 228, 238, 0.8);
}

.section-heading { margin-bottom: 2.5rem; }
.section-heading.center { text-align: center; }
.section-heading.center p:last-child { max-width: 60ch; margin: 0 auto; color: var(--muted); }

.grid-two { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: start; }
.stack { display: grid; gap: 1rem; }

/* ── CARDS ────────────────────────────────────────────── */
.media-card, .figure-card, .leaderboard-card, .citation-box, .download-card,
.info-card, .feature-card, .metric-card, .insight-card, .tier-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

.info-card { padding: 1.25rem 1.3rem; }
.accent-blue { border-top: 4px solid var(--primary); }
.accent-green { border-top: 4px solid var(--emerald); }
.accent-rose { border-top: 4px solid var(--rose); }

.figure-card { overflow: hidden; padding: 1rem; margin-bottom: 1.5rem; }
.figure-card img { border-radius: 16px; }

/* ── FEATURE GRID ─────────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature-card { padding: 1.25rem; }
.feature-index {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 999px;
  background: var(--surface-2); color: var(--primary);
  font-size: 0.9rem; font-weight: 800; margin-bottom: 0.9rem;
}

/* ── VERTICAL TIERS ───────────────────────────────────── */
.vertical-tiers { display: flex; flex-direction: column; gap: 1.2rem; max-width: 900px; margin: 0 auto; }

.tier-row {
  display: flex; align-items: center; gap: 2rem;
  padding: 1.5rem 2rem; border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tier-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.tier-info { flex: 1; }
.tier-info h3 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.tier-info p { color: var(--text); margin: 0; opacity: 0.8; }
.tier-meta { display: block; margin-top: 0.6rem; font-size: 0.82rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.tier-img { width: 200px; flex-shrink: 0; }
.tier-img img { width: 100%; border-radius: 10px; box-shadow: var(--shadow-sm); }

/* ── METRICS ──────────────────────────────────────────── */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.metric-card { padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.metric-card strong { display: block; font-family: Outfit, Inter, sans-serif; font-size: 2rem; margin: 0.2rem 0 0.25rem; }
.metric-label { color: var(--muted); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.metric-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ── RESULTS TABLES ───────────────────────────────────── */
.table-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.table-tab {
  padding: 0.6rem 1.3rem; border-radius: 999px;
  font-weight: 700; font-size: 0.9rem;
  border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; transition: all 0.2s ease; color: var(--muted);
}
.table-tab:hover { border-color: var(--primary); color: var(--primary); }
.table-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.table-panel { display: none; }
.table-panel.active { display: block; }

.results-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; -webkit-overflow-scrolling: touch; }
.table-caption { color: var(--muted); font-size: 0.9rem; margin: 0 0 1rem; }

.data-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 0.9rem; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.data-table thead th {
  background: #0f172a; color: #e2e8f0;
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.8rem 0.65rem; text-align: center; white-space: nowrap;
  border-bottom: 2px solid #1e293b;
}
.data-table thead th:first-child { text-align: left; padding-left: 1rem; }
.data-table tbody td {
  padding: 0.65rem 0.65rem; text-align: center;
  border-bottom: 1px solid var(--line); color: var(--text);
  font-variant-numeric: tabular-nums;
}
.data-table tbody td:first-child { text-align: left; font-weight: 700; padding-left: 1rem; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(37, 99, 235, 0.04); }
.data-table .group-header td {
  background: var(--surface-2); font-weight: 800; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--primary); padding: 0.55rem 1rem; text-align: left;
}
.data-table .best { font-weight: 800; color: var(--primary-2); }
.data-table .human-baseline td {
  background: rgba(5, 150, 105, 0.08); font-weight: 700; border-top: 2px solid var(--emerald);
}
.data-table .human-baseline td:first-child { color: var(--emerald); font-style: italic; }

/* ── INSIGHT CARDS ────────────────────────────────────── */
.insights-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem; margin-top: 2.5rem;
}
.insight-v2 {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 1.3rem;
  box-shadow: var(--shadow-sm); border-top: 4px solid var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.insight-v2:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.insight-v2.warn { border-top-color: var(--rose); }
.insight-v2.good { border-top-color: var(--emerald); }
.insight-v2.amber { border-top-color: var(--amber); }
.insight-v2 h3 { font-size: 1rem; margin-bottom: 0.45rem; }
.insight-v2 p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ── TEASER SLIDER ────────────────────────────────────── */
.teaser-presentation {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; position: relative;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(0,0,0,0.05);
}
.slide {
  display: none; padding: 3rem 2.5rem; text-align: center;
  background: linear-gradient(to bottom right, #ffffff, #f8fafc);
  min-height: 460px;
}
.slide.active {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  animation: fadeIn 0.5s ease-out forwards;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.slide-content { max-width: 850px; margin: 0 auto; width: 100%; }
.slide-title { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 1rem; color: var(--text); }
.slide-text { font-size: 1.1rem; color: var(--muted); max-width: 650px; margin: 0 auto; line-height: 1.6; }

.slide-progress { position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: #f1f5f9; }
.progress-bar { height: 100%; background: var(--primary); width: 0%; }

.badge {
  display: inline-block; padding: 0.35rem 0.85rem; border-radius: 999px;
  font-weight: 800; font-size: 0.82rem; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 0.8rem;
}
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-blue { background: #e0e7ff; color: #4338ca; }

/* Slide prediction rows */
.pred-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0; border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.92rem;
}
.pred-label {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 6px;
  font-weight: 700; font-size: 0.82rem; white-space: nowrap;
}
.pred-label.correct { background: #dcfce7; color: #15803d; }
.pred-label.wrong { background: #fee2e2; color: #b91c1c; }
.pred-answer { color: var(--muted); }

/* Slide flaw cards */
.flaw-card {
  flex: 1; max-width: 300px; background: #fef2f2; border: 1px solid #fca5a5;
  border-radius: 12px; padding: 1.2rem; text-align: left; box-shadow: var(--shadow-sm);
}
.flaw-card p { color: #64748b; font-size: 0.92rem; margin: 0.5rem 0 0; line-height: 1.5; }
.flaw-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.flaw-header h4 { color: #b91c1c; margin: 0; font-size: 1rem; }
.flaw-num {
  background: #ef4444; color: white; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 0.85rem; flex-shrink: 0;
}

/* ── QUALITATIVE SIDE-BY-SIDE ─────────────────────────── */
.qual-row {
  display: grid; grid-template-columns: 0.4fr 0.6fr;
  gap: 2rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 2rem; margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease;
}
.qual-row:hover { box-shadow: var(--shadow-md); }

.qual-image { text-align: center; }
.qual-image img { width: 100%; border-radius: 10px; box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,0.06); }
.qual-label {
  margin-top: 0.8rem; font-weight: 800; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary);
}

.qual-preds { display: flex; flex-direction: column; gap: 0.8rem; }
.qual-meta { color: var(--muted); font-size: 0.92rem; line-height: 1.55; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }

.pred-card {
  padding: 0.9rem 1rem; border-radius: 10px; border-left: 4px solid var(--line);
  background: var(--surface-2);
}
.pred-card.correct { border-left-color: var(--emerald); background: rgba(5, 150, 105, 0.04); }
.pred-card.wrong { border-left-color: var(--rose); background: rgba(225, 29, 72, 0.04); }

.pred-model { font-weight: 800; font-size: 0.88rem; margin-bottom: 0.25rem; }
.pred-detail { font-size: 0.9rem; }
.pred-tag {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 6px;
  font-weight: 700; font-size: 0.78rem; margin-right: 0.4rem;
}
.pred-tag.correct { background: #dcfce7; color: #15803d; }
.pred-tag.wrong { background: #fee2e2; color: #b91c1c; }
.pred-note { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.85rem; font-style: italic; }

/* ── DOWNLOADS ────────────────────────────────────────── */
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.download-card {
  text-decoration: none; padding: 1.2rem 1.3rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.download-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.download-card span { font-weight: 800; color: var(--primary); white-space: nowrap; }
.download-card p { margin: 0.35rem 0 0; color: var(--muted); }

.citation-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 1.2rem 1.3rem;
}
.citation-box pre {
  margin: 0.8rem 0 0; padding: 1rem;
  background: #0f172a; color: #e2e8f0;
  border-radius: 14px; overflow-x: auto; font-size: 0.88rem; line-height: 1.5;
}

/* ── FOOTER ───────────────────────────────────────────── */
.footer { padding: 2rem 0 3rem; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.footer-brand { display: inline-block; margin-bottom: 0.4rem; }
.footer p { margin: 0; color: var(--muted); max-width: 34ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { text-decoration: none; color: var(--muted); font-weight: 600; }
.footer-links a:hover { color: var(--primary); }

/* ── ANIMATIONS ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero, .grid-two, .qual-row { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid, .download-grid, .insights-grid { grid-template-columns: 1fr; }
  .tier-row { flex-direction: column; text-align: center; }
  .tier-img { width: 180px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: calc(100% + 0.5rem); right: 0; left: 0;
    margin: 0 auto; width: min(var(--container), calc(100% - 2rem));
    background: rgba(255,255,255,0.96); border: 1px solid var(--line);
    border-radius: 18px; box-shadow: var(--shadow-md); padding: 0.9rem;
    flex-direction: column; align-items: flex-start; display: none;
  }
  .nav.open .nav-links { display: flex; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .hero-stats, .metric-grid { grid-template-columns: 1fr; }
  .container, .nav, .hero { width: min(var(--container), calc(100% - 1.25rem)); }
  .section { padding: 3.5rem 0; }
  .slide { padding: 2rem 1.5rem; min-height: 380px; }
}
