:root {
  color-scheme: light dark;
  --paper: #f4f2ee;
  --surface: #fbfaf7;
  --ink: #342f2c;
  --muted: #716963;
  --line: #d7d0c8;
  --accent: #9c4356;
  --accent-ink: #fffaf7;
  --focus: #8d3348;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: "Trebuchet MS", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.page {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding: 28px clamp(20px, 5vw, 72px) 22px;
}

.topline,
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.topline-note,
.page-footer {
  color: var(--muted);
  font-size: 12px;
}

.welcome {
  width: min(100%, 560px);
  margin: auto;
  padding: clamp(32px, 7vw, 68px) clamp(24px, 7vw, 68px) clamp(36px, 7vw, 64px);
  border: 1px solid var(--line);
  border-radius: 4px 4px 3px 4px;
  background: var(--surface);
  box-shadow: 7px 8px 0 color-mix(in srgb, var(--line) 54%, transparent);
  text-align: center;
  animation: arrive 650ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.paper-mark {
  display: flex;
  width: 140px;
  align-items: center;
  gap: 12px;
  margin: 0 auto 34px;
  color: var(--accent);
}

.mark-line {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.mark-heart {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 12px;
  font-style: italic;
  transform: rotate(-7deg);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 68px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1;
}

.subtitle {
  max-width: 330px;
  margin: 17px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.claim-form {
  margin: 46px auto 0;
  text-align: left;
}

.claim-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.input-row input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid #a69e96;
  border-radius: 3px;
  color: var(--ink);
  background: var(--surface);
  font-size: 16px;
}

.input-row input::placeholder {
  color: #716963;
  opacity: 1;
}

.input-row button {
  min-width: 96px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}

.input-row button:hover {
  background: #803549;
}

.input-row button:active {
  transform: translateY(1px);
}

.form-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--accent);
  font-size: 13px;
  line-height: 1.5;
}

.form-message:empty {
  visibility: hidden;
}

.quiet-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 14px;
  font-style: italic;
}

.page-footer {
  min-height: 28px;
}

.footer-mark {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 11px;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #24211f;
    --surface: #2c2825;
    --ink: #f2ebe5;
    --muted: #c0b5ac;
    --line: #514842;
    --accent: #e28a9d;
    --accent-ink: #241719;
    --focus: #f1a5b4;
  }

  .input-row input {
    border-color: #8a7d74;
  }

  .input-row input::placeholder {
    color: #c0b5ac;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 18px 16px 16px;
  }

  .welcome {
    padding: 38px 22px 34px;
  }

  .claim-form {
    margin-top: 36px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .input-row button {
    width: 100%;
  }
}

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