/* gridvise.uk — a nameplate on a closed door. Steel, graphite, a grid. */

:root {
  --ground: #e9ecef;
  --grid: #d3d8dd;
  --ink: #171c21;
  --mute: #646d76;
  --rule: #b9c0c7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f1316;
    --grid: #1c2227;
    --ink: #e4e8eb;
    --mute: #8a939b;
    --rule: #2b333a;
  }
}

@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--ground);
  background-image: radial-gradient(var(--grid) 1px, transparent 1.5px);
  background-size: 28px 28px;
  color: var(--ink);
  font-family:
    'Manrope',
    system-ui,
    -apple-system,
    'Segoe UI',
    Helvetica,
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
}

.plate {
  display: grid;
  place-content: center;
  justify-items: center;
  padding: clamp(2rem, 8vw, 6rem) clamp(1.25rem, 6vw, 4rem);
  text-align: center;
}

.mark {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  font-size: clamp(2.75rem, 9vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.mark-cell {
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  border: 0.09em solid currentColor;
  border-radius: 0.06em;
  margin-top: 0.06em;
}

.reach {
  margin: 1.75rem 0 0;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.reach-button {
  appearance: none;
  cursor: pointer;
  margin: 0;
  padding: 0.7em 1.15em;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    opacity 150ms ease;
}

.reach-button:hover,
.reach-button:focus-visible {
  background: var(--ink);
  color: var(--ground);
}

.reach-button[aria-busy='true'] {
  cursor: progress;
  opacity: 0.6;
}

.reach-status {
  margin: 0.75rem 0 0;
  min-height: 1.4em;
  color: var(--mute);
  font-size: 0.9375rem;
  font-weight: 500;
}

.challenge {
  margin-top: 0.75rem;
}

.challenge:empty {
  display: none;
}

.reach-result[hidden] {
  display: none;
}

.reach-result {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
}

.address {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 0.15em;
}

.copy {
  appearance: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--mute);
  font: inherit;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.copy:hover,
.copy:focus-visible {
  color: var(--ink);
}

.legal {
  padding: 1.5rem clamp(1.25rem, 6vw, 4rem) 2rem;
  border-top: 1px solid var(--rule);
  background: var(--ground);
  color: var(--mute);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: center;
}

.legal p {
  margin: 0 auto;
  max-width: 44rem;
}

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

@media (prefers-reduced-motion: reduce) {
  .reach-button {
    transition: none;
  }
}
