:root {
  --ink: #172321;
  --muted: #5d6a67;
  --paper: #fffdf5;
  --line: #d8d2bc;
  --vine: #0d766e;
  --sun: #ffd814;
  --danger: #a83220;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 216, 20, 0.24), transparent 26%),
    linear-gradient(145deg, #e8f0e9 0%, #f7f3e7 58%, #dce9e5 100%);
  font-family: "Avenir Next", Avenir, "Gill Sans", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(23, 35, 33, 0.035) 4px
  );
}

.auth-shell {
  position: relative;
  width: min(100%, 460px);
  padding: 52px 48px 42px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow:
    0 24px 70px rgba(30, 53, 48, 0.16),
    8px 8px 0 rgba(13, 118, 110, 0.12);
}

.auth-shell::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  left: -1px;
  height: 8px;
  background: repeating-linear-gradient(
    135deg,
    var(--paper) 0 6px,
    transparent 6px 12px
  );
  transform: translateY(7px);
}

.vine-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 26px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 50% 46% 52% 44%;
  transform: rotate(-5deg);
  box-shadow: 5px 5px 0 var(--vine);
}

.vine-mark span {
  font: 700 34px/1 "Iowan Old Style", Baskerville, Georgia, serif;
  transform: rotate(5deg);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--vine);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font: 600 clamp(28px, 7vw, 38px)/1.08 "Iowan Old Style", Baskerville, Georgia, serif;
  letter-spacing: -0.025em;
}

.message {
  min-height: 48px;
  margin: 22px 0 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.progress {
  display: flex;
  justify-content: center;
  gap: 7px;
  height: 10px;
  margin: 3px 0 28px;
}

.progress span {
  width: 8px;
  height: 8px;
  background: var(--vine);
  border-radius: 50%;
  animation: pulse 1.1s ease-in-out infinite;
}

.progress span:nth-child(2) {
  animation-delay: 0.14s;
}

.progress span:nth-child(3) {
  animation-delay: 0.28s;
}

.privacy-note {
  margin: 0;
  padding-top: 22px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.55;
}

button {
  width: 100%;
  margin-top: 22px;
  padding: 11px 16px;
  color: #fff;
  background: var(--vine);
  border: 1px solid #075b55;
  border-radius: 5px;
  font: 700 14px/1 "Avenir Next", Avenir, "Gill Sans", sans-serif;
  cursor: pointer;
}

button:hover {
  background: #095f59;
}

.auth-shell.error .vine-mark {
  color: #fff;
  background: var(--danger);
  box-shadow: 5px 5px 0 #e3b4a8;
}

.auth-shell.error .message {
  color: var(--danger);
}

.auth-shell.error .progress,
.auth-shell.complete .progress {
  display: none;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (max-width: 520px) {
  .auth-shell {
    padding: 42px 28px 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress span {
    animation: none;
  }
}
