/* =============================================================
   AFOMO — Shared site layout  |  layout.css
   The ONE definition of the public header and footer.
   Markup:  partials/header.html, partials/footer.html
   Stamped into pages by:  node scripts/sync-layout.js

   Rules below were lifted unchanged from the approved homepage
   (home-v2.css). The "isolation" block makes them render the same
   on pages that still load legacy stylesheets (home.css / style.css).
   Do not add page-specific overrides here or in page stylesheets.
   ============================================================= */

:root {
  --af-ink: #1a1147;
  --af-purple: #6d28d9;
  --af-lav: #f4efff;
  --af-yellow: #ffc22e;
  --af-line: #ece6f7;
  --af-footer: #1a1147;
  --af-container: 1200px;
  --af-header-h: 70px;
}

/* ---------- isolation: header and footer ignore legacy page styles ---------- */
.af-header, .af-footer {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6; text-align: left; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* :where() keeps these at zero specificity so the component rules below always win, exactly as on the homepage. */
:where(.af-header, .af-footer) :where(*, *::before, *::after) { box-sizing: border-box; margin: 0; padding: 0; }
:where(.af-header, .af-footer) :where(a) { color: inherit; text-decoration: none; }
:where(.af-header, .af-footer) :where(ul) { list-style: none; }
:where(.af-header, .af-footer) :where(img, svg) { display: block; max-width: 100%; }
:where(.af-header) :where(button) { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:where(.af-header, .af-footer) :where(:focus-visible), .af-skip:focus-visible { outline: 3px solid #8b5cf6; outline-offset: 3px; border-radius: 6px; }

/* ---------- shared primitives ---------- */
.af-container { max-width: calc(var(--af-container) + 48px); margin: 0 auto; padding: 0 24px; }

.af-skip {
  position: absolute; left: 12px; top: -60px; z-index: 400;
  background: var(--af-ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-decoration: none;
}
.af-skip:focus { top: 12px; }

.af-ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* =============================================================
   HEADER
   ============================================================= */
.af-header {
  position: sticky; top: 0; z-index: 300;
  background: #fff; border-bottom: 1px solid var(--af-line); color: var(--af-ink);
}
.af-nav { height: var(--af-header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.af-logo img { height: 36px; width: auto; }

.af-nav-right { display: flex; align-items: center; gap: 28px; }
.af-nav-links { display: flex; align-items: center; gap: 28px; }
.af-nav-links a { font-size: 15px; font-weight: 500; color: var(--af-ink); transition: color .18s; }
.af-nav-links a:hover, .af-nav-links a[aria-current="page"] { color: var(--af-purple); }
.af-nav-links a[aria-current="page"] { font-weight: 600; }

.af-nav-cta {
  display: inline-flex; align-items: center; justify-content: center; height: 45px; padding: 0 23px; border-radius: 999px;
  background: linear-gradient(180deg, #ffc93f 0%, #ffab00 100%); color: var(--af-ink);
  font-size: 15px; font-weight: 700; box-shadow: 0 8px 20px -8px rgba(255, 169, 0, .7);
  transition: transform .18s ease, box-shadow .18s ease;
}
.af-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(255, 169, 0, .8); }

.af-burger { display: none; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; font-size: 24px; color: var(--af-ink); }
.af-burger:hover { background: var(--af-lav); }
.af-burger .af-ico-close { display: none; }
.af-burger[aria-expanded="true"] .af-ico-open { display: none; }
.af-burger[aria-expanded="true"] .af-ico-close { display: block; }

/* =============================================================
   FOOTER
   ============================================================= */
.af-footer { background: var(--af-footer); color: #fff; margin-top: 70px; padding: 60px 0 30px; }
.af-footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.af-flogo { display: inline-flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.af-flogo img { width: 44px; height: 44px; border-radius: 10px; background: #fff; padding: 2px; object-fit: contain; }
.af-footer-desc { margin-top: 18px; max-width: 320px; font-size: 14px; line-height: 1.7; color: rgba(255, 255, 255, .72); }
.af-fcols { display: flex; gap: 72px; flex-wrap: wrap; }
.af-fcol h4 { font-family: inherit; line-height: 1.6; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; font-weight: 800; color: var(--af-yellow); margin-bottom: 18px; }
.af-fcol a, .af-fcol span { display: block; font-size: 15.5px; color: rgba(255, 255, 255, .78); margin-bottom: 10px; transition: color .18s; }
.af-fcol a:hover { color: #fff; }
.af-fcol a.af-mail { color: #fff; font-weight: 700; }
.af-footer-bottom { margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.af-copy { line-height: 1.6; font-size: 13px; color: rgba(255, 255, 255, .7); }
.af-ip { margin-top: 6px; max-width: 760px; font-size: 11.5px; line-height: 1.6; color: rgba(255, 255, 255, .62); }
.af-social { display: flex; gap: 10px; }
.af-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; transition: background .18s, color .18s; }
.af-social a:hover { background: var(--af-yellow); color: var(--af-ink); }

/* =============================================================
   RESPONSIVE (header + footer only)
   ============================================================= */
@media (max-width: 960px) {
  .af-burger { display: inline-flex; }
  .af-nav-right { position: absolute; top: var(--af-header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--af-line); box-shadow: 0 20px 30px -20px rgba(40, 20, 100, .25); padding: 8px 24px 24px; display: none; }
  .af-nav-right.is-open { display: flex; }
  .af-nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .af-nav-right nav { width: 100%; }
  .af-nav-links a { display: block; padding: 15px 4px; min-height: 48px; font-size: 16px; border-bottom: 1px solid var(--af-line); }
  .af-nav-cta { margin-top: 18px; height: 50px; }
}

@media (max-width: 640px) {
  .af-container { padding: 0 20px; }
  .af-fcols { gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .af-header *, .af-footer * { transition: none !important; animation: none !important; }
}
