/* STAMP website. Colours come from brand/palette.json */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/Inter-Regular.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/Inter-Italic.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/Inter-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url(../fonts/Manrope-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url(../fonts/Manrope-Bold.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url(../fonts/Manrope-ExtraBold.woff2) format("woff2"); }

:root {
  --ink: #142D3B; --teal: #007F79; --deepteal: #00665F; --mist: #9ED3CD;
  --coral: #F47860; --slate: #5C6B73; --paper: #F5F3EC;
  --bg: #FFFFFF; --fg: var(--ink); --muted: var(--slate); --link: var(--teal);
  --surface: var(--paper); --border: #E4E2DA; --hero-bg: var(--ink); --hero-fg: #FFFFFF;
  --head: "Manrope", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1F29; --fg: #EAEFF1; --muted: #A9B6BC; --link: #7FCBC3;
    --surface: #16303D; --border: #26414F; --hero-bg: #0A1820;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; background: var(--bg); color: var(--fg); font: 400 1.0625rem/1.65 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--coral); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0 0 0.4em; }
h2 { font-size: 1.6rem; margin: 2em 0 0.6em; }
h3 { font-size: 1.15rem; margin: 0 0 0.3em; }
.prose h2::after { content: ""; display: block; width: 2.4rem; height: 3px; background: var(--teal); margin-top: 0.35em; border-radius: 2px; }
.prose > :first-child { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 10; }

main { flex: 1; }

/* header / nav */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: block; line-height: 0; }
.brand img { height: 40px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { .logo-light { display: none; } .logo-dark { display: block; } }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-nav a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--deepteal); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--teal); }
.nav-toggle, .nav-burger { display: none; }
@media (max-width: 860px) {
  .nav-burger { display: block; width: 32px; height: 32px; position: relative; cursor: pointer; }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after { position: absolute; left: 4px; right: 4px; height: 2px; background: var(--fg); content: ""; }
  .nav-burger span { top: 15px; } .nav-burger span::before { top: -8px; left: 0; right: 0; } .nav-burger span::after { top: 8px; left: 0; right: 0; }
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--bg); padding: 8px 16px 16px; border-bottom: 1px solid var(--border); }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* hero */
.hero { position: relative; background: var(--hero-bg); color: var(--hero-fg); overflow: hidden; }
.hero-inner { position: relative; z-index: 1; padding-top: clamp(48px, 9vw, 96px); padding-bottom: clamp(88px, 12vw, 140px); }
.hero h1 { max-width: 30ch; font-weight: 800; font-size: clamp(1.9rem, 3.8vw, 2.8rem); text-wrap: balance; }
.hero .lead { color: var(--mist); max-width: 44ch; font-size: 1.2rem; }
.eyebrow { font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; color: var(--teal); margin: 0 0 1em; }
.hero .eyebrow { color: var(--mist); }
.hero-traj { position: absolute; left: 0; right: 0; bottom: 30px; width: 100%; height: clamp(80px, 13vw, 170px); }
.hero-traj .tube { fill: var(--teal); opacity: 0.55; }
.hero-traj .line { fill: none; stroke: var(--mist); stroke-width: 4; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.hero-traj .sample { fill: none; stroke: var(--mist); stroke-width: 1.2; opacity: 0.7; vector-effect: non-scaling-stroke; }
.hero-traj svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hero-traj .goal { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--coral); }
.btn { display: inline-block; background: var(--coral); color: var(--ink); font-weight: 600; text-decoration: none; padding: 10px 20px; border-radius: 999px; margin: 0 8px 8px 0; }
.btn:hover { background: #F78F7B; color: var(--ink); }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px var(--mist); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* page layout */
.page-head { border-bottom: 1px solid var(--border); padding: clamp(40px, 7vw, 72px) 0 32px; background: linear-gradient(180deg, var(--surface), var(--bg)); }
.page-head .lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; margin: 0; }
.content { padding-top: 40px; padding-bottom: 72px; }
.home-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .home-grid { grid-template-columns: 1fr 320px; } }
.news-aside h2 { margin-top: 0; font-size: 1.3rem; }

/* cards */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 40px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.card p { margin: 0.4em 0 0; }
.obj-id { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; font: 700 1rem var(--head); margin-bottom: 12px; background: var(--teal); }
.nowrap { white-space: nowrap; }
.obj-2 .obj-id { background: var(--coral); color: var(--ink); }
.obj-3 .obj-id { background: var(--ink); box-shadow: inset 0 0 0 2px var(--mist); }
.obj-4 .obj-id { background: var(--deepteal); }
.obj-5 .obj-id { background: var(--slate); }
.person .avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.person .small a { white-space: nowrap; }
.initials { display: grid; place-items: center; background: var(--mist); color: var(--ink); font: 700 1.4rem var(--head); }
.role { color: var(--deepteal); font-weight: 600; }
@media (prefers-color-scheme: dark) { .role { color: var(--link); } }

/* news */
.news-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.news-item time { font-size: 0.85rem; color: var(--muted); }
.news-item h2, .news-item h3 { margin: 4px 0; }
.news-item h2 a, .news-item h3 a { color: var(--fg); text-decoration: none; }
.news-item h2 a:hover, .news-item h3 a:hover { color: var(--deepteal); }
.news-item p { margin: 4px 0 0; color: var(--muted); }
.post-image { border-radius: 12px; margin-bottom: 24px; }

/* tables */
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
@media (max-width: 720px) { .prose table { display: block; overflow-x: auto; } }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-family: var(--head); background: var(--surface); }
.prose td:first-child { font-weight: 600; white-space: nowrap; }

/* partner logos: always on white (HRZZ: no colour logo on coloured backgrounds) */
.partners { background: #FFFFFF; border-top: 1px solid #E4E2DA; padding: 28px 0; }
.partners-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 56px; }
.partner { display: block; min-width: 0; max-width: 100%; }
.partner img { display: block; height: 56px; width: auto; max-width: 100%; object-fit: contain; }
.partner img.fer { height: 40px; }
.partner img.lamor { height: 64px; }

/* footer */
.site-footer { background: var(--hero-bg); color: #C9D4D9; padding: 40px 0; font-size: 0.92rem; }
.site-footer a { color: var(--mist); }
.footer-inner { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.4fr 1fr; } }
.funding { max-width: 52ch; }
.footer-links p { margin: 0 0 6px; }
.site-footer .muted { color: #8FA0A8; }
