/* Project Mesh research site. Same Material 3 Expressive motion/shape language as Betar's
   site (spring easing, morphing radii) so the two read as a family, but a distinct neutral
   graphite palette rather than Betar's brand blue -- Project Mesh is the protocol/research
   layer, not the app, and doesn't have its own locked visual mark yet (the old tricolor
   glyph in assets/logo.svg predates the Betar rebrand and is being retired, not reused
   here -- see docs/BETAR-TRANSITION.md Part 6). This ships as a clean wordmark until a
   real mark exists. */

:root {
  --accent: #3A6EA5;
  --accent-deep: #274A70;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --ink: #14181D;
  --slate: #4B5563;
  --slate-dark: #384049;
  --outline: #D5D9DE;
  --secondary-container: #E2E8F0;
  --on-secondary-container: #1F2937;
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181D;
    --surface: #1C2127;
    --ink: #E6E9ED;
    --slate: #A7B0BA;
    --slate-dark: #C4CBD3;
    --outline: #333B44;
    --accent: #7CA6D6;
    --accent-deep: #9FC0E4;
    --secondary-container: #263140;
    --on-secondary-container: #DCE9F5;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  font-size: 18px;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); }
a:hover { color: var(--accent); }
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

header.site-header { padding: 20px 0; border-bottom: 1px solid var(--outline); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand span { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.brand .mono { font-weight: 600; color: var(--slate); font-size: 14px; }
nav.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav.site-nav a { text-decoration: none; color: var(--slate-dark); font-weight: 600; font-size: 15px; }
nav.site-nav a:hover { color: var(--accent-deep); }
nav.site-nav a[aria-current="page"] { color: var(--accent-deep); }

main { padding: 56px 0 80px; }
h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 20px; }
h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin: 48px 0 16px; }
h3 { font-size: 19px; font-weight: 700; margin: 24px 0 10px; }
p { margin: 0 0 16px; max-width: 68ch; }
.lede { font-size: 20px; color: var(--slate-dark); max-width: 62ch; }

@keyframes pm-spring-in { 0% { transform: scale(.7); opacity: 0; } 55% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.hero-center { text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--secondary-container); color: var(--on-secondary-container);
  border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 700; margin-bottom: 20px;
}

.card {
  background: var(--surface); border-radius: 22px; padding: 28px; border: 1px solid var(--outline);
  transition: border-radius .5s cubic-bezier(.34,1.56,.64,1), transform .25s ease, box-shadow .25s ease;
}
.card:hover { border-radius: 30px 16px 30px 16px; transform: translateY(-2px); box-shadow: 0 12px 28px -18px rgba(20,24,29,.25); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 24px 0; }

.btn {
  display: inline-block; background: var(--accent-deep); color: #FFFFFF; text-decoration: none;
  font-weight: 700; padding: 14px 26px; border-radius: 18px; font-size: 16px;
  transition: border-radius .25s cubic-bezier(.34,1.56,.64,1), transform .12s cubic-bezier(.34,1.56,.64,1), background .2s ease;
}
.btn:hover { background: var(--accent); border-radius: 999px; }
.btn:active { transform: scale(.96); }
.btn.secondary { background: transparent; color: var(--accent-deep); border: 2px solid var(--outline); }
.btn.secondary:hover { border-color: var(--accent-deep); }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0; }

.callout { border-left: 4px solid var(--accent); background: var(--surface); padding: 18px 22px; border-radius: 0 16px 16px 0; margin: 24px 0; }

table { width: 100%; border-collapse: collapse; margin: 20px 0; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--outline); font-size: 16px; }
th { color: var(--slate-dark); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }

code, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

footer.site-footer { border-top: 1px solid var(--outline); padding: 32px 0 48px; color: var(--slate-dark); font-size: 14px; }
footer.site-footer a { color: var(--slate-dark); }
footer.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .wrap { padding: 0 18px; }
  h2 { margin: 36px 0 14px; }
}
