/* CEASE — round 4: measured transplant of the Thinking Machines system.
   White page, quiet grey wordmark, 660px serif reading column, small sans
   headings, hairline separators. Values from the reference harvest
   (TOKENS.md, 2026-08-25), fonts substituted per license notes:
   GT America → Libre Franklin, Iowan Old Style → Source Serif 4,
   Chakra Petch → Chakra Petch (already OFL). */

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("fonts/libre-franklin-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("fonts/libre-franklin-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("fonts/ChakraPetch-Regular.ttf");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("fonts/ChakraPetch-Medium.ttf");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #282828;
  --ink-soft: #3c3836;
  --grey: #676767;
  --hover: #504945;
  --underline: rgba(103, 103, 103, 0.30);
  --underline-hover: rgba(80, 73, 69, 0.30);
  --nav-underline: rgba(40, 40, 40, 0.20);
  --divider: rgba(103, 103, 103, 0.10);
  --pill-bg: rgba(0, 0, 0, 0.04);
  --panel: #f9f9f9;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Libre Franklin", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Chakra Petch", sans-serif;
  --col: 660px;
}

* { box-sizing: border-box; }

::selection { background: rgba(0, 0, 0, 0.12); }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

/* draft marker, quiet pill bottom-right */
.draft {
  position: fixed;
  right: 14px;
  bottom: 14px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  background: var(--pill-bg);
  border-radius: 999px;
  padding: 5px 11px;
  z-index: 5;
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: var(--bg);
  z-index: 4;
}
.site-header-inner {
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--grey);
}
.brand::before {
  content: "";
  width: 22px;
  height: 22px;
  background: url("cease-mark.png") center / contain no-repeat;
  opacity: 0.85;
}
.brand-word {
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  line-height: 25px;
  letter-spacing: 0.1em;
}
.brand-full { display: none; }

/* nav lives in the fixed bar, right side */
.site-nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 54px;
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 24px;
  letter-spacing: -0.01em;
  z-index: 5;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--nav-underline);
  text-underline-offset: 4px;
}
.site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- page shell ---------- */

/* auto margins center the content block when it fits the viewport
   and collapse to zero when it doesn't (long pages scroll normally) */
.site-layout {
  padding-top: 54px;
  padding-bottom: 64px;
  margin-bottom: auto;
}
body.page-primary:not(:has(#top)) .site-layout,
body.page-legal .site-layout {
  margin-top: auto;
}
.content-frame {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 16px;
}
.section-inner { display: contents; }

/* ---------- homepage: the letter ---------- */

/* the header brand becomes the large centered wordmark */
body:has(#top) .site-header {
  position: static;
  height: auto;
  background: none;
  margin-top: auto; /* pairs with .site-layout's margin-bottom to center the whole ensemble */
}
body:has(#top) .site-header-inner {
  padding: 48px 16px 0;
  justify-content: center;
}
body:has(#top) .brand {
  flex-direction: column;
  gap: 26px;
  color: inherit;
}
body:has(#top) .brand::before {
  width: 46px;
  height: 46px;
  opacity: 1;
}
body:has(#top) .brand-word {
  font-family: var(--display);
  font-weight: 400;
  font-size: 57.8px;
  line-height: 1;
  letter-spacing: 0.28em;
  margin-right: -0.28em;
  text-transform: uppercase;
  background: linear-gradient(160deg, #565151, #a39b9b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body:has(#top) .brand-full {
  display: block;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 24px;
  color: var(--grey);
  text-align: center;
}
body:has(#top) .site-layout { padding-top: 44px; }
body:has(#top) .eyebrow { display: none; } /* duplicated by the wordmark subtitle */

/* hero option A: one centered axis */
body:has(#top) h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 42px;
  text-wrap: balance;
  text-align: center;
  max-width: 640px;
  margin: 0 auto 32px;
}
body:has(#top) .hero-copy .prose p {
  text-align: center;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
body:has(#top) .actions { justify-content: center; }

.hero-mark, .hero-foot { display: none; }

.actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 36px;
  font-family: var(--sans);
  font-size: 15px;
}
.action.primary {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
}
.action.primary:hover {
  color: var(--hover);
  text-decoration-color: var(--underline-hover);
}
.action.secondary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  background: linear-gradient(#f3f2f2, #e6e6e6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  color: #000;
  text-decoration: none;
}
.action.secondary:hover {
  background: linear-gradient(#eeeded, #e0e0e0);
}

/* ---------- shared text ---------- */

.eyebrow,
.section-kicker {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 24px;
  color: var(--grey);
  margin: 0 0 8px;
}
.section-kicker span:last-child { display: none; } /* legacy section numbers */

h1, h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 23.2px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin: 44.8px 0 16px;
  color: var(--ink);
}

.prose p {
  margin: 0 0 24px;
  color: var(--ink);
}
.prose a,
main a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
}
.prose a:hover,
main a:hover {
  color: var(--hover);
  text-decoration-color: var(--underline-hover);
}

/* subpages: modest air below the fixed bar (centering supplies the rest) */
body.page-primary:not(:has(#top)) .content-frame { padding-top: 24px; }

/* ---------- work & team: the index-list treatment ---------- */

.work-grid, .people {
  margin-top: 8px;
}
.work-item, .person {
  display: grid;
  grid-template-columns: 7rem 1fr;
  column-gap: 24px;
  padding: 19.2px 0;
  border-top: 1px solid var(--divider);
}
.item-number, .person-role {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 24px;
  color: var(--grey);
  margin: 0;
}
.work-item h3, .person h3 {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 24px;
  margin: 0 0 6px;
}
.work-item .prose, .person .prose {
  grid-column: 2;
  grid-row: 2;
}
.work-item .prose p, .person .prose p {
  margin: 0;
  color: var(--grey);
}

.institution-lead {
  display: block;
}
.foundation-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  margin: 24px 0 4px;
}
.foundation-copy {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 24px;
  color: var(--grey);
  margin: 0 0 24px;
}

/* ---------- support ---------- */

.support-status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
  background: var(--pill-bg);
  border-radius: 999px;
  padding: 8px 18px;
  margin-top: 8px;
}

/* ---------- contact form ---------- */

.contact-form {
  margin-top: 32px;
  max-width: 560px;
}
.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--underline);
  border-radius: 8px;
  padding: 10px 12px;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--hover);
  box-shadow: 0 0 0 3px rgba(80, 73, 69, 0.12);
}
.form-field textarea { min-height: 160px; resize: vertical; }
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form button {
  display: flex;
  align-items: center;
  margin-left: auto;
  min-height: 40px;
  padding: 0 18px;
  font-family: var(--sans);
  font-size: 15px;
  color: #000;
  background: linear-gradient(#f3f2f2, #e6e6e6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  cursor: pointer;
}
.contact-form button:hover { background: linear-gradient(#eeeded, #e0e0e0); }
.form-note {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
  background: var(--pill-bg);
  border-radius: 999px;
  padding: 8px 18px;
  margin-top: 16px;
}

/* ---------- privacy / legal ---------- */

body.page-legal .content-frame {
  padding-top: 72px;
  padding-bottom: 40px;
}
body.page-legal h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 42px;
  margin: 24px 0 40px;
}
body.page-legal .eyebrow { margin-bottom: 0; }
body.page-legal h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23.2px;
  line-height: 32.5px;
  letter-spacing: normal;
  margin: 44.8px 0 16px;
}
body.page-legal p { margin: 0 0 23.2px; }
.controller-card {
  background: var(--panel);
  border-radius: 8px;
  padding: 18px 20px;
  font-size: 15.3px;
  line-height: 1.55;
  margin: 0 0 24px;
}
body.page-legal blockquote {
  margin: 0 0 24px;
  padding-left: 18px;
  border-left: 2px solid #e5e5e5;
  font-style: italic;
  color: var(--grey);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--divider);
}
.site-footer-inner {
  max-width: 952px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 24px;
}
.footer-identity { margin: 0; color: var(--ink-soft); }
.footer-links { display: flex; gap: 28px; }
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
  text-decoration-color: var(--nav-underline);
  text-underline-offset: 4px;
}
.contact-pending { color: var(--grey); }

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .site-header { height: 50px; }
  .site-nav {
    height: 50px;
    gap: 18px;
    font-size: 14px;
    left: auto;
    right: 16px;
    transform: none;
  }
  .brand-word { font-size: 15px; }
  .site-layout { padding-top: 50px; }
  .content-frame { padding-left: 21px; padding-right: 21px; }
  body:has(#top) .site-header-inner { padding-top: 32px; }
  body:has(#top) .brand-word {
    font-size: 51px;
    letter-spacing: 0.22em;
    margin-right: -0.22em;
  }
  body:has(#top) h1 { font-size: 26px; line-height: 36px; }
  .work-item, .person {
    grid-template-columns: 1fr;
    row-gap: 2px;
  }
  .item-number, .person-role { grid-row: 1; }
  .work-item h3, .person h3 { grid-row: 2; }
  .work-item .prose, .person .prose { grid-column: 1; grid-row: 3; }
  .site-layout { padding-bottom: 48px; }
  .site-footer-inner { flex-direction: column; gap: 10px; }
}

/* mark below wordmark+byline (Marcin-approved, 2026-08-26) */
body:has(#top) .brand::before { order: 3; margin-top: 6px; }
