/* Shared template for medicinehorizon.com study pages.
   Layout, typography and components only. Each study sets its colours (and may set fonts)
   in <country>/<study>/assets/theme.css. */

:root {
  /* Neutral defaults. */
  --ink: #1f2a37;
  --muted: #4b5563;
  --bg: #ffffff;
  --soft: #f3f4f6;
  --tint: #eef2f7;
  --tint-strong: #d5dde8;
  --accent: #1f4e79;
  --accent-ink: #ffffff;
  --line: #e5e7eb;
  --footer-bg: #1f2a37;
  --footer-ink: #e5e7eb;
  --font-head: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 16px;
  --max: 1080px;
}

/* Self-hosted fonts (SIL Open Font License, from Google Fonts, Latin subset). Loaded only when a theme uses them. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/inter-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("/assets/fonts/montserrat-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 500 700; font-display: swap; src: url("/assets/fonts/montserrat-latin-var-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px; z-index: 10; }
h1, h2, h3, blockquote { font-family: var(--font-head); color: var(--ink); }

/* Top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brands { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brands img { height: 20px; width: auto; }
.brands .divider { width: 1px; height: 20px; background: var(--line); }
@media (min-width: 800px) { .brands { gap: 16px; } .brands img, .brands .divider { height: 30px; } }

/* Buttons and pills */
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-family: var(--font-body); font-weight: 700; font-size: 17px;
  padding: 15px 28px; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.btn:hover, .btn:focus { filter: brightness(1.08); }
.btn-top { display: none; padding: 10px 18px; font-size: 15px; box-shadow: none; }
@media (min-width: 800px) { .btn-top { display: inline-block; } }
.eyebrow {
  display: inline-block; background: var(--tint); color: var(--accent);
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; margin: 0 0 14px;
}
.pill-outline {
  display: inline-block; border: 1px solid var(--accent); color: var(--accent);
  font-size: 15px; padding: 5px 14px; border-radius: 999px;
}

/* Hero */
.hero { background: var(--soft); position: relative; }
.hero .wrap { display: grid; gap: 0; padding-top: 0; padding-bottom: 40px; align-items: center; }
.hero h1 { font-size: 31px; line-height: 1.18; margin: 0 0 14px; font-weight: 700; }
.hero .sub { font-size: 18px; color: var(--ink); margin: 0 0 14px; }
.hero-photo { margin: 0 -16px 22px; }
.hero-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (min-width: 800px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 40px; padding-top: 56px; padding-bottom: 72px; }
  .hero h1 { font-size: 44px; }
  .hero .text { order: 1; }
  .hero-photo { order: 2; margin: 0; justify-self: center; padding: 10px; border: 1px solid var(--accent); border-radius: 50%; }
  .hero-photo img { width: 400px; height: 400px; aspect-ratio: auto; border-radius: 50%; }
}
.curve { display: block; width: 100%; height: 40px; background: var(--soft); }
.curve path { fill: var(--bg); }

/* Sections */
section { padding: 48px 0; }
section.soft { background: var(--soft); }
h2 { font-size: 26px; line-height: 1.25; margin: 0 0 18px; font-weight: 700; }
h3 { font-size: 17px; margin: 0 0 6px; font-weight: 700; }
.lead { font-size: 19px; font-weight: 600; }
.note { display: flex; gap: 12px; align-items: flex-start; }
.note svg { flex: 0 0 20px; margin-top: 4px; color: var(--accent); }

/* Cards with icons */
.cards { display: grid; gap: 14px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.icon { width: 40px; height: 40px; border-radius: 50%; background: var(--tint); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.icon svg { width: 20px; height: 20px; }

/* Split section */
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.split img { border-radius: var(--radius); }
.checks { list-style: none; padding: 0; margin: 0 0 16px; }
.checks li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checks li::before { content: "\2713"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* Quote band */
.quote { background: var(--tint); text-align: center; }
.quote .mark { font-family: var(--font-head); font-size: 64px; line-height: 0.6; color: var(--accent); font-weight: 700; }
.quote blockquote { margin: 16px auto 0; max-width: 720px; font-size: 24px; line-height: 1.4; font-style: italic; font-weight: 500; }
.quote cite { display: block; margin-top: 12px; font-size: 14px; font-style: normal; color: var(--muted); font-family: var(--font-body); }

/* Video card */
.video { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--tint); aspect-ratio: 16 / 9; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-weight: 600; color: var(--ink); }
.video .play { width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video .cover ~ .play, .video .cover ~ .label { position: relative; }
.video .cover ~ .label { color: #fff; background: rgba(0, 0, 0, 0.45); padding: 4px 12px; border-radius: 999px; }

/* Questions card */
.faq { background: #fff; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); padding: 4px 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p, .faq details ol { margin: 12px 0 0; }
ol.steps { padding-left: 22px; }
ol.steps li { margin-bottom: 8px; }
/* Numbered steps with circles and a connecting line */
ol.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
ol.timeline li { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding-bottom: 20px; }
ol.timeline li:last-child { padding-bottom: 0; }
ol.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--tint-strong); }
ol.timeline .num { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; }
ol.timeline p { margin: 5px 0 0; }
ol.timeline .step-logo { height: 20px; width: auto; margin-top: 8px; }

.cta-final { text-align: center; }

/* Footer */
footer.site { background: var(--footer-bg); color: var(--footer-ink); padding: 36px 0 104px; font-size: 14px; text-align: center; }
footer.site p { margin: 8px 0; }
footer.site a { color: #fff; }
footer.site .inline-logo { display: inline-block; height: 22px; width: auto; background: #fff; padding: 3px 8px; border-radius: 6px; vertical-align: middle; margin-left: 6px; }
@media (min-width: 800px) { footer.site { padding-bottom: 36px; } }

/* Phone button bar */
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; display: flex; justify-content: center; z-index: 5; transform: translateY(110%); transition: transform 0.25s ease; }
.mobile-bar.show { transform: none; }
.mobile-bar .btn { width: 100%; max-width: 420px; text-align: center; box-shadow: none; }
@media (min-width: 800px) { .mobile-bar { display: none; } }

/* Questionnaire page */
.form-wrap { max-width: 760px; margin: 0 auto; }
.form-wrap iframe { width: 100%; min-height: 900px; border: 0; }
.notice { background: var(--soft); border-radius: var(--radius); padding: 18px; }

/* Hub page cards */
.hub-card { background: var(--soft); border-radius: var(--radius); padding: 20px; }
.hub-card p { margin: 0; color: var(--muted); }

/* Phone: full-width hero button, as in the design */
@media (max-width: 799px) { .hero .btn { display: block; text-align: center; } }
