@font-face {
  font-family: "PP Mondwest";
  src: url("/fonts/PPMondwest-Regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --background: #f7f6f2;
  --ink: #11110f;
  --muted: rgba(17, 17, 15, 0.42);
  --soft: rgba(17, 17, 15, 0.12);
  --content-width: min(88vw, 560px);
  color-scheme: light;
  font-family: "PP Mondwest";
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.92), transparent 48%),
    var(--background);
  color: var(--ink);
  font-size: clamp(16px, 1.45vw, 21px);
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  padding: 0;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

a {
  color: inherit;
}

.pixel-field {
  position: fixed;
  z-index: 0;
  width: min(36vw, 520px);
  aspect-ratio: 1;
  opacity: 0.44;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--soft) 1px, transparent 1px);
  background-size: clamp(20px, 2.2vw, 32px) clamp(20px, 2.2vw, 32px);
  mask-image: radial-gradient(circle at center, #000 18%, transparent 72%);
}

.pixel-field-top {
  top: -13vw;
  right: -7vw;
  transform: rotate(5deg);
}

.pixel-field-bottom {
  bottom: -16vw;
  left: -10vw;
  transform: rotate(-6deg);
}

.back-link {
  position: fixed;
  z-index: 3;
  top: max(24px, env(safe-area-inset-top));
  left: max(24px, env(safe-area-inset-left));
  display: block;
  padding: 6px;
}

.back-link img {
  display: block;
  width: clamp(28px, 2.5vw, 38px);
  height: auto;
  filter: brightness(0.16);
  image-rendering: pixelated;
  opacity: 0.82;
  transition: transform 160ms ease;
}

.back-link:hover img,
.back-link:focus-visible img {
  transform: translateX(-4px);
}

.back-link:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 5px;
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(84px, 12vh, 130px) 24px clamp(116px, 14vh, 150px);
}

.invite {
  display: grid;
  width: var(--content-width);
  justify-items: center;
  gap: clamp(34px, 5vh, 58px);
  text-align: center;
}

.event-header {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.eyebrow,
.event-date,
.data-note,
.form-message,
.consent p,
.noscript {
  margin: 0;
}

h1 {
  margin: -0.06em 0 -0.08em;
  font-size: clamp(72px, 11vw, 132px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.event-date {
  color: var(--muted);
}

form {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 28px;
}

.fields {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 22px;
}

.field {
  position: relative;
  display: grid;
  width: min(100%, 470px);
  justify-items: center;
  padding-bottom: 14px;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  padding: 3px 0 7px;
  border-bottom: 1px solid rgba(17, 17, 15, 0.22);
  outline: 0;
  text-align: center;
  line-height: 1.3;
  resize: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

input:focus,
textarea:focus {
  border-bottom-color: var(--ink);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-bottom-color: var(--ink);
}

.question-field {
  margin-top: 8px;
}

.question-field textarea {
  min-height: 2.2em;
  overflow: hidden;
}

.field-error {
  position: absolute;
  top: calc(100% - 8px);
  color: var(--muted);
  font-size: 0.72em;
}

.submit-button {
  line-height: 1.4;
}

.submit-button:hover,
.submit-button:focus-visible,
.consent button:hover,
.consent button:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.form-message {
  min-height: 1.2em;
  color: var(--muted);
}

.data-note {
  max-width: 42ch;
  color: var(--muted);
  font-size: 0.68em;
  line-height: 1.35;
}

.consent {
  position: fixed;
  z-index: 4;
  top: max(20px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  display: grid;
  width: min(calc(100vw - 40px), 430px);
  gap: 14px;
  padding: 17px 18px 16px;
  border: 1px solid var(--soft);
  background: rgba(247, 246, 242, 0.96);
  box-shadow: 0 12px 36px rgba(17, 17, 15, 0.1);
  font-size: 0.72em;
  line-height: 1.35;
  text-align: left;
  backdrop-filter: blur(8px);
}

.consent[hidden] {
  display: none;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 5;
  text-align: center;
}

@media (max-width: 620px) {
  :root {
    --content-width: min(100%, 430px);
  }

  body {
    font-size: 18px;
  }

  main {
    align-items: start;
    padding-top: 110px;
  }

  .invite {
    gap: 36px;
  }

  .pixel-field {
    width: 72vw;
  }

  .consent {
    top: auto;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 16px;
    width: auto;
  }
}

@media (max-height: 700px) and (min-width: 621px) {
  main {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .invite {
    gap: 20px;
  }

  h1 {
    font-size: clamp(64px, 9vw, 96px);
  }

  form {
    gap: 18px;
  }

  .fields {
    gap: 10px;
  }

  .field {
    padding-bottom: 10px;
  }

  .data-note {
    font-size: 0.62em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
