:root {
  --paper: #faf6ef;
  --field: #fefaf3;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --ink: #241c09;
  --muted: #79715e;
  --rule: #dcd6c8;
  --shadow:
    0 1px 2px rgb(36 28 9 / 0.07), 0 3px 6px -2px rgb(36 28 9 / 0.09),
    0 10px 16px -8px rgb(36 28 9 / 0.17);
  --shadow-pressed:
    0 1px 2px rgb(36 28 9 / 0.08), 0 2px 5px -3px rgb(36 28 9 / 0.13);

  --green: #7ecb8b;
  --pink: #ff9ac4;
  --blue: #74b9f0;
  --yellow: #f7cf4d;
  --green-deep: #2c6b3c;
  --pink-deep: #9c2f63;
  --blue-deep: #16548a;
  --yellow-deep: #7a5a05;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

.panel {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#anmalan {
  display: none;
}

#anmalan.revealed {
  display: flex;
}

.sheet > :first-child {
  margin-top: 0;
}

.sheet {
  text-align: center;
  padding: 2rem;
  position: relative;
}

hr {
  width: 5rem;
  margin: 1.25rem auto;
  border: 1px solid var(--rule);
}

.date {
  margin-top: var(--space-1);
}

h2 {
  font-weight: 700;
  margin-top: var(--space-4);
  margin-inline: auto;
  max-width: 18ch;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  text-transform: uppercase;
  line-height: 1.12;
}

h2:not(.date) {
  margin-top: var(--space-6);
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.08;
}

h1 {
  font-weight: 900;
  font-size: clamp(1.75rem, 4.6vw, 2.9rem);
  text-transform: uppercase;
  line-height: 1.02;
}

#anmalan .date {
  font-size: clamp(1.5rem, 4.4vw, 2.4rem);
  margin-top: var(--space-1);
}

#anmalan h1 + .date {
  margin-top: var(--space-2);
}

#anmalan hr {
  width: 7rem;
  margin: 1.75rem auto;
}

.answers {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: center;
}

.hint {
  text-transform: uppercase;
  margin-top: var(--space-6);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.orb {
  --fill: var(--green);
  --label: var(--green-deep);
  display: inline-grid;
  place-items: center;
  position: relative;
  text-decoration: none;
  font-family: inherit;
  font-size: clamp(1.15rem, 2.8vw, 1.5rem);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--label);
  border: none;
  border-radius: 50%;
  width: 8.5rem;
  height: 8.5rem;
  padding: 0;
  background: var(--fill);
  box-shadow: var(--shadow);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.25s ease,
    scale 0.3s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.answers .orb:nth-child(1) {
  --fill: var(--pink);
  --label: var(--pink-deep);
}
.answers .orb:nth-child(2) {
  --fill: var(--green);
  --label: var(--green-deep);
}
.answers .orb:nth-child(3) {
  --fill: var(--blue);
  --label: var(--blue-deep);
}

.answers .dodge {
  cursor: default;
  transition: scale 0.3s ease;
  z-index: 2;
  will-change: translate;
  touch-action: none;
}

@keyframes sway {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(7px, -11px) rotate(2deg);
  }
  40% {
    transform: translate(-5px, -16px) rotate(-1.5deg);
  }
  60% {
    transform: translate(-10px, -6px) rotate(-3deg);
  }
  80% {
    transform: translate(4px, -9px) rotate(1deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

.answers .orb,
.signup .orb {
  animation: sway 5.5s ease-in-out infinite;
}

.answers .orb:nth-child(2) {
  animation-duration: 6.4s;
  animation-delay: -1.6s;
}

.answers .orb:nth-child(3) {
  animation-duration: 7.2s;
  animation-delay: -2.4s;
}

.signup .orb {
  animation-duration: 6.8s;
  animation-delay: -0.9s;
}

.orb:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.orb:not(.dodge):active {
  box-shadow: var(--shadow-pressed);
  transition-duration: 0.05s;
}

@media (max-width: 40rem) {
  .sheet {
    padding: 1.5rem 1rem;
  }

  h2 {
    max-width: 100%;
  }

  .answers {
    margin-top: var(--space-6);
    gap: var(--space-2);
  }

  .orb {
    width: 6.5rem;
    height: 6.5rem;
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb {
    transition: none;
  }

  .answers .orb,
  .signup .orb {
    animation: none;
  }
}

.signup {
  margin-top: var(--space-6);
  margin-inline: auto;
  max-width: 20rem;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.signup .fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.signup .field {
  --accent: var(--pink);
  --accent-deep: var(--pink-deep);
  display: flex;
  flex-direction: column;
}

.signup .field:nth-child(2) {
  --accent: var(--blue);
  --accent-deep: var(--blue-deep);
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.signup input {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  color: inherit;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--accent);
  border-radius: 0.55rem;
  background: var(--field);
  box-shadow: var(--shadow-pressed);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    translate 0.2s ease;
}

.signup input::placeholder {
  color: var(--muted);
  opacity: 1;
  font-weight: 300;
}

.signup input:hover {
  translate: 0 -1px;
}

.signup input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent-deep);
  box-shadow: var(--shadow-pressed);
}

.signup .orb {
  margin-top: var(--space-6);
  align-self: center;
  --fill: var(--yellow);
  --label: var(--yellow-deep);
  width: 7rem;
  height: 7rem;
  padding: 0 0.8rem;
  font-size: 1.05rem;
  line-height: 1.15;
  text-wrap: balance;
  transition:
    translate 0.2s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.signup .orb:hover:not(:disabled) {
  translate: 0 -2px;
}

.signup .orb:active:not(:disabled) {
  translate: 0 1px;
  box-shadow: var(--shadow-pressed);
  filter: brightness(0.96);
}

.signup .orb:disabled {
  cursor: default;
  filter: saturate(0.5) brightness(1.04);
  box-shadow: var(--shadow-pressed);
}

.note {
  margin-top: var(--space-6);
  align-self: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
}

.note.error {
  color: var(--pink-deep);
}

@media (prefers-reduced-motion: reduce) {
  .signup input,
  .signup .orb {
    transition: none;
  }
}

.confetti,
.flames {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.grumble,
.blunder {
  position: fixed;
  left: 0;
  top: 0;
  font-size: 2rem;
  line-height: 1;
  pointer-events: none;
  z-index: 11;
  opacity: 0;
  scale: 0.6;
  transition:
    opacity 200ms ease,
    scale 200ms ease;
}

.blunder {
  color: #e5342a;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.grumble.shown,
.blunder.shown {
  opacity: 1;
  scale: 1;
  animation: grumble-shake 400ms ease-in-out;
}

@keyframes grumble-shake {
  0%, 100% { rotate: 0deg; }
  25% { rotate: -12deg; }
  75% { rotate: 12deg; }
}

@media (prefers-reduced-motion: reduce) {
  .grumble,
  .blunder {
    transition: none;
  }
  .grumble.shown,
  .blunder.shown {
    animation: none;
  }
}
