:root {
  color-scheme: light;
  --ink: #101512;
  --muted: #707973;
  --green: #145b42;
  --surface: rgba(255, 255, 255, .82);
  --line: rgba(16, 21, 18, .1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, .95), transparent 38%),
    #f2f0ea;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .48;
}

body::before {
  top: -24vw;
  right: -14vw;
  background: radial-gradient(circle, rgba(132, 180, 159, .26), transparent 68%);
}

body::after {
  bottom: -28vw;
  left: -18vw;
  background: radial-gradient(circle, rgba(220, 203, 168, .32), transparent 68%);
}

.payment-shell {
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: 0 32px 90px rgba(30, 43, 35, .12), inset 0 0 0 1px var(--line);
  backdrop-filter: blur(24px);
  animation: shell-enter 240ms var(--ease-out) both;
}

.brand-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.brand-lock {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
}

.brand-lock::before {
  content: "";
  width: 7px;
  height: 6px;
  margin-bottom: -2px;
  border: 1.5px solid white;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.brand-lock span {
  position: absolute;
  width: 9px;
  height: 7px;
  margin-top: 6px;
  border-radius: 2px;
  background: white;
}

.brand-name { font-size: 14px; font-weight: 680; letter-spacing: -.01em; }

.status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #24a36c;
  box-shadow: 0 0 0 4px rgba(36, 163, 108, .1);
}

.gateway-intro,
.handoff {
  padding: 54px 38px 50px;
  text-align: center;
}

.gateway-mark,
.orbital-loader {
  width: 76px;
  height: 76px;
  margin: 0 auto 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(20, 91, 66, .07);
  color: var(--green);
}

.gateway-mark span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(20, 91, 66, .22);
  border-radius: 50%;
  font-size: 17px;
  font-weight: 700;
}

.orbital-loader { position: relative; }

.loader-core {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 8px 24px rgba(20, 91, 66, .2);
  animation: core-pulse 1.15s ease-in-out infinite alternate;
}

.loader-orbit {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(20, 91, 66, .16);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: orbit 900ms linear infinite;
}

.loader-orbit::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.kicker {
  color: var(--green);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1 {
  margin: 13px 0 14px;
  font: 400 clamp(36px, 8vw, 50px)/1.03 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}

p {
  margin: 0 auto;
  max-width: 350px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.progress {
  position: relative;
  height: 3px;
  margin: 36px auto 0;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(20, 91, 66, .1);
}

.progress span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--green);
  transform: translateX(-100%);
  animation: progress 1.05s var(--ease-out) infinite;
}

.retry {
  width: 100%;
  min-height: 48px;
  margin: 22px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  font: 650 14px/1 inherit;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 180ms;
}

.retry.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.retry:focus-visible { outline: 3px solid rgba(20, 91, 66, .26); outline-offset: 3px; }

.trust-row,
.payment-meta {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border-top: 1px solid var(--line);
  color: #8a918c;
  font-size: 11px;
  font-weight: 620;
  letter-spacing: .02em;
}

.payment-meta { justify-content: space-between; }
.trust-divider { width: 3px; height: 3px; border-radius: 50%; background: #b8bdb9; }

@keyframes shell-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes orbit { to { transform: rotate(360deg); } }

@keyframes core-pulse {
  from { opacity: .72; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes progress {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}

@media (max-width: 520px) {
  body { padding: 14px; }
  .payment-shell { border-radius: 24px; }
  .gateway-intro, .handoff { padding: 44px 24px 40px; }
  h1 { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .payment-shell,
  .loader-core,
  .loader-orbit,
  .progress span { animation: none; }
  .progress span { transform: none; opacity: .8; }
  .retry { transition: none; }
}
