/* DM Sans (OFL-1.1, fonts/OFL.txt), self-hosted: the CSP allows no external fonts. These are the files the design loads
   from Google Fonts (v17, opsz 9..40 and wght 400..700): unlike the back-office's, they have the optical-size axis, which
   the headline needs to look as designed (font-optical-sizing stays auto). */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/dm-sans-opsz-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/dm-sans-opsz-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #efe7da;
  -webkit-font-smoothing: antialiased;
}

main {
  box-sizing: border-box;
  min-height: 100vh;
  background: #efe7da;
  color: #28170d;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 24px;
  overflow: hidden;
}

.top {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.logo {
  width: min(520px, 78vw);
}

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

.line {
  width: min(120px, 30vw);
  height: 2px;
  background: #a04e37;
}

.text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

h1 {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.dot {
  display: inline-block;
}

p {
  margin: 0;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.5;
  max-width: 420px;
  text-wrap: pretty;
}

.order {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.kicker {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a04e37;
}

.cta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 30px 0 24px;
  border-radius: 999px;
  background: #a04e37;
  color: #efe7da;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(160, 78, 55, 0.28);
}

.cta:hover {
  background: #28170d;
  color: #efe7da;
}

.cta:focus-visible {
  outline: 2px solid #28170d;
  outline-offset: 3px;
}

.foot {
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* The design's link colours: espresso, terracotta on hover */
a {
  color: #28170d;
}

a:hover {
  color: #a04e37;
}

/* The design's animation at its speed 1.6: every duration and delay × 1/1.6. The elements' own styles are the end
   state, so the page reads in full where animations don't run. */
@media (prefers-reduced-motion: no-preference) {
  .logo {
    animation: reveal 1000ms cubic-bezier(0.65, 0, 0.25, 1) 125ms both;
  }

  .line {
    animation: grow 438ms cubic-bezier(0.65, 0, 0.25, 1) 1000ms both;
  }

  .text {
    animation: rise 563ms cubic-bezier(0.2, 0.7, 0.2, 1) 1188ms both;
  }

  .top {
    animation: fade 563ms cubic-bezier(0.65, 0, 0.25, 1) 1438ms both;
  }

  .foot {
    animation: fade 563ms cubic-bezier(0.65, 0, 0.25, 1) 1500ms both;
  }

  /* linear here: the design eases each whole iteration, so its ease-in-out is split into the keyframes below */
  .dot {
    animation: bounce 875ms linear 1750ms infinite backwards;
  }

  .dot:nth-child(3) {
    animation-delay: 1863ms;
  }

  .dot:nth-child(4) {
    animation-delay: 1975ms;
  }

  .cta {
    transition:
      background 0.2s,
      transform 0.2s;
  }

  .cta:hover {
    transform: translateY(-2px);
  }
}

@keyframes reveal {
  from {
    clip-path: inset(0 100% 0 0);
    transform: translateY(6px);
  }
  to {
    clip-path: inset(0 0% 0 0);
    transform: none;
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* The design's keyframes (offsets 0.3 and 0.6) under one ease-in-out over the whole iteration: they fall at 37.97 % and
   55.85 % of the time, and each segment gets its part of the cubic-bezier(0.42, 0, 0.58, 1) curve. */
@keyframes bounce {
  0% {
    opacity: 0.2;
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.402, 0, 0.713, 0.44);
  }
  37.97% {
    opacity: 1;
    transform: translateY(-6px);
    animation-timing-function: cubic-bezier(0.342, 0.314, 0.667, 0.666);
  }
  55.85%,
  100% {
    opacity: 0.2;
    transform: translateY(0);
  }
}
