@font-face {
  font-family: "TeX Gyre Heros";
  src: url("../assets/fonts/texgyreheros-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TeX Gyre Heros";
  src: url("../assets/fonts/texgyreheros-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4f3ef;
  --type: #11110f;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--paper);
}

body {
  overflow: hidden;
  color: var(--type);
  font-family: "TeX Gyre Heros", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.mail-loader {
  display: flex;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: clamp(38px, 7vh, 78px);
  padding: 32px 20px;
}

h1 {
  display: flex;
  gap: 0.035em;
  margin: 0;
  font-size: clamp(64px, 13vw, 168px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.78;
  user-select: none;
  white-space: nowrap;
}

h1 span {
  display: inline-block;
}

.loading-pen {
  display: block;
  width: min(90vw, 1100px);
  height: auto;
  overflow: visible;
}

.pen-ink-fill {
  transform: scaleX(0);
  transform-box: fill-box;
  transform-origin: left center;
  animation: fill-ink 2.6s cubic-bezier(0.33, 0, 0.16, 1) 120ms forwards;
}

.loading-status {
  margin: -34px 0 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

noscript {
  position: fixed;
  right: 0;
  bottom: 20px;
  left: 0;
  text-align: center;
}

noscript p {
  margin: 0;
}

noscript a {
  color: inherit;
}

@keyframes fill-ink {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@media (max-width: 600px) {
  .mail-loader {
    gap: 34px;
  }

  h1 {
    font-size: clamp(58px, 21vw, 92px);
  }

  .loading-pen {
    width: 96vw;
  }

  .loading-status {
    margin-top: -18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pen-ink-fill {
    animation-timing-function: linear;
  }
}
