/* ProjexHQ shared site header + footer.
   Loaded after each page's own <style>, so these rules win where they overlap.
   Classes are prefixed (sh- header, sf- footer) so they never collide with page CSS. */

:root {
    --px-navy: #002244;
    --px-orange: #FB4F14;
    --px-white: #FFFFFF;
    --px-off-white: #F3F3F3;
    --px-gray: #546E7A;
    --px-dark: #313131;
}

/* The site is designed light-only. Without this, a browser in dark mode can paint
   the page canvas dark behind sections that have no background of their own. */
html { color-scheme: light; background: var(--px-white); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--px-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.10); }
/* Neutralize older page CSS that styled the bare <nav> element. */
.site-header .sh-nav,
.site-header .sh-nav.scrolled {
    position: static; padding: 0; background: transparent; box-shadow: none;
}
.sh-inner {
    max-width: 1240px; margin: 0 auto; padding: 0 2rem;
    height: 84px; display: flex; align-items: center; gap: 2rem;
    transition: height 0.25s ease;
}
.site-header.is-scrolled .sh-inner { height: 68px; }
.sh-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.sh-logo img { height: 60px; width: auto; display: block; transition: height 0.25s ease; }
.site-header.is-scrolled .sh-logo img { height: 50px; }

.sh-menu { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0 auto 0 1rem; padding: 0; }
.sh-item { position: relative; list-style: none; }
.sh-link {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.6rem 0.85rem; border: 0; background: none; border-radius: 6px;
    font: 500 1rem/1.2 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--px-dark); text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}
.sh-link:hover, .sh-item.is-open > .sh-link, .sh-link[aria-current="page"] { color: var(--px-orange); }
.sh-link:focus-visible { outline: 2px solid var(--px-orange); outline-offset: 2px; }
.sh-caret { width: 10px; height: 10px; transition: transform 0.2s ease; }
.sh-item.is-open .sh-caret { transform: rotate(180deg); }
.sh-new {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    background: rgba(251,79,20,0.12); color: var(--px-orange); padding: 0.15rem 0.45rem; border-radius: 999px;
}

/* Dropdown panel */
.sh-panel {
    position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px);
    min-width: 300px; padding: 1.25rem; background: var(--px-white);
    border-radius: 12px; border: 1px solid rgba(0,34,68,0.08);
    box-shadow: 0 18px 50px rgba(0,34,68,0.16);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.sh-panel::before { /* hover bridge between the link and the panel */
    content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
}
.sh-item.is-open > .sh-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.sh-panel.wide { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; min-width: 560px; }
.sh-group-title {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--px-gray); margin: 0 0 0.5rem 0.75rem;
}
.sh-panel ul { list-style: none; margin: 0; padding: 0; }
.sh-panel li { list-style: none; margin: 0; }
.sh-entry {
    display: block; padding: 0.65rem 0.75rem; border-radius: 8px; text-decoration: none;
    transition: background 0.15s ease;
}
.sh-entry:hover, .sh-entry:focus-visible { background: var(--px-off-white); outline: none; }
.sh-entry strong { display: block; color: var(--px-navy); font-size: 0.95rem; font-weight: 600; line-height: 1.3; }
.sh-entry span { display: block; color: var(--px-gray); font-size: 0.83rem; line-height: 1.4; margin-top: 0.15rem; font-weight: 400; }
.sh-entry:hover strong { color: var(--px-orange); }
.sh-panel-foot {
    grid-column: 1 / -1; border-top: 1px solid rgba(0,34,68,0.08); padding-top: 0.9rem; margin-top: 0.25rem;
}
.sh-panel-foot a { color: var(--px-orange); font-weight: 600; font-size: 0.9rem; text-decoration: none; margin-left: 0.75rem; }
.sh-panel-foot a:hover { text-decoration: underline; }

/* Actions */
.sh-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.sh-login { color: var(--px-navy); font-weight: 600; text-decoration: none; padding: 0.6rem 0.75rem; border-radius: 6px; }
.sh-login:hover { background: var(--px-off-white); }
.sh-btn {
    display: inline-block; padding: 0.7rem 1.25rem; border-radius: 6px; font-weight: 600; font-size: 0.95rem;
    text-decoration: none; white-space: nowrap; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sh-btn-outline { border: 2px solid var(--px-navy); color: var(--px-navy); padding: calc(0.7rem - 2px) calc(1.25rem - 2px); }
.sh-btn-outline:hover { background: var(--px-navy); color: var(--px-white); }
.sh-btn-primary { background: var(--px-orange); color: var(--px-white); }
.sh-btn-primary:hover { background: var(--px-navy); color: var(--px-white); }

/* Mobile toggle + drawer */
.sh-toggle {
    display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none;
    border-radius: 8px; cursor: pointer; color: var(--px-navy); align-items: center; justify-content: center;
}
.sh-toggle svg { width: 26px; height: 26px; }
.sh-toggle:focus-visible { outline: 2px solid var(--px-orange); }
.sh-drawer {
    display: none; position: fixed; inset: 0; z-index: 2000; background: var(--px-white);
    overflow-y: auto; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.sh-drawer.is-open { display: block; }
.sh-drawer-top { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.5rem; border-bottom: 1px solid rgba(0,34,68,0.08); }
.sh-drawer-top img { height: 48px; display: block; }
.sh-drawer-body { padding: 0.5rem 1.5rem 2rem; }
.sh-drawer details { border-bottom: 1px solid rgba(0,34,68,0.08); }
.sh-drawer summary, .sh-drawer-link {
    display: flex; justify-content: space-between; align-items: center; padding: 1.05rem 0;
    font-size: 1.15rem; font-weight: 600; color: var(--px-navy); text-decoration: none; cursor: pointer; list-style: none;
}
.sh-drawer summary::-webkit-details-marker { display: none; }
.sh-drawer details[open] summary .sh-caret { transform: rotate(180deg); }
.sh-drawer-link { border-bottom: 1px solid rgba(0,34,68,0.08); }
.sh-drawer details ul { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.sh-drawer details li { list-style: none; }
.sh-drawer details a { display: block; padding: 0.6rem 0.75rem; color: var(--px-dark); text-decoration: none; border-radius: 8px; }
.sh-drawer details a:hover { background: var(--px-off-white); }
.sh-drawer .sh-group-title { margin: 0.5rem 0 0.25rem 0.75rem; }
.sh-drawer-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.75rem; }
.sh-drawer-actions a { text-align: center; padding: 0.95rem; font-size: 1rem; }

@media (max-width: 1100px) {
    .sh-menu, .sh-actions { display: none; }
    .sh-toggle { display: inline-flex; }
    .sh-inner { height: 72px; padding: 0 1.25rem; }
    .sh-logo img, .site-header.is-scrolled .sh-logo img { height: 48px; }
    .site-header.is-scrolled .sh-inner { height: 64px; }
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--px-navy); color: var(--px-white); padding: 4rem 2rem 2rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.6;
}
.sf-inner { max-width: 1240px; margin: 0 auto; }
.sf-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2.5rem; margin-bottom: 2.5rem; }
.sf-brand-name { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.5px; color: var(--px-white); text-decoration: none; }
.sf-brand-name span { color: var(--px-orange); }
.sf-tagline { opacity: 0.85; margin-top: 0.75rem; font-weight: 600; }
.sf-blurb { opacity: 0.65; margin-top: 0.5rem; font-size: 0.92rem; max-width: 320px; }
.sf-badges { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.25rem; }
.sf-badges a { display: inline-block; }
.sf-col h4 { color: var(--px-white); font-size: 0.95rem; font-weight: 700; margin: 0 0 1rem; }
.sf-col ul { list-style: none; margin: 0; padding: 0; }
.sf-col li { list-style: none; margin: 0 0 0.65rem; }
.sf-col a { color: var(--px-white); opacity: 0.75; text-decoration: none; font-size: 0.93rem; transition: opacity 0.2s ease, color 0.2s ease; }
.sf-col a:hover { opacity: 1; color: var(--px-white); }
.sf-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.75rem; font-size: 0.88rem;
}
.sf-bottom p { opacity: 0.6; margin: 0; }
.sf-social { display: flex; gap: 0.6rem; }
.sf-social a {
    display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center;
    border-radius: 9px; background: rgba(255,255,255,0.1); color: var(--px-white); text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}
.sf-social a:hover { background: var(--px-orange); transform: translateY(-2px); }
.sf-social svg { width: 19px; height: 19px; fill: currentColor; display: block; }

@media (max-width: 1000px) {
    .sf-grid { grid-template-columns: repeat(2, 1fr); }
    .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .site-footer { padding: 3rem 1.5rem 2rem; }
    .sf-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
    .sf-bottom { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .site-header, .sh-inner, .sh-logo img, .sh-panel, .sh-caret, .sf-social a { transition: none; }
}

/* Anchored sections land below the sticky header. */
[id] { scroll-margin-top: 96px; }

/* =========================================================================
   Shared page styles (stage 4). Pages keep their own inline CSS; these rules
   give every page the same hero, closing band and building blocks as the
   homepage. "body" in a selector raises specificity over the inline styles.
   ========================================================================= */

/* Page hero: every inner page uses .page-header */
body .page-header {
    background: linear-gradient(135deg, var(--px-navy) 0%, #003366 100%);
    color: var(--px-white); text-align: center; padding: 4.5rem 2rem 4.75rem;
}
body .page-header h1 { font-size: 2.9rem; line-height: 1.15; letter-spacing: -0.5px; max-width: 900px; margin: 0 auto 1rem; }
body .page-header p { font-size: 1.2rem; opacity: 0.88; max-width: 720px; margin-left: auto; margin-right: auto; }
.px-eyebrow, body .page-header .eyebrow {
    display: block; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700;
    color: var(--px-orange); margin-bottom: 0.9rem; opacity: 1;
}
.px-hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* Buttons */
.px-btn { display: inline-block; padding: 1rem 2rem; border-radius: 6px; font-weight: 600; text-decoration: none; transition: all 0.2s ease; font-size: 1rem; }
.px-btn-primary { background: var(--px-orange); color: var(--px-white); }
.px-btn-primary:hover { background: var(--px-white); color: var(--px-navy); }
.px-light .px-btn-primary:hover { background: var(--px-navy); color: var(--px-white); }
.px-btn-ghost { border: 2px solid rgba(255,255,255,0.6); color: var(--px-white); padding: calc(1rem - 2px) calc(2rem - 2px); }
.px-btn-ghost:hover { border-color: var(--px-white); background: rgba(255,255,255,0.08); }
.px-btn-outline { border: 2px solid var(--px-navy); color: var(--px-navy); padding: calc(1rem - 2px) calc(2rem - 2px); }
.px-btn-outline:hover { background: var(--px-navy); color: var(--px-white); }

/* Sections */
.px-section { padding: 5rem 0; }
.px-section.alt { background: var(--px-off-white); }
.px-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.px-head { text-align: center; max-width: 760px; margin: 0 auto 3rem; }
.px-head h2 { color: var(--px-navy); font-size: 2.3rem; line-height: 1.2; margin: 0 0 0.9rem; text-align: center; }
.px-head p { color: var(--px-gray); font-size: 1.1rem; }

/* Grids and cards */
.px-grid { display: grid; gap: 1.5rem; }
.px-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.px-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.px-card {
    background: var(--px-white); border: 1px solid #E1E1E1; border-radius: 12px; padding: 1.75rem;
    display: flex; flex-direction: column; text-decoration: none; color: var(--px-dark);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
a.px-card:hover, .px-card.lift:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,0.08); }
.px-card.accent { border-top: 4px solid var(--px-orange); }
.px-card h3 { color: var(--px-navy); font-size: 1.2rem; line-height: 1.3; margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.px-card p { color: var(--px-gray); font-size: 0.97rem; }
.px-card .px-link { margin-top: auto; padding-top: 1rem; }
.px-icon {
    width: 46px; height: 46px; border-radius: 11px; background: rgba(251,79,20,0.1); color: var(--px-orange);
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; flex-shrink: 0;
}
.px-icon svg { width: 23px; height: 23px; }
.px-pill {
    display: inline-block; background: rgba(0,34,68,0.08); color: var(--px-navy); font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.06em; padding: 0.22rem 0.55rem; border-radius: 999px; text-transform: uppercase;
}
.px-link { color: var(--px-orange); font-weight: 600; text-decoration: none; }
.px-link:hover { text-decoration: underline; }
.px-checks { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.px-checks li { position: relative; padding-left: 1.75rem; margin-bottom: 0.55rem; color: var(--px-dark); list-style: none; }
.px-checks li::before {
    content: ""; position: absolute; left: 0; top: 0.35em; width: 1.05rem; height: 1.05rem; border-radius: 50%;
    background: rgba(251,79,20,0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FB4F14' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 0.65rem no-repeat;
}

/* Group heading inside a section */
.px-group { margin-bottom: 3rem; }
.px-group:last-child { margin-bottom: 0; }
.px-group-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; padding-bottom: 0.85rem; border-bottom: 1px solid #E1E1E1; }
.px-group-head h3 { color: var(--px-navy); font-size: 1.45rem; margin: 0; }
.px-group-head p { color: var(--px-gray); margin: 0; }

/* Screenshot rows */
.px-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3.5rem; align-items: center; margin-bottom: 4.5rem; }
.px-row:last-child { margin-bottom: 0; }
.px-row.reverse > :first-child { order: 2; }
.px-row h3 { color: var(--px-navy); font-size: 1.75rem; line-height: 1.25; margin: 0 0 1rem; }
.px-row p { color: var(--px-gray); font-size: 1.05rem; }
.px-frame { border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.2); border: 1px solid rgba(0,0,0,0.08); background: var(--px-white); }
.px-frame-bar { background: #ededed; padding: 10px 14px; display: flex; gap: 7px; }
.px-frame-bar span { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.px-frame-bar span:nth-child(1) { background: #ff5f57; } .px-frame-bar span:nth-child(2) { background: #febc2e; } .px-frame-bar span:nth-child(3) { background: #28c840; }
.px-frame img { display: block; width: 100%; height: auto; }

/* Closing band: every page's .cta-section, plus .px-cta */
body .cta-section, .px-cta {
    background: linear-gradient(135deg, var(--px-navy) 0%, #003366 100%); color: var(--px-white);
    text-align: center; padding: 5rem 2rem; border-bottom: 1px solid rgba(255,255,255,0.12);
}
body .cta-section h2, .px-cta h2 { color: var(--px-white); font-size: 2.3rem; margin-bottom: 1rem; }
body .cta-section p, .px-cta p { color: rgba(255,255,255,0.85) !important; }
body .cta-section .cta-button:hover { background: var(--px-white); color: var(--px-navy); }

@media (max-width: 1024px) {
    .px-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .px-row { grid-template-columns: 1fr; gap: 2rem; }
    .px-row.reverse > :first-child { order: 0; }
    body .page-header h1 { font-size: 2.4rem; }
}
@media (max-width: 768px) {
    body .page-header { padding: 3.25rem 1.5rem 3.5rem; }
    body .page-header h1 { font-size: 2rem; }
    body .page-header p { font-size: 1.05rem; }
    .px-section { padding: 3.5rem 0; }
    .px-container { padding: 0 1.5rem; }
    .px-head { margin-bottom: 2.25rem; }
    .px-head h2, body .cta-section h2, .px-cta h2 { font-size: 1.75rem; }
    .px-head p { font-size: 1rem; }
    .px-grid.cols-2, .px-grid.cols-3 { grid-template-columns: 1fr; }
    .px-row h3 { font-size: 1.4rem; }
    .px-hero-actions .px-btn { flex: 1 1 100%; text-align: center; }
    body .cta-section, .px-cta { padding: 3.5rem 1.5rem; }
}
