@font-face {
  font-family: Fraunces;
  src: url("assets/fonts/Fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F3EEE4;
  --charcoal: #2B2F33;
  --teal: #2EC4B6;
  --muted: rgba(43, 47, 51, 0.7);
}

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

html, body {
  min-height: 100%;
  background: var(--paper);
  color: var(--charcoal);
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: Fraunces, "Times New Roman", Times, serif;
  font-optical-sizing: auto;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.75rem 1.25rem;
  text-align: center;
  gap: 0;
}

.wordmark {
  position: relative;
  display: block;
  width: min(88vw, 40rem);
  margin: 0 auto;
  font-size: inherit;
  font-weight: 500;
  line-height: 0;
}

.wordmark img {
  display: block;
  width: 100%;
  height: auto;
}

.tm {
  position: absolute;
  right: -0.7em;
  top: 14%;
  font-size: clamp(0.85rem, 2.6vw, 1.45rem);
  font-weight: 500;
  line-height: 1;
  color: var(--charcoal);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tagline {
  margin-top: 1rem;
  font-size: clamp(1.05rem, 3.6vw, 1.7rem);
  font-weight: 500;
  font-optical-sizing: auto;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--charcoal);
}

.ants {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.15rem;
  width: min(100%, 42rem);
  margin: 1.4rem 0 0.4rem;
}

.ant {
  flex: 0 0 auto;
  width: clamp(3rem, 12.4vw, 6.5rem);
  aspect-ratio: 1;
  background-repeat: no-repeat;
  background-size: 800% 100%;
  background-position: 0 0;
  animation: walk 0.667s steps(7) infinite;
  image-rendering: auto;
}

.charcoal-queen,
.rust-queen {
  width: clamp(3.15rem, 13.2vw, 7.1rem);
}

.charcoal-worker { background-image: url("assets/sprites/charcoal-worker-walk.png"); animation-delay: 0s; }
.charcoal-soldier { background-image: url("assets/sprites/charcoal-soldier-walk.png"); animation-delay: -0.11s; }
.charcoal-queen { background-image: url("assets/sprites/charcoal-queen-walk.png"); animation-delay: -0.23s; }
.rust-worker { background-image: url("assets/sprites/rust-worker-walk.png"); animation-delay: -0.31s; }
.rust-soldier { background-image: url("assets/sprites/rust-soldier-walk.png"); animation-delay: -0.44s; }
.termite-worker { background-image: url("assets/sprites/termite-worker-walk.png"); animation-delay: -0.52s; }
.termite-soldier { background-image: url("assets/sprites/termite-soldier-walk.png"); animation-delay: -0.08s; }

@keyframes walk {
  from { background-position: 0 0; }
  to { background-position: 100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ant {
    animation: none;
    background-position: 0 0;
  }
}

.soon {
  margin-top: 0.85rem;
  font-size: clamp(0.95rem, 2.8vw, 1.2rem);
  font-weight: 500;
  color: var(--charcoal);
}

footer {
  flex: 0 0 auto;
  padding: 0.75rem 1.25rem 1.25rem;
  text-align: center;
}

footer p {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
}

@media (min-width: 700px) {
  .tagline { margin-top: 1.25rem; }
  .ants { margin-top: 1.75rem; gap: 0.35rem; }
  .soon { margin-top: 1.1rem; }
}
