/* GridForesight360 — shared site styles.
   Tokens follow the GridForesight design system: square corners, dense controls, brand blue. */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-foreground: #ffffff;
  --info: #3b82f6;
  --background: #ffffff;
  --foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #94a3b8;
  --teal: #0d9488;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  overflow-x: clip;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
img, svg { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---- Hover helpers (replace design-time style-hover attributes) ---- */
.hov-ink:hover { color: #0f172a !important; }
.hov-blue:hover { color: #2563eb !important; }
.hov-blue-dark:hover { color: #1d4ed8 !important; }
.hov-sky:hover { color: #93c5fd !important; }
.hov-slate:hover { color: #e2e8f0 !important; }
.hov-bg-slate:hover { background: #e2e8f0 !important; }
.hov-chip:hover { border-color: #2563eb !important; color: #2563eb !important; }

/* ---- Controls (design-system equivalents) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  color: var(--primary-foreground); background: var(--primary);
  border: 1px solid transparent; border-radius: 0; cursor: pointer;
  text-decoration: none; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--primary-hover); color: var(--primary-foreground); }
.btn--outline { background: var(--background); color: var(--foreground); border-color: var(--input); }
.btn--outline:hover { background: var(--accent); color: var(--foreground); }
.btn--xs { height: 24px; padding: 0 8px; font-size: 11px; }

.badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: fit-content;
  padding: 2px 8px; font-size: 12px; font-weight: 500; line-height: 14px; white-space: nowrap;
  border: 1px solid transparent; border-radius: 0;
  color: var(--foreground); background: var(--muted);
}
.badge--info { background: var(--info); color: #ffffff; }
.badge--outline { background: transparent; border-color: var(--border); color: var(--foreground); }

.label { font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--foreground); }
.input, .textarea {
  display: block; width: 100%; min-width: 0;
  font: inherit; font-size: 12px; line-height: 1.4; color: var(--foreground);
  background: transparent; border: 1px solid var(--input); border-radius: 0;
  box-shadow: 0 1px 2px rgba(15,23,42,.05); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input { height: 32px; padding: 4px 12px; }
.textarea { min-height: 64px; padding: 8px 12px; resize: vertical; }
.input:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px rgba(148,163,184,.5); }
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); }

/* ---- Header / navigation ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226,232,240,0); box-shadow: 0 8px 24px rgba(15,23,42,0);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.site-header.is-solid, .site-header.is-scrolled {
  background: rgba(255,255,255,.88); border-bottom-color: rgba(226,232,240,1); box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.site-header__inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; min-height: 76px; display: flex; align-items: center; gap: 24px; }
.site-header__logo { display: flex; flex: none; align-items: center; line-height: 0; }
.site-header__logo img { height: 60px; width: auto; display: block; }
.site-nav { display: flex; flex: 1 1 auto; align-self: stretch; flex-wrap: wrap; align-items: center; gap: 0 24px; white-space: nowrap; font-size: 13px; font-weight: 500; color: #475569; }
.site-nav > a { color: #475569; }
.site-nav > a:hover { color: #0f172a; }
.site-nav > a.is-current { color: #0f172a; font-weight: 600; }
.nav-item { display: flex; align-items: center; }
.nav-trigger {
  appearance: none; background: none; border: 0; padding: 26px 0; margin: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; color: #475569;
  box-shadow: inset 0 -2px 0 transparent; transition: color .15s ease, box-shadow .15s ease;
}
.nav-trigger:hover, .nav-item.is-open .nav-trigger { color: #0f172a; }
.nav-trigger.is-current { color: #0f172a; font-weight: 600; }
.nav-item.is-open .nav-trigger { box-shadow: inset 0 -2px 0 #2563eb; }
.nav-trigger svg { flex: none; transition: transform .2s ease; }
.nav-item.is-open .nav-trigger svg { transform: rotate(180deg); }
.nav-panel {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  background: #ffffff; border-top: 1px solid #e2e8f0; box-shadow: 0 24px 48px rgba(15,23,42,.14);
  white-space: normal;
}
.nav-item.is-open .nav-panel { display: block; animation: fadeUp .22s ease-out both; }
.nav-panel__inner { max-width: 1280px; margin: 0 auto; padding: 24px 32px 32px; display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 32px; }
.nav-panel__intro { background: #f1f5f9; padding: 22px 24px; display: grid; gap: 10px; align-content: start; color: inherit; text-decoration: none; }
a.nav-panel__intro:hover { background: #e2e8f0; color: inherit; }
.nav-panel__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #0f172a; }
.nav-panel__intro p { margin: 0; font-size: 14px; line-height: 1.55; color: #475569; }
.nav-panel__more { font-size: 13px; font-weight: 600; color: #2563eb; }
.nav-panel__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; align-content: start; padding-top: 6px; }
.nav-panel__links a { display: grid; gap: 4px; padding: 6px 0; color: #0f172a; text-decoration: none; }
.nav-panel__links a:hover { color: #2563eb; }
.nav-panel__links a > span:first-child { font-size: 14px; font-weight: 600; line-height: 1.3; }
.nav-panel__links a > span:last-child { font-size: 13px; line-height: 1.45; color: #475569; }
.site-header__actions { margin-left: auto; flex: none; display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; appearance: none; background: none; border: 1px solid var(--border); width: 36px; height: 36px; padding: 0; cursor: pointer; color: #0f172a; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; }
.nav-toggle span::before { top: -5px; } .nav-toggle span::after { top: 5px; }

@media (max-width: 960px) {
  .site-header__inner { padding: 0 20px; gap: 12px; flex-wrap: wrap; min-height: 64px; }
  .site-header__logo img { height: 46px; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .site-header__actions { margin-left: 0; }
  .site-header__actions .btn--outline { display: none; }
  .site-nav { display: none; order: 3; flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 16px; border-top: 1px solid var(--border); font-size: 15px; }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav > a { padding: 12px 0; }
  .nav-item { flex-direction: column; align-items: stretch; }
  .nav-trigger { padding: 12px 0; justify-content: space-between; box-shadow: none !important; }
  .nav-panel { position: static; border-top: 0; box-shadow: none; }
  .nav-panel__inner { grid-template-columns: 1fr; padding: 4px 0 12px; gap: 12px; }
  .nav-panel__links { grid-template-columns: 1fr; gap: 6px; padding-top: 0; }
  .nav-panel__intro { padding: 14px 16px; }
}

/* ---- Footer ---- */
.site-footer { margin-top: 96px; background: #0f172a; color: #cbd5e1; }
.site-footer__inner { max-width: 1120px; margin: 0 auto; padding: 72px 32px 28px; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 48px 40px; align-items: start; }
.site-footer__col { display: grid; gap: 14px; align-content: start; min-width: 0; }
.site-footer__brand { display: grid; gap: 18px; align-content: start; min-width: 0; }
.site-footer__name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: #ffffff; }
.site-footer p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #cbd5e1; }
.site-footer__heading { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffffff; }
.site-footer__col a { font-size: 14.5px; font-weight: 600; color: #e2e8f0; text-decoration: none; }
.site-footer__col a:hover { color: #93c5fd; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-top: 72px; padding-top: 22px; border-top: 1px solid rgba(148,163,184,.25); font-size: 14.5px; color: #94a3b8; }
.site-footer__bottom a { color: #94a3b8; }
.site-footer__bottom a:hover { color: #e2e8f0; }
.site-footer__legal { display: flex; gap: 8px; }

/* ---- Page rhythm helpers shared by sub-pages ---- */
/* Two-column sections stack below ~900px; the visual column always follows the copy. */
@media (max-width: 960px) {
  .col-visual { order: 2; }
}
@media (max-width: 640px) {
  .page-pad { padding-left: 20px !important; padding-right: 20px !important; }
  .site-footer__inner { padding: 56px 20px 24px; }
}
