/* BUILD MODULE 04: DESIGN SYSTEM (shell.css) — edit _shared/shell.css, synced to /css by apply_shell.py. repro: BUILD-MODULES.md #04 */
/* RankOps shell.css — shared nav/footer/hamburger rules.
   SOURCE OF TRUTH: _shared/shell.css  →  synced to /css/shell.css by apply_shell.py.
   Linked from every hand-built page (and the kept /nc/ pages). Pairs with style.css. */

/* Prevent any inner element from causing horizontal page scroll on mobile —
   which is what pushes the fixed nav hamburger off-screen. */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

/* NOTE: desktop nav *component* styling (logo/links/cta look) lives in
   style.css so it is opt-in — adding it here would override every legacy
   page's inline nav. shell.css only carries defensive + mobile rules that
   are safe everywhere. */

/* ── nav (mobile) ──────────────────────────────────────────────────────────
   Pin hamburger to the right so no sibling overflow can shove it off-screen. */
@media (max-width: 768px) {
  nav {
    position: fixed;
    padding: 0 16px !important;
  }
  nav .hamburger {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
  }
  nav .nav-links,
  nav .nav-cta { display: none !important; }
}

/* ── footer grid ── */
footer{background:var(--deep);border-top:1px solid var(--border);padding:40px 40px 24px;}
.footer-top{display:grid;grid-template-columns:260px 1fr 1fr 1fr;gap:32px;padding-bottom:32px;border-bottom:1px solid var(--border);}
.footer-brand-name{font-size:22px;font-weight:900;color:var(--white);margin-bottom:12px;}
.footer-brand-name span{color:var(--green);}
.footer-tagline{font-size:12px;color:var(--muted);line-height:1.6;margin-bottom:14px;}
.footer-ecosystem{display:flex;flex-direction:column;gap:6px;}
.footer-ecosystem a{font-size:12px;font-weight:600;color:var(--muted);text-decoration:none;letter-spacing:0.5px;transition:color 0.2s;}
.footer-ecosystem a:hover{color:var(--green);}
.footer-col .footer-col-title{font-size:10px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:var(--muted);margin-bottom:14px;}
.footer-col ul{list-style:none;display:flex;flex-direction:column;gap:7px;}
.footer-col a{font-size:12px;color:var(--text);text-decoration:none;transition:color 0.2s;}
.footer-col a:hover{color:var(--green);}
.footer-bottom{display:flex;justify-content:space-between;align-items:center;padding-top:22px;flex-wrap:wrap;gap:14px;}
.footer-copy{font-size:11px;color:var(--muted);letter-spacing:0.5px;}
.footer-disclosure{font-size:11px;color:var(--muted);max-width:480px;text-align:right;line-height:1.5;}
/* AI agent line treatment — clearly distinct from the human line */
.footer-ai-line{font-size:11px;color:var(--muted);}
.footer-ai-line a{color:var(--gold);text-decoration:none;font-weight:700;}
.footer-ai-line .ai-tag{display:inline-block;font-size:9px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--black);background:var(--gold);padding:1px 6px;border-radius:3px;margin-left:6px;vertical-align:middle;}
/* Services collapsible */
.footer-col details{width:100%;}
.footer-col details summary{list-style:none;cursor:pointer;font-size:10px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:var(--muted);margin-bottom:0;display:flex;align-items:center;justify-content:space-between;user-select:none;padding-right:2px;}
.footer-col details summary::-webkit-details-marker{display:none;}
.footer-col details summary::after{content:'+';font-size:13px;font-weight:400;color:var(--muted);line-height:1;}
.footer-col details[open] summary::after{content:'−';}
.footer-col details ul{margin-top:12px;}
@media(max-width:1024px){.footer-top{grid-template-columns:1fr 1fr;}}
@media(max-width:768px){.footer-top{grid-template-columns:1fr;}.footer-disclosure{text-align:left;}.footer-bottom{flex-direction:column;align-items:flex-start;}}

/* ── mobile menu ──────────────────────────────────────────────────────────────
   .mobile-menu is stamped into every page by apply_shell.py (via _shared/nav.html).
   These rules must live here (not index.html inline CSS) so all pages that link
   shell.css get the hide/show behaviour. */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height, 64px);
  left: 0;
  right: 0;
  background: var(--deep, #111111);
  border-bottom: 1px solid var(--border, #222222);
  padding: 24px;
  z-index: 199;
  flex-direction: column;
  gap: 20px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text, #BBBBBB);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--border, #222222);
}
.mobile-menu a:last-child { border-bottom: none; }

/* Blog/listing pages: keep the category bar from running flush-left on wide screens. */
.category-bar {
  max-width: 1280px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .category-bar { padding: 0 16px !important; }
}

/* ── Reveal-on-scroll (progressive enhancement) ────────────────────────────
   Default: visible. JS adds 'js-ready' to <html>, which re-hides elements
   so the IntersectionObserver can animate them in. No JS = always visible. */
.reveal { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s ease; }
.js-ready .reveal { opacity: 0; transform: translateY(20px); }
.js-ready .reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal { opacity: 1; transform: none; }
}
