:root {
  --bg: #f6eadb;
  --ink: #2a241b;
  /* 97.724pt on a 1920px artboard, scaled with the viewport. */
  --email-size: calc(97.724 / 1920 * 100vw);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  display: grid;
  place-items: center;
  min-height: 100svh;
}

.email {
  /* Nudge to the artboard position: the design centers the glyphs, CSS centers the line box. */
  position: relative;
  left: -0.143em;
  top: -0.077em;
  color: inherit;
  text-decoration: none;
  font-size: max(var(--email-size), 18px);
  line-height: 1.2;
  letter-spacing: -0.041em;
  white-space: nowrap;
}

@media (scripting: enabled) {
  .email:not(.is-ready) {
    visibility: hidden;
    /* Show the address anyway if the script never runs. */
    animation: reveal 0s 2s forwards;
  }
}

@keyframes reveal {
  to {
    visibility: visible;
  }
}

/* The real character keeps its slot in the layout; the scramble glyph is drawn over it. */
.ch {
  position: relative;
}

.ch.is-hidden,
.ch.is-scrambling {
  color: transparent;
}

.ch.is-scrambling::after {
  content: attr(data-glyph);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink);
  opacity: var(--scramble-opacity, 1);
}
