@import url('/assets/fonts/cargan/cargan.css');

:root {
  --bg: #e2e4e8;
  --ink: #13213e;
  --muted: #33486b;
  --card: #ffffff;
  --card-border: rgba(19, 33, 62, 0.18);
  --action: #6b7280;
  --action-hover: #525a68;
  --success: #0b7a52;
  --danger: #b42318;
  --warning: #9a6700;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Cargan", "Segoe UI", sans-serif;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -14vmax;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: normal;
}

body::before {
  background:
    radial-gradient(50% 42% at 13% 20%, rgba(255, 42, 79, 0.78) 0 36%, rgba(255, 42, 79, 0) 100%),
    radial-gradient(46% 40% at 64% 26%, rgba(242, 47, 180, 0.74) 0 34%, rgba(242, 47, 180, 0) 100%),
    radial-gradient(46% 40% at 83% 74%, rgba(90, 29, 242, 0.72) 0 36%, rgba(90, 29, 242, 0) 100%),
    radial-gradient(34% 30% at 46% 52%, rgba(31, 63, 159, 0.64) 0 30%, rgba(31, 63, 159, 0) 100%);
  filter: blur(54px) saturate(178%);
  animation: fsinf-fade-a 12s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

body::after {
  background:
    radial-gradient(48% 42% at 80% 22%, rgba(21, 185, 200, 0.78) 0 34%, rgba(21, 185, 200, 0) 100%),
    radial-gradient(44% 37% at 27% 72%, rgba(8, 221, 86, 0.7) 0 34%, rgba(8, 221, 86, 0) 100%),
    radial-gradient(44% 38% at 60% 56%, rgba(31, 63, 159, 0.64) 0 36%, rgba(31, 63, 159, 0) 100%),
    radial-gradient(34% 30% at 52% 42%, rgba(255, 42, 79, 0.6) 0 30%, rgba(255, 42, 79, 0) 100%);
  filter: blur(58px) saturate(186%);
  animation: fsinf-fade-b 15s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.bg-blobfield,
.bg-blobfield::before,
.bg-blobfield::after {
  position: fixed;
  inset: -16vmax;
  pointer-events: none;
  z-index: 0;
  content: "";
  mix-blend-mode: soft-light;
}

.bg-blobfield {
  background:
    radial-gradient(40% 34% at 12% 50%, rgba(242, 47, 180, 0.58) 0 34%, rgba(242, 47, 180, 0) 100%),
    radial-gradient(38% 34% at 86% 48%, rgba(255, 42, 79, 0.62) 0 34%, rgba(255, 42, 79, 0) 100%);
  filter: blur(64px) saturate(168%);
  animation: fsinf-fade-c 13s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.bg-blobfield::before {
  background:
    radial-gradient(46% 40% at 50% 14%, rgba(21, 185, 200, 0.68) 0 32%, rgba(21, 185, 200, 0) 100%),
    radial-gradient(46% 38% at 44% 84%, rgba(90, 29, 242, 0.66) 0 34%, rgba(90, 29, 242, 0) 100%),
    radial-gradient(30% 26% at 74% 36%, rgba(255, 42, 79, 0.48) 0 30%, rgba(255, 42, 79, 0) 100%);
  filter: blur(68px) saturate(176%);
  animation: fsinf-fade-d 17s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.bg-blobfield::after {
  background:
    radial-gradient(32% 28% at 24% 22%, rgba(255, 42, 79, 0.74) 0 30%, rgba(255, 42, 79, 0) 100%),
    radial-gradient(34% 28% at 76% 78%, rgba(8, 221, 86, 0.66) 0 30%, rgba(8, 221, 86, 0) 100%),
    radial-gradient(28% 25% at 70% 30%, rgba(31, 63, 159, 0.76) 0 32%, rgba(31, 63, 159, 0) 100%),
    radial-gradient(24% 22% at 52% 62%, rgba(242, 47, 180, 0.54) 0 28%, rgba(242, 47, 180, 0) 100%);
  filter: blur(52px) saturate(196%);
  animation: fsinf-fade-e 10s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.page-wrap {
  width: min(920px, 100%);
  position: relative;
  z-index: 1;
}

.dialog-logo {
  width: clamp(120px, 16vw, 180px);
  height: auto;
  display: block;
  margin: 8px 0 30px;
}

.logo-reset-inline {
  margin: 0;
  display: inline-block;
}

.logo-reset-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(16, 32, 58, 0.14);
  backdrop-filter: blur(8px) saturate(118%);
}

.hero h1,
.narrow h1 {
  margin: 6px 0 10px;
  font-family: "Cargan", "Segoe UI", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  line-height: 1.16;
}

.narrow {
  max-width: none;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.lead {
  margin: 0 0 18px;
  color: #253a5d;
  max-width: 66ch;
  line-height: 1.5;
}

.intro-points {
  margin: 0 0 18px;
  padding-left: 20px;
  max-width: 66ch;
  display: grid;
  gap: 8px;
}

.intro-points li {
  color: #253a5d;
  line-height: 1.45;
}

.steps {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 18px 0;
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.steps article {
  background: rgba(246, 248, 252, 0.84);
  border: 1px solid rgba(56, 72, 108, 0.16);
  border-radius: 14px;
  padding: 14px;
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.info-block {
  display: grid;
  gap: 10px;
  margin: 14px 0 6px;
}

.info-block p {
  margin: 0;
}

.arrow-call {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #24395d;
}

.actions {
  margin-top: 18px;
}

.success-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-nav {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

.legal-nav a {
  color: #f8fbff;
  text-decoration: none;
  font-size: 0.92rem;
}

.legal-nav a:hover {
  text-decoration: underline;
}

.btn {
  appearance: none;
  border: 0;
  background: var(--action);
  color: #fff;
  font: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 11px;
  padding: 0 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
  width: auto;
  max-width: 100%;
}

.btn:hover {
  background: var(--action-hover);
  transform: translateY(-1px);
}

.btn.secondary {
  background: #334155;
}

.form {
  display: grid;
  gap: 9px;
}

.form .btn,
.actions .btn {
  justify-self: start;
}

.form label {
  margin-top: 2px;
  font-size: 0.94rem;
}

.form input {
  border: 1px solid #c8d2e4;
  border-radius: 11px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

.meta {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.meta div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px dashed #cdd7e8;
}

.meta dt {
  color: var(--muted);
}

.meta dd {
  margin: 0;
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 14px;
}

.flash {
  border-radius: 11px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 1px solid;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(16, 32, 58, 0.12);
}

.flash-success {
  border-color: #8ad6b9;
  color: var(--success);
  background: #effbf5;
}

.flash-error {
  border-color: #f1a8a2;
  color: #7a1f18;
  background: #fff1f0;
}

.flash-info {
  border-color: #e6cd8a;
  color: var(--warning);
  background: #fff9eb;
}

@keyframes fsinf-fade-a {
  0% {
    transform: translate3d(-3%, -4%, 0) scale(1) rotate(0deg);
    opacity: 0.95;
  }
  33% {
    transform: translate3d(4%, 2%, 0) scale(1.12) rotate(4deg);
    opacity: 1;
  }
  66% {
    transform: translate3d(-2%, 4%, 0) scale(0.94) rotate(-3deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(3%, -2%, 0) scale(1.06) rotate(2deg);
    opacity: 0.92;
  }
}

@keyframes fsinf-fade-b {
  0% {
    transform: translate3d(3%, -3%, 0) scale(1.1) rotate(0deg);
    opacity: 0.92;
  }
  33% {
    transform: translate3d(-4%, 2%, 0) scale(0.9) rotate(-4deg);
    opacity: 1;
  }
  66% {
    transform: translate3d(2%, 4%, 0) scale(1.12) rotate(3deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(-2%, -4%, 0) scale(0.95) rotate(-2deg);
    opacity: 0.9;
  }
}

@keyframes fsinf-fade-c {
  0% {
    transform: translate3d(2%, 0, 0) scale(1.02) rotate(0deg);
    opacity: 0.96;
  }
  50% {
    transform: translate3d(-3%, 2%, 0) scale(1.16) rotate(5deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(3%, -2%, 0) scale(0.92) rotate(-4deg);
    opacity: 0.94;
  }
}

@keyframes fsinf-fade-d {
  0% {
    transform: translate3d(-2%, 3%, 0) scale(1.04) rotate(0deg);
    opacity: 0.92;
  }
  50% {
    transform: translate3d(4%, -2%, 0) scale(0.9) rotate(-5deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(-3%, -3%, 0) scale(1.1) rotate(4deg);
    opacity: 0.95;
  }
}

@keyframes fsinf-fade-e {
  0% {
    transform: translate3d(3%, -2%, 0) scale(1.1) rotate(0deg);
    opacity: 0.94;
  }
  33% {
    transform: translate3d(-4%, 3%, 0) scale(0.92) rotate(-6deg);
    opacity: 1;
  }
  66% {
    transform: translate3d(2%, 4%, 0) scale(1.14) rotate(5deg);
    opacity: 0.98;
  }
  100% {
    transform: translate3d(-3%, -3%, 0) scale(0.9) rotate(-3deg);
    opacity: 0.94;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-blobfield,
  .bg-blobfield::before,
  .bg-blobfield::after,
  body::before,
  body::after {
    animation: none;
  }
}

@media (max-width: 620px) {
  body {
    padding: 12px;
  }

  .dialog-logo {
    width: clamp(112px, 32vw, 150px);
    margin: 4px 0 20px;
  }

  .card {
    padding: 18px;
  }

  body::before,
  body::after {
    filter: blur(56px);
    animation-duration: 28s;
  }

  .bg-blobfield,
  .bg-blobfield::before,
  .bg-blobfield::after {
    filter: blur(58px);
    animation-duration: 30s;
  }

  .meta div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
