:root {
  color: #17362f;
  background: #f5f3ec;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgb(239 177 98 / 18%), transparent 35rem), #f5f3ec;
}

button,
input {
  font: inherit;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, 68rem);
  margin: 0 auto;
  padding: 1.25rem 0;
}

.brand {
  color: #17362f;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

main {
  width: min(100% - 2rem, 38rem);
  margin: clamp(1.5rem, 8vh, 5rem) auto 4rem;
  outline: none;
}

.card {
  min-width: 0;
  padding: clamp(1.4rem, 5vw, 2.5rem);
  border: 1px solid rgb(23 54 47 / 10%);
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 1.5rem 4rem rgb(23 54 47 / 9%);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #9b5d18;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

h2 {
  margin: 0;
  font-size: clamp(1.55rem, 6vw, 2.2rem);
  letter-spacing: -0.035em;
}

.lede {
  margin: 1rem 0 1.75rem;
  color: #4d625d;
  line-height: 1.55;
}

.stack {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  font-weight: 700;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #9baba7;
  border-radius: 0.7rem;
  color: #17362f;
  background: white;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #f1ae54;
  outline-offset: 2px;
}

.primary,
.secondary,
.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.7rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  border: 1px solid #17362f;
  color: white;
  background: #17362f;
}

.secondary,
.google-button {
  border: 1px solid #9baba7;
  color: #17362f;
  background: white;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.text-button,
.inline-link {
  padding: 0;
  border: 0;
  color: #315f55;
  background: transparent;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  color: #75847f;
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  height: 1px;
  background: #d8dfdc;
  content: "";
}

.hint,
.error,
.success {
  margin: 0;
  line-height: 1.5;
}

.hint {
  color: #657873;
  font-size: 0.9rem;
}

.error {
  padding: 0.8rem;
  border-radius: 0.6rem;
  color: #7b251d;
  background: #fff0ed;
}

.success {
  color: #246248;
}

.qr-panel {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.2rem;
  border-radius: 0.9rem;
  background: #f8faf9;
}

.qr-panel img {
  display: block;
  width: min(100%, 20rem);
  height: auto;
  aspect-ratio: 1;
}

.qr-url {
  max-width: 100%;
  color: #315f55;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 420px) {
  .site-header,
  main {
    width: min(100% - 1.25rem, 38rem);
  }

  main {
    margin-top: 1rem;
  }

  .actions > * {
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card {
    animation: reveal 220ms ease-out;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(0.4rem);
    }
  }
}
