/* weblerai.com – the hub.
 *
 * A directory board: one loud field of colour, one typeface, and the apps'
 * own addresses as the headings. Each app brings its colour as a small marker.
 */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
}

:root {
  --field: #f6d743;
  --field-lift: #fbe88a;
  --ink: #15183f;
  --ink-soft: #3b3d5c;
  --on-ink: #f6d743;
  --rule: 3px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --field: #15183f;
    --field-lift: #1f2358;
    --ink: #f6d743;
    --ink-soft: #d9d3a6;
    --on-ink: #15183f;
  }
}

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

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

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
}

.page {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 68rem;
  flex-direction: column;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.top {
  padding: 1.5rem 0;
}

.mark {
  color: inherit;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

main {
  flex: 1;
  padding: clamp(1.5rem, 6vw, 5rem) 0 4rem;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  line-height: 1.45;
}

.lede a {
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.none {
  margin: clamp(3rem, 8vw, 6rem) 0 0;
  padding-top: 1.5rem;
  border-top: var(--rule) solid var(--ink);
  color: var(--ink-soft);
}

/* The list of apps: thick rules, one row per app, the whole row a link. */

.apps {
  /* Rules and rows run a little past the text, into the page margin. */
  margin: clamp(3rem, 8vw, 6rem) -1.25rem 0;
  padding: 0;
  border-bottom: var(--rule) solid var(--ink);
  list-style: none;
}

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1.75rem 1.25rem 2rem;
  border-top: var(--rule) solid var(--ink);
  color: inherit;
  text-decoration: none;
  transition: background-color 120ms ease-out;
}

.address {
  margin: 0;
  font-size: clamp(1.75rem, 7.6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.address .name {
  font-weight: 800;
}

.address .rest {
  font-weight: 300;
}

.what {
  max-width: 36rem;
  margin: 0;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  line-height: 1.45;
}

.kind {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 600;
}

.swatch {
  width: 0.875rem;
  height: 0.875rem;
  flex: none;
  border-radius: 3px;
  background: var(--app, var(--ink));
}

/* A dark app colour would vanish on the dark field: give it a frame. */
@media (prefers-color-scheme: dark) {
  .swatch {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
  }
}

.beta {
  padding: 0 0.5rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 0.875rem;
}

.open {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-self: start;
  margin-top: 0.5rem;
  padding: 0 1.25rem;
  border: var(--rule) solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 1.0625rem;
  font-weight: 700;
  transition:
    background-color 120ms ease-out,
    color 120ms ease-out;
}

.app:hover {
  background: var(--field-lift);
}

.app:hover .open {
  background: transparent;
  color: var(--ink);
}

.app:focus-visible,
.mark:focus-visible,
.lede a:focus-visible {
  outline: var(--rule) solid var(--ink);
  outline-offset: 4px;
}

.app:focus-visible {
  outline-offset: -6px;
}

/* With room, the description and the button sit beside the address's baseline. */

@media (min-width: 48rem) {
  .page {
    padding: 0 2.5rem;
  }

  .app {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 2rem;
    padding: 2.5rem 2.5rem 2.75rem;
  }

  .apps {
    margin-right: -2.5rem;
    margin-left: -2.5rem;
  }

  .address {
    grid-column: 1 / -1;
  }

  .what {
    grid-column: 1;
  }

  .kind {
    grid-column: 1;
  }

  .open {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: end;
    justify-self: end;
    margin-top: 0;
  }
}

.foot {
  padding: 1.5rem 0 2rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.foot p {
  margin: 0;
}

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