@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4/SourceSerif4-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --colour-cycle-duration: 40s;
  --forest-ink: #173f35;
  --forest-paper: #f4ebd8;
  --oxblood-ink: #642c3a;
  --oxblood-paper: #f3ddd9;
  --cobalt-ink: #273fad;
  --cobalt-paper: #f4f0e6;
  --espresso-ink: #422c28;
  --espresso-paper: #f4ead2;
  color: var(--forest-ink);
  background-color: var(--forest-paper);
  font: 400 18px/1.5 "Source Serif 4", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --forest-ink: #f4ebd8;
    --forest-paper: #173f35;
    --oxblood-ink: #f3ddd9;
    --oxblood-paper: #642c3a;
    --cobalt-ink: #f4f0e6;
    --cobalt-paper: #273fad;
    --espresso-ink: #f4ead2;
    --espresso-paper: #422c28;
  }
}

/* Animate colour properties; unregistered custom properties would jump. */
@keyframes colour-cycle {
  0%, 100% {
    color: var(--forest-ink);
    background-color: var(--forest-paper);
  }
  25% {
    color: var(--oxblood-ink);
    background-color: var(--oxblood-paper);
  }
  50% {
    color: var(--cobalt-ink);
    background-color: var(--cobalt-paper);
  }
  75% {
    color: var(--espresso-ink);
    background-color: var(--espresso-paper);
  }
}

/* Preserve the brand endpoints while avoiding legacy RGB interpolation. */
@supports (color: oklab(from white l a b)) {
  @keyframes colour-cycle {
    0%, 100% {
      color: oklab(from var(--forest-ink) l a b);
      background-color: oklab(from var(--forest-paper) l a b);
    }
    25% {
      color: oklab(from var(--oxblood-ink) l a b);
      background-color: oklab(from var(--oxblood-paper) l a b);
    }
    50% {
      color: oklab(from var(--cobalt-ink) l a b);
      background-color: oklab(from var(--cobalt-paper) l a b);
    }
    75% {
      color: oklab(from var(--espresso-ink) l a b);
      background-color: oklab(from var(--espresso-paper) l a b);
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    animation: colour-cycle var(--colour-cycle-duration) linear infinite;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

main {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 52px;
}

.business-card {
  width: 100%;
  max-width: 468px;
  min-width: 0;
}

.wordmark,
p {
  margin: 0;
  font: inherit;
}

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

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 38px 12px 0;
  padding-top: 18px;
  border-top: 1px solid currentColor;
}

.contact p {
  min-width: 0;
  overflow-wrap: anywhere;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

@media (max-width: 520px) {
  main {
    padding: 28px 24px;
  }

  .contact {
    display: block;
    margin: 28px 8px 0;
  }

  .contact p + p {
    margin-top: 10px;
  }
}

@media (pointer: coarse) {
  a {
    display: inline-block;
    padding-block: 9px;
  }
}
