/* Venn — Soft Singularity
   One object, then words. Warm paper, one grotesk, one mono. */

:root {
  --paper: #ece8df;
  --ink: #1b1a17;
  --ink-2: #4a4740;
  --ink-3: #67635b;
  --signal: #c0502f;
  --line: rgb(27 26 23 / 0.14);

  --sans: "Host Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 2vw, 28px);
  --measure: 40rem;
  --header-h: 60px;

  --t-meta: 0.8125rem;
  --t-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --t-large: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem);
  --t-title: clamp(2rem, 1.3rem + 2.6vw, 3.4rem);
  --t-display: clamp(3rem, 1.4rem + 6vw, 7rem);

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p, ol, ul, figure {
  margin: 0;
}

h1, h2, h3 {
  font-weight: 400;
}

ol, ul {
  padding: 0;
  list-style: none;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 1.5px solid currentColor;
  outline-offset: 4px;
}

.skip {
  position: fixed;
  top: 12px;
  left: var(--gutter);
  z-index: 200;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-200%);
  transition: transform 0.2s;
}

.skip:focus {
  transform: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Shared ---------------------------------------------------------------- */

.eyebrow,
.status,
.specs span,
.field label,
.form-status,
.fine {
  font-family: var(--mono);
  font-size: var(--t-meta);
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.eyebrow,
.specs span,
.field label,
.fine {
  color: var(--ink-3);
}

.link {
  display: inline-flex;
  gap: 0.4em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.3s;
}

.link:hover {
  opacity: 0.6;
}

.btn {
  appearance: none;
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  padding: 0.7rem 1.3rem;
  font-size: 0.9375rem;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 0.3s;
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
}

.btn:hover {
  opacity: 0.8;
}

.btn:disabled {
  opacity: 0.5;
  cursor: progress;
}

.btn--large {
  padding: 0.95rem 1.6rem;
  font-size: 1rem;
}

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: rgb(236 232 223 / 0.82);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid transparent;
}

.wordmark {
  font-size: 1.3125rem;
  letter-spacing: -0.025em;
}

/* The trademark sits small and high, like a footnote to the name. */
.tm {
  margin-left: 0.06em;
  font-size: 0.42em;
  letter-spacing: 0;
  vertical-align: 0.95em;
  line-height: 0;
}

.site-nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 32px);
  margin-left: auto;
  font-size: 0.9375rem;
}

.site-nav a:hover {
  opacity: 0.6;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}

.status__dot {
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

/* Hero ------------------------------------------------------------------ */

.hero {
  padding: clamp(40px, 5.5vw, 76px) var(--gutter) 0;
  text-align: center;
  overflow-x: clip;
}

.hero__name {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  letter-spacing: -0.02em;
}

.hero__title {
  max-width: 12ch;
  margin: 0.5rem auto 0;
  font-size: clamp(3rem, 1.4rem + 5vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero__lede {
  max-width: 30rem;
  margin: 1.4rem auto 0;
  font-size: var(--t-large);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  text-wrap: balance;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem 1.8rem;
  margin-top: 1.8rem;
  font-size: 0.9375rem;
}

.hero__pebble {
  width: min(100% + 2 * var(--gutter), 1400px);
  margin: clamp(8px, 1.5vw, 24px) auto 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.hero__pebble img {
  width: 100%;
}

.specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
  max-width: 64rem;
  margin: clamp(8px, 2vw, 24px) auto 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.specs span {
  display: block;
  margin-bottom: 0.35rem;
}

/* Manifesto ------------------------------------------------------------- */

.manifesto {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(120px, 16vw, 220px) var(--gutter) 0;
}

.chapter + .chapter {
  margin-top: clamp(96px, 12vw, 168px);
}

.chapter--opening {
  margin-bottom: clamp(96px, 12vw, 168px);
}

.manifesto__title {
  margin-top: 1rem;
  font-size: var(--t-title);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.chapter h2 {
  font-size: var(--t-title);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.chapter .eyebrow + h2 {
  margin-top: 0.9rem;
}

.chapter > p {
  margin-top: 1.1em;
  color: var(--ink-2);
  text-wrap: pretty;
}

.chapter > h2 + p {
  margin-top: 1.6rem;
}

.chapter > .large {
  font-size: var(--t-large);
  line-height: 1.32;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.chapter > .statement {
  margin-top: 2.6rem;
  font-size: var(--t-large);
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.beliefs {
  margin-top: 2.2rem;
  counter-reset: belief;
}

.beliefs li {
  padding: 1.4rem 0 1.6rem;
  border-top: 1px solid var(--line);
  counter-increment: belief;
}

.beliefs h3 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.beliefs h3::before {
  content: counter(belief, decimal-leading-zero);
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--mono);
  font-size: var(--t-meta);
  letter-spacing: 0.01em;
  color: var(--ink-3);
}

.beliefs p {
  margin-top: 0.6rem;
  color: var(--ink-2);
}

.so {
  margin-top: 2rem;
}

.so li {
  padding: 0.55em 0 0.6em;
  border-top: 1px solid var(--line);
  font-size: var(--t-large);
  line-height: 1.25;
  letter-spacing: -0.012em;
}

.so li:last-child {
  color: var(--ink-3);
}

.thesis-block {
  margin: clamp(140px, 18vw, 240px) auto 0;
  text-align: center;
}

.thesis {
  max-width: 17ch;
  margin: 0 auto 1.6rem;
  font-size: var(--t-display);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

/* Breaks the column so the thesis can run wide. */
.manifesto .thesis-block {
  width: min(100vw - 2 * var(--gutter), 80rem);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* Invitation ------------------------------------------------------------ */

.invitation {
  max-width: calc(34rem + 2 * var(--gutter));
  margin: clamp(140px, 18vw, 240px) auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}

.invitation h2 {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.invitation > p:not(.eyebrow):not(.fine) {
  margin-top: 1.2rem;
  color: var(--ink-2);
}

.invite-form {
  display: grid;
  gap: 1.3rem;
  margin-top: 2.6rem;
  text-align: left;
}

.invite-form .btn {
  justify-self: center;
  margin-top: 0.8rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.55rem 0 0.6rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-size: var(--t-large);
  outline: none;
}

.field input::placeholder {
  color: var(--ink-3);
  opacity: 0.7;
}

.field input:focus-visible {
  box-shadow: 0 1px 0 0 var(--ink);
}

.field input[aria-invalid="true"] {
  border-bottom-color: var(--signal);
  box-shadow: 0 1px 0 0 var(--signal);
}

.optional {
  opacity: 0.7;
}

.form-status {
  min-height: 1.45em;
  text-align: center;
  color: var(--ink-2);
}

.form-status.is-error {
  color: var(--signal);
}

.invite-form.is-sent .field,
.invite-form.is-sent .btn {
  display: none;
}

.invite-form.is-sent .form-status {
  font-family: var(--sans);
  font-size: var(--t-large);
  line-height: 1.35;
  color: var(--ink);
}

.fine {
  margin-top: 2.4rem;
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(120px, 14vw, 200px);
  padding: 2rem var(--gutter) 2.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-3);
}

.footer__mark {
  font-size: 1.3125rem;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.site-footer a:hover {
  opacity: 0.6;
}

.progress {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  height: 2px;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--ink);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

/* Motion ---------------------------------------------------------------- */

/* Words under a bar until they scroll into view. */
.redact {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 100% 66%;
  background-size: 100% 1em;
  transition: background-size 1.1s var(--ease);
}

.redact.is-revealed {
  background-size: 0% 1em;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* The pebble settles in: a slow rise out of soft focus. */
.js .hero__pebble img {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(28px) scale(0.98);
  transition: opacity 1.6s var(--ease) 0.3s, filter 1.8s var(--ease) 0.3s, transform 2.2s var(--ease) 0.3s;
}

.js .hero__pebble.is-in img {
  opacity: 1;
  filter: none;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .hero__pebble img {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }

  .redact {
    transition: none;
  }
}

/* Responsive ------------------------------------------------------------ */

@media (min-width: 1000px) {
  .hero__title {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.6rem;
  }
}

@media (max-width: 560px) {
  .site-nav a:first-child {
    display: none;
  }

  .status {
    display: none;
  }

  .hero__pebble {
    width: calc(100% + 2 * var(--gutter));
  }
}
