:root {
  --ink: #102a33;
  --teal: #0f766e;
  --teal-soft: #5eead4;
  --paper: #f7f4ef;
  --muted: #6b7280;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(1200px 700px at 20% -10%, #d9f6f1 0%, transparent 55%),
    radial-gradient(900px 600px at 110% 20%, #ffe8d6 0%, transparent 50%),
    linear-gradient(160deg, #fbfaf7, #eef2f0 60%, #e7ecea);
  color: var(--ink);
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.glow {
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.22), transparent 65%);
  filter: blur(8px);
  animation: pulse 2.8s ease-in-out infinite;
}

.card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 2rem 1.5rem 1.75rem;
  border-radius: 24px;
  background: color-mix(in srgb, white 88%, var(--paper));
  border: 1px solid rgba(16, 42, 51, 0.08);
  box-shadow:
    0 1px 2px rgba(16, 42, 51, 0.05),
    0 24px 48px rgba(16, 42, 51, 0.1);
  text-align: center;
}

.seal {
  position: relative;
  margin: 0 auto 1.1rem;
  width: min(280px, 100%);
}

.sig {
  width: 100%;
  height: auto;
  display: block;
}

.sig__stroke {
  stroke: var(--teal);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: draw 1.25s ease-out forwards;
}

.sig__stroke--soft {
  stroke: color-mix(in srgb, var(--teal) 45%, #94a3b8);
  stroke-width: 1.8;
  animation-delay: 0.15s;
}

.sig__base {
  stroke: #d4d4d8;
  stroke-width: 1.2;
  stroke-dasharray: 4 5;
}

.check {
  position: absolute;
  right: 0.2rem;
  bottom: 0.15rem;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.22);
  transform: scale(0.4);
  opacity: 0;
  animation: pop 0.55s cubic-bezier(0.2, 1.4, 0.3, 1) 1.05s forwards;
}

.check svg {
  width: 2.2rem;
  height: 2.2rem;
}

.check__ring {
  fill: none;
  stroke: color-mix(in srgb, var(--teal) 25%, white);
  stroke-width: 3;
}

.check__mark {
  fill: none;
  stroke: var(--teal);
  stroke-width: 4;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw 0.45s ease-out 1.2s forwards;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.stage[data-ok="false"] .sig__stroke {
  stroke: #b45309;
}

.stage[data-ok="false"] .check__mark {
  stroke: #b45309;
}

.stage[data-ok="false"] .glow {
  background: radial-gradient(circle, rgba(180, 83, 9, 0.2), transparent 65%);
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pop {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sig__stroke,
  .check,
  .check__mark,
  .glow {
    animation: none !important;
  }
  .sig__stroke,
  .check__mark {
    stroke-dashoffset: 0;
  }
  .check {
    opacity: 1;
    transform: scale(1);
  }
}
