/* s9m Labs. Black by default; light on request. */

:root {
  --paper: #000;
  --ink: #e9e7e2;
  --soft: #85827b;
  --line: #1e1e1d;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Mona Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mark: "Michroma", "Helvetica Neue", Arial, sans-serif;
  --wide: 76rem;
  --text: 40rem;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --paper: #ece8df;
  --ink: #1b1a17;
  --soft: #8a877e;
  --line: #d6d1c6;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; }

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 2rem;
}

a { color: inherit; text-decoration: none; }

/* Header */

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 0;
}

/* Logo lockup: the mark, then the name in the logo's typeface (Michroma) */
.lockup {
  --f: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--f) * 1.12);
  font-size: var(--f);
}

.lockup .mark {
  width: calc(var(--f) * 1.41);
  height: calc(var(--f) * 1.7);
  background: var(--ink);
  -webkit-mask: url(logo.png) center / contain no-repeat;
  mask: url(logo.png) center / contain no-repeat;
}

.wordmark {
  font-family: var(--mark);
  font-weight: 400;
  letter-spacing: 0.06em;
  white-space: nowrap;
  line-height: 1;
}

.site-head nav { display: flex; align-items: center; gap: 2rem; font-size: 0.95rem; }

.theme {
  font: inherit;
  font-size: 0.85rem;
  color: var(--soft);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  cursor: pointer;
}
.theme:hover { color: var(--ink); border-color: var(--soft); }
.site-head nav a { color: var(--soft); transition: color 0.15s; }
.site-head nav a:hover,
.site-head nav a[aria-current="page"] { color: var(--ink); }

/* Hero: large serif title, muted second line */

.hero { padding: 9rem 0 5rem; text-align: center; }

.hero h1 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(2.6rem, 6.2vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0;
}

.hero h1 span { display: block; color: var(--soft); }

.hero h1 .tag {
  font-family: var(--mark);
  font-size: 0.42em;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.hero h1 .name {
  font-family: var(--mark);
  font-size: 0.72em;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 0.4em;
}


/* Prose (manifesto) */

.prose {
  max-width: var(--text);
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.6;
}

.prose p { margin: 0 0 1.4rem; }

.prose .sig {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--soft);
  margin-top: 2.5rem;
}

.more {
  display: flex;
  gap: 2rem;
  margin-top: 4rem;
  font-size: 0.95rem;
}

.more a { border-bottom: 1px solid var(--line); padding-bottom: 0.15rem; }
.more a:hover { border-color: var(--ink); }

/* Sections: label on the left, content on the right */

.section {
  border-top: 1px solid var(--line);
  padding: 3rem 0 1rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.section > h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--soft);
  margin: 0.35rem 0 0;
}

.rows { margin: 0; padding: 0; list-style: none; }

.rows > li {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 2rem;
  padding: 0 0 2.5rem;
}

.rows h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}

.rows p { margin: 0 0 0.8rem; color: var(--ink); }
.rows .meta { color: var(--soft); font-size: 0.9rem; }

.rows a.link { border-bottom: 1px solid var(--line); }
.rows a.link:hover { border-color: var(--ink); }
.rows .links a + a { margin-left: 1.25rem; }

/* Team */

.person {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.5rem;
  padding: 0 0 2.75rem;
}

.person img {
  width: 7rem;
  height: 7rem;
  object-fit: cover;
  border-radius: 2px;
  filter: grayscale(1);
}

.person h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0;
}

.person .role { color: var(--soft); font-size: 0.9rem; margin: 0.2rem 0 0.75rem; }
.person p { margin: 0 0 0.75rem; }
.person .links { font-size: 0.9rem; }
.person .links a { border-bottom: 1px solid var(--line); }
.person .links a + a { margin-left: 1.25rem; }

/* Footer with the logo at the end of the page */

.site-foot {
  margin-top: 8rem;
  padding: 0 0 2.5rem;
}

.site-foot .lockup { --f: 1.5rem; margin-bottom: 1rem; }

.tagline { color: var(--soft); font-size: 0.95rem; margin: 0 0 3rem; }

.foot-line {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  font-size: 0.85rem;
  color: var(--soft);
}

.foot-line a:hover { color: var(--ink); }
.foot-links { display: flex; gap: 1.5rem; }

@media (max-width: 52rem) {
  .wrap { padding: 0 1.25rem; }
  .hero { padding: 5rem 0 3rem; }
  .prose { font-size: 1.15rem; }
  .section { grid-template-columns: 1fr; gap: 1.25rem; padding-top: 2rem; }
  .rows > li { grid-template-columns: 1fr; gap: 0.6rem; }
  .person { grid-template-columns: 4.5rem 1fr; gap: 1rem; }
  .person img { width: 4.5rem; height: 4.5rem; }
  .site-head nav { gap: 1.25rem; }
  .site-foot { margin-top: 5rem; }
}

.rows > li.paper { grid-template-columns: 1fr; gap: 1rem; }
.rows > li.paper h3 { font-size: 1.8rem; max-width: 34rem; }
.rows > li.paper > div { max-width: 34rem; }


.prose a.cta { border-bottom: 1px solid var(--soft); }
.prose a.cta:hover { border-color: var(--ink); }

/* Home: the manifesto sits in a centered column */
.home .prose { margin: 0 auto; }
.home .more { justify-content: center; }

/* First-visit opening (intro.js) */
html.intro-on body { overflow: hidden; }
html.intro-on .wrap { opacity: 0; animation: intro-safety 0s linear 7s forwards; }
html.intro-on .site-head .lockup { visibility: hidden; }
html.intro-on.intro-reveal .wrap { opacity: 1; transition: opacity 0.7s ease 0.2s; }
@keyframes intro-safety { to { opacity: 1; } }

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
}

.intro-lockup { --f: clamp(1.9rem, 5.6vw, 4.2rem); transform-origin: 0 0; }

.intro-mark {
  display: block;
  width: calc(var(--f) * 1.41);
  height: calc(var(--f) * 1.7);
  overflow: visible;
}

.intro-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro-mark circle { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.intro-mark .signals circle {
  transform: none;
  opacity: 0;
  fill: #9fe4ff;
  filter: drop-shadow(0 0 6px rgba(159, 228, 255, 0.9));
}

.intro-word .ch { display: inline-block; opacity: 0; }

.intro-skip {
  position: absolute;
  right: 2rem;
  bottom: 1.5rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--soft);
  background: none;
  border: 0;
  cursor: pointer;
}
.intro-skip:hover { color: var(--ink); }
