/* Acute Care Genomics eLearning: shared styles for the landing page and module banners */

/* Nunito Sans (variable weight, SIL Open Font License), self-hosted */
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 200 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/nunito-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 200 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/nunito-sans-latin.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;
}

:root {
  --brand: #00538b;
  --brand-dark: #003f6a;
  --brand-tint: #dbe8f3;
  --brand-light: #b3d4ec;
  --surface: #f3f6f9;
  --text: #424244;
  --text-strong: #2b2b2d;
  --text-muted: #5d5d60;
  --gutter: clamp(20px, 5vw, 56px);
  --header-height: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
  margin: 0;
  font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--brand);
  background: #fff;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.container { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Header: white so both partner logos keep their colours */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  color: var(--brand);
  border-bottom: 3px solid var(--brand);
  transition: box-shadow .25s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 4px 16px rgba(0, 40, 70, .12); }
.site-header .container {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 16px; margin-right: auto; text-decoration: none; }
.brand-logo { display: block; height: 44px; width: auto; }
.brand-divider { width: 1px; height: 36px; background: #d5dee7; }
.site-nav { display: flex; gap: 24px; font-weight: 700; font-size: 15px; }
.site-nav a { color: var(--brand); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease); }
.site-nav a:hover { color: var(--brand-dark); border-bottom-color: var(--brand); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 83, 139, .25); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-outline { background: transparent; color: var(--text); }
.btn-outline:hover { background: var(--brand); border-color: var(--brand); }
.btn-sm { padding: 12px 24px; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--surface) 0%, #fff 100%); }
.hero .container {
  display: grid;
  gap: 28px;
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(8px, 6vw, 20px);
}
.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-tint);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.08; font-weight: 800; margin: 0; max-width: 18ch; letter-spacing: -.01em; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; max-width: 82ch; margin: 0; color: var(--text); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
.section { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }
.section-title { font-size: clamp(28px, 3vw, 36px); font-weight: 800; margin: 0 0 32px; }

/* Module cards */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 28px; }
.module-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 83, 139, .06), 0 12px 32px rgba(0, 83, 139, .08);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.module-card:hover { transform: translateY(-4px); box-shadow: 0 4px 8px rgba(0, 83, 139, .08), 0 20px 44px rgba(0, 83, 139, .14); }
.module-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 28px 32px;
  background: var(--brand);
  color: #fff;
}
.module-number { font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: #f2f2f3; }
.module-meta { font-size: 13px; font-weight: 600; opacity: .88; }
.module-cover { display: block; overflow: hidden; background: #fff; }
.module-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 694;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.module-card:hover .module-cover img { transform: scale(1.01); }
.module-card-body { display: flex; flex-direction: column; gap: 16px; flex: 1; padding: 32px; }
.module-card h3 { font-size: 26px; line-height: 1.2; font-weight: 800; margin: 0; }
.module-card p { font-size: 16px; line-height: 1.65; margin: 0; color: var(--text); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 4px 12px; border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; }
.module-card-cta { margin-top: auto; padding-top: 12px; }

/* Acknowledgements */
.acknowledgements { background: var(--surface); }
.acknowledgements .container { display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 64px); }
.acknowledgements .section-title { margin: 0; flex: 1 1 240px; }
.ack-body { flex: 3 1 480px; min-width: 0; display: grid; gap: 18px; font-size: 16px; line-height: 1.7; color: var(--text); max-width: 72ch; }
.ack-body p { margin: 0; }
.ack-funding { color: var(--text-strong); font-weight: 600; }
.ack-media { color: var(--text-muted); font-style: italic; }
.ack-publication {
  display: grid;
  gap: 6px;
  padding: 20px 24px;
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: #fff;
}
.ack-publication-intro { font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--text-muted); }
.ack-publication-title { font-weight: 700; line-height: 1.45; }
.ack-publication-title a { text-decoration: none; transition: color .2s var(--ease); }
.ack-publication-title a:hover { color: var(--brand-dark); text-decoration: underline; }
.ack-publication-authors, .ack-publication-source { font-size: 14px; line-height: 1.6; }
.ack-publication-source a { overflow-wrap: anywhere; }
.ack-notice { padding: 16px 20px; border-radius: 12px; background: #fff; color: var(--brand); font-weight: 600; }

/* Footer */
.site-footer { background: var(--brand); color: #d6e4f0; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 32px; font-size: 14px; }
.site-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--brand-light); }

/* 404 page: footer pinned to the bottom on short pages */
.error-page { min-height: 100vh; display: flex; flex-direction: column; }
.not-found {
  flex: 1;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--surface) 0%, #fff 100%);
}
.not-found .container {
  display: grid;
  gap: 24px;
  width: 100%;
  padding-top: clamp(56px, 10vw, 120px);
  padding-bottom: clamp(56px, 10vw, 120px);
}
.not-found h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.1; font-weight: 800; margin: 0; letter-spacing: -.01em; }

/* Entrance animation (cards and sections fade up as they scroll into view) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* Module page: banner above the framed Storyline course */
.module-page { height: 100%; }
.module-page body { height: 100%; display: flex; flex-direction: column; background: #282828; }
.module-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px 20px;
  flex-wrap: wrap;
  padding: 8px var(--gutter);
  background: var(--brand);
  color: #d6e4f0;
  font-size: 13px;
  line-height: 1.4;
}
.module-banner-back { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; transition: color .2s var(--ease); }
.module-banner-back:hover { color: var(--brand-light); }
.module-banner-title { color: #fff; font-weight: 700; margin-right: auto; }
.module-banner-funding { margin: 0; }
.module-frame { flex: 1 1 auto; width: 100%; border: 0; display: block; background: #282828; }

@media (max-width: 600px) {
  :root { --header-height: 110px; }
  .brand { gap: 12px; }
  .brand-logo { height: 34px; }
  .brand-divider { height: 28px; }
  .module-banner-funding { flex-basis: 100%; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
