/* Causality Labs — causalitylabs.xyz */

@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/archivo-black.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/archivo-var.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
}

:root {
  --bg: #0e0e0e;
  --fg: #f2f2ef;
  --mute: #8c8c88;
  --line: #2a2a28;
  --display: "Archivo Black", Impact, "Arial Black", sans-serif;
  --sans: "Archivo", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; }
html, body { background: var(--bg); color: var(--fg); }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
::selection { background: var(--fg); color: var(--bg); }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px; }

/* ---------- hero / wordmark ---------- */

.hero { padding: 10vh 0 5vh; }

.wordmark {
  font-family: var(--display);
  font-size: clamp(56px, 13.2vw, 200px);
  font-weight: 400;
  line-height: .84;
  letter-spacing: -.045em;
  text-transform: uppercase;
  user-select: none;
}
.wordmark > span { display: block; }
.wordmark .labs { color: transparent; -webkit-text-stroke: 2px var(--fg); }

.wordmark > .labs-line { display: flex; align-items: center; gap: .14em; flex-wrap: wrap; }
.labs-line .labs { display: inline; }

.eclipse { width: .78em; height: .78em; flex: none; color: var(--fg); }

.tag {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  margin-left: .12em;
  align-self: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: .36em;
  font-weight: 400;
  letter-spacing: -.005em;
  text-transform: none;
  line-height: 1.05;
  color: var(--mute);
  text-wrap: balance;
}
.tag .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(.3em);
  animation: word-in .6s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(.35s + var(--i) * .45s);
}
@keyframes word-in { to { opacity: 1; transform: none; } }

/* ---------- projects ---------- */

.projects { padding: 36px 0 10px; margin-top: 6vh; }

.label {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 18px;
}

.row {
  display: grid;
  grid-template-columns: 64px 1fr 1.4fr 32px;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  transition: padding-left .22s cubic-bezier(.2, .7, .2, 1);
}
.row:last-child { border-bottom: 1px solid var(--line); }
a.row:hover, a.row:focus-visible { padding-left: 20px; }
a.row:focus-visible { outline: none; }
a.row:focus-visible .name { text-decoration: underline; text-underline-offset: .12em; }

.num { font-size: 12px; color: var(--mute); letter-spacing: .1em; }

.name {
  display: inline-flex;
  align-items: center;
  gap: .28em;
  font-family: var(--display);
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1;
  text-transform: uppercase;
}
.mark { width: .95em; height: .95em; flex: none; }

.desc {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.35;
  color: var(--mute);
  max-width: 44ch;
}

.arrow { font-size: 22px; justify-self: end; }

.row.soon { color: var(--mute); }
.row.soon .name { color: transparent; -webkit-text-stroke: 1px var(--line); }

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

footer.wrap {
  margin-top: auto;
  padding: 40px 28px 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--mute);
}
footer a:hover { color: var(--fg); }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .tag { flex: 0 0 100%; margin-left: 0; margin-top: 22px; font-size: 24px; }
  .row { grid-template-columns: 40px 1fr 32px; }
  .desc { grid-column: 2 / 3; }
}
@media (max-width: 640px) {
  .wordmark .labs { -webkit-text-stroke: 1.2px var(--fg); }
}

@media (prefers-reduced-motion: reduce) {
  .tag .w { animation: none; opacity: 1; transform: none; }
  .row { transition: none; }
}
