/* =====================================================================
   TDMx — public website
   Design system adapted from the TDMxRUI application skin
   (navy/teal palette, card layout, About-page hero pattern).
   ===================================================================== */

:root {
  --navy-dark: #1a3a5c;
  --navy: #215d8f;
  --navy-deep: #142c46;
  --teal: #1abc9c;
  --teal-dark: #17a589;
  --orange: #e07b39;
  --text: #2c3e50;
  --text-muted: #546e7a;
  --text-soft: #7f8c8d;
  --border: #dce6f0;
  --bg: #f4f8fb;
  --bg-alt: #f8fafb;
  --white: #ffffff;
  --warn-bg: #fffbf0;
  --warn-border: #f0d060;
  --warn-accent: #e6a800;
  --warn-text: #5d4037;
  --radius: 10px;
  --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 58, 92, 0.12);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.18);
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15.5px;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-dark); }

.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.14em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

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

/* =====================================================================
   HEADER / NAV
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  border-bottom: 2px solid var(--teal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.3px;
}

.brand img { height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 5px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
  color: #fff;
  border-bottom: 2px solid var(--teal);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 6px;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--navy-dark);
    padding: 6px 16px 14px;
    gap: 0;
    display: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0; }
  .nav-links a.active { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: #fff;
  padding: 64px 0 56px;
}

.hero.hero-page { padding: 40px 0; }

.hero .wrap { text-align: center; }
.hero.hero-page .wrap { text-align: left; }

.hero-logo { height: 64px; margin: 0 auto 18px; }
.hero.hero-page .hero-logo { margin: 0 0 14px; }

.hero h1 {
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: 0.2px;
}

.hero.hero-page h1 { font-size: 26px; }

.hero .tagline {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 620px;
  margin: 0 auto 26px;
}

.hero.hero-page .tagline { margin: 0; max-width: none; }

.hero-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-flex > .hero-text { flex: 1 1 320px; text-align: left; }
.hero-flex .hero-logo { margin: 0 0 14px; }

.hero-screenshot {
  display: block;
  flex: 1 1 460px;
  width: 100%;
  max-width: 620px;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 820px) {
  .hero:not(.hero-page) .hero-flex .hero-text { text-align: center; }
  .hero:not(.hero-page) .hero-flex .hero-logo { margin: 0 auto 14px; }
}

.hero-photo {
  flex: 1 1 300px;
  max-width: 340px;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 4px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  padding: 4px 13px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 11px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, border-color 0.18s, color 0.18s;
}

.btn-primary {
  background: var(--teal);
  border-color: var(--teal-dark);
  color: #0d3b31;
}
.btn-primary:hover { background: var(--teal-dark); color: #fff; box-shadow: 0 2px 10px rgba(26, 188, 156, 0.4); }

.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

.btn-light {
  background: #fff;
  border-color: var(--border);
  color: var(--navy);
}
.btn-light:hover { background: var(--bg-alt); color: var(--navy-dark); }

/* =====================================================================
   SECTIONS
   ===================================================================== */
section { padding: 52px 0; }
section.tight { padding: 34px 0; }
section.alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 680px; margin: 0 auto 34px; text-align: center; }
.section-head h2 { font-size: 25px; margin: 0 0 8px; color: var(--navy-dark); }
.section-head p { color: var(--text-muted); margin: 0; }

.eyebrow {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 8px;
}

/* =====================================================================
   CARDS / GRIDS
   ===================================================================== */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 880px) {
  .grid, .grid.cols-2, .grid.cols-4 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px;
  box-shadow: var(--shadow-sm);
}

.card .card-photo {
  display: block;
  width: calc(100% + 44px);
  max-width: none;
  height: 150px;
  margin: -22px -22px 16px -22px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card h3 {
  font-size: 16px;
  color: var(--navy-dark);
  margin: 10px 0 8px;
}

.card p { color: var(--text-muted); margin: 0; font-size: 14px; }

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

/* Drug / application cards */
.drug-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drug-card .drug-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drug-card h3 { margin: 0; font-size: 18px; color: var(--navy-dark); }

.drug-card .model-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  background: #eaf2fa;
  border-radius: 20px;
  padding: 3px 11px;
  white-space: nowrap;
}

.drug-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.drug-card .drug-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f0f4f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drug-card .drug-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.drug-card .drug-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Publication list */
.pub-item {
  padding: 16px 0;
  border-bottom: 1px solid #f0f4f8;
}
.pub-item:last-child { border-bottom: none; }

.pub-authors {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text-soft);
}

.pub-title {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy-dark);
  line-height: 1.4;
}

.pub-journal {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.pub-journal a { color: var(--navy); }
.pub-journal a:hover { color: var(--navy-dark); }

/* Resource link rows */
.resource-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--navy);
  padding: 10px 0;
  border-bottom: 1px solid #f0f4f8;
}
.resource-link:last-child { border-bottom: none; }
.resource-link:hover { color: var(--navy-dark); }
.resource-link .icon { color: var(--teal); }
.resource-link .sub { display: block; font-size: 12px; color: var(--text-soft); font-weight: 400; }

/* Disclaimer / callout */
.callout {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left: 4px solid var(--warn-accent);
  border-radius: 6px;
  padding: 18px 20px;
  font-size: 14px;
  color: var(--warn-text);
  line-height: 1.65;
}

.callout .callout-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #7d5a00;
  margin-bottom: 8px;
  font-size: 14.5px;
}

/* FAQ accordion */
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary .chevron {
  transition: transform 0.18s;
  color: var(--navy);
  flex: none;
}

.faq-item[open] summary .chevron { transform: rotate(180deg); }

.faq-item .faq-body {
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
}

/* Numbered step list (features) */
.step-list { counter-reset: step; display: grid; gap: 18px; }

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step .num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.step h3 { margin: 2px 0 5px; font-size: 16px; color: var(--navy-dark); }
.step p { margin: 0; color: var(--text-muted); font-size: 14px; }

.clr-navy { color: var(--navy); font-weight: 600; }
.clr-orange { color: var(--orange); font-weight: 600; }

/* View tabs (e.g. Applications: current vs. legacy) */
.view-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0 0 32px;
}

.view-tab {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.view-tab:hover { color: var(--navy-dark); border-color: var(--navy); }

.view-tab.active {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #fff;
}

.view-panel { display: none; }
.view-panel.active { display: block; }

/* Contact card */
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f4f8;
}
.contact-row:last-child { border-bottom: none; }
.contact-row .icon { color: var(--navy); margin-top: 3px; }
.contact-row strong { display: block; font-size: 13px; color: var(--navy-dark); }
.contact-row span, .contact-row a { font-size: 14px; color: var(--text-muted); }

/* Legal page */
.legal h2 {
  font-size: 17px;
  color: var(--navy-dark);
  margin: 34px 0 10px;
}
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--text-muted); font-size: 14.5px; }
.legal ul { padding-left: 20px; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0 26px;
  margin-top: 40px;
  font-size: 13.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 26px;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
}
.footer-brand img { height: 22px; }

.site-footer h4 {
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, 0.72); }
.site-footer a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
}

/* =====================================================================
   MISC
   ===================================================================== */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.lead { font-size: 16.5px; color: var(--text-muted); }
