/*
 * PropertyHandle Africa: the shared header and footer (2026-10-21).
 *
 * Styles for /partials/header.html and /partials/footer.html only, written as
 * plain CSS with the token hex values (.claude/skills/propertyhandle-design)
 * so they look the same on every page: pages built with the compiled
 * site.css, pages still on the Tailwind Play CDN with a legacy inline config,
 * and pages with no Tailwind at all. Every rule is scoped to .phh (header) or
 * .phf (footer). Loaded by /partials/head.html, and by footer.js on pages that
 * still inject the footer.
 */

.phh, .phh *, .phf, .phf * { box-sizing: border-box; }
.phh a, .phf a { text-decoration: none; }
.phh :focus-visible, .phf :focus-visible { outline: 2px solid #EA148C; outline-offset: 3px; border-radius: 4px; }

/* ---- Header ------------------------------------------------------------ */
.phh {
  position: sticky; top: 0; z-index: 60;
  background: #FFFFFF; border-bottom: 1px solid #E4E0EE;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: #141432;
}
.phh-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 16px; height: 72px;
  display: flex; align-items: center; gap: 24px;
}
.phh-logo {
  position: relative; display: block; flex: 0 0 auto; width: 76px; height: 52px;
  overflow: hidden; border-radius: 8px; background: #FFFFFF;
}
.phh-logo img {
  position: absolute; left: 50%; top: 50%; height: 84px; width: auto; max-width: none;
  transform: translate(-50%, -50%);
}
.phh-nav-wrap { display: none; flex: 1 1 auto; justify-content: center; }
.phh-nav { display: flex; margin: 0; padding: 0; list-style: none; gap: 4px; }
.phh-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  font-size: 15px; font-weight: 500; line-height: 1.2; color: #5E5880; white-space: nowrap; border-radius: 4px;
  transition: color 150ms cubic-bezier(0.2, 0, 0, 1);
}
.phh-nav a:hover { color: #141432; }
.phh-nav a[aria-current="page"] { color: #141432; box-shadow: inset 0 -2px 0 #EA148C; border-radius: 0; }

.phh-auth { display: none; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.phh-signin {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: 15px; font-weight: 600; color: #141432; white-space: nowrap;
}
.phh-signin:hover { color: #9437D2; }
.phh-cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  font-size: 15px; font-weight: 600; color: #FFFFFF; background: #D1107C; border-radius: 4px; white-space: nowrap;
  transition: background-color 150ms cubic-bezier(0.2, 0, 0, 1);
}
.phh-cta:hover { background: #B80D6D; color: #FFFFFF; }
.phh-user { display: inline-flex; align-items: center; gap: 4px; }
.phh-user-name { font-size: 15px; font-weight: 600; color: #141432; padding: 0 8px; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phh-linkbtn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500; color: #5E5880;
}
.phh-linkbtn:hover { color: #141432; }

/* The menu on phones and tablets: a <details>, so it opens without script. */
.phh-menu { margin-left: auto; }
.phh-menu > summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid #8C86A6; border-radius: 4px;
  font-size: 15px; font-weight: 600; color: #141432; cursor: pointer; user-select: none;
}
.phh-menu > summary::-webkit-details-marker { display: none; }
.phh-menu > summary svg { width: 20px; height: 20px; }
.phh-menu[open] > summary { background: #141432; color: #FFFFFF; border-color: #141432; }
.phh-panel {
  position: absolute; left: 0; right: 0; top: 72px; background: #FFFFFF; border-bottom: 1px solid #E4E0EE;
  max-height: calc(100vh - 72px); overflow-y: auto; padding: 8px 16px 24px;
  box-shadow: 0 16px 32px rgba(20, 20, 50, 0.12);
}
.phh-panel ul { list-style: none; margin: 0; padding: 0; }
.phh-panel li a {
  display: flex; align-items: center; min-height: 52px; font-size: 18px; font-weight: 500; color: #141432;
  border-bottom: 1px solid #E4E0EE;
}
.phh-panel li a[aria-current="page"] { color: #D1107C; }
.phh-panel-auth { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.phh-panel-auth .phh-signin, .phh-panel-auth .phh-cta, .phh-panel-auth .phh-linkbtn { justify-content: center; font-size: 16px; }
.phh-panel-auth .phh-signin { border: 1px solid #8C86A6; border-radius: 4px; }
.phh-panel-auth p { margin: 0; font-size: 15px; color: #5E5880; }
.phh-panel-auth a.phh-plain { display: flex; align-items: center; min-height: 44px; font-size: 16px; color: #141432; }

@media (min-width: 640px) { .phh-inner { padding: 0 24px; } }
@media (min-width: 1180px) {
  .phh-inner { padding: 0 32px; }
  .phh-nav-wrap, .phh-auth { display: flex; }
  .phh-menu { display: none; }
}
@media (prefers-reduced-motion: reduce) { .phh *, .phf * { transition: none !important; } }

/* Skip link (pages built from the partials). */
.ph-skip { position: absolute; left: -9999px; top: 8px; z-index: 70; background: #141432; color: #FFFFFF; padding: 12px 16px; border-radius: 4px; font-family: 'Inter', sans-serif; }
.ph-skip:focus { left: 8px; }

/* ---- Footer ------------------------------------------------------------ */
.phf {
  background: #141432; color: #FFFFFF;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.55;
}
.phf-inner { max-width: 1240px; margin: 0 auto; padding: 64px 16px 40px; }
.phf-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
.phf-brand p { margin: 20px 0 0; color: #C9B8EE; max-width: 34ch; font-size: 16px; }
.phf-logo { position: relative; display: block; width: 76px; height: 52px; overflow: hidden; border-radius: 8px; background: #FFFFFF; }
.phf-logo img { position: absolute; left: 50%; top: 50%; height: 84px; width: auto; max-width: none; transform: translate(-50%, -50%); }
.phf-social { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.phf-social a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 4px; border: 1px solid rgba(201, 184, 238, 0.35); color: #C9B8EE;
  transition: color 150ms cubic-bezier(0.2, 0, 0, 1), border-color 150ms cubic-bezier(0.2, 0, 0, 1);
}
.phf-social a:hover { color: #FFFFFF; border-color: #FFFFFF; }
.phf-social svg { width: 20px; height: 20px; max-width: 20px; max-height: 20px; flex: 0 0 auto; }
.phf-cols { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.phf-col h2 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: #FFFFFF; letter-spacing: 0; text-transform: none; font-family: inherit; }
.phf-col ul { list-style: none; margin: 0; padding: 0; }
.phf-col a { display: inline-flex; align-items: center; min-height: 40px; color: #C9B8EE; }
.phf-col a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }
.phf-base { margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(201, 184, 238, 0.25); display: grid; gap: 16px; color: #C9B8EE; }
.phf-base p { margin: 0; }
.phf-base a { color: #C9B8EE; text-decoration: underline; text-underline-offset: 4px; }
.phf-base a:hover { color: #FFFFFF; }
.phf-reg { color: #FFFFFF; }

@media (min-width: 640px) {
  .phf-inner { padding-left: 24px; padding-right: 24px; }
  .phf-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .phf-inner { padding: 80px 32px 48px; }
  .phf-grid { grid-template-columns: 4fr 8fr; gap: 64px; }
  .phf-base { grid-template-columns: 1fr 1fr; align-items: end; }
  .phf-base .phf-reg { text-align: right; }
}
