/* ============================================================
   MORPH RESEARCH — SITE DESIGN SYSTEM  ·  "Release dossier"
   ------------------------------------------------------------
   The site is set like a reviewed technical document: cool
   archival paper, print-density ink, one verification green.
   Type: STIX Two Text (display serif of scientific publishing),
   Hanken Grotesk (body/UI), IBM Plex Mono (labels & data).
   Fonts are self-hosted — no third-party requests.
   ============================================================ */

/* ---- faces ------------------------------------------------ */
@font-face {
  font-family: "STIX Two Text";
  src: url("assets/fonts/stix-two-text-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "STIX Two Text";
  src: url("assets/fonts/stix-two-text-italic-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-grotesk-var.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/plex-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/plex-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---- tokens ------------------------------------------------ */
:root {
  --paper: #f4f6f0;        /* cool archival white            */
  --paper-2: #eaeee3;      /* tinted panel                   */
  --paper-3: #e0e6d8;      /* deeper tint / hover            */
  --ink: #141d17;          /* green-black                    */
  --ink-2: #4c594f;        /* muted body                     */
  --ink-3: #78857b;        /* captions                       */
  --rule: rgba(20, 29, 23, 0.16);
  --rule-2: rgba(20, 29, 23, 0.38);
  --verify: #0e7c52;       /* verification green             */
  --verify-deep: #0a5c3e;
  --verify-wash: rgba(14, 124, 82, 0.09);
  --risk: #b0482e;         /* adversarial step only          */
  --night: #0f190f;        /* closing panel (matches wave)   */
  --night-2: #182617;
  --paper-on-night: #eef2e7;
  --muted-on-night: #a7b3a4;
  --rule-on-night: rgba(238, 242, 231, 0.18);

  --serif: "STIX Two Text", "Times New Roman", Georgia, serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --max: 1120px;
  --gutter: 24px;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --hero-paper: url("assets/hero-paper.webp");
  --wave-img: url("assets/closing-wave.webp");
}

/* ---- base -------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--verify); color: var(--paper); }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible {
  outline: 2px solid var(--verify);
  outline-offset: 3px;
  border-radius: 2px;
}
.wrap { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 0 auto; }

h1, h2, h3, blockquote { font-family: var(--serif); font-weight: 560; margin: 0; }

/* mono label — the document's field notation */
.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tag.verify { color: var(--verify); }
.tag.risk { color: var(--risk); }

/* ---- document strip ---------------------------------------- */
.doc-strip {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.doc-strip .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
}
.doc-strip .tag { font-size: 10.5px; color: var(--ink-3); }

/* ---- header ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 246, 240, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
nav.main-nav {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17.5px;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.brand img { width: 34px; height: auto; }
.navlinks { display: flex; align-items: center; gap: 6px; }
.navlinks a:not(.btn) {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: var(--r-sm);
  transition: color 0.15s ease, background 0.15s ease;
}
.navlinks a:not(.btn):hover { color: var(--ink); background: var(--paper-2); }
.navlinks .btn { margin-left: 8px; }

/* ---- buttons ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--verify-deep); }
.btn-ghost { border-color: var(--rule-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
/* on dark panels */
.on-night .btn-primary { background: var(--paper-on-night); color: var(--night); }
.on-night .btn-primary:hover { background: #fff; }
.on-night .btn-ghost { border-color: var(--rule-on-night); color: var(--paper-on-night); }
.on-night .btn-ghost:hover { border-color: var(--paper-on-night); background: var(--night-2); }

/* ---- hero --------------------------------------------------- */
.hero { padding: 72px 0 64px; }
@media (min-width: 761px) {
  .hero { background: var(--hero-paper) center / cover no-repeat; }
}
@media (max-width: 760px) {
  .hero { background: url("assets/hero-paper-mobile.webp") center bottom / cover no-repeat; }
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero .tag { display: inline-block; margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(42px, 5.6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.021em;
  margin: 0 0 22px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--verify-deep);
}
.hero .lede {
  font-size: 18.5px;
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 34em;
  margin: 0 0 30px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero .fields {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero.compact h1 { font-size: clamp(36px, 4.6vw, 60px); max-width: 15em; }
.hero.compact .tag { margin-bottom: 18px; }

/* founder portrait */
.person .portrait {
  display: block;
  width: min(100%, 240px);
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  margin-bottom: 22px;
  filter: saturate(0.92);
}

/* closing seal */
.closing-panel .seal { display: block; width: 46px; height: auto; margin-bottom: 22px; opacity: 0.92; }

/* brand plate (team hero) */
.brand-plate { justify-self: end; width: min(100%, 400px); }
.brand-plate img { width: 100%; height: auto; }

/* the figure plate */
.figure-plate {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: #f8faf4;
  padding: clamp(14px, 2vw, 24px);
}
.figure-plate svg { width: 100%; height: auto; display: block; }
.figure-plate figcaption {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.figure-plate figcaption .fig-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--verify);
  margin-right: 8px;
}

/* ---- section scaffolding ------------------------------------ */
.section { padding: 76px 0; border-top: 1px solid var(--rule); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px 56px;
  align-items: end;
  margin-bottom: 44px;
}
.section-head .tag { display: block; margin-bottom: 14px; }
.section-head h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.section-head .head-note {
  font-size: 16.5px;
  color: var(--ink-2);
  margin: 0;
  max-width: 32em;
  justify-self: end;
}

/* ---- pipeline ledger ---------------------------------------- */
.ledger { border-top: 1px solid var(--rule-2); }
.ledger-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 220px;
  gap: 20px 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.ledger-row .no {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-3);
}
.ledger-row .no::after { content: " /"; color: var(--rule-2); }
.ledger-row h3 {
  font-size: 24px;
  line-height: 1.16;
  letter-spacing: -0.012em;
  margin: 0 0 8px;
}
.ledger-row p { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 42em; }
.ledger-row .out { justify-self: end; text-align: right; }
.ledger-row .out .tag { display: block; }
.ledger-row .out .tag:first-child { color: var(--ink-3); font-size: 10px; margin-bottom: 4px; }

/* ---- case panels (solutions) --------------------------------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.case {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper-2);
  padding: 30px 30px 26px;
}
.case .tag { display: block; margin-bottom: 16px; }
.case h3 {
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
}
.case ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.case li {
  color: var(--ink-2);
  font-size: 15.5px;
  padding-left: 18px;
  position: relative;
}
.case li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 1.5px;
  background: var(--verify);
}

/* ---- research ------------------------------------------------ */
.paper-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px;
  align-items: center;
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  background: #f8faf4;
  padding: 30px 32px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.paper-card:hover { border-color: var(--ink); background: var(--paper-2); }
.paper-card .tag { display: block; margin-bottom: 12px; }
.paper-card h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.014em; margin: 0 0 8px; }
.paper-card p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 42em; }
.paper-card .go {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--verify);
  white-space: nowrap;
}

.quote-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px 64px;
  margin-top: 56px;
  align-items: start;
}
blockquote.pull {
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.28;
  letter-spacing: -0.012em;
  font-style: italic;
  font-weight: 480;
  border-left: 2px solid var(--verify);
  padding-left: 26px;
}
.attrib {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-style: normal;
}
.side-note .tag { display: block; margin-bottom: 14px; }
.side-note p { margin: 0 0 14px; color: var(--ink-2); font-size: 16px; }
.side-note p:last-child { margin-bottom: 0; }

/* ---- closing panel + footer ---------------------------------- */
.closing { padding: 84px 0 0; }
.closing-panel {
  background: var(--night);
  color: var(--paper-on-night);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: clamp(44px, 6vw, 76px) 0 0;
}
@media (min-width: 981px) {
  .closing-panel {
    background-image:
      linear-gradient(90deg, var(--night) 0%, var(--night) 64%,
        rgba(15, 25, 15, 0.8) 76%, rgba(15, 25, 15, 0.3) 88%,
        rgba(15, 25, 15, 0) 98%),
      var(--wave-img);
    background-repeat: no-repeat, no-repeat;
    background-position: center, right center;
    background-size: 100% 100%, auto 100%;
  }
}
.closing-inner { max-width: 720px; }
.closing-panel .tag { color: var(--muted-on-night); display: block; margin-bottom: 18px; }
.closing-panel h2 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.018em;
  margin: 0 0 20px;
}
.closing-panel .closing-inner p {
  color: var(--muted-on-night);
  font-size: 17px;
  margin: 0 0 16px;
  max-width: 36em;
}
.closing-panel .cta-row { margin-top: 28px; }
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--rule-on-night);
  padding: 22px 0 30px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted-on-night);
}
.footer-row a { color: inherit; text-decoration: none; }
.footer-row a:hover { color: var(--paper-on-night); }

/* ---- team page ------------------------------------------------ */
.brief { border-top: 1px solid var(--rule-2); }
.brief-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px 48px;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}
.brief-row h3 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.014em;
  margin: 0 0 10px;
}
.brief-row p { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 44em; }

.person {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px 64px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper-2);
  padding: clamp(26px, 4vw, 44px);
}
.person .who h3 { font-size: 32px; letter-spacing: -0.016em; margin: 0 0 6px; }
.person .role { color: var(--ink-2); font-size: 16px; margin: 0 0 18px; }
.person .focus { display: flex; flex-wrap: wrap; gap: 8px; }
.person .focus .tag {
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 10.5px;
}
.person blockquote.pull { font-size: clamp(21px, 2.2vw, 26px); }
.person .why p { color: var(--ink-2); font-size: 15.5px; margin: 18px 0 0; }

.cred-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px 48px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.cred-row:first-of-type { border-top: 1px solid var(--rule-2); }
.cred-row .mark img { max-height: 44px; width: auto; }
.cred-row h3 { font-size: 20px; margin: 0 0 6px; letter-spacing: -0.01em; }
.cred-row p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 46em; }

/* ---- gatd page ------------------------------------------------- */
.paper-head {
  padding: 72px 0 56px;
  background: url("assets/gatd-paper.webp") right center / cover no-repeat;
}
.paper-head .tag { display: block; margin-bottom: 20px; }
.paper-head h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  max-width: 16em;
}
.paper-head .lede { font-size: 18px; color: var(--ink-2); max-width: 36em; margin: 0 0 28px; }
.paper-head .meta-line {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 30px;
}
.paper-head .meta-line a { color: var(--verify); text-decoration: none; }
.paper-head .meta-line a:hover { text-decoration: underline; }

.resource-list { border-top: 1px solid var(--rule-2); }
.resource {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr) auto;
  gap: 12px 40px;
  align-items: baseline;
  padding: 22px 4px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition: background 0.15s ease;
}
.resource:hover { background: var(--paper-2); }
.resource h3 { font-size: 21px; letter-spacing: -0.01em; margin: 0; }
.resource p { margin: 0; color: var(--ink-2); font-size: 15px; }
.resource .go {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--verify);
  white-space: nowrap;
  justify-self: end;
}
.resource:hover .go { color: var(--verify-deep); }

/* ---- responsive ------------------------------------------------ */
@media (max-width: 980px) {
  .hero { padding: 52px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; }
  .figure-plate { max-width: 640px; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .section-head .head-note { justify-self: start; }
  .ledger-row { grid-template-columns: 64px minmax(0, 1fr); }
  .ledger-row .out { grid-column: 2; justify-self: start; text-align: left; display: flex; gap: 14px; }
  .ledger-row .out .tag:first-child { margin-bottom: 0; }
  .case-grid, .quote-grid, .person { grid-template-columns: 1fr; }
  .quote-grid { gap: 36px; }
  .paper-card { grid-template-columns: 1fr; }
  .brief-row { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .cred-row { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .navlinks a:not(.btn) { display: none; }
  .doc-strip .tag:last-child { display: none; }
  .section { padding: 56px 0; }
  .ledger-row { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .ledger-row .no { font-size: 13px; }
  .cta-row .btn { flex: 1 1 auto; }
  .resource { grid-template-columns: 1fr; gap: 6px; }
  .resource .go { justify-self: start; }
}
@media (max-width: 460px) {
  .brand span { font-size: 15.5px; }
  .hero h1 { font-size: clamp(36px, 11vw, 44px); }
  .btn { width: 100%; }
  .navlinks .btn { width: auto; }
}
