/* Marketing pages (/courses). Colours are the design-system light-theme tokens
   (@dr-logic-ltd/design-tokens); the layout follows the media team's
   "Academy Course Pages v2" mock. Light theme only, like the app. */

@font-face {
  font-family: "Kumbh Sans";
  src: url("/courses/_/fonts/kumbh-sans.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --fg-1: hsl(240 3% 12%);
  --fg-2: hsl(240 4% 34%);
  --fg-3: hsl(240 4% 42%);
  --bg: #fff;
  --bg-surface: hsl(240 9% 96%);
  --border-subtle: hsl(240 5% 87%);
  --accent: hsl(210 90% 44%);
  --accent-hover: hsl(210 90% 37%);
  --accent-50: hsl(210 90% 96%);
  --accent-700: hsl(210 90% 34%);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-md: 0 8px 24px rgb(0 0 0 / 0.08);
  --container-max: 72rem;
  --gutter: 1rem;
  --font: "Kumbh Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

@media (min-width: 640px) { :root { --gutter: 1.5rem; } }
@media (min-width: 1024px) { :root { --gutter: 2rem; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.muted { color: var(--fg-3); }
.small { font-size: 0.8125rem; }
.prose { font-size: 1.0625rem; line-height: 1.6; color: var(--fg-2); max-width: 46ch; text-wrap: pretty; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; }
.container { max-width: var(--container-max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); width: 100%; }
.section { padding-top: 2.5rem; padding-bottom: 3rem; }

/* Nav */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 0.875rem var(--gutter); border-bottom: 1px solid var(--border-subtle); background: #fff;
}
.nav-brand img { height: 2rem; width: auto; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; white-space: nowrap; }
.nav-link { font-size: 0.875rem; font-weight: 500; color: var(--fg-1); padding: 0.5rem 0; border-bottom: 2px solid transparent; }
.nav-link.is-active { border-bottom-color: var(--accent); }
.nav-link:hover { text-decoration: none; color: var(--accent); }
@media (max-width: 480px) { .nav-link { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.5rem; padding: 0 1rem; border-radius: var(--radius-sm); font: 500 0.875rem var(--font);
  cursor: pointer; border: 1px solid transparent; white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-lg { height: 3rem; padding: 0 1.5rem; font-size: 1rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: #fff; color: var(--fg-1); border-color: var(--border-subtle); }
.btn-secondary:hover { background: var(--bg-surface); color: var(--fg-1); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--accent-50) 0%, #fff 100%); }
.hero .container { padding-top: 1.5rem; padding-bottom: 2rem; }
.hero-course .container { padding-top: 1.5rem; padding-bottom: 3rem; }
.hero-title { font-size: clamp(2.25rem, 6vw, 3.5rem); letter-spacing: -0.035em; line-height: 1.02; margin-bottom: 1rem; text-wrap: balance; }
.hero-lead { font-size: clamp(1.0625rem, 2vw, 1.25rem); color: var(--fg-2); line-height: 1.35; letter-spacing: -0.01em; max-width: 48ch; text-wrap: pretty; }
.back { display: inline-flex; align-items: center; height: 2.5rem; padding: 0 1rem; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--border-subtle); font-size: 0.875rem; color: var(--fg-1); margin-bottom: 1.5rem; }
.back:hover { text-decoration: none; background: var(--bg-surface); color: var(--fg-1); }
.course-head { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.course-head-text { flex: 1; min-width: min(100%, 17.5rem); }
.course-title { font-size: clamp(1.875rem, 5vw, 3rem); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 1rem; max-width: 22ch; text-wrap: balance; }
.eyebrow { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.375rem; }
.ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem; }
.facts { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--border-subtle); }
.facts dt { font-size: 0.8125rem; color: var(--fg-3); margin-bottom: 0.25rem; }
.facts dd { margin: 0; font-size: 1.0625rem; font-weight: 500; }

/* Badge circle */
.badge-circle { flex: none; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: #fff; border: 1px solid var(--border-subtle); display: grid; place-items: center; overflow: hidden; }
.badge-circle-lg { width: 6rem; height: 6rem; }
.badge-circle img { width: 78%; height: 78%; object-fit: contain; }
.badge-initial { width: 100%; height: 100%; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.badge-circle-lg .badge-initial { font-size: 2rem; }

/* Chips */
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; }
.chips-label { font-size: 0.875rem; color: var(--fg-2); margin-right: 0.25rem; }
.chip { height: 2.375rem; padding: 0 1.125rem; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--border-subtle); background: #fff; color: var(--fg-1); font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.chip:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1.5rem; }
.cards-compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 1.125rem; height: 100%; padding: 1.5rem;
  background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); color: var(--fg-1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; color: var(--fg-1); }
.card-head { display: flex; gap: 1.125rem; align-items: center; }
.card-title { font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.2; text-wrap: balance; }
.card-title-sm { font-size: 1.0625rem; letter-spacing: -0.015em; line-height: 1.25; }
.card-summary { font-size: 0.9375rem; line-height: 1.55; color: var(--fg-2); flex: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding-top: 0.875rem; border-top: 1px solid var(--border-subtle); font-size: 0.8125rem; }
.card-row { flex-direction: row; align-items: center; gap: 1rem; padding: 1.25rem; }
.card-row .badge-circle { width: 3.5rem; height: 3.5rem; }
.link-arrow { font-size: 0.875rem; font-weight: 500; color: var(--accent); white-space: nowrap; }

/* Course body */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr)); gap: 2.5rem; }
.h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); letter-spacing: -0.02em; margin-bottom: 1rem; }
.h2-tight { margin-bottom: 0; }
.outcomes { display: flex; flex-direction: column; gap: 0.875rem; margin-bottom: 2.5rem; }
.outcomes li { display: flex; gap: 0.75rem; font-size: 1rem; line-height: 1.55; }
.outcomes li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 0.6rem; }
.outline { background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.outline li { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.125rem 1.25rem; border-top: 1px solid var(--border-subtle); }
.outline li:first-child { border-top: 0; }
.outline-title { font-size: 0.9375rem; font-weight: 500; line-height: 1.35; }
.outline-meta { display: flex; gap: 0.625rem; align-items: center; font-size: 0.8125rem; }
.pill { font-size: 0.75rem; font-weight: 500; color: var(--fg-2); background: var(--bg-surface); border: 1px solid var(--border-subtle); padding: 0.125rem 0.625rem; border-radius: 999px; }

.band { background: var(--bg-surface); }
.band .container { padding-top: 3rem; padding-bottom: 3rem; }
.band .btn { margin-top: 1.5rem; }
.faqs { border-top: 1px solid var(--border-subtle); }
.faqs details { border-bottom: 1px solid var(--border-subtle); padding: 1.125rem 0; }
.faqs summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; font-size: 1rem; font-weight: 500; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs details[open] summary .muted { transform: rotate(45deg); display: inline-block; }
.faqs p { font-size: 0.9375rem; line-height: 1.6; color: var(--fg-2); margin-top: 0.75rem; max-width: 60ch; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

/* Footer */
.footer { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); }
.footer-inner { max-width: var(--container-max); margin: 0 auto; padding: 2rem var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
/* align-items: a flex column would otherwise STRETCH the wordmark to the text's width. */
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.footer-brand img { height: 1.75rem; width: auto; }
.footer-meta { font-size: 0.8125rem; color: var(--fg-3); }
.footer-apple { width: 8.75rem; height: auto; color: var(--fg-3); }

/* Empty catalogue — shown only until the first course page is published. */
.coming-soon { padding: 2.5rem; border: 1px dashed var(--border-subtle); border-radius: var(--radius-lg); background: var(--bg-surface); display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; max-width: 44rem; }
.coming-soon .h2 { margin-bottom: 0; }
.coming-soon .ctas { margin-top: 0.75rem; }

.notfound { text-align: center; padding-top: 5rem; padding-bottom: 5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }

