/* ============================================================
   IMPACT Learning Hub — site header & footer
   Depends on tokens in style.css (load that first)
   ------------------------------------------------------------
   The previous version carried two complete footer
   implementations (.site-foot from the first build, .ft from
   the second) plus an infinitely looping logo animation and an
   infinitely looping credit mark. Both loops have been cut:
   a mark that pulses forever reads as a widget, not a
   letterhead. Motion now plays once on load and then rests.

   The dead .site-foot block is gone. .ft is the footer.
   ============================================================ */

/* ============================================================
   Utility bar — address, phone, email. A registered
   consulting firm puts its contact details above the fold.
   ============================================================ */
.util-bar{
  background: var(--ink);
  color: #C3CBE2;
  font-size: var(--step--2);
}
.util-in{
  display: flex;
  align-items: center;
  gap: 8px 24px;
  min-height: 36px;
  flex-wrap: wrap;
}
.util-bar a{ color: #fff; text-decoration: none; }
.util-bar a:hover{ color: var(--amber); text-decoration: none; }
.util-where{ display: flex; align-items: center; gap: 7px; }
.util-where svg{ flex: none; opacity: .75; }
.util-contact{ display: flex; align-items: center; gap: 8px 20px; margin-left: auto; flex-wrap: wrap; }
.util-sep{ color: rgba(255,255,255,.24); }
@media (max-width: 760px){
  .util-bar{ display: none; }   /* phone users get this in the footer and the menu */
}

/* ============================================================
   Header
   ============================================================ */
.site-head{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: var(--border);
  transition: box-shadow .2s var(--ease);
}
/* Shadow appears only once the page has scrolled, so the header
   is flat at rest and lifted when it is overlapping content. */
.site-head.is-stuck{ box-shadow: var(--lift-2); }

.head-in{
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}
@media (max-width: 560px){ .head-in{ min-height: 64px; } }

/* ---------- logo lockup ----------
   Four-square mark left, IMPACT wordmark in brand blue, red
   tagline beneath — the arrangement from the client's
   letterhead. */
:root{ --lockup-blue: #1F5FA3; --lockup-red: #B80F0A; }

.logo{ display: flex; align-items: center; gap: 12px; flex: none; }
.logo:hover{ text-decoration: none; }

.mark{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 42px;
  height: 42px;
  flex: none;
}
.mark i{ display: block; border-radius: 2px; }
.mark .d-data{ background: var(--div-data); }
.mark .d-tech{ background: var(--div-tech); }
.mark .d-lab{  background: var(--div-lab); }
.mark .d-agri{ background: var(--div-agri); }

.wordmark{ display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.wordmark b{
  font-family: var(--font-body);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--lockup-blue);
  letter-spacing: -0.02em;
  line-height: .95;
}
.wordmark small{
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--lockup-red);
  margin-top: 4px;
  max-width: 19em;
}
@media (max-width: 620px){
  .logo{ gap: 9px; }
  .mark{ width: 34px; height: 34px; gap: 3px; }
  .wordmark b{ font-size: 1.45rem; }
  .wordmark small{ font-size: 0.5rem; max-width: 15em; }
}
@media (max-width: 380px){
  .wordmark small{ display: none; }   /* keep the lockup from wrapping */
}

/* Mark builds itself once on load, then stops. */
.logo .mark i{
  transform-origin: center;
  animation: lgPop .55s var(--ease) both;
}
.logo .mark i:nth-child(1){ animation-delay: .02s; }
.logo .mark i:nth-child(2){ animation-delay: .09s; }
.logo .mark i:nth-child(3){ animation-delay: .16s; }
.logo .mark i:nth-child(4){ animation-delay: .23s; }
@keyframes lgPop{
  from{ opacity: 0; transform: scale(.4); }
  to{ opacity: 1; transform: none; }
}

/* ---------- nav ---------- */
.menu-toggle{ display: none; margin-left: auto; }

.main-nav{
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.nav-link{
  display: inline-flex;
  align-items: center;
  height: 72px;
  padding: 0 13px;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--ink-mid);
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.nav-link:hover{ color: var(--ink); border-bottom-color: var(--stone-deep); text-decoration: none; }
.nav-link[aria-current="page"]{ color: var(--ink); border-bottom-color: var(--amber); }

.nav-explore{ position: relative; }
.nav-link[aria-expanded="true"]{ color: var(--ink); border-bottom-color: var(--stone-deep); }

.explore-menu{
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  min-width: 290px;
  background: var(--surface);
  border: var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--lift-2);
  padding: 8px;
  z-index: 30;
}
.explore-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--ink);
}
.explore-item:hover{ background: var(--paper-deep); text-decoration: none; }
.explore-item i{ width: 9px; height: 9px; border-radius: 50%; flex: none; }
.explore-item.sub{ padding-left: 22px; font-weight: 500; }
.explore-item.data i{ background: var(--div-data); }
.explore-item.tech i{ background: var(--div-tech); }
.explore-item.lab i{  background: var(--div-lab); }
.explore-item.agri i{ background: var(--div-agri); }
.explore-item.lang i{ background: var(--div-lang); }
.explore-item.hub i{  background: var(--div-hub); }
.explore-menu hr{ border: 0; border-top: var(--hairline); margin: 6px 4px; }

.nav-auth{ display: flex; align-items: center; gap: 8px; margin-left: 12px; }

/* ---------- mobile drawer ---------- */
@media (max-width: 1040px){
  .menu-toggle{ display: inline-flex; }
  .main-nav{
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: var(--border);
    box-shadow: var(--lift-2);
    padding: 6px var(--rail) 22px;
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .main-nav.open{ display: flex; }
  .nav-link{
    height: auto;
    padding: 15px 2px;
    border-bottom: 1px solid var(--stone-soft);
    border-left: 3px solid transparent;
    font-size: var(--step-0);
    justify-content: flex-start;
  }
  .nav-link[aria-current="page"]{ border-bottom-color: var(--stone-soft); border-left-color: var(--amber); padding-left: 10px; }
  .nav-explore{ position: static; }
  .explore-menu{
    position: static;
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid var(--stone-soft);
    border-radius: 0;
    padding: 2px 0 8px 10px;
    min-width: 0;
  }
  .nav-auth{ margin: 18px 0 0; }
  .nav-auth .btn{ flex: 1; }
  /* Contact details for phone users, who do not get the util bar */
  .nav-contact{
    display: block;
    margin-top: 18px;
    padding-top: 16px;
    border-top: var(--hairline);
    font-size: var(--step--1);
    color: var(--ink-soft);
  }
  .nav-contact a{ display: block; padding: 4px 0; font-weight: 600; }
}
.nav-contact{ display: none; }

/* ============================================================
   Footer
   ============================================================ */
.ft{
  background: var(--ink);
  color: #D5D9E6;
  margin-top: clamp(48px, 7vw, 88px);
}
.ft-ribbon{
  height: 4px;
  background: linear-gradient(90deg,
    var(--div-data) 0 20%, var(--div-tech) 0 40%,
    var(--div-lab) 0 60%, var(--div-agri) 0 80%, var(--div-lang) 0);
}

.ft-main{
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 1.4fr minmax(200px, auto);
  gap: 32px 48px;
  padding-block: 40px 32px;
  align-items: start;
}
.ft .wordmark b{ color: #fff; }
.ft .wordmark small{ color: #FF9D94; }
.foot-logo{ margin-bottom: 14px; }
.foot-logo .mark{ width: 46px; height: 46px; }
.foot-logo .wordmark b{ font-size: 2rem; }
.ft-brand-note{
  font-size: var(--step--1);
  color: #9BA4C0;
  max-width: 34ch;
  margin: 0;
  line-height: 1.6;
}

.ft-col h4{
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.ft-links{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 9px 24px;
}
.ft-links a{
  color: #C3CBE2;
  text-decoration: none;
  font-size: var(--step--1);
  border-bottom: 1px solid transparent;
  justify-self: start;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.ft-links a:hover{ color: #fff; border-color: var(--amber); text-decoration: none; }

.ft-contact{ display: flex; flex-direction: column; gap: 6px; font-size: var(--step--1); }
.ft-contact a{ color: #fff; text-decoration: none; }
.ft-contact a:hover{ color: var(--amber); }
.ft-contact address{ font-style: normal; color: #9BA4C0; line-height: 1.55; margin-top: 4px; max-width: 28ch; }

.foot-apps{ display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; }
.app-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 5px;
  color: #fff;
  font-size: .7rem;
  line-height: 1.25;
  text-decoration: none;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.app-badge b{ font-size: .84rem; }
.app-badge:hover{ border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.06); text-decoration: none; }
.app-badge.soon{ opacity: .5; cursor: default; }

.ft-base{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  align-items: center;
  padding-block: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: var(--step--2);
  color: #99A2BE;
}
.ft-base .reg{ font-variant-numeric: tabular-nums; }

/* ---------- O'net credit ----------
   The agency lockup draws itself once on load and then holds.
   It was looping every 3.2s, which pulled the eye to the
   bottom-right corner of every page forever. */
.foot-credit{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #99A2BE;
  font-size: var(--step--2);
  margin-left: auto;
}
.credit-label, .credit-sub{ white-space: nowrap; }
.credit-sub{ color: #7A84A8; }
.onet-lockup{ flex: none; }
.onet-ring{
  stroke-dasharray: 201.1;
  stroke-dashoffset: 201.1;
  animation: onet-ring 1.1s var(--ease) .2s forwards;
}
.onet-slash{
  stroke-dasharray: 97.7;
  stroke-dashoffset: 97.7;
  animation: onet-slash .65s var(--ease) .85s forwards;
}
@keyframes onet-ring{  to{ stroke-dashoffset: 0; } }
@keyframes onet-slash{ to{ stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce){
  .onet-ring, .onet-slash{ stroke-dashoffset: 0; animation: none; }
  .logo .mark i{ animation: none; opacity: 1; transform: none; }
}

@media (max-width: 980px){
  .ft-main{ grid-template-columns: 1fr 1fr; }
  .ft-brand{ grid-column: 1 / -1; }
}
@media (max-width: 640px){
  .ft-main{ grid-template-columns: 1fr; gap: 28px; padding-block: 32px 24px; }
  .ft-base{ flex-direction: column; align-items: flex-start; }
  .foot-credit{ margin-left: 0; }
}
