:root {
  --bg: #0a0a0b;
  /* Slightly see-through, so the background glows softly through cards. */
  --surface: rgba(20, 20, 22, 0.76);
  --surface-hover: rgba(28, 28, 32, 0.84);
  --line: #26262a;
  --line-strong: #3a3a40;
  --chip: #232327;
  --text: #f4f4f5;
  --muted: #b4b4bc;
  --faint: #8e8e97;
  --accent: #2f7bf5;
  --radius: 16px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Animated block field, drawn by background.js. Sits behind everything. */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Two columns: who we are on the left, what we make and do on the right. */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 32px 48px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* ---------- Left column ---------- */

.about {
  position: sticky;
  top: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.about .mark {
  width: 64px;
  height: 64px;
  margin-left: -7px; /* the mark has 7 units of built-in margin; line it up with the text */
}

.about h1 {
  margin: 2px 0 0;
  font: 600 26px/1.2 "Space Grotesk", Inter, system-ui, sans-serif;
  letter-spacing: 0.02em;
}

.about p {
  margin: 0;
  color: var(--muted);
}

.about strong {
  color: var(--text);
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: #ffffff;
}

.about .people-label {
  margin-top: 10px;
  font-size: 13px;
  color: var(--faint);
}

.people {
  list-style: none;
  margin: -10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.people svg {
  color: var(--faint);
}

.people a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}

.people a span {
  color: var(--faint);
}

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

/* ---------- Right column ---------- */

section + section {
  margin-top: 28px;
}

#work {
  scroll-margin-top: 32px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 2px 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.section-head span {
  font-size: 14px;
  color: var(--faint);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
}

.card:focus-visible {
  border-radius: var(--radius);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
}

/* Ekome's icon is dark ink on transparent; give it the paper colour of its own site. */
.icon-on-paper {
  padding: 3px;
  background: #faf7f2;
}

/* Gyaata's logo is a shape on transparent, so it gets no tile and no rounding. */
.icon-bare {
  border-radius: 0;
}

.card h3 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.chip {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.tagline,
.detail,
.domain {
  margin: 0;
}

.detail {
  font-size: 14px;
  color: var(--muted);
}

/* Pushed to the bottom so domains line up across a row of cards. */
.domain {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--faint);
}

.card:hover .domain {
  color: var(--text);
}

.panel {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.panel-lead,
.panel-cta {
  margin: 0;
  color: var(--muted);
}

.panel-cta a {
  color: var(--text);
  text-underline-offset: 3px;
}

.services {
  list-style: none;
  margin: 18px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}

.services h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.services p {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--muted);
}

footer {
  margin-top: 40px;
  padding: 20px 2px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--faint);
}

@media (max-width: 860px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 32px 16px 40px;
  }

  .about {
    position: static;
  }
}

@media (max-width: 560px) {
  .cards,
  .services {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .button {
    transition: none;
  }
}
