/* The N50 Project Design System — shared tokens & components
   Extracted from n50project.org (real CSS), 2026-05-06
   Free-font substitute: Manrope (Google) for PP Mori (Pangram, paid) */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* color */
  --brand: #1c5d99;
  --brand-soft: #96bee3;
  --brand-pale: #d6e5ef;
  --brand-deep: #103a66;
  --accent-teal: #267e6e;
  --accent-deep: #003429;
  --accent-warm: #ff6900;
  --ink: #0d0e07;
  --ink-soft: rgba(13,14,7,0.8);
  --ink-muted: rgba(13,14,7,0.7);
  --ink-quiet: rgba(13,14,7,0.3);
  --ink-faint: rgba(13,14,7,0.12);
  --bg: #f8f6f2;
  --bg-pure: #ffffff;
  --ink-deep: #21405e;
  --text-on-dark: #f8f6f2;
  --text-on-dark-muted: rgba(248,246,242,0.72);
  --text-on-dark-quiet: rgba(248,246,242,0.5);

  /* type */
  --font-display: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-eyebrow: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* layout */
  --container: 1240px;
  --container-narrow: 880px;
  --gutter: 32px;
  --section: 120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }

/* TYPOGRAPHY ----------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 128px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0;
}
.h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 0.4em;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5em;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 12px;
}
.eyebrow {
  font-family: var(--font-eyebrow);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 16px;
  display: inline-block;
}
.eyebrow.on-dark { color: var(--brand-soft); }
.eyebrow.teal { color: var(--accent-teal); }
.lede {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 56ch;
}
p { margin: 0 0 1.1em; max-width: 72ch; }

/* BUTTONS -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 30px;
  border: 0;
  background: var(--brand);
  color: var(--bg);
  border-radius: 10px;
  font-family: var(--font-eyebrow);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
  cursor: pointer;
  line-height: 1;
}
.btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn.secondary {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
.btn.secondary:hover { background: var(--brand); color: var(--bg); }
.btn.on-dark {
  background: var(--bg);
  color: var(--ink);
}
.btn.on-dark:hover { background: var(--brand-soft); color: var(--ink-deep); }
.btn.warm {
  background: var(--accent-warm);
  color: var(--bg);
}
.btn.warm:hover { background: #d35a00; }
.btn.teal {
  background: var(--accent-teal);
  color: var(--bg);
}
.btn.teal:hover { background: var(--accent-deep); }

.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-eyebrow);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
  transition: color 160ms ease;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 4px;
}
.btn-arrow .arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 200ms ease;
}
/* SVG long-arrow icon — N50's signature CTA element. Use 12.41x9.18 viewbox arrow.svg.
   When inline as <svg> child of .btn-arrow .arrow it should size to ~12px wide. */
.btn-arrow .arrow svg {
  width: 12px;
  height: auto;
  display: block;
  fill: currentColor;
}
.btn-arrow:hover { color: var(--brand-deep); }
.btn-arrow:hover .arrow { transform: translateX(5px); }
.btn-arrow.on-dark { color: var(--brand-soft); }
.btn-arrow.on-dark:hover { color: var(--bg); }
/* Same SVG arrow inside a .btn (primary button) */
.btn .arrow svg { width: 11px; height: auto; fill: currentColor; display: block; }
.btn .arrow { display: inline-flex; align-items: center; transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* CHIP ----------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--brand-pale);
  color: var(--brand-deep);
  font-family: var(--font-eyebrow);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
}
.chip.teal {
  background: rgba(38,126,110,0.12);
  color: var(--accent-deep);
}
.chip.warm {
  background: rgba(255,105,0,0.12);
  color: var(--accent-warm);
}
.chip.outline {
  background: transparent;
  border: 1px solid var(--ink-quiet);
  color: var(--ink-soft);
}

/* LAYOUT --------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section) 0; }
.section-sm { padding: 64px 0; }

/* NAVIGATION ----------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: transparent;
  transition: background 220ms ease, box-shadow 220ms ease;
}
.nav.scrolled {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--ink-faint);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.nav-brand img {
  height: 44px;
  width: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: color 140ms ease;
}
.nav-links a:hover { color: var(--brand); }
.nav.over-dark .nav-links a {
  color: var(--bg);
}
.nav.over-dark.scrolled .nav-links a {
  color: var(--ink);
}
.nav-cta {
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* CARDS ---------------------------------------------------- */
.card {
  background: var(--bg-pure);
  border: 1px solid var(--ink-faint);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -18px rgba(13,14,7,0.18);
  border-color: var(--brand-soft);
}
.card .img {
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  background-color: var(--brand-pale);
}
.card .body { padding: 28px 28px 32px; }

/* DARK SECTION -------------------------------------------- */
.dark {
  background: var(--ink-deep);
  color: var(--text-on-dark);
}
.dark .h1, .dark .h2, .dark .h3, .dark .display { color: var(--bg); }
.dark .lede { color: var(--text-on-dark-muted); }
.dark p { color: var(--text-on-dark-muted); }

/* FOOTER --------------------------------------------------- */
.footer {
  background: var(--ink-deep);
  color: var(--text-on-dark);
  padding: 96px 0 40px;
}
.footer .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 64px;
}
.footer h4 {
  font-family: var(--font-eyebrow);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-soft);
  margin: 0 0 20px;
  font-weight: 700;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 12px; }
.footer ul a {
  color: var(--text-on-dark-muted);
  font-size: 14px;
  font-weight: 400;
  transition: color 140ms;
}
.footer ul a:hover { color: var(--bg); }
.footer .footer-brand img { height: 90px; margin-bottom: 20px; width: auto; }
.footer .footer-brand p {
  color: var(--text-on-dark-muted);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.55;
}
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(248,246,242,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-on-dark-quiet);
}
.footer-bottom .socials { display: flex; gap: 12px; }
.footer-bottom .socials a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248,246,242,0.18);
  border-radius: 999px;
  color: var(--text-on-dark-muted);
  transition: all 160ms ease;
}
.footer-bottom .socials a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--bg);
}

/* HERO ----------------------------------------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding: 160px 0 90px;
  color: var(--bg);
  overflow: hidden;
  background: var(--ink-deep);
}
.hero .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,14,7,0.35) 0%, rgba(13,14,7,0.15) 35%, rgba(13,14,7,0.85) 100%);
  z-index: 1;
}
.hero .container { position: relative; z-index: 2; }
.hero .display { color: var(--bg); max-width: 16ch; }
.hero .lede { color: rgba(248,246,242,0.92); max-width: 50ch; }

/* DIAGONAL DECORATION ------------------------------------- */
/* ShowIt's signature decorative line — drawn corner-to-corner across an
   absolutely-positioned box. On the live n50project.org these appear 23+
   times as subtle section punctuation: corners of cards, between rows of
   icon + label blocks, and as visual breaks at section transitions.
   Stroke-width 1, ~15% opacity, inherits stroke from currentColor.
   Default sizing is 150px square (matches live site's data-d-length="150"). */
.n50-diagonal {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1;
  opacity: 0.15;
  overflow: visible;
}
.n50-diagonal line { stroke: inherit; stroke-width: inherit; }
/* Inline 150px decorative box that holds a single corner-to-corner diagonal.
   Use as a non-flow accent placed inside a relatively-positioned section. */
.n50-diag-box {
  position: relative;
  width: 150px;
  height: 150px;
  display: inline-block;
  pointer-events: none;
  color: var(--ink);
}
.n50-diag-box.sm { width: 100px; height: 100px; }
.n50-diag-box.lg { width: 220px; height: 220px; }
.n50-diag-box.on-dark { color: var(--bg); }
/* Section corner-accent positioning utilities */
.n50-diag-corner-tr { position: absolute; top: 24px; right: 24px; }
.n50-diag-corner-tl { position: absolute; top: 24px; left: 24px; }
.n50-diag-corner-br { position: absolute; bottom: 24px; right: 24px; }
.n50-diag-corner-bl { position: absolute; bottom: 24px; left: 24px; }

/* ICON HELPER --------------------------------------------- */
/* All N50 icons live at assets/n50-brand/icons/<name>.svg with viewBox 0 0 512 512
   (or 12.41 9.18 for the long arrow). They use fill="currentColor" so they
   inherit text color; size with .n50-icon utility or width/height attrs. */
.n50-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  fill: currentColor;
  vertical-align: middle;
  flex-shrink: 0;
}
.n50-icon.sm { width: 16px; height: 16px; }
.n50-icon.lg { width: 48px; height: 48px; }
.n50-icon.xs { width: 14px; height: 14px; }

/* Replace existing footer socials inline-svg sizing with icon system */
.footer-bottom .socials a .n50-icon { width: 14px; height: 14px; }

/* MOBILE-NAV TOGGLE (hamburger) -------------------------- */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  margin-left: 8px;
  color: inherit;
  cursor: pointer;
  border-radius: 6px;
}
.nav-toggle .n50-icon { width: 22px; height: 22px; }
.nav.over-dark .nav-toggle { color: var(--bg); }
.nav.scrolled .nav-toggle { color: var(--ink); }

/* RESPONSIVE ---------------------------------------------- */
@media (max-width: 880px) {
  .nav-links a { display: none; }
  .nav-links a.btn,
  .nav-links a.nav-cta { display: inline-flex; }
  .nav-toggle { display: inline-flex; }
  .footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { padding: 80px 0; }
}

/* ==================== SIGNATURE PATTERNS ==================== */
/* N50-only extensions to the canonical section catalog.
   Per brand-spec.md → "Signature patterns (N50-only)". */

/* STAT STRIP ---------------------------------------------- */
.sig-stat-strip {
  padding: 96px 0;
  border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
}
.sig-stat-strip .eyebrow {
  display: block;
  text-align: center;
  margin-bottom: 56px;
}
.sig-stat-strip .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
}
.sig-stat-strip .stat {
  text-align: left;
  border-left: 2px solid var(--ink-faint);
  padding-left: 28px;
}
.sig-stat-strip .stat .figure {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 6vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--brand);
  margin: 0 0 12px;
}
.sig-stat-strip .stat .figure.teal { color: var(--accent-teal); }
.sig-stat-strip .stat .label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0 0 6px;
  max-width: 22ch;
}
.sig-stat-strip .stat .source {
  font-family: var(--font-eyebrow);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}
.sig-stat-strip.on-dark { background: var(--ink-deep); border-color: rgba(248,246,242,0.12); }
.sig-stat-strip.on-dark .stat { border-left-color: rgba(248,246,242,0.18); }
.sig-stat-strip.on-dark .stat .figure { color: var(--brand-soft); }
.sig-stat-strip.on-dark .stat .label { color: var(--text-on-dark-muted); }

/* PARTNER STRIP ------------------------------------------- */
.sig-partner-strip {
  padding: 96px 0;
}
.sig-partner-strip .head {
  text-align: center;
  margin-bottom: 56px;
}
.sig-partner-strip .head .h3 { margin-bottom: 0; }
.sig-partner-strip .grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 48px 64px;
  align-items: center;
  justify-items: center;
}
.sig-partner-strip .partner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  width: 100%;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 200ms ease, opacity 200ms ease;
}
.sig-partner-strip .partner:hover {
  filter: grayscale(0);
  opacity: 1;
}
.sig-partner-strip .partner img,
.sig-partner-strip .partner svg {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
.sig-partner-strip .partner.text-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
  filter: none;
  opacity: 0.45;
}
.sig-partner-strip .partner.text-logo:hover { opacity: 1; color: var(--ink); }

/* QUOTE CARD ---------------------------------------------- */
.sig-quote-card {
  background: var(--bg);
  border-left: 4px solid var(--brand);
  padding: 56px 64px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}
.sig-quote-card::before {
  content: "\201C";
  position: absolute;
  top: -28px;
  left: 36px;
  font-family: Georgia, serif;
  font-size: 140px;
  line-height: 1;
  color: var(--brand-soft);
  font-style: normal;
  font-weight: 400;
}
.sig-quote-card .quote {
  font-family: var(--font-body);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 32px;
  max-width: 36ch;
}
.sig-quote-card .attribution {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sig-quote-card .attribution .headshot {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--brand-pale);
  flex-shrink: 0;
}
.sig-quote-card .attribution .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}
.sig-quote-card .attribution .title {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-muted);
  margin: 4px 0 0;
}
.sig-quote-card.theme-navy {
  background: var(--ink-deep);
  border-left-color: var(--brand-soft);
  color: var(--text-on-dark);
}
.sig-quote-card.theme-navy::before { color: rgba(150,190,227,0.4); }
.sig-quote-card.theme-navy .quote { color: var(--bg); }
.sig-quote-card.theme-navy .attribution .name { color: var(--bg); }
.sig-quote-card.theme-navy .attribution .title { color: var(--text-on-dark-muted); }

@media (max-width: 880px) {
  .sig-stat-strip .grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .sig-partner-strip .grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .sig-quote-card { padding: 40px 32px; }
}


/* ============ DS NAV ============ */
.ds-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.08));
  font-family: 'Inter', system-ui, sans-serif;
}
.ds-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ds-nav-brand {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink, #161616);
  text-decoration: none;
  letter-spacing: -0.005em;
}
.ds-nav-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}
.ds-nav-tabs a {
  display: block;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft, #3D3D3D);
  text-decoration: none;
  border-radius: 6px;
  transition: background 160ms, color 160ms;
}
.ds-nav-tabs a:hover {
  background: var(--surface, rgba(0,0,0,0.04));
  color: var(--ink, #161616);
}
.ds-nav-tabs a.active {
  background: var(--ink, #161616);
  color: #fff;
}
