/* Site header and footer: menu bar, mega menus, status labels and the footer tagline.
   Used by index.html, get-started.html and the pages linked from the homepage.
   Pages built on arthashield.css pick up its theme. On pages that don't load it,
   give the header and footer the classes "site-shell standalone". */
:root {
  --line-strong: rgba(0, 0, 0, .16);
  --c-understand: #1d1d1f;
  --c-decide: #0369a1;
  --c-protect: #4f46e5;
  --c-act: #7c3aed;
}
.dark {
  --line-strong: rgba(255, 255, 255, .2);
  --c-understand: #ffffff;
  --c-decide: #38bdf8;
  --c-protect: #818cf8;
  --c-act: #a78bfa;
}
/* Menus: closed panels are hidden from keyboard focus, not just collapsed */
.dropdown.max-h-0, #mobileMenu.max-h-0 { visibility: hidden; }
.badge-gradient { display: inline-flex; align-items: center; border-radius: 9999px; background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; padding: .15rem .55rem; font-size: .6875rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }

.nav-item { transition: color .2s; }
.nav-item:hover, .nav-item[aria-current="page"] { color: var(--text); }
.nav-item[aria-current="page"] { font-weight: 600; }

/* "Explore CAL" in the menu bar: a white button with a soft pulsing glow, the way into CAL */
.cal-pill { display: inline-flex; align-items: center; border-radius: 9999px; padding: .3rem .8rem; font-size: .8125rem; font-weight: 600; white-space: nowrap; color: #0b0b0f; transition: opacity .2s; }
.cal-pill.cal-glow { background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #38bdf8, #6366f1, #a78bfa) border-box; }
.cal-pill:hover { opacity: .9; }
@media (min-width: 640px) { .cal-pill { padding: .35rem 1rem; font-size: .875rem; } }
.cal-glow { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, #38bdf8, #6366f1, #a78bfa) border-box; animation: calGlow 2.8s ease-in-out infinite; }
.cal-glow-word { background: linear-gradient(90deg, #38bdf8, #818cf8, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes calGlow {
  0%, 100% { box-shadow: 0 0 16px -6px rgba(56, 189, 248, .55); }
  50% { box-shadow: 0 0 0 3px rgba(99, 102, 241, .14), 0 0 34px -4px rgba(139, 92, 246, .7); }
}

/* Full-width mega menu under the sticky header */
.mega-trigger { display: inline-flex; align-items: center; gap: .25rem; transition: color .2s; }
.mega-trigger:hover, .mega-trigger[aria-expanded="true"] { color: var(--text); }
.mega-trigger svg { width: 1rem; height: 1rem; margin-top: .125rem; transition: transform .2s; }
.mega-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.mega { position: absolute; left: 0; right: 0; top: 100%; padding-top: .5rem; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.mega.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
.mega-card { overflow: hidden; border-radius: 1.25rem; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .55); }
.mega-side { background: var(--bg-alt); border-left: 1px solid var(--line); }
.mega-label { font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mega-link { display: flex; flex-direction: column; gap: .15rem; margin: 0 -.75rem; border-radius: .75rem; padding: .6rem .75rem; transition: background-color .2s, color .2s; }
.mega-link:hover { background: rgba(0, 0, 0, .04); color: var(--accent); }
.dark .mega-link:hover { background: rgba(255, 255, 255, .05); }
.mega-feature { display: block; border-radius: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(124, 58, 237, .08)); transition: border-color .2s; }
.mega-feature:hover { border-color: var(--line-strong); }
.mega-promo { display: flex; flex-direction: column; gap: .25rem; border-radius: .875rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.mega-promo:hover { border-color: var(--line-strong); box-shadow: 0 12px 24px -18px rgba(37, 99, 235, .6); }

/* Tagline: each word in its stage colour */
.t-understand { color: var(--c-understand); }
.t-decide { color: var(--c-decide); }
.t-protect { color: var(--c-protect); }
.t-act { color: var(--c-act); }

/* Maturity labels */
.status { display: inline-flex; align-items: center; gap: .35rem; border-radius: 9999px; border: 1px solid currentColor; padding: .15rem .6rem; font-size: .6875rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.status::before { content: ""; width: .375rem; height: .375rem; border-radius: 9999px; background: currentColor; }
.status-early { color: var(--c-act); border-color: color-mix(in srgb, var(--c-act) 45%, transparent); background: color-mix(in srgb, var(--c-act) 10%, transparent); }
.status-live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.status-demo { color: var(--muted); border-style: dashed; border-color: var(--line-strong); }
.status-demo::before { background: transparent; border: 1px solid currentColor; }
@media (prefers-reduced-motion: reduce) {
  .cal-glow { animation: none; box-shadow: 0 0 26px -6px rgba(139, 92, 246, .6); }
}

/* Standalone pages: header and footer carry their own theme, following the device setting as those pages do */
.site-shell.standalone {
  --bg: #ffffff; --bg-alt: #f5f5f7; --surface: #ffffff; --text: #1d1d1f; --muted: #6e6e73;
  --line: rgba(0, 0, 0, .08); --accent: #2563eb; --line-strong: rgba(0, 0, 0, .16);
  --c-understand: #1d1d1f; --c-decide: #0369a1; --c-protect: #4f46e5; --c-act: #7c3aed;
  color: var(--text); font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.site-shell.standalone .glass { background: rgba(255, 255, 255, .72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border: 1px solid var(--line); }
.site-shell.standalone .surface { background: var(--surface); border: 1px solid var(--line); }
.site-shell.standalone .muted { color: var(--muted); }
.site-shell.standalone .accent { color: var(--accent); }
.site-shell.standalone .bg-alt, .site-shell.standalone.bg-alt { background: var(--bg-alt); }
.site-shell.standalone .hairline, .site-shell.standalone.hairline { border-color: var(--line); }
.site-shell.standalone .link-arrow { display: inline-flex; align-items: center; gap: .25rem; font-weight: 500; color: var(--accent); }
.site-shell.standalone .theme-toggle { display: none; }
.dark .site-shell.standalone {
    --bg: #000000; --bg-alt: #0a0a0c; --surface: #111114; --text: #f5f5f7; --muted: #a1a1a6;
    --line: rgba(255, 255, 255, .1); --accent: #60a5fa; --line-strong: rgba(255, 255, 255, .2);
    --c-understand: #ffffff; --c-decide: #38bdf8; --c-protect: #818cf8; --c-act: #a78bfa;
}
.dark .site-shell.standalone .glass { background: rgba(22, 22, 26, .72); }
.dark .site-shell.standalone .mega-link:hover { background: rgba(255, 255, 255, .05); }
