/* CODED Course Catalog — editorial brochure
 *
 * Multi-page A4 layout. Web view stacks the pages; @media print emits
 * real page breaks for the Puppeteer-generated PDF.
 *
 * Brand anchoring:
 *   • Edge-to-edge navy header band on every page (taller on page 1)
 *   • Big white CODED wordmark in the navy band
 *   • Navy footer band with contact + page number
 *   • Bracket motif around the topic chip (per the CODED brand book)
 *   • Topic accent color (red for Cybersecurity, royal for AI, etc.)
 *     used for eyebrows, module numbers, cohort OPEN tag, CTA button,
 *     and the bracket marks
 */

/* ────────────────────────────────────────────────────────────────
 * Tokens
 * ──────────────────────────────────────────────────────────────── */

:root {
  /* A4 @ 96dpi */
  --cat-w: 794px;
  --cat-h: 1123px;

  /* Body padding (the navy bands sit outside this, edge-to-edge). */
  --cat-body-px: 56px;
  --cat-body-py: 32px;

  /* Navy header heights */
  --cat-head-h-1: 144px;    /* page 1 — hero-scale brand */
  --cat-head-h:   60px;     /* page 2+ — slim running header */
  --cat-foot-h:   52px;     /* footer band, all pages */

  /* Brand */
  --cat-navy: #11213D;
  --cat-navy-deep: #0C1B33;

  /* Body palette */
  --cat-rule: rgba(20, 36, 63, 0.10);
  --cat-rule-strong: rgba(20, 36, 63, 0.18);
  --cat-muted: #6B7A91;
  --cat-ink: #11213D;
  --cat-ink-2: #2D3F55;

  /* Default topic accent (overridden per program by .catalog--<topic>). */
  --topic: #1640C8;
  --topic-soft: rgba(1, 40, 145, 0.08);
  --topic-ink: #FFFFFF;
}

/* Topic accents — slug comes from catalog.js (lowercase, strip &, dashed). */
.catalog--cybersecurity                         { --topic: #DC2626; --topic-soft: #FEF2F2; }
.catalog--agentic-ai                            { --topic: #1640C8; --topic-soft: #EEF2FC; }
.catalog--artificial-intelligence               { --topic: #1640C8; --topic-soft: #EEF2FC; }
.catalog--ai-automation                         { --topic: #7C3AED; --topic-soft: #F5F3FF; }
.catalog--data-science-analysis                 { --topic: #047857; --topic-soft: #ECFDF5; }
.catalog--project-management-agile              { --topic: #D97706; --topic-soft: #FFFBEB; }
.catalog--software-development-design           { --topic: #1640C8; --topic-soft: #EEF2FC; }
.catalog--digital-transformation-and-management { --topic: #475569; --topic-soft: #F1F5F9; }

/* ────────────────────────────────────────────────────────────────
 * Page shell
 * ──────────────────────────────────────────────────────────────── */

body.has-catalog {
  background: #ECEFF4;
}
.catalog-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 16px 56px;
}

.catalog__page {
  width: 100%;
  max-width: var(--cat-w);
  min-height: var(--cat-h);
  background: #FFFFFF;
  color: var(--cat-ink);
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 13.5px;
  line-height: 1.55;
  position: relative;
  box-shadow: 0 8px 32px rgba(20, 36, 63, 0.08);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ────────────────────────────────────────────────────────────────
 * Navy header band (edge-to-edge)
 * ──────────────────────────────────────────────────────────────── */

.cat-head {
  flex-shrink: 0;
  background: var(--cat-navy);
  color: #FFFFFF;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 var(--cat-body-px);
}
.cat-head::after {
  /* Topic-colored accent stripe along the bottom edge of the navy band */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--topic);
}

/* Page 1 — large brand band */
.cat-head--hero {
  height: var(--cat-head-h-1);
  align-items: flex-start;
  padding-top: 32px;
  padding-bottom: 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
}
.cat-head--hero .cat-head__logo {
  height: 56px;
  width: auto;
  align-self: center;
  display: block;
}
.cat-head--hero .cat-head__right {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.cat-head__caption {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}
.cat-head__caption b {
  color: #FFFFFF;
  font-weight: 700;
}

/* Pages 2 / 3 — slim running header */
.cat-head--slim {
  height: var(--cat-head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-head--slim .cat-head__logo {
  height: 28px;
  width: auto;
  display: block;
}
.cat-head--slim .cat-head__right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78);
}
.cat-head--slim .cat-head__program {
  font-weight: 700;
  color: #FFFFFF;
}
.cat-head--slim .cat-head__sep { color: rgba(255, 255, 255, 0.4); }

/* ────────────────────────────────────────────────────────────────
 * Navy footer band (every page)
 * ──────────────────────────────────────────────────────────────── */

.cat-foot {
  flex-shrink: 0;
  background: var(--cat-navy);
  color: #FFFFFF;
  height: var(--cat-foot-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--cat-body-px);
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-top: auto;
}
.cat-foot__left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.75);
}
.cat-foot__email { color: #FFFFFF; font-weight: 600; }
.cat-foot__pageno {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #FFFFFF;
}

/* ────────────────────────────────────────────────────────────────
 * Body (white surface, padded)
 * ──────────────────────────────────────────────────────────────── */

.cat-body {
  flex: 1 1 auto;
  padding: var(--cat-body-py) var(--cat-body-px) calc(var(--cat-body-py) - 4px);
  display: flex;
  flex-direction: column;
  min-height: 0;     /* let flex shrink to fit */
}

/* ────────────────────────────────────────────────────────────────
 * Topic chip + section eyebrows
 * ──────────────────────────────────────────────────────────────── */

/* Brand-book bracket motif around the topic chip */
.cat-topic {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--topic);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.cat-topic::before { content: "["; font-weight: 400; opacity: 0.9; }
.cat-topic::after  { content: "]"; font-weight: 400; opacity: 0.9; }

.cat-eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--topic);
  margin: 0 0 10px;
}
.cat-eyebrow::before { content: "["; font-weight: 400; opacity: 0.9; }
.cat-eyebrow::after  { content: "]"; font-weight: 400; opacity: 0.9; }

/* ────────────────────────────────────────────────────────────────
 * Page 1 — Hero / Overview / Stats / Outcomes
 * ──────────────────────────────────────────────────────────────── */

.cat-hero {
  margin: 0 0 24px;
}
.cat-hero__title {
  font-family: var(--font-display, var(--font-sans));
  font-weight: 800;
  font-size: 52px;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--cat-ink);
  margin: 0;
  max-width: 95%;
}
.cat-hero__title--medium { font-size: 46px; }
.cat-hero__title--small  { font-size: 38px; }

.cat-hero__lede {
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--cat-ink-2);
  max-width: 92%;
}

/* 4-up stats strip */
.cat-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--cat-rule);
  border-top: 1px solid var(--cat-rule);
  border-bottom: 1px solid var(--cat-rule);
  margin: 24px 0;
}
.cat-stats__cell {
  background: #FFFFFF;
  padding: 14px 14px 16px;
}
.cat-stats__label {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cat-muted);
  margin: 0 0 6px;
}
.cat-stats__value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--cat-ink);
  line-height: 1.25;
  /* Keep "8 AM – 2 PM" on a single line. Combined with the non-breaking
   * spaces inside the value, this prevents PM dropping to the next line
   * in narrow columns. */
  white-space: nowrap;
}
.cat-stats__value-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--cat-muted);
  margin-top: 2px;
  letter-spacing: 0;
  text-transform: none;
}

/* Outcomes block */
.cat-section { margin: 0 0 20px; }
.cat-section__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--cat-ink);
  margin: 0 0 12px;
}
.cat-outcomes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}
.cat-outcomes li {
  position: relative;
  padding-left: 24px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cat-ink-2);
}
.cat-outcomes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--topic);
  border-radius: 50%;
  mask-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='white'><path d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='white'><path d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>");
  mask-size: contain;
  -webkit-mask-size: contain;
}

/* Stack / Tools / Fields summary on page 1 */
.cat-stack {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px 16px;
  margin: 0 0 22px;
}
.cat-stack__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cat-muted);
  padding-top: 4px;
}
.cat-stack__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F4F7FB;
  border: 1px solid var(--cat-rule);
  color: var(--cat-ink);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.005em;
}
.cat-chip img {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

/* ────────────────────────────────────────────────────────────────
 * Page 2 — Curriculum + Cohorts
 * ──────────────────────────────────────────────────────────────── */

.cat-modules {
  display: flex;
  flex-direction: column;
  margin: 0 0 28px;
}
.cat-module {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--cat-rule);
}
.cat-module:last-child { border-bottom: 1px solid var(--cat-rule); }
.cat-module__num {
  font-family: var(--font-display, var(--font-sans));
  font-size: 32px;
  font-weight: 800;
  line-height: 0.95;
  color: var(--topic);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.cat-module__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cat-module__meta {
  display: flex;
  gap: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cat-muted);
}
.cat-module__meta b { color: var(--topic); font-weight: 700; }
.cat-module__title {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--cat-ink);
  margin: 1px 0 2px;
}
.cat-module__focus {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--cat-ink-2);
  margin: 0;
}

.cat-cohorts {
  border-top: 1px solid var(--cat-rule);
}
.cat-cohort {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--cat-rule);
}
.cat-cohort__no {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cat-muted);
  font-variant-numeric: tabular-nums;
}
.cat-cohort__dates {
  font-size: 14px;
  font-weight: 600;
  color: var(--cat-ink);
}
.cat-cohort__tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cat-muted);
  padding: 3px 8px;
  border-radius: 3px;
  background: transparent;
}
.cat-cohort.is-next .cat-cohort__tag {
  background: var(--topic);
  color: var(--topic-ink);
}

/* ────────────────────────────────────────────────────────────────
 * Page 3 — Logistics / Audience / Instructor / FAQ / CTA
 * ──────────────────────────────────────────────────────────────── */

.cat-keyvals {
  display: grid;
  grid-template-columns: 130px 1fr;
  row-gap: 9px;
  column-gap: 18px;
  border-top: 1px solid var(--cat-rule);
  border-bottom: 1px solid var(--cat-rule);
  padding: 14px 0;
  margin: 0 0 18px;
}
.cat-keyvals dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cat-muted);
}
.cat-keyvals dd {
  margin: 0;
  font-size: 13px;
  color: var(--cat-ink);
  font-weight: 500;
}
.cat-keyvals dd a { color: var(--topic); }

.cat-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--cat-ink-2);
  margin: 0;
}

/* Instructor */
.cat-instructor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 14px 16px;
  background: var(--topic-soft);
  border-left: 3px solid var(--topic);
  border-radius: 3px;
}
.cat-instructor__name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--cat-ink);
  margin: 0;
}
.cat-instructor__role {
  font-size: 11px;
  font-weight: 700;
  color: var(--topic);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
}
.cat-instructor__bio {
  font-size: 12px;
  line-height: 1.5;
  color: var(--cat-ink-2);
  margin: 4px 0 0;
}

/* FAQ */
.cat-faq {
  display: flex;
  flex-direction: column;
}
.cat-faq__item {
  padding: 10px 0;
  border-top: 1px solid var(--cat-rule);
}
.cat-faq__item:first-child { border-top: 0; padding-top: 0; }
.cat-faq__q {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cat-ink);
  margin: 0 0 3px;
}
.cat-faq__a {
  font-size: 12px;
  line-height: 1.5;
  color: var(--cat-ink-2);
  margin: 0;
}

/* CTA strip — navy on white body, topic-colored email button */
.cat-cta {
  margin: 18px 0 0;
  padding: 18px 22px;
  background: var(--cat-navy);
  color: #FFFFFF;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cat-cta__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.cat-cta__sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  margin: 4px 0 0;
}
.cat-cta__email {
  background: var(--topic);
  color: var(--topic-ink);
  padding: 12px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

/* Screen-only actions */
.catalog-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

/* ────────────────────────────────────────────────────────────────
 * Print
 * ──────────────────────────────────────────────────────────────── */

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  html, body { background: #FFFFFF !important; }
  body.has-catalog .site-header,
  body.has-catalog .site-footer-min,
  body.has-catalog .sticky-cta-mobile,
  body.has-catalog .catalog-actions,
  body.has-catalog .skip-link { display: none !important; }
  .catalog-shell { padding: 0; gap: 0; }
  .catalog__page {
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    max-width: none;
    min-height: auto;
    height: 100vh;
    page-break-after: always;
    break-after: page;
  }
  .catalog__page:last-of-type {
    page-break-after: auto;
    break-after: auto;
  }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

/* ────────────────────────────────────────────────────────────────
 * Responsive (web only)
 * ──────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  :root { --cat-body-px: 28px; --cat-head-h-1: 100px; --cat-head-h: 50px; }
  .catalog__page { font-size: 13px; }
  .cat-hero__title { font-size: 38px; }
  .cat-stats { grid-template-columns: repeat(2, 1fr); }
  .cat-module { grid-template-columns: 1fr; gap: 4px; }
  .cat-module__num { font-size: 28px; }
  .cat-keyvals { grid-template-columns: 1fr; row-gap: 4px; }
  .cat-keyvals dt { margin-top: 8px; }
  .cat-cta { flex-direction: column; align-items: stretch; text-align: left; }
  .cat-head--hero .cat-head__logo { height: 40px; }
}
