/* PTX Labs — site styles
   Fonts: Newsreader (display) + Source Sans 3 (body), both SIL OFL 1.1, self-hosted. */

@font-face {
  font-family: 'Newsreader';
  src: url('/assets/fonts/newsreader-var.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/sourcesans3-var.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* one accent, cool bright neutrals; no near-black surfaces */
  --ink:      #0f2b2c;
  --ink-soft: #294348;
  --slate:    #556e73;   /* 4.9:1 on mint, 5.4:1 on white */
  --muted:    #587176;   /* small print: clears 4.5:1 on white and mint */
  --paper:    #ffffff;
  --paper-2:  #f4fbfa;
  --mint:     #e4f7f2;
  --line:     #dbeae7;
  --accent:   #077567;   /* interactive: clears 4.5:1 on white and on mint */
  --accent-d: #06695d;
  --accent-l: #3fd9c0;   /* decorative only — fails text contrast */
  --accent-br:#12c9ae;   /* decorative only */
  --deep:     #0b625c;
  --on-deep:  #d3efe9;
  --grad:     linear-gradient(135deg, #07806f 0%, #076b85 100%);

  --display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;

  --wrap: 1180px;
  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgba(10, 90, 84, .05), 0 14px 40px -12px rgba(10, 90, 84, .18);
  --z-header: 20;
  --z-skip: 60;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17.5px;
  line-height: 1.62;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle grain so large flat areas aren't sterile */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none; opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='1'/%3E%3C/filter%3E%3Crect width='90' height='90' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 450;
  line-height: 1.1;
  letter-spacing: -.018em;
  margin: 0 0 .46em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.55rem, 6vw, 4.35rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.85rem, 3.7vw, 2.7rem); letter-spacing: -.024em; }
h3 { font-size: 1.28rem; font-weight: 500; letter-spacing: -.012em; }
p  { margin: 0 0 1.1em; text-wrap: pretty; }
a  { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-d); }
strong { font-weight: 600; color: var(--ink); }
img, svg { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- structure ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 26px; position: relative; z-index: 2; }
section { padding: 96px 0 104px; }         /* optically heavier at the bottom */
.section-paper2 { background: var(--paper-2); }
.section-mint { background: var(--mint); }
.section-grad { background: var(--grad); color: #eafffb; }
.section-grad h1, .section-grad h2, .section-grad h3 { color: #fff; }
.section-grad a { color: #fff; }
.section-tight { padding: 60px 0 64px; }

.lede { font-size: 1.18rem; line-height: 1.55; color: var(--slate); max-width: 60ch; }
.section-grad .lede { color: #eafffb; }
.measure { max-width: 64ch; }

.eyebrow {
  font-family: var(--body);
  font-size: .74rem; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 1.1em;
}
.section-grad .eyebrow { color: #c8fff4; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 26px; height: 74px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 36px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 30px; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .96rem; font-weight: 500;
  transition: color .18s ease;
}
.nav a.btn-primary { color: #fff; }        /* .nav a would otherwise win over .btn-primary */
.nav a.btn-primary:hover { color: #fff; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav a:not(.btn)[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-toggle {
  display: none; margin-left: auto; font: inherit; font-size: .92rem; font-weight: 500;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; color: var(--ink);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-family: var(--body);
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.section-grad .btn-primary { background: #fff; color: var(--accent-d); }
.section-grad .btn-primary:hover { background: #eafffb; color: var(--accent-d); }
.section-grad .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.section-grad .btn-ghost:hover { background: #fff; color: var(--accent-d); border-color: #fff; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.btn-row.center { justify-content: center; }   /* flex ignores text-align */

/* ---------- status pill ---------- */
.status {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-d); background: rgba(10, 160, 140, .09);
  border: 1px solid rgba(10, 160, 140, .18);
  border-radius: 999px; padding: 6px 15px 6px 12px; margin-bottom: 26px;
}
.status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.section-grad .status {
  color: #fff; background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.34);
}
.section-grad .status::before { background: #fff; }

/* ---------- hero (text only, particle field behind) ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 132px 0 124px;
  background: linear-gradient(178deg, var(--mint), var(--paper) 72%);
}
#particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; display: block;
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { margin-bottom: .32em; max-width: none; }   /* full width */
.hero .lede { font-size: 1.28rem; max-width: none; }
.hero-note { margin: 32px 0 0; font-size: .9rem; color: var(--slate); }

/* ---------- zig-zag program rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 66px; align-items: center; }
.split + .split { margin-top: 104px; }
.split.reverse > figure { order: 2; }
.split figure { margin: 0; }
.split img { border-radius: var(--r-md); box-shadow: var(--shadow); }

.tag {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-d);
  background: rgba(10, 160, 140, .1); border-radius: var(--r-sm);
  padding: 5px 11px; margin-bottom: 16px;
}
.section-grad .tag { color: #fff; background: rgba(255,255,255,.2); }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-side { grid-template-columns: .82fr 1.18fr; gap: 56px; align-items: start; }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 30px;
  display: flex; flex-direction: column;
}
.card > :last-child { margin-bottom: 0; }
.card-plain { background: none; border: 0; padding: 0; }
.section-grad .card { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.24); color: #eafffb; }

/* ---------- stats ---------- */
.stat { display: flex; flex-direction: column; padding: 24px 0 0; border-top: 1px solid var(--line); }
.section-grad .stat { border-top-color: rgba(255,255,255,.3); }
.stat .num {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.2rem, 4.3vw, 3rem); line-height: 1;
  letter-spacing: -.035em; color: var(--accent);
  font-variant-numeric: tabular-nums; margin-bottom: 14px;
}
.section-grad .stat .num { color: #fff; }
.stat .label { font-size: .96rem; line-height: 1.45; color: var(--slate); margin: 0 0 14px; }
.section-grad .stat .label { color: #eafffb; }
.stat cite {
  display: block; font-style: normal; font-size: .78rem; color: var(--muted);
  margin-top: auto; padding-top: 12px;   /* citations share a baseline across a row */
}

/* ---------- timeline ---------- */
.track { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.track li {
  position: relative; padding: 22px 0 22px 40px;
  border-top: 1px solid var(--line);
}
.section-grad .track li { border-top-color: rgba(255,255,255,.3); }
.track li::before {
  content: ""; position: absolute; left: 4px; top: 30px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent-l);
}
.track li.done::before { background: var(--accent); border-color: var(--accent); }
.section-grad .track li::before { background: transparent; border-color: #fff; }
.section-grad .track li.done::before { background: #fff; border-color: #fff; }
.track h3 { margin-bottom: .25em; }
.track p { margin: 0; color: var(--slate); font-size: .97rem; }
.section-grad .track p { color: #eafffb; }
.track .when {
  font-size: .74rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 7px;
}

/* ---------- ticks ---------- */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 0 0 14px 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(10, 160, 140, .12); box-shadow: inset 0 0 0 2px var(--accent-l);
}

/* ---------- form ---------- */
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .98rem; color: var(--ink); font-family: var(--body);
  padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { min-height: 156px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 160, 140, .13);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 11px; align-items: flex-start; font-size: .89rem; color: var(--slate); }
.consent input { width: auto; margin-top: 4px; }
.form-status { font-size: .93rem; padding: 13px 15px; border-radius: var(--r-sm); margin: 0; }
.form-status[data-state="ok"]  { background: rgba(10, 160, 140, .1); color: var(--accent-d); }
.form-status[data-state="err"] { background: #fbeae7; color: #8d3226; }
.form-status[hidden] { display: none; }

/* ---------- notes ---------- */
.note {
  border-left: 3px solid var(--accent-l); background: var(--paper-2);
  padding: 20px 24px; border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: .91rem; color: var(--slate);
}
.note > :last-child { margin-bottom: 0; }

.page-head { padding: 78px 0 10px; background: linear-gradient(178deg, var(--mint), var(--paper)); }

/* ---------- footer ---------- */
.site-footer { background: var(--deep); color: var(--on-deep); padding: 68px 0 34px; font-size: .93rem; }
.site-footer .footer-bottom { color: #a7d8d0; }
.site-footer .footer-bottom a { color: #a7d8d0; }
.site-footer h4 {
  font-family: var(--body); color: #fff; font-size: .74rem; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; margin: 0 0 15px;
}
.site-footer a { color: var(--on-deep); text-decoration: none; }
.site-footer a:hover { color: var(--accent-l); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 48px; }
.footer-logo { height: 34px; margin-bottom: 18px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 50px; padding-top: 24px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: .84rem; color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.footer-bare { border-top: 0; margin-top: 0; padding-top: 0; }

/* ---------- utilities (no inline styles: CSP blocks them) ---------- */
.center { text-align: center; }
.center .lede, .center .measure { margin-inline: auto; }
.stack-sm { margin-top: 26px; }
.stack-md { margin-top: 44px; }
.stack-lg { margin-top: 64px; }
.skip {
  position: absolute; left: -9999px; background: var(--accent); color: #fff;
  padding: 11px 18px; border-radius: 0 0 var(--r-sm) 0; z-index: var(--z-skip);
}
.skip:focus { left: 0; top: 0; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero .wrap, .split, .grid-3, .grid-4, .grid-side, .footer-grid { grid-template-columns: 1fr; }
  .hero .wrap, .split { gap: 44px; }
  .split + .split { margin-top: 64px; }
  .split.reverse > figure { order: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  section { padding: 68px 0 74px; }
  .hero { padding: 62px 0 66px; }
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 26px 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; }
  .nav .btn { margin-top: 12px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .grid-2, .grid-4, .field-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:active { transform: none; }
}
