/* hexive — one screen, white on black */

:root {
  --bg: #0b0b0b;
  --ink: #ecebe8;
  --muted: #8d8a85;
  --rule: #262523;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(40px, 8vh, 96px) clamp(20px, 6vw, 48px);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  background: var(--bg);
}

main {
  width: min(100%, 34rem);
}

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

a {
  color: var(--ink);
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.2s;
}

a:hover {
  text-decoration-color: var(--ink);
}

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

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

/* Logo and introduction
   ------------------------------------------------ */
h1 {
  margin: 0;
}

.logo {
  width: clamp(150px, 38vw, 230px);
  margin-bottom: clamp(32px, 6vh, 56px);
}

.lede {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
}

.lede + p {
  text-wrap: balance;
}

/* Clients: one quiet row of logos, white on black
   ------------------------------------------------ */
.clients {
  margin: clamp(40px, 7vh, 56px) 0;
}

/* Columns in proportion to each logo's width, so all four share one height and one line. */
.clients ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 223fr 201fr 157fr 160fr;
  column-gap: 36px;
  align-items: center;
}

.clients img {
  width: 100%;
  filter: grayscale(1) invert(1);
  opacity: 0.6;
}

/* Phones: two by two, so they stay big enough to recognize. */
@media (max-width: 520px) {
  .clients ul {
    grid-template-columns: 1fr 1fr;
    gap: 24px 20px;
  }

  .clients img {
    width: auto;
    max-height: 26px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Footer
   ------------------------------------------------ */
footer {
  margin-top: clamp(32px, 6vh, 48px);
  font-size: 0.8125rem;
}

/* 404
   ------------------------------------------------ */
.notfound main {
  text-align: center;
}

.notfound .logo {
  margin-inline: auto;
}

/* A quiet arrival
   ------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  main > * {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  main > :nth-child(2) { animation-delay: 0.08s; }
  main > :nth-child(3) { animation-delay: 0.16s; }
  main > :nth-child(n + 4) { animation-delay: 0.24s; }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}

/* The sign-off: the email sits back in gray until hovered */
.hello a {
  color: var(--muted);
  text-decoration-color: var(--rule);
}

.hello a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}
