/* MSPAlliance Institute pages. Tokens match the UCS web edition (styles.css). */
:root {
  --ink: #10253d;
  --ink-2: #183552;
  --muted: #5c6c80;
  --blue: #126da4;
  --blue-dark: #0d4b75;
  --sky: #59b7e8;
  --paper: #ffffff;
  --warm: #f7f4ef;
  --rule: #d9e0e6;
  --amber: #884817;
  --serif: Georgia, "Times New Roman", serif;
  --wrap: 1120px;
  --header-h: 76px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 64px); }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.65; }
a { color: var(--blue); text-underline-offset: 0.16em; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

.skip-link {
  position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 8px 12px;
  border-radius: 4px; background: var(--ink); color: #fff; transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
  position: sticky; z-index: 100; top: 0; height: var(--header-h);
  border-bottom: 1px solid var(--rule); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: 0 0 auto; }
.brand img { display: block; width: 230px; height: auto; }
.brand span {
  padding: 4px 10px 3px; border: 1px solid #9dd7f4; border-radius: 8px; background: #eff9fe;
  color: var(--ink); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.16em;
}
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 8px 12px; border-radius: 6px; color: var(--ink); font-size: 0.93rem; font-weight: 600; text-decoration: none;
}
.site-nav a:hover { background: #edf7fc; color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); border-radius: 0; }
.nav-toggle {
  display: none; width: 42px; height: 42px; padding: 10px; border: 1px solid var(--rule);
  border-radius: 5px; background: #fff; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; margin: 4px 0; background: var(--ink); }

.subnav {
  position: sticky; z-index: 90; top: var(--header-h); border-bottom: 1px solid var(--rule); background: var(--warm);
}
.subnav .wrap { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.subnav a {
  flex: 0 0 auto; padding: 12px 0; color: var(--muted); font-size: 0.84rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.subnav a:hover, .subnav a.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--amber); }

/* Hero */
.hero {
  position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 96px);
  background: radial-gradient(120% 140% at 85% 0%, #1d4b74 0%, var(--ink) 55%); color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: linear-gradient(90deg, #4da9dc 0 20%, #7d59c1 20% 40%, #10a978 40% 60%, #ee7925 60% 80%, #ed3248 80%);
}
/* Oversized brand mark bleeding off the hero corner (matches HeroWatermark on mspalliance.com). */
.hero-mark {
  position: absolute; z-index: 0; top: 50%; right: -10%; width: 58%; max-width: 860px; height: auto;
  opacity: 0.12; transform: translateY(-50%) rotate(8deg); pointer-events: none; user-select: none;
}
.hero .wrap { position: relative; z-index: 1; }
@media (max-width: 640px) { .hero-mark { top: 0; right: -35%; width: 110%; transform: rotate(8deg); opacity: 0.1; } }
.hero h1 {
  max-width: 17ch; margin: 0 0 20px; font-family: var(--serif); font-size: clamp(2.3rem, 5.2vw, 3.9rem);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.01em;
}
.hero .lede { max-width: 46ch; margin: 0 0 22px; color: #d6e6f3; font-size: clamp(1.1rem, 1.8vw, 1.32rem); line-height: 1.5; }
.hero p { max-width: 62ch; color: #c3d4e3; }
.hero .eyebrow { color: #9dd7f4; }

.eyebrow {
  margin: 0 0 12px; color: var(--amber); font-size: 0.74rem; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase;
}

/* Bands */
.band { padding: clamp(56px, 7vw, 92px) 0; }
.band.tone-warm { background: var(--warm); }
.band.tone-ink { background: var(--ink); color: #dbe7f1; }
.band.tone-ink h2 { color: #fff; }
.band h2 {
  max-width: 24ch; margin: 0 0 24px; font-family: var(--serif); font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.15;
}
.band h3 { margin: 28px 0 10px; font-size: 1.08rem; line-height: 1.3; }
.prose { max-width: 72ch; }
.prose p, .card p, .panel p, .topic p, .callout p { margin: 0 0 14px; }
.prose > h3:first-child { margin-top: 0; }

.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }

.panel {
  padding: 26px 28px; border: 1px solid var(--rule); border-radius: 10px; background: #fff;
}
.panel h3:first-child { margin-top: 0; }

.check-list { margin: 0 0 8px; padding: 0; list-style: none; }
.check-list li { position: relative; padding: 7px 0 7px 26px; border-bottom: 1px solid #ebe6dd; }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: ""; position: absolute; top: 15px; left: 2px; width: 10px; height: 10px; border-radius: 2px; background: var(--blue);
}
.check-list.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; max-width: 820px; margin-bottom: 28px; }
.check-list.two-col li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }

.numbered { max-width: 820px; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: n; }
.numbered li {
  position: relative; counter-increment: n; margin: 0 0 12px; padding: 18px 20px 18px 70px;
  border: 1px solid var(--rule); border-radius: 10px; font-weight: 600;
}
.numbered li::before {
  content: "0" counter(n); position: absolute; top: 16px; left: 22px; color: var(--blue); font-family: var(--serif); font-size: 1.3rem; font-weight: 700;
}

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 26px 0 8px; }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.principles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card {
  padding: 24px 24px 12px; border: 1px solid var(--rule); border-top: 3px solid var(--blue); border-radius: 8px; background: #fff;
}
.card h3 { margin: 0 0 10px; }
.card .check-list li { border-color: var(--rule); }

.callout {
  max-width: 860px; margin-top: 36px; padding: 28px 30px; border-left: 4px solid var(--amber); border-radius: 0 10px 10px 0; background: var(--warm);
}
.tone-warm .callout { background: #fff; }
.callout h3 { margin-top: 0; }

.note { max-width: 72ch; margin: 18px 0 0; color: var(--muted); font-size: 0.95rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: 6px; font-size: 0.95rem; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #eff9fe; color: var(--ink); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); color: #fff; }
.btn:focus-visible, .site-nav a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(89, 183, 232, 0.6); outline-offset: 2px;
}

.address { font-style: normal; line-height: 1.6; }
.tone-ink .address { padding: 24px 26px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 10px; color: #fff; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.topic { padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--rule); }
.topic h3 { margin-top: 0; }
.address-block { padding: 20px 22px; border-radius: 8px; background: var(--warm); }
.contact-form {
  position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 16px; padding: 30px;
  border: 1px solid var(--rule); border-radius: 12px; background: #fff; box-shadow: 0 18px 46px rgba(20, 39, 60, 0.08);
}
.contact-form h2 { margin: 0; font-size: 1.6rem; }
.contact-form label { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 700; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #becbd5; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-weight: 400;
}
.contact-form textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-status { margin: 0; color: var(--muted); font-size: 0.9rem; }
.form-status.is-error { color: #b42318; }

/* Footer */
.site-footer { padding: 48px 0 24px; border-top: 1px solid var(--rule); background: var(--warm); font-size: 0.92rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-row nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
.footer-base { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.84rem; }
.footer-base p { margin: 0; }

@media (max-width: 960px) {
  .card-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .contact-layout { grid-template-columns: 1fr; }
  .contact-form { position: static; }
}

@media (max-width: 820px) {
  :root { --header-h: 66px; }
  .brand img { width: 180px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); right: 0; left: 0; display: none; flex-direction: column; gap: 0;
    padding: 8px 16px 16px; border-bottom: 1px solid var(--rule); background: #fff; box-shadow: 0 18px 30px rgba(20, 39, 60, 0.1);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: none; }
}

@media (max-width: 640px) {
  .brand span { display: none; }
  .card-grid, .card-grid.three, .check-list.two-col, .field-row { grid-template-columns: 1fr; }
  .check-list.two-col li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid #ebe6dd; }
  .contact-form { padding: 22px; }
  .numbered li { padding-left: 58px; }
  .numbered li::before { left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
