:root {
  --bg: #0a0a0a;
  --bg-raised: #121212;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --faint: #555;
  --line: #222;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 20px var(--gutter);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand img { height: 26px; width: auto; }

.nav { display: flex; gap: 28px; }

.nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.nav a:hover { color: var(--text); }

/* Sections share the same width */

main > section,
.site-footer {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Hero */

.hero {
  position: relative;
  min-height: min(78vh, 760px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 64px;
  padding-bottom: 96px;
  overflow: hidden;
}

.hero-mark {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  height: min(80%, 560px);
  width: auto;
  transform: translateY(-50%);
  opacity: 0.06;
  pointer-events: none;
}

.hero h1 {
  position: relative;
  max-width: 14ch;
  margin: 0 0 32px;
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.lede {
  position: relative;
  max-width: 52ch;
  margin: 0;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted);
}

/* Facts row */

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.fact {
  padding: 28px 24px 40px 0;
}

.fact + .fact {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.fact p:last-child {
  margin: 12px 0 0;
  font-size: 17px;
}

/* Portfolio */

.portfolio { padding-top: 120px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 20px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.portfolio-grid li {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.company {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 2;
  padding: 28px;
  text-decoration: none;
  transition: background 0.25s;
}

a.company:hover { background: var(--bg-raised); }

/* Logos arrive in different colors, so render them all white for a uniform grid */
.company img {
  max-width: 62%;
  max-height: 44%;
  width: auto;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: opacity 0.25s;
}

a.company:hover img { opacity: 1; }

.company .wordmark {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--muted);
  transition: color 0.25s;
}

a.company:hover .wordmark { color: var(--text); }

.company .name {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.25s;
}

.company .arrow {
  position: absolute;
  right: 16px;
  top: 12px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.25s;
}

a.company:hover .name { color: var(--muted); }
a.company:hover .arrow { opacity: 1; }

/* Contact */

.contact {
  padding-top: 120px;
  padding-bottom: 120px;
}

.email {
  display: inline-block;
  margin-top: 16px;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 300;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  transition: border-color 0.2s;
}

.email:hover { border-color: var(--text); }

.contact-note {
  margin: 24px 0 0;
  color: var(--muted);
}

/* Footer */

.site-footer {
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-row p { margin: 0; }

.footer-mark { height: 18px; width: auto; opacity: 0.5; }

.disclaimer {
  max-width: 80ch;
  margin: 20px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

/* Tablet */

@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Phone */

@media (max-width: 640px) {
  .brand img { height: 20px; }
  .nav { gap: 18px; }
  .hero { min-height: min(70vh, 620px); }
  .hero-mark { height: 55%; right: -10%; }
  .facts { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding: 20px 0; border-left: 0; }
  .fact + .fact { border-top: 1px solid var(--line); }
  .portfolio { padding-top: 80px; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .company { padding: 20px; }
  .company .name { left: 12px; bottom: 10px; font-size: 10px; }
  .contact { padding-top: 100px; padding-bottom: 100px; }
}
