:root {
  font-family: "DM Sans", Arial, sans-serif;
  color: #11100f;
  --canvas-background: #ff5a36;
  background: var(--canvas-background);
  font-synthesis: none;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background-color: var(--canvas-background);
  transition: background-color 560ms var(--ease);
}

body {
  overflow-x: hidden;
}

button,
a {
  color: inherit;
}

.page {
  --background: #ff5a36;
  --foreground: #11100f;
  --accent: #f4e9d7;
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(1rem, 2vw, 2rem);
  color: var(--foreground);
  background: var(--background);
  cursor: pointer;
  transition:
    background-color 560ms var(--ease),
    color 560ms var(--ease);
}

.page[data-colour="blue"] {
  --background: #1457ff;
  --foreground: #f6f0e5;
  --accent: #ffd628;
}

.page[data-colour="yellow"] {
  --background: #ffd628;
  --foreground: #171512;
  --accent: #1457ff;
}

/* The first grid row is the box the lettering must completely fill. */
.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(12rem, 1fr) auto;
  gap: clamp(1.5rem, 3vw, 3rem);
  min-height: 100svh;
}
.wordmark {
  grid-column: 1 / -1;
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wordmark .letter {
  position: absolute;
  display: block;
  overflow: visible;
  fill: currentColor;
  transition: left 420ms var(--ease), top 420ms var(--ease),
    width 420ms var(--ease), height 420ms var(--ease);
}
.wordmark:not([data-ready]) .letter { visibility: hidden; }

.wordmark:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 0.5rem;
}

/* Descriptive phrases flow together like a small typographic word search. */
.links {
  grid-column: 1 / -1;
  align-self: end;
  width: 100%;
  padding: .15em 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(.95rem, 1.65vw, 1.65rem);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: .075em;
  text-transform: uppercase;
  text-wrap: pretty;
  cursor: default;
}
.links a {
  padding: .12em .28em;
  border-radius: 4px;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: .25em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-color 160ms, color 160ms, text-decoration-color 160ms;
}
.separator {
  padding: 0 .22em;
  opacity: .5;
}
.links a:focus-visible {
  background: var(--foreground);
  color: var(--background);
  text-decoration-color: transparent;
  outline: 2px solid var(--foreground);
  outline-offset: 3px;
}
.links a:active {
  background: var(--foreground);
  color: var(--background);
}
@media (hover: hover) and (pointer: fine) {
  .links a:hover {
    background: var(--foreground);
    color: var(--background);
    text-decoration-color: transparent;
  }
}
@media (min-width: 1600px) {
  .links { font-size: clamp(1.65rem, 1.5vw, 2.25rem); }
}
@media (max-width: 720px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(15rem, 1fr) auto;
    gap: 1.5rem;
  }
  .links { font-size: clamp(.875rem, 2.6vw, 1.1rem); line-height: 2; letter-spacing: .055em; }
  .separator { padding: 0 .08em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
.wordmark { touch-action: none; }
