:root {
  color-scheme: light dark;
  --bg: #fff4ec;
  --brown: #69443c;
}

/* Dark mode follows the system preference */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1614;
    --brown: #f1e3d8; /* text colour: warm cream on dark brown */
  }

  /* The illustration has dark outlines and black fur, so it keeps a light
     card behind it instead of sitting directly on the dark background. */
  .logo {
    background: #fff4ec;
    padding: 1.25rem;
    border-radius: 1.5rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--brown);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 14vh; /* bottom padding lifts the block above centre, as in the design */
  text-align: center;
}

.logo {
  width: clamp(220px, 27vw, 372px);
  height: auto;
}

h1 {
  margin: 1rem 0 0;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(1.6rem, 1rem + 3vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

p {
  margin: 2.25rem 0 0;
  font-size: clamp(1.125rem, 0.8rem + 1.5vw, 2rem);
  line-height: 1.3;
}

.cta {
  margin-top: 1.5rem;
}

a {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.25em;
}

a:hover,
a:focus-visible {
  text-decoration-thickness: 0.12em;
}

/* Link with a leading icon: the icon stays un-underlined, the label keeps the underline */
.cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  text-decoration: none;
}

.cta a span {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.25em;
}

.cta a:hover span,
.cta a:focus-visible span {
  text-decoration-thickness: 0.12em;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 4px;
}
