/* site.css — shared site chrome (design tokens + header + footer).
 * Single source of truth for the RankNibbler header/footer, extracted from the
 * homepage so any page can link this file and drop in the {{HEADER}}/{{FOOTER}}
 * partials instead of copy-pasting markup + CSS. Served from /css/site.css. */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --navy:#003366; --navy-dark:#001a33;
  --red:#ef4444; --red-hover:#dc2626; --red-light:#fee2e2;
  --text:#0a0a0a; --text-soft:#374151; --text-muted:#6b7280;
  --border:#e5e7eb; --border-strong:#d1d5db;
  --bg:#ffffff; --bg-subtle:#f9fafb; --bg-accent:#f3f4f6;
  --ok:#059669; --warn:#d97706; --fail:#dc2626;
}

html, body { margin:0; padding:0; overflow-x:hidden; }
body { background:var(--bg); font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  font-size:15px; line-height:1.6; color:var(--text); -webkit-font-smoothing:antialiased; max-width:100vw; }
a { color:var(--text); text-decoration:none; }
a:hover { color:var(--text-muted); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header { border-bottom:1px solid var(--border); background:rgba(255,255,255,0.85);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); position:sticky; top:0; z-index:100; }
.header-inner { max-width:1360px; margin:0 auto; padding:18px 32px; display:flex; align-items:center;
  justify-content:space-between; gap:24px; }
.logo { display:inline-flex; align-items:center; gap:8px; font-family:'Inter',sans-serif; font-size:22px;
  letter-spacing:-0.6px; color:var(--text); font-weight:400; text-decoration:none; }
.logo b { font-weight:700; }
.logo:hover { color:var(--text); }
.logo-icon { flex-shrink:0; }
.logo-text { color:var(--text); }
.main-nav { display:flex; align-items:center; gap:28px; }
.main-nav a { font-size:14px; font-weight:500; color:var(--text-soft); }
.main-nav a:hover { color:var(--text); }
.nav-cta { background:transparent; color:var(--text-soft) !important; padding:0; border:none; border-radius:0;
  font-weight:500; font-size:14px; }
.nav-cta:hover { color:var(--text) !important; background:transparent; border:none; }
/* A filled CTA variant for auth pages (Sign in / Get started) */
.nav-btn { display:inline-flex; align-items:center; padding:9px 16px !important; border-radius:8px;
  font-size:14px; font-weight:600; background:#0a0a0a; color:#fff !important; }
.nav-btn:hover { background:#2b2b2b; color:#fff !important; }

/* Hamburger */
.nav-toggle { display:none; background:transparent; border:1px solid var(--border); border-radius:8px;
  width:40px; height:40px; padding:10px; cursor:pointer; flex-direction:column; gap:4px; align-items:center; justify-content:center; }
.nav-toggle span { display:block; width:18px; height:1.8px; background:var(--text); border-radius:2px;
  transition:transform .22s ease, opacity .22s ease; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { border-top:1px solid var(--border); background:var(--bg); }
.footer-inner { max-width:1360px; margin:0 auto; padding:0 32px; }
/* Newsletter signup — sits above the link grid */
.ft-newsletter { display:grid; grid-template-columns:1.1fr 1fr; gap:40px; align-items:center; padding:40px 0; border-bottom:1px solid var(--border); }
.ft-news-text h3 { font-size:21px; font-weight:700; letter-spacing:-.5px; margin:0 0 6px; color:var(--text); }
.ft-news-text p { font-size:14px; color:var(--text-muted); margin:0; line-height:1.55; max-width:46ch; }
.ft-news-form { width:100%; }
.ft-news-row { display:flex; gap:10px; }
.ft-news-input { flex:1; min-width:0; padding:12px 14px; border:1px solid var(--border-strong); border-radius:8px; font-size:14px; font-family:inherit; color:var(--text); background:#fff; }
.ft-news-input::placeholder { color:var(--text-muted); }
.ft-news-input:focus { outline:none; border-color:var(--text); box-shadow:0 0 0 3px rgba(17,24,39,.08); }
.ft-news-btn { background:var(--text); color:#fff; border:0; border-radius:8px; padding:12px 22px; font-size:14px; font-weight:600; cursor:pointer; font-family:inherit; white-space:nowrap; transition:background .15s; }
.ft-news-btn:hover { background:#000; }
.ft-news-agree { display:flex; gap:8px; align-items:flex-start; margin-top:11px; font-size:12px; color:var(--text-muted); line-height:1.4; }
.ft-news-agree input { margin-top:1px; flex-shrink:0; accent-color:var(--text); }
.ft-news-agree a { color:var(--text); text-decoration:underline; text-underline-offset:2px; }
@media (max-width:760px) { .ft-newsletter { grid-template-columns:1fr; gap:18px; padding:28px 0; } }
.ft-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:48px; padding:56px 0; }
.ft-group + .ft-group { margin-top:28px; }
.ft-h { display:block; width:100%; text-align:left; background:none; border:none; padding:0; margin:0 0 16px;
  font-family:inherit; font-size:13px; font-weight:600; text-transform:uppercase; letter-spacing:1px; color:var(--text); cursor:default; }
.ft-chev { display:none; }
.ft-links { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.ft-links li { font-size:14px; }
.ft-links a { color:var(--text-soft); }
.ft-links a:hover { color:var(--text); }
.ft-bottom { border-top:1px solid var(--border); padding:26px 0 36px; }
.ft-bottom-row { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.footer-brand { display:inline-flex; align-items:center; gap:8px; font-family:'Inter',sans-serif; font-size:20px;
  letter-spacing:-0.6px; color:var(--text); font-weight:400; }
.footer-brand b { font-weight:700; }
.footer-status { font-size:12px; letter-spacing:0.3px; color:var(--text-muted); font-weight:500; }
.ft-copy { margin:18px 0 0; color:var(--text-muted); font-size:13px; }
.ft-disclaimer { margin:8px 0 0; max-width:920px; color:var(--text-muted); font-size:12px; line-height:1.6; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width:980px) {
  .ft-grid { grid-template-columns:repeat(2, 1fr); }
}
@media (max-width:760px) {
  .nav-toggle { display:flex; }
  .main-nav { display:none; position:absolute; top:100%; left:0; right:0; background:var(--bg);
    border-bottom:1px solid var(--border); padding:16px 24px 20px; flex-direction:column; align-items:stretch; gap:0;
    box-shadow:0 10px 30px rgba(0,0,0,0.06); }
  .menu-open .main-nav { display:flex; }
  .main-nav a { display:block; font-size:16px; padding:14px 4px; border-bottom:1px solid var(--border); color:var(--text) !important; }
  .main-nav a:last-of-type { border-bottom:none; }
  .nav-cta { width:auto; text-align:left; margin:0; padding:14px 4px; font-size:16px; }
  .nav-btn { width:auto; text-align:left; margin:8px 0 0; }
  .menu-open .nav-toggle span:nth-child(1) { transform:translateY(5.8px) rotate(45deg); }
  .menu-open .nav-toggle span:nth-child(2) { opacity:0; }
  .menu-open .nav-toggle span:nth-child(3) { transform:translateY(-5.8px) rotate(-45deg); }
}
@media (max-width:640px) {
  .header-inner { padding:14px 20px; }
  .footer-inner { padding:0 20px; }
  .ft-grid { grid-template-columns:1fr; gap:0; padding:8px 0; }
  .ft-col > .ft-group, .ft-group { border-top:1px solid var(--border); }
  .ft-grid > div:first-child .ft-group:first-child { border-top:none; }
  .ft-group + .ft-group { margin-top:0; }
  .ft-h { display:flex; align-items:center; justify-content:space-between; margin:0; padding:16px 2px; cursor:pointer; }
  .ft-chev { display:block; flex:0 0 auto; transition:transform .2s ease; color:var(--text-muted); }
  .ft-h[aria-expanded="true"] .ft-chev { transform:rotate(180deg); }
  .ft-links { display:none; padding:0 2px 16px; }
  .ft-links.is-open { display:flex; }
  .ft-bottom-row { flex-direction:column; align-items:flex-start; gap:12px; }
}
