/* StratEx Consulting — shared site chrome (nav, footer, tokens)
   Used by every page except index.html, which intentionally keeps its own
   minimal, self-contained styling. See CLAUDE.md before editing this file —
   it's loaded by multiple pages, so a change here changes all of them. */

:root {
  --ink: #132338;
  --steel: #1a3050;
  --slate: #4a6080;
  --slate-light: #8a9bb0;
  --mist: #f2f4f7;
  --white: #ffffff;
  --amber: #d4af37;
  --amber-light: #faf5e4;
  --border: #dde3eb;
  --radius: 4px;

  /* Shared performance/risk/cost semantic colors — framework.html and
     yourproblem.html already agreed on these exact values independently;
     sharing them stops that agreement from drifting apart in future edits.
     Note: --system and --data-col are NOT shared — framework.html and
     yourproblem.html use conflicting values for --system (#5a3a8a vs
     #9b7fd4), so those stay page-specific. */
  --perf: #2a7abf;
  --risk: #b83232;
  --cost: #1e8449;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--white);
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  height: 72px;
  background: rgba(19,35,56,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-logo { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--white); text-decoration: none; }
.nav-logo span { color: var(--amber); }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.8rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--amber); }
.nav-links a.active { color: var(--white); }
.nav-cta { background: var(--amber) !important; color: var(--ink) !important; padding: 0.45rem 1.1rem; border-radius: 4px; }

/* ── HAMBURGER / MOBILE MENU ── */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; z-index: 200; }
.hamburger span { display: block; width: 22px; height: 2px; background: rgba(255,255,255,0.8); border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; position: fixed; top: 72px; left: 0; right: 0; background: rgba(19,35,56,0.98); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.08); z-index: 99; padding: 1.5rem 5%; flex-direction: column; gap: 0; }
.mobile-menu.open { display: flex; }
.mobile-menu a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 1rem; font-weight: 500; padding: 0.85rem 0 0.85rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.07); transition: color 0.2s; }
.mobile-menu a.nav-cta { padding-left: 1.25rem; color: var(--amber); font-weight: 700; }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--amber); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  padding: 2.5rem 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-logo { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1rem; color: var(--white); text-decoration: none; }
.footer-logo span { color: var(--amber); }
.footer-lines { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; }
footer p { font-size: 0.82rem; color: rgba(255,255,255,0.4); margin: 0; }
footer .footer-credit { font-size: 0.7rem; color: rgba(255,255,255,0.28); }

@media (max-width: 600px) {
  footer { padding: 2rem 5%; }
}

/* ── SCALE-TO-FIT DIAGRAM PREVIEW + TAP TO ENLARGE ──
   Paired with shared/scale-preview.js. This base rule MUST stay outside any
   media query — it was previously scoped only inside @media(max-width:900px),
   which let the badge/close button leak onto desktop with no display rule
   to hide them. Don't repeat that mistake. */
.scale-enlarge-badge, .scale-close-btn { display: none; }

@media (max-width: 900px) {
  .scale-preview { position: relative; overflow: hidden; }
  .scale-inner { transform-origin: top left; }
  .scale-enlarge-badge {
    position: absolute; top: 0.6rem; right: 0.6rem; z-index: 5;
    display: flex; align-items: center; gap: 0.35rem;
    background: rgba(19,35,56,0.85); border: 1px solid rgba(212,175,55,0.4);
    color: var(--amber); font-family: 'DM Sans', sans-serif; font-size: 0.65rem; font-weight: 600;
    padding: 0.3rem 0.6rem; border-radius: 20px; pointer-events: none;
  }
  .scale-preview.is-expanded {
    position: fixed; inset: 0; z-index: 2000; overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--ink); padding: 3.5rem 1.25rem 2rem;
    height: auto !important;
  }
  .scale-preview.is-expanded .scale-inner { transform: none !important; }
  .scale-preview.is-expanded .scale-enlarge-badge { display: none; }
  .scale-close-btn {
    display: none;
    position: fixed; top: 0.85rem; right: 0.85rem; z-index: 2001;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
    color: var(--white); font-size: 1.1rem; line-height: 1; cursor: pointer;
    align-items: center; justify-content: center;
  }
  .scale-preview.is-expanded ~ .scale-close-btn { display: flex; }
}
