/* ==========================================================================
   Course page template (Phase 3 demo, RD13, 15 Oct 2026). One template, every course.
   Loads after site.css + academy.css (track tokens, nav state) and only uses their tokens.
   --c is the course's track colour, set on <body>. Becomes single-course.php.
   ========================================================================== */
.hdr-nav a[aria-current="true"] { color: var(--saffron-lt); }

/* ---------- hero: decision first on phones (date, price, Book), photo after ---------- */
.cp-hero { padding-top: clamp(24px, 4vw, 56px); }
.cp-hero-grid { display: grid; gap: 28px; }
.cp-hero-copy { display: grid; gap: 16px; align-content: start; }
.cp-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.cp-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-muted); text-decoration: none; }
.cp-crumbs a:hover { color: var(--ink); }
.cp-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 15px; margin-top: -6px; }
.cp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.cp-dots { display: inline-flex; gap: 5px; margin-left: 4px; }
.cp-dots i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--c); }
.cp-dots i.on { background: var(--c); }
.cp-hero h1 { font-size: calc(var(--ds) * clamp(44px, 4.4vw + 20px, 86px)); color: var(--cream); max-width: 11em; }
.cp-lede { color: var(--ink-soft); font-size: 18px; line-height: 1.55; max-width: 34em; }

.cp-book { display: grid; gap: 14px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.cp-when { display: grid; gap: 2px; }
.cp-when .label { color: var(--saffron); }
.cp-date { font-weight: 400; font-size: 24px; line-height: 1.2; color: var(--cream); font-variant-numeric: tabular-nums; }
.cp-date.is-req { color: var(--ink-soft); }
.cp-price { color: var(--cream); font-variant-numeric: tabular-nums; }
.cp-price.is-enq { color: var(--ink-muted); font-size: 15px; }
.cp-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-btns .btn { flex: 1 1 auto; }
.cp-online { font-size: 15px; color: var(--ink-soft); }
.cp-online a { color: var(--saffron-lt); }
.cp-online:empty { display: none; }

.cp-hero-photo { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--espresso-3); }
.cp-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 600px) { .cp-btns .btn { flex: 0 0 auto; } }
@media (min-width: 1024px) {
  .cp-hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 64px; align-items: stretch; }
  .cp-hero-copy { gap: 20px; padding-block: 24px; align-content: center; }
  .cp-hero-photo { aspect-ratio: auto; min-height: 520px; max-height: 620px; }
  .cp-book { max-width: 30em; }
}

/* ---------- at a glance: the facts every course carries ---------- */
.cp-glance { padding-top: clamp(32px, 5vw, 64px); }
.cp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; border-top: 1px solid var(--line); }
.cp-facts div { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.cp-facts dt { font-size: 14px; color: var(--ink-muted); }
.cp-facts dd { margin: 0; color: var(--cream); font-size: 16px; line-height: 1.4; }
@media (min-width: 768px) { .cp-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; } }
@media (min-width: 1024px) { .cp-facts { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* ---------- pathway: where this course sits in its track ---------- */
.cp-path { padding-bottom: 0; }
.cp-path-list { display: grid; gap: 10px; counter-reset: none; }
.cp-path-card {
  position: relative; display: grid; gap: 6px; height: 100%;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--espresso-2); color: inherit; text-decoration: none;
  transition: border-color .4s var(--ease);
}
a.cp-path-card:hover, a.cp-path-card:focus-visible { border-color: color-mix(in oklab, var(--c) 70%, transparent); }
.cp-path-card .label { color: var(--ink-muted); }
.cp-path-name { font-size: 22px; line-height: 1.25; color: var(--cream); }
.cp-path-go { color: var(--saffron); font-size: 15px; }
.cp-path-here { justify-self: start; font-size: 14px; padding: 5px 10px; border-radius: 999px; background: color-mix(in oklab, var(--c) 35%, var(--espresso-2)); border: 1px solid var(--c); color: var(--cream); font-weight: 500; }
.is-here .cp-path-card { border-color: var(--c); background: color-mix(in oklab, var(--c) 14%, var(--espresso-2)); }
.cp-path-list--five .cp-path-card { border-top: 3px solid var(--c); }
@media (min-width: 768px) {
  .cp-path-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .cp-path-list--sust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cp-path-list--one { grid-template-columns: minmax(0, 1fr); max-width: 30em; }
  /* arrows between ladder steps */
  /* sustainability: one arrow out of Foundation only, the three specialists run in any order */
  .cp-path-list:not(.cp-path-list--five):not(.cp-path-list--one):not(.cp-path-list--sust) .cp-path-step + .cp-path-step .cp-path-card::before,
  .cp-path-list--sust .cp-path-step:nth-child(2) .cp-path-card::before {
    content: "→"; position: absolute; left: -14px; top: 50%; transform: translate(-50%, -50%);
    color: var(--ink-muted); font-size: 16px;
  }
}
@media (min-width: 1024px) { .cp-path-list--five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- body: content + sticky booking card on desktop ---------- */
.cp-layout { display: grid; gap: 0; padding-top: var(--sec); }
.cp-main { display: grid; gap: var(--sec); min-width: 0; }
.cp-sec .sec-head { margin-bottom: 28px; }
.cp-sec h2.display { font-size: calc(var(--ds) * clamp(32px, 2vw + 22px, 52px)); color: var(--cream); }
.cp-h3 { font-size: 22px; font-weight: 500; line-height: 1.3; color: var(--cream); margin-bottom: 14px; }

.cp-outcomes { display: grid; border-top: 1px solid var(--line); }
.cp-outcomes li { display: grid; grid-template-columns: 2.6em 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cp-num { color: color-mix(in oklab, var(--c) 50%, var(--cream)); font-variant-numeric: tabular-nums; padding-top: 1px; }
.cp-outcomes p { color: var(--ink); line-height: 1.5; }
@media (min-width: 768px) {
  .cp-outcomes { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}

.cp-two { display: grid; gap: 40px; }
@media (min-width: 768px) { .cp-two { grid-template-columns: 1fr 1fr; } }
.cp-ticks { display: grid; gap: 12px; }
.cp-ticks li { position: relative; padding-left: 26px; color: var(--ink-soft); line-height: 1.5; }
.cp-ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 10px; height: 2px; background: var(--c); }

.cp-teacher { display: grid; gap: 24px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--espresso-2); }
.cp-teacher img { width: 120px; height: 150px; object-fit: cover; object-position: 50% 20%; border-radius: 10px; }
.cp-teacher > div { display: grid; gap: 12px; justify-items: start; }
.cp-teacher h2.display { font-size: calc(var(--ds) * clamp(32px, 1.6vw + 22px, 44px)); }
.cp-teacher p:not(.label) { color: var(--ink-soft); max-width: 40em; }
@media (min-width: 600px) { .cp-teacher { grid-template-columns: 160px 1fr; align-items: start; } .cp-teacher img { width: 160px; height: 200px; } }

.cp-faq { border-top: 1px solid var(--line); }
.cp-faq-item { border-bottom: 1px solid var(--line); }
.cp-faq-item summary { list-style: none; cursor: pointer; position: relative; padding: 18px 44px 18px 0; min-height: 44px; }
.cp-faq-item summary::-webkit-details-marker { display: none; }
.cp-faq-item summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 26px; line-height: 1; color: var(--ink-muted); transition: transform .3s var(--ease); }
.cp-faq-item[open] summary::after { transform: rotate(45deg); }
.cp-faq-item summary:hover h3 { color: var(--saffron-lt); }
.cp-faq-item h3 { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.4; color: var(--cream); }
.cp-faq-a { padding: 0 0 20px; color: var(--ink-soft); max-width: 44em; }
.cp-faq-more { margin-top: 20px; color: var(--ink-muted); }
.cp-faq-more a { color: var(--saffron-lt); }

/* booking card: desktop only (phones get the bottom bar instead) */
.cp-aside { display: none; }
@media (min-width: 1024px) {
  .cp-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; align-items: start; }
  .cp-aside { display: block; position: sticky; top: calc(var(--hdr) + 24px); }
}
.cp-card { display: grid; gap: 14px; padding: 24px; border: 1px solid var(--line-strong); border-top: 3px solid var(--c); border-radius: var(--radius); background: var(--espresso-2); }
.cp-card-title { font-size: 19px; font-weight: 500; line-height: 1.3; color: var(--cream); }
.cp-card-meta { font-size: 15px; color: var(--ink-muted); margin-top: -6px; }
.cp-btns--stack { display: grid; }
.cp-card-foot { font-size: 14px; color: var(--ink-muted); }
.cp-card-foot a { color: var(--ink-soft); }

/* ---------- closing ---------- */
.cp-close { border-top: 1px solid var(--line); margin-top: var(--sec); }
.cp-close .wrap { display: grid; gap: 20px; justify-items: start; }
.cp-close h2 { font-size: calc(var(--ds) * clamp(38px, 3vw + 22px, 72px)); color: var(--cream); max-width: 15em; }
.cp-close .cp-btns { width: 100%; }
@media (min-width: 600px) { .cp-close .cp-btns { width: auto; } }

/* ---------- sticky booking bar: phones and tablets ---------- */
.cp-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(33, 18, 10, .96);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-strong);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  transform: translateY(105%); visibility: hidden;
  transition: transform .45s var(--ease), visibility 0s linear .45s;
}
.cp-bar.is-on { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
.cp-bar-in { display: flex; align-items: center; gap: 10px; max-width: 720px; margin-inline: auto; }
.cp-bar-when { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; font-size: 15px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.cp-bar-when span:first-child { color: var(--cream); font-weight: 500; }
.cp-bar-when span:last-child { color: var(--ink-muted); font-size: 14px; }
.cp-bar .btn { flex: none; padding: 0 22px; }
.cp-bar-wa {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--cream);
}
.cp-bar-wa:hover { border-color: var(--saffron); color: var(--saffron-lt); }
@media (min-width: 1024px) { .cp-bar { display: none; } }
@media (prefers-reduced-motion: reduce) { .cp-bar, .cp-bar.is-on { transition: none; } }
