@font-face {
  font-family: "Monkey";
  src: url("fonts/monkey.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Mona Sans";
  src: url("fonts/github.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("fonts/opensans.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #757575;
  --faint: #b5b5b5;
  --brand: #333333;
  --hover-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  --box-h: calc(2.5rem + 2px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --text: #f2f2f2;
    --muted: #999999;
    --faint: #555555;
    --brand: #f2f2f2;
    --hover-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 14px rgba(255, 255, 255, 0.55);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Monkey", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 1rem;
  text-align: center;
}

@media (max-height: 40rem) {
  main {
    padding-bottom: 2.75rem;
  }
}

.coco {
  position: relative;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.logo {
  display: block;
  width: min(220px, 55vw);
  height: auto;
  aspect-ratio: 1;
  transition: opacity 0.6s;
}

.coco .logo {
  animation: appear 1.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.js .coco .logo {
  animation-delay: 1s;
}

.viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: grab;
  touch-action: none;
  transition: opacity 0.6s;
}

.viewer:active {
  cursor: grabbing;
}

.coco.loaded .viewer {
  opacity: 1;
}

.coco.loaded .logo {
  opacity: 0;
}

.coco.failed .logo {
  animation-delay: 0s;
}

.credit,
.build {
  position: absolute;
  bottom: 0.75rem;
  color: var(--faint);
  font-size: 0.5rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.credit {
  right: 1rem;
  left: 1rem;
  text-align: right;
  animation: fade-in 0.6s;
  pointer-events: none;
}

.build {
  left: 1rem;
}

.credit a,
.build a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.credit a:hover,
.credit a:focus-visible,
.build a:hover,
.build a:focus-visible {
  text-decoration: underline;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes appear {
  from {
    opacity: 0;
    transform: scale(0.96);
    filter: blur(6px);
  }
}

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

  .credit {
    animation: none;
  }

  .coco .logo {
    animation-name: fade-in;
  }
}

.email {
  color: var(--text);
  font-size: clamp(0.7rem, 4.2vw, 1.2rem);
  overflow-wrap: anywhere;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.typing {
  display: inline-grid;
  text-align: left;
}

.typing > span {
  grid-area: 1 / 1;
}

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

.typing .ghost {
  visibility: hidden;
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-right: -0.55em;
  vertical-align: text-bottom;
  background: currentColor;
  animation: blink 1s step-end infinite;
}

@media (prefers-reduced-motion: no-preference) {
  .js:not(.ready) :is(.email, .label, .icons) {
    animation: wait-for-script 3s;
  }
}

@keyframes wait-for-script {
  from,
  to {
    visibility: hidden;
  }
}

.cursor.busy {
  animation: none;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.email:hover,
.email:focus-visible {
  color: var(--muted);
  border-color: var(--muted);
}

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

.links {
  display: grid;
  grid-template-columns: max-content minmax(0, max-content);
  justify-content: center;
  align-items: start;
  column-gap: 0.75rem;
  row-gap: 0.75rem;
  width: 100%;
  margin-top: 1rem;
  font-size: clamp(0.8rem, 4vw, 1rem);
}

.label {
  color: var(--muted);
  text-align: right;
  line-height: var(--box-h);
}

.icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 8rem;
  height: var(--box-h);
  padding: 0 0.5rem;
  border: 1px solid var(--muted);
  border-radius: calc(var(--box-h) * 0.2237);
  gap: 0.5rem;
  text-decoration: none;
  color: var(--brand);
  transition: box-shadow 0.2s;
}

@supports (corner-shape: squircle) {
  .icons a {
    border-radius: calc(var(--box-h) * 0.358);
    corner-shape: squircle;
  }
}

.icons a:hover,
.icons a:focus-visible {
  box-shadow: var(--hover-shadow);
}

.icons a:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 4px;
}

.icons a:has(> img) {
  background: #ffffff padding-box;
}

.icons svg {
  width: 1.5rem;
  height: 1.5rem;
}

.brand {
  font-family: "Mona Sans", -apple-system, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
}

.store {
  font-family: "Open Sans", -apple-system, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
}

.store span {
  margin-right: 0.13em;
  font-weight: 400;
}

@property --sweep {
  syntax: "<angle>";
  inherits: false;
  initial-value: 360deg;
}

.reveal a {
  position: relative;
  border-color: transparent;
  transition: box-shadow 0.2s, background-color 0.4s ease-out calc(var(--delay, 0s) + 0.45s);
}

.reveal a:nth-child(2) {
  --delay: 0.25s;
}

.reveal a::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--muted);
  border-radius: inherit;
  corner-shape: inherit;
  pointer-events: none;
  -webkit-mask: conic-gradient(from -90deg, #000 var(--sweep), transparent 0);
  mask: conic-gradient(from -90deg, #000 var(--sweep), transparent 0);
}

.reveal.hidden a::after {
  --sweep: 0deg;
}

.reveal:not(.hidden) a::after {
  animation: sweep 0.55s cubic-bezier(0.45, 0, 0.25, 1) var(--delay, 0s) backwards;
}

@keyframes sweep {
  from {
    --sweep: 0deg;
  }
}

.reveal a > * {
  transition: opacity 0.5s ease-out calc(var(--delay, 0s) + 0.45s), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--delay, 0s) + 0.45s);
}

.reveal.hidden a > * {
  opacity: 0;
  transform: scale(0.9);
}

.reveal.hidden a:has(> img) {
  background: transparent;
}

.icons .site {
  width: auto;
  height: 1.5rem;
}

.icons .mark {
  width: auto;
  height: 1.75rem;
}

.art {
  display: block;
  width: auto;
  height: min(229px, 50vw);
}

.error {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 1em;
  font-weight: normal;
  font-size: clamp(1rem, 6vw, 1.5rem);
  letter-spacing: 0.02em;
}

.reason {
  color: var(--muted);
}

.message {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

@media (max-width: 30rem) {
  .message {
    align-items: center;
  }
}

.home {
  color: var(--muted);
  font-size: clamp(0.8rem, 4vw, 1rem);
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.home svg {
  width: 1em;
  height: 1.125em;
  margin-right: 0.375em;
  vertical-align: -0.125em;
  shape-rendering: crispEdges;
}

.home:hover,
.home:focus-visible {
  color: var(--text);
  border-color: var(--text);
}

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