@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --ground: #16100c;
  --ink: #f2e4d0;
  --accent: #c4a574;
  --margin: 32px;
}

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

html {
  background: var(--ground);
  color: var(--ink);
}

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

body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  font-family: "Cormorant Garamond", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.5;
  background: var(--ground);
  color: var(--ink);
}

main {
  margin: var(--margin);
  max-width: 22ch;
}

h1 {
  margin: 0;
  font-size: clamp(3.25rem, 11vw, 7.5rem);
  font-weight: 400;
  font-style: normal;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
}

h1 span {
  display: block;
}

.standfirst {
  margin: 1.4em 0 0;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: var(--accent);
}

@media (max-width: 480px) {
  :root {
    --margin: 24px;
  }

  body {
    align-items: flex-end;
    padding-bottom: 18vh;
  }

  main {
    max-width: none;
  }

  h1 {
    font-size: clamp(3.4rem, 18vw, 4.75rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  h1,
  .standfirst {
    animation: rise 0.9s ease-out both;
  }

  .standfirst {
    animation-delay: 0.12s;
  }
}

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