:root {
  --color-text: #000;
  --color-bg: #fff;
  --color-link-active: #e04a2f;
  --color-muted: #767676;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --letter-spacing: 0.03em;
}

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

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

body {
  background: var(--color-bg);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  letter-spacing: var(--letter-spacing);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 60em;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: 30px;
  padding-right: 30px;
}

a:link,
a:visited,
h1,
h2 {
  color: var(--color-text);
}

a:active {
  color: var(--color-link-active);
}

img {
  max-width: 100%;
}

main {
  padding-top: clamp(2.5rem, 8vw, 5rem);
}

/* Auto margin pins the footer to the bottom on short pages; the padding keeps
   it clear of the grid once the content is tall enough to push past it. */
footer {
  margin-top: auto;
  padding-bottom: 3rem;
  padding-top: 4.5rem;
}

.intro {
  margin-bottom: 2rem;
  max-width: 34em;
}

.intro p {
  margin: 0 0 1em;
}

.intro p:last-child {
  margin-bottom: 0;
}

/* A heading for structure, but sized to read as ordinary body text. */
.apps-label {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin: 0 0 1.5rem;
}

.wordmark {
  line-height: 1;
  margin: 0 0 1rem;
}

.wordmark img {
  display: block;
  height: auto;
  max-width: min(320px, 100%);
  width: auto;
}

.apps {
  display: grid;
  gap: 2rem 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.apps a {
  display: block;
  text-decoration: none;
}

.apps a:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}

/* Icons supply their own fill and corner shape, so no tile background here.
   The drop shadow traces the alpha channel, which gives near-white icons a
   visible edge on the white page without boxing off the rounded corners. */
.app-icon {
  display: block;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.25));
  height: auto;
  width: 100%;
}

.app-name {
  display: block;
  font-size: 13px;
  margin-top: 0.75em;
}

.app-tagline {
  color: var(--color-muted);
  display: block;
  font-size: 12px;
}

/* Hidden with opacity, not display, so the labels still name the link for
   screen readers and the row keeps its height on hover. */
.app-name,
.app-tagline {
  opacity: 0;
  transition: opacity 120ms ease-out;
}

/* Hover is on the <li> so unlinked apps reveal their labels too. */
.apps li:hover .app-name,
.apps li:hover .app-tagline,
.apps a:focus-visible .app-name,
.apps a:focus-visible .app-tagline {
  opacity: 1;
}

/* Touch devices never hover, so the labels stay put. */
@media (hover: none) {
  .app-name,
  .app-tagline {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-name,
  .app-tagline {
    transition: none;
  }
}

.contact {
  font-size: 13px;
  margin: 0;
}
