:root {
  --paper: #ffffff;
  --paper-light: #ffffff;
  --ink: #101820;
  --muted: #56616d;
  --line: #1a2027;
  --blue: #1f6fd2;
  --red: #cf3341;
  --green: #188a43;
  --yellow: #ad7810;
  --focus: rgba(31, 111, 210, 0.18);
  --font: "Noteworthy", "Bradley Hand", "Marker Felt", "Chalkboard SE", "Apple SD Gothic Neo", cursive;
  --font-loud: "Noteworthy", "Bradley Hand", "Marker Felt", "Chalkboard SE", "Apple SD Gothic Neo", cursive;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.page-shell {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(14px, 2vw, 24px);
  overflow: clip;
}

.signup {
  width: min(1060px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  grid-template-areas:
    "intro mascot"
    "preview form";
  column-gap: clamp(24px, 5vw, 60px);
  row-gap: clamp(6px, 1.2vw, 12px);
  align-items: start;
}

.intro {
  grid-area: intro;
  margin: 0;
  transform: rotate(-1.5deg);
}

.hero-title-image {
  display: block;
  width: min(620px, 100%);
  height: auto;
  image-rendering: auto;
}

.brand-hangul-image {
  display: block;
  width: min(130px, 34vw);
  height: auto;
  margin: 0 0 4px 8px;
  image-rendering: auto;
  transform: rotate(2.8deg);
}

.hero-lede-image {
  display: block;
  width: min(365px, 82%);
  height: auto;
  margin-top: clamp(8px, 1.2vw, 14px);
  image-rendering: auto;
  transform: rotate(1.1deg);
}

.status-preview {
  grid-area: preview;
  width: min(390px, 74%);
  margin: 0;
  justify-self: center;
  overflow: visible;
  border: 0;
  border-radius: 15px 7px 18px 9px;
  background: var(--paper-light);
  padding: 0;
  box-shadow: none;
  transform: rotate(2.4deg) translate(10px, -8px);
}

.status-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px 5px 11px 4px;
  image-rendering: auto;
}

.mascot-stage {
  grid-area: mascot;
  position: relative;
  width: min(245px, 100%);
  margin: 0;
  justify-self: center;
  align-self: start;
  transform: rotate(-5deg) translate(-2px, -12px);
}

.mascot-art {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  filter: none;
}

.mascot-art path {
  stroke: var(--ink);
}

.mascot-eye-mark {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 90ms ease;
}

.mascot-art.is-blinking .mascot-eye-mark {
  transform: scaleY(0.08);
}

.motion-button {
  position: absolute;
  right: 2px;
  bottom: 26px;
  min-height: 36px;
  border: 0;
  border-radius: 18px 9px 14px 11px;
  background: var(--paper-light);
  color: var(--ink);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
  transform: rotate(-8deg);
}

.motion-button::before,
.motion-button::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 3px solid currentColor;
  border-radius: 18px 9px 14px 11px;
  pointer-events: none;
}

.motion-button::after {
  inset: -4px -1px -1px -5px;
  border-width: 2px;
  border-radius: 12px 18px 10px 17px;
  transform: rotate(3deg);
}

.motion-button[hidden] {
  display: none;
}

.motion-button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper-light);
}

.form-card {
  grid-area: form;
  position: relative;
  align-self: start;
  margin-top: -150px;
  border: 0;
  border-radius: 26px 12px 31px 9px;
  background: #ffffff;
  padding: 16px 18px 16px;
  box-shadow: none;
  transform: rotate(-1deg);
}

.form-title {
  position: relative;
  z-index: 1;
  margin: 0 0 7px 1px;
  transform: rotate(1deg);
}

.form-title-art {
  display: block;
  width: min(318px, 88%);
  height: auto;
}

form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.scribble-border {
  pointer-events: none;
  overflow: visible;
}

.scribble-border path {
  fill: none;
  stroke: var(--line);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.form-scribble {
  position: absolute;
  inset: -10px -9px -12px -11px;
  z-index: 0;
  width: calc(100% + 20px);
  height: calc(100% + 24px);
}

.field {
  display: grid;
  gap: 3px;
}

.field:nth-of-type(1) {
  transform: rotate(0.6deg);
}

.field:nth-of-type(2) {
  transform: rotate(-0.8deg);
}

.field:nth-of-type(3) {
  transform: rotate(0.4deg);
}

.field:nth-of-type(4) {
  transform: rotate(-0.5deg);
}

.field label {
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  line-height: 0;
}

.label-art {
  display: block;
  width: auto;
  max-width: min(250px, 100%);
  height: 24px;
  object-fit: contain;
  object-position: left center;
}

.input-wrap {
  position: relative;
  --input-border-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 64' preserveAspectRatio='none'%3E%3Cpath d='M14 9 C52 1 111 10 172 6 C229 2 300 7 347 10 C355 24 353 43 346 55 C285 61 222 52 172 57 C117 62 61 55 16 57 C5 43 7 23 14 9Z' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.input-wrap::before {
  content: "";
  position: absolute;
  inset: -7px -9px -8px -8px;
  background: var(--line);
  -webkit-mask: var(--input-border-mask) center / 100% 100% no-repeat;
  mask: var(--input-border-mask) center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 0;
}

.field:nth-of-type(1) .input-wrap::before {
  transform: rotate(-0.7deg);
}

.field:nth-of-type(1) .input-wrap {
  --input-border-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 64' preserveAspectRatio='none'%3E%3Cpath d='M16 8 C74 5 116 1 174 8 C232 15 291 3 346 11 C354 27 351 47 340 56 C284 55 229 60 176 55 C119 50 74 63 17 55 C7 39 6 22 16 8Z' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.field:nth-of-type(2) .input-wrap::before {
  transform: rotate(0.9deg);
}

.field:nth-of-type(2) .input-wrap {
  --input-border-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 64' preserveAspectRatio='none'%3E%3Cpath d='M12 10 C66 0 125 8 178 5 C238 2 292 10 348 8 C356 25 353 40 346 55 C289 61 227 54 178 58 C118 62 61 53 15 57 C4 43 7 25 12 10Z' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.field:nth-of-type(3) .input-wrap::before {
  transform: rotate(-0.3deg);
}

.field:nth-of-type(3) .input-wrap {
  --input-border-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 64' preserveAspectRatio='none'%3E%3Cpath d='M15 7 C58 13 115 4 173 7 C231 10 290 1 345 12 C353 29 355 43 344 56 C283 59 231 55 175 58 C118 61 63 55 18 56 C6 42 5 21 15 7Z' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.field:nth-of-type(4) .input-wrap::before {
  transform: rotate(0.4deg);
}

.field:nth-of-type(4) .input-wrap {
  --input-border-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 64' preserveAspectRatio='none'%3E%3Cpath d='M13 11 C67 6 116 10 174 6 C234 2 292 5 348 10 C354 25 352 45 344 55 C288 62 230 55 175 57 C120 59 62 60 16 54 C7 42 4 25 13 11Z' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

input,
select {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 13px;
  font-family: var(--font);
  font-size: 19px;
  font-weight: 700;
  outline: none;
  box-shadow: none;
  transition: transform 140ms ease;
}

select {
  appearance: auto;
}

input::placeholder {
  color: transparent;
}

.input-wrap:not(.has-value) select {
  color: transparent;
}

select option {
  color: var(--ink);
}

.placeholder-art {
  position: absolute;
  z-index: 2;
  left: 13px;
  top: 50%;
  width: auto;
  max-width: calc(100% - 42px);
  height: 24px;
  object-fit: contain;
  object-position: left center;
  pointer-events: none;
  transform: translateY(-50%) rotate(-0.6deg);
  transition: opacity 120ms ease;
}

.input-wrap.has-value .placeholder-art {
  opacity: 0;
}

input:focus,
select:focus {
  transform: rotate(-0.5deg);
}

.input-wrap:focus-within::before {
  background-color: var(--blue);
}

.field.has-error input {
  transform: rotate(0.5deg);
}

.field.has-error .input-wrap::before {
  background-color: var(--red);
}

.field-error,
.form-status {
  min-height: 16px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.field-error {
  color: var(--red);
}

.field:not(.has-error) .field-error {
  color: transparent;
}

.form-status {
  color: var(--muted);
}

.form-status.is-error {
  color: var(--red);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.submit-button,
.secondary-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  border-radius: 17px 8px 19px 10px;
  font-size: 19px;
  font-weight: 700;
}

.submit-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--paper-light);
  box-shadow: none;
  transform: rotate(0.7deg);
}

.submit-button::before {
  content: "";
  position: absolute;
  inset: -2px -3px -4px -2px;
  border: 3px solid var(--line);
  border-radius: 17px 8px 19px 10px;
  background: var(--ink);
  pointer-events: none;
  z-index: 0;
}

.button-art {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: min(240px, 84%);
  height: 36px;
  object-fit: contain;
}

.submit-button:hover,
.submit-button:focus-visible {
  transform: rotate(-0.6deg);
}

.submit-button:hover::before,
.submit-button:focus-visible::before {
  background: #26313d;
}

.submit-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.success-state {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.success-state[hidden] {
  display: none;
}

.success-state h2 {
  margin: 0;
  color: var(--green);
  font-size: 28px;
}

.success-state p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.25;
}

.secondary-button {
  width: max-content;
  border: 0;
  background: var(--paper-light);
  color: var(--ink);
  padding: 0 18px;
  box-shadow: none;
}

.secondary-button::before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 3px solid var(--line);
  border-radius: 17px 8px 19px 10px;
  pointer-events: none;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: #fff2b8;
}

.is-complete form {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .mascot-eye-mark,
  input,
  select,
  .submit-button {
    transition: none;
  }
}

@media (max-width: 860px) {
  .page-shell {
    display: block;
    padding: 18px 16px 34px;
    overflow: visible;
  }

  .signup {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "form"
      "preview";
    gap: 18px;
  }

  h1 {
    font-size: clamp(58px, 18vw, 94px);
  }

  .hero-title-image {
    width: 100%;
  }

  .hero-lede-image {
    width: min(390px, 92%);
  }

  .mascot-stage {
    position: absolute;
    grid-area: auto;
    top: 0;
    right: 0;
    width: clamp(78px, 20vw, 132px);
    justify-self: auto;
    z-index: 2;
    transform: rotate(-5deg);
  }

  .motion-button {
    right: 0;
    bottom: auto;
    top: calc(100% + 2px);
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
    transform: rotate(-5deg);
  }

  .motion-button::before {
    border-width: 2px;
  }

  .motion-button::after {
    inset: -3px -1px -1px -3px;
    border-width: 1px;
  }

  .status-preview {
    width: min(500px, 100%);
    justify-self: center;
    transform: rotate(-1.4deg);
  }

  .form-card {
    margin-top: 0;
    width: min(420px, 100%);
    justify-self: center;
    transform: rotate(0.8deg);
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 14px 13px 28px;
  }

  .signup {
    gap: 14px;
  }

  .intro {
    padding-right: clamp(42px, 14vw, 74px);
  }

  .brand-hangul-image {
    width: min(96px, 30vw);
    margin-bottom: 1px;
  }

  .hero-title-image {
    width: 100%;
  }

  .hero-lede-image {
    width: min(310px, 94%);
    margin-top: 6px;
  }

  .mascot-stage {
    top: 2px;
    right: -4px;
    width: clamp(58px, 18vw, 84px);
  }

  .motion-button {
    top: calc(100% + 1px);
    right: 1px;
    min-height: 24px;
    padding: 0 8px;
    font-size: 10px;
  }

  .form-card {
    padding: 12px 14px 14px;
  }

  .form-title {
    margin-bottom: 5px;
  }

  .form-title-art {
    width: min(284px, 84%);
  }

  form {
    gap: 5px;
  }

  .field {
    gap: 1px;
  }

  .label-art {
    height: 22px;
  }

  input,
  select {
    height: 42px;
  }

  .placeholder-art {
    height: 22px;
  }

  .field-error,
  .form-status {
    min-height: 13px;
    font-size: 13px;
  }

  .submit-button,
  .secondary-button {
    min-height: 54px;
  }

  .status-preview {
    width: min(390px, 94%);
  }
}
