/* TrainMedi — shared stylesheet */

:root {
  --ink: #10222a;
  --ink-soft: #3c545c;
  --paper: #f7f9f8;
  --paper-raised: #ffffff;
  --line: #dbe4e2;
  --teal: #0f6b62;
  --teal-deep: #0a4a44;
  --accent: #c98a3e;
  --brand-navy: #0b2f52;
  --brand-teal: #17b8a6;
  --radius: 10px;
  --max-width: 1080px;
  --shadow: 0 1px 2px rgba(16, 34, 42, 0.04), 0 8px 24px rgba(16, 34, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef3f2;
    --ink-soft: #aebdba;
    --paper: #0e1615;
    --paper-raised: #141d1c;
    --line: #263230;
    --teal: #4fb3a6;
    --teal-deep: #7fd0c4;
    --accent: #d9a35f;
    --brand-navy: #7fb2e0;
    --brand-teal: #4fd6c4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal-deep);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

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

/* ---------- Header / Nav ---------- */

header.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 22%;
}

.brand-train { color: var(--brand-navy); }
.brand-medi { color: var(--brand-teal); }

nav.site-nav {
  display: flex;
  gap: 28px;
}

nav.site-nav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}

nav.site-nav a:hover,
nav.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
  border-bottom-color: var(--teal);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 720px) {
  nav.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  nav.site-nav.open { display: flex; }
  nav.site-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
}

.hero-flow {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 18px;
  max-width: 18ch;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 28px;
}

.page-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}
.page-header .eyebrow { margin-bottom: 12px; }
.page-header h1 { max-width: none; font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.page-header .lede { margin-bottom: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover { background: var(--teal-deep); text-decoration: none; }

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--teal); text-decoration: none; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */

section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  margin: 0 0 12px;
}

.section-lede {
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 36px;
}

/* ---------- Cards ---------- */

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

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
  flex-grow: 1;
}

.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}

.card-link {
  font-size: 0.9rem;
  font-weight: 600;
}

.mini-list {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.mini-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--paper-raised);
}

.mini-item h4 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.mini-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ---------- Lists / prose ---------- */

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.check-list li {
  padding-left: 26px;
  position: relative;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.note {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  padding: 14px 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ---------- Form ---------- */

form.contact-form {
  display: grid;
  gap: 18px;
  max-width: 560px;
}

.field { display: grid; gap: 6px; }

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field textarea,
.field select {
  font: inherit;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.field textarea { resize: vertical; min-height: 130px; }

/* ---------- Footer ---------- */

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--ink-soft); }

/* ---------- Utility ---------- */

.center { text-align: center; }
.text-balance { text-wrap: balance; }
