/*
 * AEC Learning Hub — shared components (nav, buttons, cards, frames, accordion, modal).
 * Loaded after style.css; every value references a brand token defined there.
 */

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--color-psmj-navy);
  background: var(--color-psmj-white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-psmj-navy);
  letter-spacing: -0.01em;
  line-height: 1.08;
}
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-psmj-navy) 30%, transparent);
  outline-offset: 2px;
  border-radius: 2px;
}
.on-navy :focus-visible { outline-color: color-mix(in srgb, var(--color-psmj-white) 55%, transparent); }

/* ---------- Layout ---------- */
.container-psmj { max-width: var(--container-marketing); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 96px; }
.section-tight { padding-block: 64px; }
@media (max-width: 767px) { .section { padding-block: 64px; } .section-tight { padding-block: 48px; } }
.section-hero { padding-block: 96px; }
@media (min-width: 1024px) { .section-hero { padding-block: 128px; } }
.surface-navy { background: var(--color-psmj-navy); color: var(--color-psmj-white); }
.surface-gray { background: var(--color-psmj-gray); }
.rule-top { border-top: 1px solid var(--color-psmj-border); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-eyebrow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.h-hero { font-size: var(--text-h1-sm); color: var(--color-psmj-white); line-height: 1.02; }
@media (min-width: 1024px) { .h-hero { font-size: var(--text-h1); } }
.h-section { font-size: var(--text-h2-sm); }
@media (min-width: 768px) { .h-section { font-size: var(--text-h2); } }
.h-card { font-size: var(--text-h3); line-height: 1.2; }
.h-subhead { font-size: var(--text-h3); line-height: 1.3; }
@media (min-width: 768px) { .h-subhead { font-size: 1.75rem; } }
.text-lead { font-size: var(--text-lead); line-height: 1.65; }
.text-muted { color: color-mix(in srgb, var(--color-psmj-navy) 78%, transparent); }
.text-on-navy { color: color-mix(in srgb, var(--color-psmj-white) 86%, transparent); }
.prose-psmj p + p { margin-top: 16px; }
.prose-psmj strong { font-weight: 700; }

/* One inline sentence prevents host flex/grid or link-position rules from
   separating contact details from the surrounding text. Keep links exposed. */
p:has(> .contact-sentence) { display: block !important; }
.contact-sentence,
.contact-sentence > a,
.contact-sentence > strong {
  display: inline !important;
  position: static !important;
  float: none !important;
  order: 0 !important;
  transform: none !important;
}

/* Team-packages contact link: PSMJ Red, no underline (hover restores it). */
.contact-email {
  color: var(--color-psmj-red);
  text-decoration: none;
}
.contact-email:hover,
.contact-email:focus-visible { text-decoration: underline; }


/* Hero stat line — e.g. "7 courses · 7 PDH". The separator dot is drawn
   with an empty ::before pseudo-element (background circle), so screen
   readers announce "7 courses, 7 PDH" and never the dot. */
.stat-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--color-psmj-white) 86%, transparent);
  opacity: 0.8;
}
.stat-line li { white-space: nowrap; }
.stat-line li + li { margin-left: 16px; }
.stat-line li + li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: currentColor;
  vertical-align: 3px;
  margin-right: 16px;
}
.stat-line-num { font-family: var(--font-display); font-weight: 700; }

/* Diagonal slash motif (~28deg) */
.slash {
  display: inline-block;
  width: 56px;
  height: 4px;
  background: var(--color-psmj-red);
  transform: skewX(-28deg);
  flex-shrink: 0;
}
.slash-row { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--ease-psmj), color 200ms var(--ease-psmj), transform 120ms var(--ease-psmj);
}
.btn-primary { background: var(--color-psmj-red); color: var(--color-psmj-white); border: 1px solid transparent; }
.btn-primary:hover { background: var(--color-psmj-red-600); }
.btn-primary:active { background: var(--color-psmj-red-700); transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--color-psmj-navy); border: 1px solid var(--color-psmj-navy); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-psmj-navy) 6%, transparent); }
.btn-secondary-light { background: transparent; color: var(--color-psmj-white); border: 1px solid color-mix(in srgb, var(--color-psmj-white) 65%, transparent); }
.btn-secondary-light:hover { background: color-mix(in srgb, var(--color-psmj-white) 10%, transparent); }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 14px; }
.btn-academy { width: 100%; padding-inline: 8px; font-size: var(--text-small); }
.btn-academy span { white-space: nowrap; }
@media (min-width: 768px) and (max-width: 1023px) {
  .btn-academy { padding-inline: 4px; font-size: var(--text-eyebrow); letter-spacing: 0; }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 500;
  font-size: 15px;
  color: var(--color-psmj-navy);
  text-decoration: underline;
  text-decoration-color: var(--color-psmj-red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 200ms var(--ease-psmj);
}
.text-link:hover { color: var(--color-psmj-red-700); }

/* Labels / pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-weight: 500;
  font-size: var(--text-eyebrow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}
.pill-dot::before { content: ""; width: 8px; height: 8px; background: var(--color-psmj-red); display: inline-block; }
.pill-on-navy { border: 1px solid color-mix(in srgb, var(--color-psmj-white) 35%, transparent); color: var(--color-psmj-white); }
.pill-light { border: 1px solid var(--color-psmj-border); color: var(--color-psmj-navy); background: var(--color-psmj-white); }
.pill-navy { background: var(--color-psmj-navy); color: var(--color-psmj-white); }
.status-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  border: 1px dashed var(--color-psmj-navy);
  color: var(--color-psmj-navy);
  font-weight: 500;
  font-size: 15px;
}

/* ---------- Icons ---------- */
.icon { width: 24px; height: 24px; flex-shrink: 0; stroke-width: 1.75; }
.icon-20 { width: 20px; height: 20px; }
.icon-16 { width: 16px; height: 16px; }
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-btn);
  background: var(--color-psmj-navy);
  color: var(--color-psmj-white);
  flex-shrink: 0;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--color-psmj-white);
  border: 1px solid var(--color-psmj-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-psmj-sm);
  transition: box-shadow 200ms var(--ease-psmj), transform 200ms var(--ease-psmj);
}
.card-hover:hover { box-shadow: var(--shadow-psmj-md); transform: translateY(-2px); }
.card-accent::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--color-psmj-red);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  z-index: 1;
}
.card-pad { padding: 32px; }
@media (max-width: 639px) { .card-pad { padding: 24px; } }
.card-media { overflow: hidden; border-radius: var(--radius-card) var(--radius-card) 0 0; }

/* Sidebar callout (mirrors "If these sound familiar" aside) */
.callout {
  position: relative;
  background: var(--color-psmj-gray);
  border: 1px solid var(--color-psmj-border);
  border-radius: var(--radius-card);
  padding: 40px;
}
@media (max-width: 639px) { .callout { padding: 24px; } }
.callout::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--color-psmj-red);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

/* ---------- Photos ---------- */
/* Shared footer: one heading above a single, equal-height card row. */
.footer-cards { display: grid; gap: 32px; margin-top: 48px; }
.footer-card { box-shadow: none; font-size: 15px; }
.footer-card .eyebrow { margin-bottom: 12px; line-height: 1.4; letter-spacing: 0.12em; }
.footer-card .footer-guarantee-heading { color: var(--color-psmj-red); }
.footer-credits { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.footer-aia-logo { width: 33.333333%; height: auto; flex-shrink: 0; }
.footer-credits-copy { width: 100%; min-width: 0; }
.footer-contact { margin-top: 16px; font-size: var(--text-small); }
.footer-contact strong { white-space: nowrap; }
.footer-contact a { color: var(--color-psmj-red); overflow-wrap: anywhere; }
.footer-contact a:hover { text-decoration: underline; }
@media (min-width: 768px) {
  .footer-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-credits { flex-direction: row; align-items: flex-start; }
  .footer-aia-logo { width: 72px; }
}

.photo { position: relative; overflow: hidden; border-radius: var(--radius-card); border: 1px solid var(--color-psmj-border); background: var(--color-psmj-gray); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-3-1 { aspect-ratio: 3 / 1; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.photo-badge { position: absolute; left: 12px; bottom: 12px; }

/* ---------- Browser-window frames for course screens ---------- */
.browser-frame {
  background: var(--color-psmj-white);
  border: 1px solid var(--color-psmj-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-psmj-xl);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding-inline: 10px;
  background: var(--color-psmj-gray);
  border-bottom: 1px solid var(--color-psmj-border);
}
.browser-bar span { width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--color-psmj-border); }
.browser-bar span:first-child { background: var(--color-psmj-navy); opacity: 0.35; }
.browser-frame img { display: block; width: 100%; height: auto; object-fit: cover; object-position: top left; }

.screen-stack { position: relative; aspect-ratio: 16 / 11; }
.screen-stack .browser-frame { position: absolute; }
.screen-stack .layer-back { top: 0; left: 0; width: 78%; }
.screen-stack .layer-front { right: 0; top: 30%; width: 78%; z-index: 2; }
.screen-stack .layer-accent { left: 6%; bottom: 0; width: 52%; z-index: 3; }
.screen-stack.two .layer-front { top: 38%; }

/* Landing thumbnails */
.thumb-link { display: block; text-decoration: none; color: inherit; }
.thumb-link .photo { transition: box-shadow 200ms var(--ease-psmj), transform 200ms var(--ease-psmj); }
.thumb-link:hover .photo { box-shadow: var(--shadow-psmj-md); transform: translateY(-2px); }
.thumb-link img.is-screen { object-position: top left; }
.thumb-caption { margin-top: 16px; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.25; display: flex; gap: 8px; align-items: center; }
.thumb-link:hover .thumb-caption { text-decoration: underline; text-decoration-color: var(--color-psmj-red); text-underline-offset: 4px; }

/* Numbered course list (FM / Fundamentals) */
.course-list { counter-reset: course; border-top: 1px solid var(--color-psmj-border); }
.course-list li {
  counter-increment: course;
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-psmj-border);
  font-size: 1.0625rem;
}
.course-list li::before {
  content: counter(course, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-psmj-red);
  min-width: 2ch;
}

/* ---------- Sticky nav ---------- */
.site-nav {
  z-index: 40;
  height: 72px;
  background: var(--color-psmj-white);
  border-bottom: 1px solid var(--color-psmj-border);
  transition: background-color 200ms var(--ease-psmj);
}
.site-nav.is-scrolled { background: color-mix(in srgb, var(--color-psmj-white) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.site-nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-nav nav .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 72px;
  font-size: 15px;
  font-weight: 400;
  color: var(--color-psmj-navy);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  white-space: nowrap;
  transition: color 120ms var(--ease-psmj);
}
.site-nav nav .nav-link:hover { color: var(--color-psmj-red-700); }
.site-nav nav .nav-link[aria-current="page"] {
  color: var(--color-psmj-navy);
  text-decoration-color: var(--color-psmj-red);
}
.nav-login { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-left: auto; font-size: 15px; color: var(--color-psmj-navy); text-decoration: none; white-space: nowrap; }
.nav-login:hover { text-decoration: underline; text-underline-offset: 4px; }
/* HubSpot's .hidden overrides display as well as visibility. Restore only
   this project's desktop nav at its lg breakpoint, including its children. */
@media (min-width: 1024px) {
  #site-nav nav.hidden[class~="lg:flex"] { display: flex !important; visibility: visible !important; }
  #site-nav nav.hidden[class~="lg:flex"] * { visibility: visible !important; }
  .nav-toggle { display: none !important; }
}
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -10px; color: var(--color-psmj-navy); background: none; border: 0; cursor: pointer; }
.nav-mobile { background: var(--color-psmj-white); border-bottom: 1px solid var(--color-psmj-border); box-shadow: var(--shadow-psmj-md); }
.nav-mobile a { display: flex; align-items: center; min-height: 48px; padding-inline: 24px; color: var(--color-psmj-navy); text-decoration: none; border-top: 1px solid var(--color-psmj-border); }
.nav-mobile a[aria-current="page"] { color: var(--color-psmj-navy); font-weight: 400; box-shadow: inset 3px 0 0 var(--color-psmj-red); }

.nav-loading-track { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: transparent; pointer-events: none; }
.nav-loading-fill { height: 2px; width: 0%; background: var(--color-psmj-red); visibility: hidden; transition: none; }
.nav-loading-fill.is-running { width: 100%; visibility: visible; transition: width 1.3s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .nav-loading-fill.is-running { width: 0%; visibility: hidden; transition: none; }
}

/* ---------- Course catalog accordion ---------- */
.library-block + .library-block { margin-top: 64px; }
.library-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--color-psmj-navy);
}
.course-row { border-bottom: 1px solid var(--color-psmj-border); }
.course-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 16px 4px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--color-psmj-navy);
  font: inherit;
  transition: background-color 120ms var(--ease-psmj);
}
.course-toggle:hover { background: color-mix(in srgb, var(--color-psmj-navy) 3%, transparent); }
.course-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-psmj-navy);
  color: var(--color-psmj-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.course-title { flex: 1; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.3; }
.course-meta { font-family: var(--font-body); font-weight: 400; display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-size: var(--text-small); color: color-mix(in srgb, var(--color-psmj-navy) 78%, transparent); white-space: nowrap; }
.pill-sample { border: 1px solid var(--color-psmj-red); color: var(--color-psmj-navy); background: var(--color-psmj-white); padding: 4px 10px; letter-spacing: 0.08em; }
.course-chevron { transition: transform 200ms var(--ease-psmj); }
.course-toggle[aria-expanded="true"] .course-chevron { transform: rotate(180deg); }
.course-panel { padding: 4px 4px 32px 64px; }
@media (max-width: 639px) {
  .course-toggle { flex-wrap: wrap; }
  .course-title { flex-basis: calc(100% - 64px); }
  .course-meta { width: 100%; padding-left: 60px; }
  .course-panel { padding-left: 4px; }
}
.course-panel ul.bullets li { position: relative; padding-left: 20px; margin-top: 8px; }
.course-panel ul.bullets li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 8px; height: 8px; background: var(--color-psmj-red); }
.course-panel[data-animate] { animation: panel-in 200ms var(--ease-psmj); }
@keyframes panel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--color-psmj-navy-deep) 70%, transparent);
  animation: fade-in 200ms var(--ease-psmj);
}
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--color-psmj-white);
  border: 1px solid var(--color-psmj-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-psmj-xl);
  padding: 40px;
  animation: rise-in 240ms var(--ease-psmj);
}
@media (max-width: 639px) { .modal-panel { padding: 28px 24px; } }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  border-radius: var(--radius-btn);
  color: var(--color-psmj-navy);
  cursor: pointer;
}
.modal-close:hover { background: color-mix(in srgb, var(--color-psmj-navy) 6%, transparent); }
.modal-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-psmj-border); }
.modal-list li span:first-child { font-family: var(--font-display); font-weight: 700; min-width: 2.5ch; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Video */
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--color-psmj-border); box-shadow: var(--shadow-psmj-lg); background: var(--color-psmj-navy); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Desktop hero (>=1280px): wider text column + right bleed ---------- */
:root { --hero-bleed: clamp(0px, calc((100vw - 1120px) / 2), 220px); }
@media (min-width: 1280px) {
  .section-hero { overflow-x: clip; overflow-y: visible; }
  .section-hero > .container-psmj.grid { column-gap: 48px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .section-hero > .container-psmj.grid:has(> .photo.ratio-4-3) { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .section-hero .screen-stack,
  .section-hero > .container-psmj > .photo.ratio-4-3 { width: calc(100% + var(--hero-bleed)); max-width: none; }
  .section-hero .screen-stack { height: auto; aspect-ratio: auto; align-self: center; }
  .section-hero .screen-stack .browser-frame { position: relative; left: auto; top: auto; right: auto; bottom: auto; width: 84%; }
  .section-hero .screen-stack .layer-back { margin-left: 0; z-index: 1; }
  .section-hero .screen-stack .layer-front { margin-left: 16%; margin-top: -20%; z-index: 2; }
  .section-hero .screen-stack .layer-accent { margin-left: 8%; margin-top: -20%; z-index: 3; }
}
