/* Shared header and footer for every page of aiwithjay.com, the homepage
   included. The markup is the same on every page (see the site-header and
   site-footer comments in each page). Everything here is prefixed sh- or sf-
   or hangs off .sh / .sf, so it never clashes with a page's own styles.
   Tokens are local copies of the homepage's, so this file works with or
   without styles.css. scripts.js drives the dropdown and the phone menu
   through the .nav-drop, .nav-mobile-toggle and #nav-mobile-panel hooks. */
.sh, .sf {
  --sh-ink: #07080a; --sh-ink2: #0d1014; --sh-ink3: #14181f; --sh-line: #262b33;
  --sh-gold: #f5b942; --sh-paper: #f3efe5; --sh-soft: #bdb8ab;
  --sh-disp: "Archivo", "Arial Narrow", Arial, sans-serif;
  --sh-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --sh-pad: 64px;
  font-family: var(--sh-body);
  color: var(--sh-paper);
}
.sh *, .sf * { box-sizing: border-box; }
.sh :focus-visible, .sf :focus-visible { outline: 3px solid var(--sh-gold); outline-offset: 3px; border-radius: 4px; }

/* ── Header ────────────────────────────────────────────────────────────── */
.sh { position: relative; z-index: 60; background: var(--sh-ink); }
.sh-in {
  display: flex; align-items: center; gap: 26px;
  max-width: 1440px; margin: 0 auto; padding: 16px var(--sh-pad);
}
.sh-logo, .sf-logo {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--sh-paper); text-decoration: none; flex: none;
}
.sh-logo { margin-right: auto; }
.sh-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px;
  background: var(--sh-gold); color: var(--sh-ink);
  font: 900 17px/1 var(--sh-disp); font-stretch: 100%; letter-spacing: -.04em;
}
.sh-word { font-weight: 600; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }

.sh-nav { display: flex; align-items: center; gap: 24px; }
.sh-nav > a, .sh-nav .nav-drop > button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  font: 500 15px/1.2 var(--sh-body); color: var(--sh-soft); text-decoration: none; white-space: nowrap;
}
.sh-nav > a:hover, .sh-nav .nav-drop > button:hover,
.sh-nav .nav-drop[data-open="true"] > button { color: var(--sh-paper); }
.sh-nav > a:hover { text-decoration: underline; text-underline-offset: 5px; }
.sh-nav > a[aria-current="page"], .sh-nav .nav-drop.is-current > button { color: var(--sh-paper); text-decoration: underline; text-decoration-color: var(--sh-gold); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.sh-nav .sh-split { padding-right: 24px; border-right: 1px solid var(--sh-line); }

/* Resources dropdown. Opens on hover and on click (scripts.js sets data-open). */
.sh .nav-drop { position: relative; }
.sh .nav-drop .chev { font-size: 11px; transition: transform .15s; }
.sh .nav-drop[data-open="true"] .chev { transform: rotate(180deg); }
.sh .nav-drop-panel {
  display: none; position: absolute; top: 100%; left: -18px; z-index: 70;
  min-width: 300px; margin-top: 6px; padding: 8px;
  background: var(--sh-ink2); border: 1px solid var(--sh-line); border-radius: 12px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.7);
}
.sh .nav-drop-panel::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.sh .nav-drop[data-open="true"] .nav-drop-panel { display: block; }
@media (hover: hover) { .sh .nav-drop:hover .nav-drop-panel { display: block; } }
.sh .nav-drop-panel a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 12px;
  border-radius: 8px; color: var(--sh-paper); text-decoration: none;
}
.sh .nav-drop-panel a:hover, .sh .nav-drop-panel a[aria-current="page"] { background: var(--sh-ink3); }
.sh .nav-drop-panel a:hover b { color: var(--sh-gold); }
.sh .nav-drop-panel b { display: block; font: 800 19px/1.05 var(--sh-disp); font-stretch: 68%; }
.sh .nav-drop-panel small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.3; color: var(--sh-soft); }
.sh .nav-drop-panel .sh-ext { margin-left: auto; color: var(--sh-gold); }
.sh .nav-drop-panel hr { border: 0; height: 1px; background: var(--sh-line); margin: 6px 8px; }

/* The one loud button */
.sh-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 18px; border-radius: 8px;
  background: var(--sh-gold); color: var(--sh-ink); text-decoration: none; white-space: nowrap;
  font: 800 19px/1 var(--sh-disp); font-stretch: 68%; letter-spacing: .005em;
  transition: transform .18s ease, box-shadow .18s ease;
}
.sh-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 0 rgba(245,185,66,.35); }

/* Phone menu */
.sh .nav-mobile-toggle {
  display: none; flex: none; width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
  background: transparent; color: var(--sh-paper);
  border: 2px solid #4b505a; border-radius: 8px; cursor: pointer;
}
.sh .nav-mobile-toggle:hover, .sh .nav-mobile-toggle[aria-expanded="true"] { border-color: var(--sh-gold); color: var(--sh-gold); }
.sh .nav-mobile-toggle svg { display: block; }
.sh .nav-mobile-toggle .icon-x { display: none; }
.sh .nav-mobile-toggle[aria-expanded="true"] .icon-burger { display: none; }
.sh .nav-mobile-toggle[aria-expanded="true"] .icon-x { display: block; }
.sh .nav-mobile-panel {
  display: none; position: absolute; top: 100%; left: 10px; right: 10px; z-index: 80;
  max-height: calc(100vh - 90px); overflow-y: auto;
  padding: 10px 10px 12px; background: var(--sh-ink2);
  border: 1px solid var(--sh-line); border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.7);
}
.sh .nav-mobile-panel.open { display: block; }
.sh .nav-mobile-panel p {
  margin: 0; padding: 14px 12px 4px;
  font: 600 13px/1.2 var(--sh-body); color: var(--sh-gold);
}
.sh .nav-mobile-panel a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 46px; padding: 0 12px; border-radius: 8px;
  font: 500 16px/1.2 var(--sh-body); color: var(--sh-paper); text-decoration: none;
}
.sh .nav-mobile-panel a:hover, .sh .nav-mobile-panel a[aria-current="page"] { background: var(--sh-ink3); color: var(--sh-gold); }
.sh .nav-mobile-panel a span { color: var(--sh-soft); font-size: 14px; }
.sh .nav-mobile-panel a.sh-m-btn {
  justify-content: center; margin-top: 10px; min-height: 52px;
  background: var(--sh-gold); color: var(--sh-ink);
  font: 800 21px/1 var(--sh-disp); font-stretch: 68%;
}

/* Lower-priority links step aside at middle widths instead of wrapping. */
@media (max-width: 1320px) { .sh .sh-p3 { display: none; } }
@media (max-width: 1180px) { .sh-in { --sh-pad: 40px; gap: 20px; } .sh-nav { gap: 20px; } .sh .sh-p2 { display: none; } }
@media (max-width: 1000px) {
  .sh-nav { display: none; }
  .sh .nav-mobile-toggle { display: inline-flex; }
}
@media (max-width: 900px) {
  .sh-in { --sh-pad: 20px; padding: 10px var(--sh-pad); gap: 10px; }
  .sh-mark { width: 34px; height: 34px; }
  .sh-word { font-size: 15px; }
  .sh-btn { min-height: 44px; font-size: 18px; padding: 0 14px; }
}
@media (max-width: 420px) { .sh-word { display: none; } }

/* ── Footer ────────────────────────────────────────────────────────────── */
.sf { background: var(--sh-ink); position: relative; z-index: 2; }
.sf-in { max-width: 1440px; margin: 0 auto; padding: 70px var(--sh-pad) 40px; }
.sf ul { list-style: none; margin: 0; padding: 0; }
.sf-routes {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 30px;
  padding-bottom: 30px; border-bottom: 1px solid var(--sh-line);
  font-size: 15px; color: var(--sh-soft);
}
.sf-routes a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--sh-paper); text-decoration: none; }
.sf-routes a:hover { text-decoration: underline; text-underline-offset: 5px; }
.sf-routes i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.sf-grid { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 36px; padding-top: 40px; }
.sf-grid p { margin: 14px 0 0; max-width: 300px; font-size: 15px; line-height: 1.5; color: var(--sh-soft); }
.sf-grid h2 { margin: 0 0 10px; font: 800 22px/1 var(--sh-disp); font-stretch: 68%; letter-spacing: 0; color: var(--sh-paper); }
.sf-grid li a { display: inline-flex; align-items: center; min-height: 40px; font-size: 15px; line-height: 1.3; color: var(--sh-soft); text-decoration: none; }
.sf-grid li a:hover { color: var(--sh-paper); text-decoration: underline; text-underline-offset: 4px; }
.sf-grid li a[aria-current="page"] { color: var(--sh-paper); }
.sf-legal {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--sh-line);
  font-size: 14px; color: var(--sh-soft);
}
.sf-legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--sh-soft); }
.sf-legal a:hover { color: var(--sh-paper); }
@media (max-width: 1180px) {
  .sf-in { --sh-pad: 40px; }
  .sf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sf-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .sf-in { --sh-pad: 20px; padding: 54px var(--sh-pad) 110px; }
  .sf-routes { display: block; }
  .sf-routes a { display: flex; }
  .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; }
}
@media (prefers-reduced-motion: reduce) { .sh *, .sf * { transition: none !important; } }
@media print { .sh, .sf { display: none !important; } }
