/* CLP responsive polish: theme-aware inner-page heroes, ordered header controls,
   fluid Join the Journey CTA, and defensive learning-card hover pseudo-elements. */

/* Light theme: pale left-side blend for dark copy; retain the photo on the right. */
html[data-theme="light"] .page-hero {
  background-color: #f5faff;
  color: #10243e;
}
html[data-theme="light"] .page-hero::after {
  background:
    linear-gradient(90deg,
      rgba(245,250,255,.98) 0%,
      rgba(245,250,255,.91) 34%,
      rgba(245,250,255,.67) 57%,
      rgba(245,250,255,.20) 82%,
      rgba(245,250,255,.06) 100%),
    linear-gradient(0deg, rgba(245,250,255,.22), rgba(245,250,255,.02) 65%, rgba(245,250,255,.12));
}
html[data-theme="light"] .page-hero > * { text-shadow: none; }
html[data-theme="light"] .page-hero .eyebrow { color: #00647b; text-shadow: none; }
html[data-theme="light"] .page-hero h1,
html[data-theme="light"] .page-hero h1 span { color: #10243e; }
html[data-theme="light"] .page-hero h1 span {
  background: linear-gradient(90deg, #00647b, #5140a8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme="light"] .page-hero > p:last-child { color: #18364f; text-shadow: none; }

/* Desktop order: logo, navigation, then theme control at the extreme right. */
@media (min-width: 901px) {
  .site-header > .brand { order: 0; flex: 0 0 auto; }
  .site-header > .site-nav { order: 1; margin-left: auto; }
  .site-header > .header-controls { order: 2; margin-left: 0; }
  .site-header > .header-controls .nav-toggle { display: none !important; }
  .site-header > .header-controls .theme-toggle { margin-left: 2px; }
}

/* Fluid CTA sizing with a comfortable touch target in the collapsed mobile menu. */
.site-header > .site-nav .button-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1.2;
  min-height: 40px;
  padding: clamp(8px, .7vw, 11px) clamp(10px, 1.15vw, 16px);
  font-size: clamp(.78rem, .88vw, .92rem);
}
@media (max-width: 900px) {
  .site-header > .site-nav .button-small {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    font-size: .9rem;
  }
}

/* Prevent decorative pseudo-elements from becoming a blue hover circle on cards. */
body.home-page .home-path-card::after,
body.home-page .home-path-card:hover::after,
body.home-page .home-path-card:focus-visible::after,
body.home-page .home-video-card::after,
body.home-page .home-video-card:hover::after,
body.home-page .home-video-card:focus-visible::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  filter: none !important;
  pointer-events: none !important;
}


/* CLP refinement pass 2026-10-15: responsive controls and light-theme legibility. */

/* Keep the theme control visually consistent on tablet/mobile while preserving the
   approved desktop treatment. Use a compact, centered icon target beside Menu. */
@media (max-width: 900px) {
  .site-header > .header-controls {
    align-items: center;
    gap: 8px;
  }
  .site-header > .header-controls .theme-toggle {
    display: inline-grid !important;
    place-items: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex: 0 0 42px;
    padding: 0;
    border-radius: 50%;
    line-height: 1;
  }
  .site-header > .header-controls .theme-toggle .theme-toggle-label {
    display: none !important;
  }
  .site-header > .header-controls .theme-toggle .theme-toggle-icon {
    display: block;
    font-size: 1.15rem;
    line-height: 1;
  }
}
@media (max-width: 420px) {
  .site-header > .header-controls .theme-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex-basis: 40px;
  }
}

/* The collapsed menu intentionally stays dark in either theme. Explicitly set
   every link state so light-theme defaults cannot wash out the menu text. */
@media (max-width: 900px) {
  .site-header > .site-nav,
  .site-header > .site-nav.is-open {
    color: #f2fbff !important;
    background: rgba(4, 21, 39, .98) !important;
  }
  .site-header > .site-nav > a:not(.button),
  .site-header > .site-nav > a:not(.button):visited {
    color: #f2fbff !important;
    text-shadow: none !important;
  }
  .site-header > .site-nav > a:not(.button):hover,
  .site-header > .site-nav > a:not(.button):focus-visible,
  .site-header > .site-nav > a:not(.button):active {
    color: #75eaff !important;
    background: rgba(32, 215, 244, .12);
    border-radius: 8px;
  }
  .site-header > .site-nav > a:not(.button):focus-visible {
    outline: 2px solid #ffbf47;
    outline-offset: 1px;
  }
  html[data-theme="light"] .site-header > .site-nav,
  html[data-theme="light"] .site-header > .site-nav.is-open {
    color: #f2fbff !important;
    background: rgba(4, 21, 39, .98) !important;
  }
}

/* On compact screens, size the CTA to its caption rather than stretching it
   across the entire dropdown. Keep the tap target tall enough to use comfortably. */
@media (max-width: 900px) {
  .site-header > .site-nav .button-small {
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    min-height: 44px;
    padding: 11px 16px;
    font-size: .9rem;
    line-height: 1.2;
  }
}

/* Light-theme hero: remove the dark left patch with a strong pale blend behind
   copy, then fade smoothly to the unchanged contextual photograph on the right. */
html[data-theme="light"] .page-hero {
  background-color: #f5faff !important;
  color: #10243e !important;
}
html[data-theme="light"] .page-hero::after {
  background:
    linear-gradient(90deg,
      rgba(245, 250, 255, .99) 0%,
      rgba(245, 250, 255, .96) 32%,
      rgba(245, 250, 255, .84) 50%,
      rgba(245, 250, 255, .48) 70%,
      rgba(245, 250, 255, .10) 100%) !important;
}
html[data-theme="light"] .page-hero > * {
  background-color: transparent !important;
  text-shadow: none !important;
}
html[data-theme="light"] .page-hero .eyebrow {
  color: #005b70 !important;
}
html[data-theme="light"] .page-hero h1,
html[data-theme="light"] .page-hero h1 span {
  color: #10243e !important;
}
html[data-theme="light"] .page-hero h1 span {
  background: linear-gradient(90deg, #00647b, #5140a8) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
html[data-theme="light"] .page-hero > p:last-child {
  color: #18364f !important;
  text-shadow: none !important;
}


/* CLP footer refinement: modern editorial hierarchy, responsive layout, and
   resilient visibility in both themes. Keep content links truthful to the site. */
.site-footer {
  position: relative;
  isolation: isolate;
  display: grid !important;
  grid-template-columns: minmax(220px, 1.35fr) repeat(2, minmax(130px, .7fr));
  gap: clamp(22px, 3vw, 42px);
  align-items: start;
  padding: clamp(38px, 5vw, 66px) max(24px, calc((100% - 1200px) / 2)) 24px;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(32,215,244,.12), transparent 42%),
    linear-gradient(145deg, #061329 0%, #081d35 62%, #0a2941 100%) !important;
  color: #d8e8f5 !important;
  border-top: 1px solid rgba(104,216,255,.22);
  overflow-wrap: anywhere;
}
.site-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, #20d7f4 25%, #8b5cf6 72%, transparent);
  opacity: .8;
}
.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.site-footer .footer-brand img {
  display: block;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
}
.site-footer .footer-brand p {
  margin: 0;
  color: #7ce8ff !important;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .11em;
  line-height: 1.5;
}
.site-footer > div:nth-child(2) > p:first-child {
  max-width: 340px;
  margin: 0 0 15px;
  color: #c6d9e9 !important;
  font-size: .95rem;
  line-height: 1.75;
}
.site-footer > div:nth-child(2) > p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
}
.site-footer a {
  color: #8bdfff !important;
  text-decoration: none;
  text-underline-offset: 4px;
  font-weight: 700;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.site-footer a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}
.site-footer a:focus-visible {
  outline: 2px solid #ffbf47;
  outline-offset: 4px;
  border-radius: 3px;
}
.site-footer > small {
  grid-column: 1 / -1;
  display: block;
  margin-top: 2px;
  padding-top: 19px;
  border-top: 1px solid rgba(220,240,255,.16);
  color: #a9bfd2 !important;
  font-size: .78rem;
  line-height: 1.6;
}
html[data-theme="light"] .site-footer {
  background:
    radial-gradient(ellipse at 12% 0%, rgba(32,167,211,.10), transparent 45%),
    linear-gradient(145deg, #f1f8fc 0%, #e8f1f8 68%, #e2edf6 100%) !important;
  color: #18344e !important;
  border-top-color: #c5dbe9;
}
html[data-theme="light"] .site-footer .footer-brand p { color: #075b7a !important; }
html[data-theme="light"] .site-footer > div:nth-child(2) > p:first-child { color: #334d64 !important; }
html[data-theme="light"] .site-footer a { color: #075f87 !important; }
html[data-theme="light"] .site-footer a:hover { color: #063a59 !important; }
html[data-theme="light"] .site-footer > small {
  color: #50677b !important;
  border-top-color: #c8dbe8;
}
@media (max-width: 900px) {
  .site-footer {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    padding: 38px 28px 22px;
    gap: 26px 32px;
  }
  .site-footer .footer-brand { grid-column: 1 / -1; }
  .site-footer > div:nth-child(2) { min-width: 0; }
}
@media (max-width: 560px) {
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 32px 22px 20px;
    width: 100%;
    min-height: 0;
    height: auto;
    overflow: visible;
  }
  .site-footer .footer-brand { grid-column: auto; }
  .site-footer > div:nth-child(2) > p:first-child { max-width: 34ch; }
  .site-footer > div:nth-child(2) > p:last-child { gap: 12px 18px; }
  .site-footer > small { grid-column: auto; margin-top: 0; }
}


/* Tablet/mobile: keep the theme switch easy to tap, but remove the heavy
   circular button backdrop. Desktop appearance remains unchanged. */
@media (max-width: 900px) {
  .site-header > .header-controls .theme-toggle {
    background: transparent !important;
    background-image: none !important;
    border: 1px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: inherit;
  }
  .site-header > .header-controls .theme-toggle:hover,
  .site-header > .header-controls .theme-toggle:active {
    background: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }
  .site-header > .header-controls .theme-toggle:focus-visible {
    outline: 2px solid #20d7f4 !important;
    outline-offset: 2px;
    border-radius: 3px !important;
  }
  html[data-theme="light"] .site-header > .header-controls .theme-toggle {
    color: #10243e !important;
  }
  html[data-theme="dark"] .site-header > .header-controls .theme-toggle {
    color: #f2fbff !important;
  }
}


/* Follow-up responsive audit: keep the shared footer in normal document flow on
   compact viewports, regardless of homepage hero sizing or inherited animations. */
.site-footer,
body.home-page > .site-footer {
  display: grid !important;
  position: relative !important;
  inset: auto !important;
  float: none !important;
  clear: both;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0;
  overflow: visible !important;
  clip: auto !important;
  pointer-events: auto !important;
}
@media (max-width: 900px) {
  .site-header > .header-controls .nav-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center;
    border-radius: 12px;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    line-height: 1;
  }
  .site-header > .header-controls .nav-toggle:hover {
    background: rgba(32, 215, 244, .10) !important;
    border-color: rgba(32, 215, 244, .35) !important;
  }
  .site-header > .header-controls .nav-toggle:focus-visible {
    outline: 2px solid #20d7f4 !important;
    outline-offset: 3px;
  }
  html[data-theme="light"] .site-header > .header-controls .nav-toggle {
    color: #10243e !important;
  }
  html[data-theme="dark"] .site-header > .header-controls .nav-toggle {
    color: #f2fbff !important;
  }
  .hamburger-icon {
    width: 22px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
  }
  .hamburger-icon > span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
  }
  .site-header > .header-controls .nav-toggle[aria-expanded="true"] .hamburger-icon > span:first-child {
    transform: translateY(8px) rotate(45deg);
  }
  .site-header > .header-controls .nav-toggle[aria-expanded="true"] .hamburger-icon > span:nth-child(2) {
    opacity: 0;
  }
  .site-header > .header-controls .nav-toggle[aria-expanded="true"] .hamburger-icon > span:last-child {
    transform: translateY(-8px) rotate(-45deg);
  }
}
@media (max-width: 900px) {
  .site-footer,
  body.home-page > .site-footer {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    padding: 32px 22px 22px !important;
    margin: 0 !important;
  }
  .site-footer .footer-brand,
  .site-footer > div:nth-child(2),
  .site-footer > small {
    display: block !important;
    grid-column: auto !important;
    min-width: 0;
  }
  .site-footer .footer-brand {
    display: flex !important;
    align-items: center;
  }
  .site-footer > div:nth-child(2) > p:last-child {
    display: flex !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hamburger-icon > span { transition: none !important; }
}
