:root {
  color-scheme: light;
  --font-display: "Headline Face", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Body Face", "Helvetica Neue", Arial, sans-serif;
  --text-color: white;
  --line-color: white;
}

@font-face {
  font-family: "Headline Face";
  src: url("fonts/fake_receipt-webfont.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Body Face";
  src: url("fonts/LoRes12OT-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
  background-color: black;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("images/background.jpg");
  background-size: cover;
  background-position: center;
  color: var(--text-color);
  font-family: var(--font-body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("images/noise.gif");
  background-repeat: repeat;
  background-size: 640px 640px;
  opacity: 0.2;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

#rsvp-panel {
  width: min(520px, 92vw);
  text-align: center;
  position: relative;
  overflow: hidden;
  -webkit-clip-path: inset(0 0 100% 0);
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  -webkit-animation: thermal-reveal 1200ms steps(36, end) 80ms forwards;
  animation: thermal-reveal 1200ms steps(36, end) 80ms forwards;
}

#rsvp-panel.is-confirmed {
  -webkit-animation: thermal-reveal-confirmed 1200ms steps(36, end) forwards;
  animation: thermal-reveal-confirmed 1200ms steps(36, end) forwards;
}

#rsvp-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18%;
  height: 16%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.26) 45%,
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
  opacity: 0;
  -webkit-animation: thermal-head 1200ms linear 80ms forwards;
  animation: thermal-head 1200ms linear 80ms forwards;
}

#rsvp-panel.is-confirmed::after {
  -webkit-animation: thermal-head-confirmed 1200ms linear forwards;
  animation: thermal-head-confirmed 1200ms linear forwards;
}

@-webkit-keyframes thermal-reveal {
  0% {
    -webkit-clip-path: inset(0 0 100% 0);
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    -webkit-filter: contrast(1.14) saturate(0.92);
    filter: contrast(1.14) saturate(0.92);
  }

  8% {
    opacity: 1;
  }

  100% {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
    opacity: 1;
    -webkit-filter: none;
    filter: none;
  }
}

@keyframes thermal-reveal {
  0% {
    -webkit-clip-path: inset(0 0 100% 0);
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    -webkit-filter: contrast(1.14) saturate(0.92);
    filter: contrast(1.14) saturate(0.92);
  }

  8% {
    opacity: 1;
  }

  100% {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
    opacity: 1;
    -webkit-filter: none;
    filter: none;
  }
}

@-webkit-keyframes thermal-reveal-confirmed {
  0% {
    -webkit-clip-path: inset(0 0 100% 0);
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    -webkit-filter: contrast(1.14) saturate(0.92);
    filter: contrast(1.14) saturate(0.92);
  }

  8% {
    opacity: 1;
  }

  100% {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
    opacity: 1;
    -webkit-filter: none;
    filter: none;
  }
}

@keyframes thermal-reveal-confirmed {
  0% {
    -webkit-clip-path: inset(0 0 100% 0);
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    -webkit-filter: contrast(1.14) saturate(0.92);
    filter: contrast(1.14) saturate(0.92);
  }

  8% {
    opacity: 1;
  }

  100% {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
    opacity: 1;
    -webkit-filter: none;
    filter: none;
  }
}

@-webkit-keyframes thermal-head {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  10% {
    opacity: 0.65;
  }

  90% {
    opacity: 0.65;
  }

  100% {
    transform: translateY(760%);
    opacity: 0;
  }
}

@keyframes thermal-head {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  10% {
    opacity: 0.65;
  }

  90% {
    opacity: 0.65;
  }

  100% {
    transform: translateY(760%);
    opacity: 0;
  }
}

@-webkit-keyframes thermal-head-confirmed {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  10% {
    opacity: 0.65;
  }

  90% {
    opacity: 0.65;
  }

  100% {
    transform: translateY(760%);
    opacity: 0;
  }
}

@keyframes thermal-head-confirmed {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  10% {
    opacity: 0.65;
  }

  90% {
    opacity: 0.65;
  }

  100% {
    transform: translateY(760%);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #rsvp-panel {
    -webkit-animation: none;
    animation: none;
    -webkit-clip-path: none;
    clip-path: none;
    opacity: 1;
  }

  #rsvp-panel::after {
    -webkit-animation: none;
    animation: none;
    opacity: 0;
  }
}

#page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.75rem;
  letter-spacing: 0.08em;
  line-height: 1.05;
}

.event-meta {
  margin: 0.3rem 0 0;
  font-family: var(--font-display);
  /* font-size: clamp(0.8rem, 2vw, 1rem); */
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#intro-copy {
  /* margin: 1rem auto 1.2rem;
  max-width: 42ch; */
  font-size: 0.84rem;
  line-height: 1.35;
}

#rsvp-form {
  /* margin: 0 auto;
  max-width: 460px; */
}

input {
  width: 100%;
  margin: 0 0 0.55rem;
  border: 2px solid var(--line-color);
  border-radius: 0;
  padding: 0.32rem 0.75rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-color);
  /* background: rgba(255, 255, 255, 0.32); */
  background: transparent;
}

input::-webkit-input-placeholder {
  color: rgba(253, 253, 253, 0.72);
}

input::-moz-placeholder {
  color: rgba(253, 253, 253, 0.72);
}

input:-ms-input-placeholder {
  color: rgba(253, 253, 253, 0.72);
}

input::-ms-input-placeholder {
  color: rgba(253, 253, 253, 0.72);
}

input::placeholder {
  color: rgba(253, 253, 253, 0.72);
}

#submit-btn {
  width: 100%;
  border: 1px solid var(--line-color);
  border-radius: 0;
  padding: 0.32rem 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: black;
  background: var(--line-color);
  cursor: pointer;
}

#submit-btn:hover {
  background: rgb(228, 228, 228);
}

#submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

a {
  color: white;
}

.footnote {
  /* margin: 0.75rem auto 0;
  max-width: 44ch; */
  font-size: 0.66rem;
  line-height: 1.35;
}

.site-footer {
  margin-top: 0.75rem;
}

.retry-link-wrap {
  display: none;
  margin: 0.8rem 0 0;
  font-size: 0.78rem;
}

.label-logo {
  display: block;
  width: 74px;
  max-width: 28vw;
  margin: 0.7rem auto 0;
}

#status {
  margin-top: 0.8rem;
  min-height: 1.2rem;
  font-size: 0.83rem;
}

#audio-toggle {
  position: fixed;
  right: 0.9rem;
  bottom: 0.9rem;
  border: 0;
  background: transparent;
  color: var(--text-color);
  font-size: 1.15rem;
  padding: 0;
  line-height: 1;
  cursor: pointer;
}

#audio-toggle[data-playing="true"] {
  opacity: 0.95;
}

#audio-toggle:hover {
  opacity: 0.7;
}

main.is-confirmed #status {
  font-size: 0.95rem;
  line-height: 1.4;
}

main.is-confirmed .event-meta,
main.is-confirmed .footnote,
main.is-confirmed #status {
  display: none;
}

main.is-confirmed #intro-copy {
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

main.is-confirmed .retry-link-wrap {
  display: block;
}

main.is-confirmed .label-logo {
  display: none;
}

.ok {
  color: #1d5e3d;
}

.error {
  color: #ff1c41;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: var(--text-color);
}

@media (max-width: 560px) {
  body {
    padding: 1rem;
  }

  #intro-copy {
    font-size: 0.8rem;
  }

  #audio-toggle {
    right: 0.7rem;
    bottom: 0.7rem;
  }
}
