/* Marketing homepage styles. Loaded only by layouts/marketing.html.erb —
   all classes are prefixed with mh- to stay independent from the app styles. */

:root {
  --mh-navy:       #0d1b3e;
  --mh-blue:       #1a7fe0;
  --mh-blue-dark:  #0055cc;
  --mh-blue-light: #e6f0ff;
  --mh-ink:        #1a1f2e;
  --mh-muted:      #5a6478;
  --mh-faint:      #8a92a3;
  --mh-bg:         #ffffff;
  --mh-bg-alt:     #f5f7fb;
  --mh-border:     #e2e6ef;
  --mh-green:      #1a7a4a;
  --mh-amber-bg:   #fffbea;
  --mh-amber:      #b7791f;
  --mh-radius:     10px;
  --mh-shadow:     0 6px 24px rgba(13, 27, 62, .08);
  --mh-shadow-lg:  0 16px 48px rgba(13, 27, 62, .12);
  --mh-font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mh-font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

.mh-body {
  font-family: var(--mh-font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--mh-ink);
  background: var(--mh-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mh-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.mh-container--narrow { max-width: 760px; }

h1, h2, h3 {
  font-family: var(--mh-font-display);
  color: var(--mh-navy);
  line-height: 1.22;
  font-weight: 700;
}

h2 { font-size: 30px; margin-bottom: 16px; letter-spacing: -.5px; }

p { margin-bottom: 12px; }

a { color: var(--mh-blue-dark); text-decoration: none; }

.mh-link {
  color: var(--mh-blue-dark);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.mh-emphasis {
  font-weight: 600;
  color: var(--mh-navy);
  font-size: 17px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.mh-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  transition: background .15s, color .15s, box-shadow .15s;
  cursor: pointer;
  white-space: nowrap;
}

.mh-btn--lg { padding: 14px 28px; font-size: 16px; }
.mh-btn--sm { padding: 7px 14px; font-size: 13px; }

.mh-btn--primary {
  background: linear-gradient(135deg, var(--mh-blue) 0%, var(--mh-blue-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 127, 224, .35);
}

.mh-btn--primary:hover { box-shadow: 0 6px 20px rgba(26, 127, 224, .5); }

.mh-btn--secondary {
  background: var(--mh-blue-light);
  color: var(--mh-blue-dark);
}

.mh-btn--secondary:hover { background: #d6e6ff; }

.mh-btn--ghost { color: var(--mh-navy); }
.mh-btn--ghost:hover { background: var(--mh-bg-alt); }

.mh-btn--light {
  background: #fff;
  color: var(--mh-navy);
}

.mh-btn--light:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }

/* ── Header ──────────────────────────────────────────────── */
.mh-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mh-border);
}

.mh-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}

.mh-header__logo { justify-self: start; }

.mh-header__logo img { height: 40px; display: block; }

.mh-header__nav {
  display: flex;
  gap: 8px;
  justify-self: center;
}

.mh-header__nav a {
  color: var(--mh-muted);
  font-weight: 500;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 8px;
}

.mh-header__nav a:hover {
  color: var(--mh-navy);
  background: var(--mh-bg-alt);
}

.mh-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

/* ── Hero ────────────────────────────────────────────────── */
.mh-hero {
  padding: 72px 0 80px;
  background: linear-gradient(180deg, var(--mh-blue-light) 0%, #fff 90%);
}

.mh-hero__inner {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 64px;
  align-items: center;
}

.mh-hero__headline {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 20px;
}

.mh-hero__sub {
  font-size: 17px;
  color: var(--mh-muted);
  margin-bottom: 14px;
}

.mh-hero__promise {
  font-size: 17px;
  font-weight: 600;
  color: var(--mh-navy);
}

.mh-hero__benefit {
  font-size: 17px;
  font-weight: 600;
  color: var(--mh-blue-dark);
  margin-top: 14px;
}

.mh-hero__ctas {
  display: flex;
  gap: 14px;
  margin: 28px 0 14px;
  flex-wrap: wrap;
}

.mh-hero__support {
  font-size: 14px;
  color: var(--mh-faint);
}

/* ── Product visual (app mock) ───────────────────────────── */
.mh-app-card {
  background: #fff;
  border: 1px solid var(--mh-border);
  border-radius: 14px;
  box-shadow: var(--mh-shadow-lg);
  overflow: hidden;
}

.mh-app-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 24px;
  border-bottom: 1px solid var(--mh-border);
  background: var(--mh-bg-alt);
}

.mh-app-card__patient {
  font-size: 18px;
  font-weight: 700;
  color: var(--mh-navy);
}

.mh-app-card__subtitle { color: var(--mh-muted); font-size: 13px; }

.mh-app-card__meta { color: var(--mh-faint); font-size: 13px; }

.mh-app-card__body { padding: 20px 24px; }

.mh-app-card__section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--mh-faint);
  margin-bottom: 14px;
}

.mh-app-card__section-title:not(:first-child) { margin-top: 26px; }

.mh-fact { margin-bottom: 14px; }

.mh-fact__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--mh-muted);
}

.mh-fact__value { font-size: 15px; color: var(--mh-ink); }

.mh-trend { font-weight: 600; font-variant-numeric: tabular-nums; }

.mh-trend span { color: var(--mh-faint); font-weight: 400; padding: 0 2px; }

.mh-mini-timeline { list-style: none; }

.mh-mini-timeline li {
  position: relative;
  padding: 0 0 18px 22px;
  border-left: 2px solid var(--mh-border);
  margin-left: 5px;
}

.mh-mini-timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }

.mh-mini-timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mh-blue);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--mh-border);
}

.mh-mini-timeline__date {
  font-size: 12px;
  font-weight: 700;
  color: var(--mh-blue-dark);
  font-variant-numeric: tabular-nums;
}

.mh-mini-timeline__title { font-weight: 600; font-size: 15px; }

.mh-mini-timeline__detail { font-size: 14px; color: var(--mh-muted); }

/* ── Sections ────────────────────────────────────────────── */
.mh-section { padding: 80px 0; }

.mh-section--alt { background: var(--mh-bg-alt); }

.mh-section__title { text-align: center; }

.mh-section__lead {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
  color: var(--mh-muted);
  font-size: 17px;
}

.mh-section__note {
  text-align: center;
  margin-top: 36px;
  font-weight: 600;
  color: var(--mh-navy);
  font-size: 17px;
}

.mh-section ul:not([class]) {
  list-style: none;
  margin-bottom: 12px;
}

.mh-section ul:not([class]) li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 4px;
}

.mh-section ul:not([class]) li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--mh-blue);
  font-weight: 700;
}

/* ── How it works ────────────────────────────────────────── */
.mh-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.mh-step {
  background: #fff;
  border: 1px solid var(--mh-border);
  border-radius: var(--mh-radius);
  padding: 28px;
  box-shadow: var(--mh-shadow);
}

.mh-step__number {
  font-size: 14px;
  font-weight: 800;
  color: var(--mh-blue);
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.mh-step h3 { font-size: 19px; margin-bottom: 12px; }

.mh-step p, .mh-step li { font-size: 15px; color: var(--mh-muted); }

.mh-step__label {
  font-weight: 600;
  color: var(--mh-navy);
  margin: 14px 0 6px;
}

.mh-step__note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--mh-faint);
  font-style: italic;
}

/* ── Split layout (text + visual) ────────────────────────── */
.mh-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.mh-split--reverse .mh-split__text { order: 2; }
.mh-split--reverse .mh-split__visual { order: 1; }

.mh-split__text p { color: var(--mh-muted); }

.mh-split__text p.mh-emphasis { color: var(--mh-navy); }

/* ── Timeline card ───────────────────────────────────────── */
.mh-timeline-card {
  background: #fff;
  border: 1px solid var(--mh-border);
  border-radius: 14px;
  box-shadow: var(--mh-shadow-lg);
  padding: 28px 32px;
}

.mh-timeline-year {
  font-size: 13px;
  font-weight: 800;
  color: var(--mh-faint);
  letter-spacing: 2px;
  margin: 18px 0 10px;
}

.mh-timeline-year:first-child { margin-top: 0; }

.mh-timeline-entry {
  display: flex;
  gap: 16px;
  position: relative;
  padding: 0 0 16px 22px;
  border-left: 2px solid var(--mh-border);
  margin-left: 5px;
}

.mh-timeline-entry::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mh-blue);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--mh-border);
}

.mh-timeline-entry__date {
  flex-shrink: 0;
  width: 58px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mh-blue-dark);
}

.mh-timeline-entry__body strong {
  display: block;
  color: var(--mh-navy);
  font-size: 15px;
}

.mh-timeline-entry__body span { font-size: 14px; color: var(--mh-muted); }

/* ── Patient overview ────────────────────────────────────── */
.mh-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

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

.mh-overview-card h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--mh-faint);
  margin-bottom: 12px;
}

.mh-overview-card ul { list-style: none; }

.mh-overview-card li {
  font-size: 15px;
  padding: 3px 0;
  border-bottom: 1px solid var(--mh-bg-alt);
}

.mh-overview-card li:last-child { border-bottom: none; }

/* ── Chat card ───────────────────────────────────────────── */
.mh-chat-card {
  background: #fff;
  border: 1px solid var(--mh-border);
  border-radius: 14px;
  box-shadow: var(--mh-shadow-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mh-chat-msg {
  border-radius: var(--mh-radius);
  padding: 14px 18px;
  font-size: 15px;
}

.mh-chat-msg p { margin-bottom: 6px; }
.mh-chat-msg p:last-of-type { margin-bottom: 0; }

.mh-chat-msg--doctor {
  background: var(--mh-blue-light);
  align-self: flex-end;
  max-width: 85%;
}

.mh-chat-msg--ai {
  background: var(--mh-bg-alt);
  border: 1px solid var(--mh-border);
  align-self: flex-start;
  max-width: 95%;
}

.mh-chat-msg__author {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--mh-faint);
  margin-bottom: 6px;
}

.mh-chat-msg__sources {
  margin-top: 10px;
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--mh-blue-dark);
  background: var(--mh-blue-light);
  border-radius: 999px;
  padding: 3px 12px;
}

.mh-question-list { list-style: none; margin-top: 20px; }

.mh-question-list li {
  display: inline-block;
  margin: 0 8px 10px 0;
  padding: 8px 16px;
  background: var(--mh-bg-alt);
  border: 1px solid var(--mh-border);
  border-radius: 999px;
  font-size: 14px;
  color: var(--mh-muted);
}

/* ── Trust cards (source + conflict) ─────────────────────── */
.mh-trust-cards {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: stretch;
  max-width: 900px;
  margin: 0 auto;
}

.mh-source-card {
  background: #fff;
  border: 1px solid var(--mh-border);
  border-radius: 14px;
  box-shadow: var(--mh-shadow-lg);
  padding: 28px 32px;
}

.mh-source-card__value {
  font-size: 32px;
  font-weight: 800;
  color: var(--mh-navy);
  margin-bottom: 16px;
}

.mh-source-card__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--mh-faint);
  margin-bottom: 6px;
}

.mh-source-card__doc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--mh-bg-alt);
  border-radius: var(--mh-radius);
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--mh-muted);
}

.mh-source-card__doc strong { color: var(--mh-navy); font-size: 15px; }

/* ── Conflict card ───────────────────────────────────────── */
.mh-conflict-card {
  background: #fff;
  border: 1px solid #f0e3bd;
  border-radius: 14px;
  box-shadow: var(--mh-shadow-lg);
  padding: 28px 32px;
}

.mh-conflict-card__title {
  font-weight: 700;
  color: var(--mh-amber);
  margin-bottom: 14px;
}

.mh-conflict-card__drug {
  font-size: 20px;
  font-weight: 700;
  color: var(--mh-navy);
  margin-bottom: 14px;
}

.mh-conflict-card__versions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.mh-conflict-card__version {
  flex: 1;
  background: var(--mh-bg-alt);
  border-radius: var(--mh-radius);
  padding: 14px 16px;
}

.mh-conflict-card__date { font-size: 13px; color: var(--mh-faint); }

.mh-conflict-card__dose { font-size: 17px; font-weight: 700; color: var(--mh-navy); }

.mh-conflict-card__doc { font-size: 13px; color: var(--mh-muted); }

.mh-conflict-card__vs { font-weight: 700; color: var(--mh-faint); }

/* ── Report card ─────────────────────────────────────────── */
.mh-report-card {
  background: #fff;
  border: 1px solid var(--mh-border);
  border-radius: 14px;
  box-shadow: var(--mh-shadow-lg);
  padding: 24px 28px;
}

.mh-report-card__title {
  font-weight: 700;
  color: var(--mh-navy);
  font-size: 17px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mh-border);
  margin-bottom: 14px;
}

.mh-report-card__section { margin-bottom: 12px; }

.mh-report-card__section strong {
  display: block;
  font-size: 13px;
  color: var(--mh-navy);
}

.mh-report-card__section p { font-size: 14px; color: var(--mh-muted); margin: 2px 0 0; }

.mh-report-card__placeholder {
  height: 10px;
  max-width: 75%;
  border-radius: 5px;
  background: var(--mh-bg-alt);
  margin-top: 8px !important;
}

/* ── Workflow flow (horizontal chips) ────────────────────── */
.mh-flow {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 24px 0 28px;
}

.mh-flow li {
  position: relative;
  background: #fff;
  border: 1px solid var(--mh-border);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 14px;
  color: var(--mh-navy);
  box-shadow: var(--mh-shadow);
}

.mh-flow li:not(:last-child) { margin-right: 22px; }

.mh-flow li:not(:last-child)::after {
  content: "→";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 7px;
  color: var(--mh-faint);
}

/* ── Security ────────────────────────────────────────────── */
.mh-security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.mh-security-item {
  background: #fff;
  border: 1px solid var(--mh-border);
  border-radius: var(--mh-radius);
  padding: 16px 18px 16px 46px;
  position: relative;
  font-weight: 600;
  color: var(--mh-navy);
  font-size: 15px;
}

.mh-security-item::before {
  content: "✓";
  position: absolute;
  left: 18px;
  color: var(--mh-green);
  font-weight: 800;
}

/* ── Final CTA ───────────────────────────────────────────── */
.mh-final-cta {
  background: linear-gradient(135deg, #123a7a 0%, var(--mh-navy) 100%);
  color: #fff;
  text-align: center;
  padding: 88px 0;
}

.mh-final-cta h2 { color: #fff; font-size: 34px; font-weight: 800; letter-spacing: -.8px; margin-bottom: 32px; }

/* ── Legal pages ─────────────────────────────────────────── */
.mh-legal { padding: 64px 0 80px; }

.mh-legal h1 { font-size: 34px; letter-spacing: -.8px; margin-bottom: 6px; }

.mh-legal__meta {
  color: var(--mh-faint);
  font-size: 14px;
  margin-bottom: 32px;
}

.mh-legal h2 { font-size: 22px; margin: 36px 0 12px; }

.mh-legal h3 { font-size: 16px; margin: 20px 0 8px; }

.mh-legal p, .mh-legal li { color: var(--mh-muted); font-size: 15px; }

.mh-legal strong { color: var(--mh-navy); }

.mh-legal ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.mh-legal li { margin-bottom: 6px; }

/* ── Footer ──────────────────────────────────────────────── */
.mh-footer {
  background: var(--mh-bg-alt);
  border-top: 1px solid var(--mh-border);
  padding: 48px 0 0;
}

.mh-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 32px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.mh-footer__brand img { height: 34px; margin-bottom: 10px; }

.mh-footer__brand p { color: var(--mh-muted); font-size: 14px; }

.mh-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mh-footer__nav a { color: var(--mh-muted); font-size: 14px; }

.mh-footer__nav a:hover { color: var(--mh-navy); }

.mh-footer__legal {
  border-top: 1px solid var(--mh-border);
  padding: 18px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--mh-faint);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .mh-header__nav { display: none; }

  .mh-hero__headline { font-size: 34px; }

  h2 { font-size: 25px; }

  .mh-section { padding: 56px 0; }

  .mh-hero__inner,
  .mh-split,
  .mh-steps,
  .mh-overview-grid,
  .mh-trust-cards,
  .mh-security-grid {
    grid-template-columns: 1fr;
  }

  .mh-split { gap: 32px; }

  .mh-split--reverse .mh-split__text { order: 1; }
  .mh-split--reverse .mh-split__visual { order: 2; }

  .mh-conflict-card__versions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 560px) {
  .mh-header__actions .mh-btn--ghost { display: none; }

  .mh-hero { padding-top: 56px; }

  .mh-hero__headline { font-size: 28px; }
}
