/* ==========================================================================
   MRB Instructional Design — core stylesheet
   Design system carried over from the June 2026 dossier build.
   Change colors, fonts and spacing here and every page updates.
   ========================================================================== */

:root {
  /* --- Palette --------------------------------------------------------- */
  --ink:        #0D161E;   /* page background */
  --ink-2:      #111E29;   /* panels and cards */
  --ink-3:      #17293700; /* placeholder, see --raised */
  --raised:     #172836;   /* hovered / raised surfaces */
  --teal:       #2E7D74;   /* primary accent */
  --mint:       #9FD9CE;   /* light accent, links */
  --orange:     #E8662C;   /* signal accent — use sparingly */
  --salmon:     #F2B5A0;   /* light signal */
  --clay:       #A35F49;   /* tertiary */
  --paper:      #E6EDF2;   /* body text */
  --muted:      #8CA3B3;   /* secondary text */
  --rule:       rgba(159, 217, 206, 0.14);
  --rule-solid: #1E3341;

  /* --- Type ------------------------------------------------------------ */
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  /* --- Layout ---------------------------------------------------------- */
  --measure: 1180px;
  --narrow:  760px;
  --radius:  10px;
  --gap:     clamp(2.5rem, 6vw, 5.5rem);
}

/* --- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }

/* --- Type scale -------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.65rem); }
h4 { font-size: 1.15rem; }
p  { margin: 0 0 1.1em; }
a  { color: var(--mint); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--salmon); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.lede { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.mono { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--muted); }

/* --- Focus ------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- Layout helpers ---------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--measure)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--narrow)); margin-inline: auto; }
section { padding-block: var(--gap); }
.rule-top { border-top: 1px solid var(--rule-solid); }

/* --- Skip link --------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px;
  background: var(--orange); color: var(--ink);
  padding: 0.6rem 1rem; z-index: 100; font-family: var(--mono); font-size: 0.8rem;
}
.skip:focus { left: 1rem; top: 1rem; }

/* --- Header ------------------------------------------------------------ */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 22, 30, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-solid);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 68px;
}
.brand {
  font-family: var(--display); font-size: 1.15rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--paper); text-decoration: none; white-space: nowrap;
}
.brand span { color: var(--teal); }
.nav { display: flex; gap: 1.6rem; align-items: center; }
.nav a {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  padding-block: 0.4rem; border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--orange); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule-solid);
  color: var(--paper); font-family: var(--mono); font-size: 0.75rem;
  padding: 0.45rem 0.8rem; border-radius: 6px; cursor: pointer;
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset: 68px 0 auto; flex-direction: column;
    align-items: flex-start; gap: 0; padding: 1rem 1.25rem 1.5rem;
    background: var(--ink-2); border-bottom: 1px solid var(--rule-solid);
  }
  .nav[hidden] { display: none; }
  .nav a { width: 100%; padding-block: 0.7rem; }
}

/* --- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-block; font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  padding: 0.85rem 1.5rem; border-radius: 6px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #1A0B04; font-weight: 600; }
.btn-primary:hover { background: var(--salmon); color: #1A0B04; }
.btn-ghost { border-color: var(--teal); color: var(--mint); }
.btn-ghost:hover { background: rgba(46, 125, 116, 0.16); color: var(--mint); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* --- Cards ------------------------------------------------------------- */
.card {
  background: var(--ink-2); border: 1px solid var(--rule-solid);
  border-radius: var(--radius); padding: 1.75rem;
}
.card h3 { margin-bottom: 0.6rem; }
.card p:last-child { margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; display: block; transition: border-color 0.18s, background 0.18s; }
a.card:hover { border-color: var(--teal); background: var(--raised); }
.grid-2 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.grid-3 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }

/* --- Hero -------------------------------------------------------------- */
.hero { padding-block: clamp(4rem, 11vw, 8rem) var(--gap); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 0%, transparent 75%);
  opacity: 0.5;
}
.hero .wrap { position: relative; }
.hero h1 { max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--mint); }

/* --- Stat band --------------------------------------------------------- */
.stats {
  display: grid; gap: 1px; background: var(--rule-solid);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--rule-solid); border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--ink-2); padding: 1.6rem 1.4rem; }
.stat b {
  display: block; font-family: var(--display); font-size: 2.7rem;
  font-weight: 600; line-height: 1; color: var(--mint);
}
.stat span {
  display: block; font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin-top: 0.6rem;
}

/* --- Map (the deployment plot) ----------------------------------------- */
.plot-shell {
  background: var(--ink-2); border: 1px solid var(--rule-solid);
  border-radius: var(--radius); padding: 0.5rem; position: relative;
}
#deployment-plot { width: 100%; height: auto; display: block; touch-action: manipulation; }
.plot-land { fill: var(--mint); opacity: 0.07; }
.plot-grat { stroke: var(--rule); stroke-width: 0.5; fill: none; }
.plot-frame { stroke: var(--rule-solid); stroke-width: 1; fill: none; }
.plot-label { font-family: var(--mono); font-size: 5px; letter-spacing: 0.18em; fill: var(--muted); opacity: 0.5; }
.plot-arc { stroke: var(--teal); stroke-width: 0.5; fill: none; opacity: 0.35; }
.plot-site { cursor: pointer; }
.plot-site .dot { fill: var(--orange); transition: r 0.2s ease; }
.plot-site .ring { fill: none; stroke: var(--orange); stroke-width: 0.6; opacity: 0; transition: opacity 0.2s, r 0.2s; }
.plot-site .hit { fill: transparent; }
.plot-site:hover .dot, .plot-site.is-active .dot { fill: var(--salmon); }
.plot-site:hover .ring, .plot-site.is-active .ring { opacity: 0.85; }
.plot-site .name {
  font-family: var(--mono); font-size: 4.4px; letter-spacing: 0.08em;
  fill: var(--paper); opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.plot-site:hover .name, .plot-site.is-active .name { opacity: 1; }
.plot-home .dot { fill: var(--mint); }
.plot-legend {
  display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.plot-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.5rem; }

/* --- Timeline ---------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule-solid); }
.timeline li { position: relative; padding: 0 0 2rem 1.75rem; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 0.55rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink); border: 1px solid var(--teal); transition: background 0.2s, border-color 0.2s;
}
.timeline li.is-active::before { background: var(--orange); border-color: var(--orange); }
.timeline .yr { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; color: var(--teal); }
.timeline h4 { margin: 0.25rem 0 0.15rem; text-transform: none; font-family: var(--body); font-weight: 600; font-size: 1.05rem; }
.timeline .org { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.06em; }
.timeline p { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.95rem; }

/* --- Meter bars -------------------------------------------------------- */
.meter { margin-bottom: 1.15rem; }
.meter-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.4rem; }
.meter-track { height: 6px; background: var(--raised); border-radius: 3px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--teal); border-radius: 3px; width: 0; transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1); }
.meter-fill.accent { background: var(--orange); }

/* --- Case studies ------------------------------------------------------ */
.case-metrics { display: flex; flex-wrap: wrap; gap: 1.75rem; margin: 1.4rem 0 0; padding: 1.2rem 0 0; border-top: 1px solid var(--rule-solid); }
.case-metrics div b { display: block; font-family: var(--display); font-size: 1.9rem; color: var(--orange); line-height: 1; }
.case-metrics div span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* --- Quotes ------------------------------------------------------------ */
blockquote {
  margin: 2rem 0; padding: 1.4rem 1.6rem;
  border-left: 2px solid var(--orange); background: var(--ink-2);
  border-radius: 0 var(--radius) var(--radius) 0;
}
blockquote p { font-size: 1.08rem; }
blockquote cite { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--muted); font-style: normal; }

/* --- Forms ------------------------------------------------------------- */
.field { margin-bottom: 1.25rem; }
.field label {
  display: block; font-family: var(--mono); font-size: 0.74rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.45rem;
}
.field input, .field select, .field textarea {
  width: 100%; background: var(--ink); color: var(--paper);
  border: 1px solid var(--rule-solid); border-radius: 6px;
  padding: 0.8rem 0.9rem; font-family: var(--body); font-size: 1rem;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.form-note { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.05em; }
.hp { position: absolute; left: -9999px; }

/* --- Blog -------------------------------------------------------------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-bottom: 1px solid var(--rule-solid); }
.post-list a { display: block; padding: 1.6rem 0; text-decoration: none; color: inherit; }
.post-list a:hover h3 { color: var(--mint); }
.post-list .meta { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.post-list h3 { margin: 0.5rem 0 0.4rem; text-transform: none; font-family: var(--body); font-weight: 600; font-size: 1.3rem; }
.post-list p { color: var(--muted); margin: 0; font-size: 0.97rem; }

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.4rem; font-size: 1.7rem; }
.prose h3 { margin-top: 1.8rem; text-transform: none; font-family: var(--body); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.5rem; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--ink-2); padding: 0.15em 0.4em; border-radius: 4px; }
.prose hr { border: 0; border-top: 1px solid var(--rule-solid); margin: 2.5rem 0; }
.prose img { border-radius: var(--radius); margin: 2rem 0; }

/* --- Footer ------------------------------------------------------------ */
.site-foot { border-top: 1px solid var(--rule-solid); padding-block: 3rem 2.5rem; margin-top: var(--gap); }
.site-foot .wrap { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.site-foot h4 { font-size: 0.8rem; font-family: var(--mono); letter-spacing: 0.15em; color: var(--teal); margin-bottom: 0.9rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 0.5rem; }
.site-foot a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.site-foot a:hover { color: var(--paper); }
.colophon { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule-solid); font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.06em; }


/* --- Figures ----------------------------------------------------------- */
figure { margin: 0 0 2rem; }
figure img {
  width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--rule-solid);
}
figcaption {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--muted); margin-top: 0.7rem; line-height: 1.5;
}
.figure-band {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 2rem 0;
}
.figure-band figure { margin: 0; }
.hero-figure { position: relative; max-width: 1024px; margin-inline: auto; }
.hero-figure img { aspect-ratio: 3 / 2; object-fit: cover; }

/* --- Reveal on scroll -------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
