/* ============================================================
   IMPACT Learning Hub — site header & footer
   Depends on tokens defined in style.css (load that first)
   ============================================================ */

/* ---------- Header ---------- */
.site-head{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: var(--border);
}
.head-in{
  display: flex;
  align-items: center;
  gap: 20px;
  height: 76px;
}

.logo{ display: flex; align-items: center; gap: 10px; flex: none; }
.mark{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 26px;
  height: 26px;
  flex: none;
}
.mark i{ border-radius: 1px; }
.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; }
.wordmark b{
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.01em;
}
.wordmark small{ font-size: 0.72rem; color: var(--ink-soft); margin-top: 3px; }

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

.main-nav{
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link{
  display: inline-flex;
  align-items: center;
  height: 76px;
  padding: 0 14px;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--ink);
  background: none;
  border-top: none; border-left: none; border-right: none;
  cursor: pointer;
}
.nav-link:hover, .nav-link[aria-current="page"]{
  border-bottom-color: var(--amber);
  text-decoration: none;
}

.nav-explore{ position: relative; }
.explore-menu{
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 260px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15,27,60,0.14);
  padding: 8px;
  z-index: 30;
}
.explore-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--ink);
}
.explore-item:hover{ background: var(--stone-soft); text-decoration: none; }
.explore-item i{ width: 10px; height: 10px; border-radius: 50%; flex: none; }
.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: none; border-top: var(--border); margin: 6px 4px; }

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

@media (max-width: 980px){
  .menu-toggle{ display: inline-flex; }
  .main-nav{
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: var(--border);
    padding: 8px var(--rail) 20px;
    gap: 0;
  }
  .main-nav.open{ display: flex; }
  .nav-link{ height: auto; padding: 14px 0; border-bottom: 1px solid var(--stone-soft); }
  .nav-explore{ position: static; }
  .explore-menu{ position: static; box-shadow: none; border: none; padding: 4px 0 4px 12px; }
  .nav-auth{ margin: 14px 0 0; }
}

/* ---------- Footer ---------- */
.site-foot{
  background: var(--ink);
  color: #C9D0E8;
  margin-top: 80px;
  padding-top: 56px;
}
.site-foot a{ color: #fff; }
.site-foot h4{
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  margin-bottom: 12px;
}
.site-foot .muted{ color: #9AA4C4; }
.site-foot .wordmark b{ color: #fff; }
.site-foot .wordmark small{ color: #9AA4C4; }

.foot-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}
.foot-brand .wordmark{ margin-bottom: 10px; }
.foot-brand p{ font-size: var(--step--1); margin-bottom: 8px; max-width: 42ch; }
.foot-contact a{ color: #fff; }

.foot-apps{ display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.app-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.2;
}
.app-badge b{ font-size: 0.85rem; }
.app-badge:hover{ border-color: rgba(255,255,255,0.5); text-decoration: none; }
.app-badge.soon{ opacity: 0.55; cursor: default; }

.foot-grid ul{ display: grid; gap: 8px; }
.foot-grid li a{ font-size: var(--step--1); }

.foot-copy{
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 16px 0;
  font-size: var(--step--1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* O'net credit — the real brand-kit lockup (ring + wordmark),
   using the exact continuous line-draw animation from the O'net
   brand kit itself. This one loops deliberately — it's the
   client's established brand motion, not a page effect we chose. */
.foot-credit{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #9AA4C4;
  font-size: var(--step--1);
  margin-left: auto;
  padding-left: 24px;
}
.credit-label{ white-space: nowrap; }
.credit-sub{ white-space: nowrap; color: #7A84A8; }
.onet-lockup{ flex: none; }

.onet-ring{
  stroke-dasharray: 201.1;
  stroke-dashoffset: 201.1;
  animation: onet-draw-ring 3.2s cubic-bezier(.65,0,.35,1) infinite;
}
.onet-slash{
  stroke-dasharray: 97.7;
  stroke-dashoffset: 97.7;
  animation: onet-draw-slash 3.2s cubic-bezier(.65,0,.35,1) infinite;
}
@keyframes onet-draw-ring{
  0%   { stroke-dashoffset: 201.1; opacity: 1; }
  38%  { stroke-dashoffset: 0; opacity: 1; }
  82%  { stroke-dashoffset: 0; opacity: 1; }
  96%  { opacity: 0; }
  100% { stroke-dashoffset: 201.1; opacity: 0; }
}
@keyframes onet-draw-slash{
  0%   { stroke-dashoffset: 97.7; opacity: 0; }
  40%  { stroke-dashoffset: 97.7; opacity: 0; }
  58%  { stroke-dashoffset: 0; opacity: 1; }
  82%  { stroke-dashoffset: 0; opacity: 1; }
  96%  { opacity: 0; }
  100% { stroke-dashoffset: 97.7; opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .onet-ring, .onet-slash{ stroke-dashoffset: 0; opacity: 1; animation: none; }
}

@media (max-width: 560px){
  .foot-credit{ margin-left: 0; padding-left: 0; }
}

@media (max-width: 860px){
  .foot-grid{ grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px){
  .foot-copy{ flex-direction: column; align-items: flex-start; }
}
