:root {
  --ink: #14334a;
  --muted: #58758b;
  --green: #0da574;
  --card: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.62);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: #dcedf4;
  font-family: "Manrope", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

.page-shell {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  place-items: center;
  padding: 28px clamp(20px, 4vw, 60px) 24px;
  background:
    radial-gradient(circle at 16% 22%, rgba(255, 191, 225, 0.82), transparent 24rem),
    radial-gradient(circle at 84% 18%, rgba(150, 228, 255, 0.9), transparent 27rem),
    radial-gradient(circle at 56% 83%, rgba(165, 255, 219, 0.74), transparent 28rem),
    linear-gradient(135deg, #eefaff 0%, #dce8ff 45%, #f8efff 100%);
  background-size: auto;
}

.noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}

.ambient {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 10px 12px 30px rgba(255, 255, 255, 0.42),
    inset -12px -14px 28px rgba(71, 150, 194, 0.09),
    0 25px 70px rgba(50, 123, 165, 0.12);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.ambient-one {
  width: 640px;
  height: 640px;
  left: -350px;
  top: 22%;
  animation: drift 9s ease-in-out infinite alternate;
}

.ambient-two {
  width: 420px;
  height: 420px;
  right: -190px;
  bottom: -170px;
  animation: drift 11s ease-in-out 1s infinite alternate-reverse;
}

.site-header {
  width: min(1180px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #24465c;
  text-decoration: none;
  letter-spacing: 0.19em;
  font-size: 11px;
  font-weight: 800;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #ffffff;
  background: linear-gradient(145deg, #21c58e, #0d8fbc);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.55),
    0 8px 22px rgba(22, 150, 145, 0.2);
  letter-spacing: 0;
  font-weight: 900;
}

.connection {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #4c7185;
  font: 500 10px/1 "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(13, 165, 116, 0.1), 0 0 16px rgba(13, 165, 116, 0.5);
  animation: pulse 2s ease-out infinite;
}

.scan-card {
  position: relative;
  width: min(480px, 100%);
  margin: 50px 0 30px;
  padding: 44px 42px 32px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), transparent 42%),
    var(--card);
  box-shadow:
    0 35px 90px rgba(53, 104, 136, 0.2),
    0 10px 30px rgba(84, 138, 167, 0.12),
    inset 1px 1px 0 rgba(255, 255, 255, 0.92),
    inset -1px -1px 0 rgba(100, 166, 192, 0.12);
  backdrop-filter: blur(30px) saturate(145%);
  animation: card-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.scan-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(255, 255, 255, 0.9),
    transparent 35%
  );
}

.top-line {
  position: absolute;
  width: 34%;
  height: 1px;
  left: 50%;
  top: -1px;
  translate: -50%;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  box-shadow: 0 0 18px var(--green);
}

.document-visual {
  position: relative;
  width: 114px;
  height: 125px;
  margin: 0 auto 26px;
  display: grid;
  place-items: center;
}

.document-halo {
  position: absolute;
  inset: 7px -8px -8px;
  border-radius: 50%;
  background: rgba(27, 188, 155, 0.18);
  filter: blur(15px);
  animation: halo 2.2s ease-in-out infinite;
}

.document-sheet {
  width: 72px;
  height: 91px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(210, 236, 245, 0.64));
  box-shadow:
    0 16px 30px rgba(53, 107, 137, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.9);
  transition: 450ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.is-ready .document-sheet {
  border-color: rgba(115, 246, 181, 0.5);
  transform: translateY(-2px) scale(1.025);
}

.file-type {
  position: absolute;
  top: 14px;
  left: 13px;
  color: #567689;
  font: 600 8px/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
}

.paper-line {
  position: absolute;
  left: 13px;
  height: 3px;
  border-radius: 3px;
  background: rgba(76, 117, 139, 0.15);
}

.line-one {
  top: 36px;
  width: 42px;
}

.line-two {
  top: 47px;
  width: 35px;
}

.line-three {
  top: 58px;
  width: 39px;
}

.scanner-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  top: 15%;
  background: #80ffbd;
  box-shadow:
    0 0 8px 2px rgba(115, 246, 181, 0.8),
    0 0 24px 7px rgba(62, 224, 144, 0.18);
  animation: scan 1.7s cubic-bezier(0.65, 0, 0.35, 1) infinite alternate;
}

.status-orbit {
  position: absolute;
  z-index: 2;
  width: 34px;
  height: 34px;
  right: 2px;
  bottom: 5px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: rgba(239, 255, 250, 0.84);
  box-shadow: 0 8px 20px rgba(49, 115, 139, 0.18);
}

.orbit-dot {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(115, 246, 181, 0.17);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.check {
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
  animation: check-in 450ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.copy {
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font: 600 10px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 390px;
  margin: 0 auto;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.13;
  letter-spacing: -0.045em;
  font-weight: 800;
  text-wrap: balance;
}

.supporting {
  max-width: 360px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.progress-panel {
  margin-top: 30px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.62);
  transition: 350ms ease;
}

.progress-panel.complete {
  border-color: rgba(13, 165, 116, 0.24);
  background: rgba(226, 255, 243, 0.42);
}

.progress-panel.complete .progress-meta > span {
  color: #126c52;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 11px;
  color: #547286;
  font: 500 10px/1.2 "IBM Plex Mono", monospace;
}

.progress-meta strong {
  color: #264c61;
}

.mini-check {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-right: 5px;
  border-radius: 50%;
  color: #092117;
  background: var(--green);
  font-style: normal;
  font-size: 9px;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(63, 110, 132, 0.1);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #28c97e, #8affc6);
  box-shadow: 0 0 14px rgba(115, 246, 181, 0.5);
  transition: width 180ms cubic-bezier(0.33, 1, 0.68, 1);
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 3px;
  border-bottom: 1px solid var(--line);
}

.file-icon {
  width: 39px;
  height: 43px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(231, 166, 149, 0.19);
  border-radius: 9px;
  color: #f0a18c;
  background: rgba(205, 92, 61, 0.08);
  font: 600 8px/1 "IBM Plex Mono", monospace;
}

.file-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.file-info strong {
  overflow: hidden;
  color: #274b60;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-info span {
  color: #728b9a;
  font: 500 9px/1.2 "IBM Plex Mono", monospace;
}

.file-state {
  margin-left: auto;
  color: var(--green);
  font: 600 9px/1 "IBM Plex Mono", monospace;
  opacity: 0;
  transform: translateX(6px);
  transition: 300ms ease;
}

.file-state.visible {
  opacity: 1;
  transform: translateX(0);
}

.download-button {
  width: 100%;
  height: 50px;
  margin-top: 14px;
  padding: 0 18px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 0;
  border-radius: 13px;
  color: #05120d;
  background: linear-gradient(110deg, #62e9a6, #91f7c6);
  box-shadow: 0 12px 30px rgba(50, 210, 137, 0.2);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 250ms ease;
}

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

.download-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 38px rgba(50, 210, 137, 0.27);
}

.download-button:active {
  transform: scale(0.985);
}

.download-button i {
  position: absolute;
  right: 18px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: rgba(2, 15, 9, 0.1);
  font-style: normal;
  font-size: 16px;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
  color: #698394;
  font-size: 9px;
}

.lock-shape {
  width: 9px;
  height: 8px;
  position: relative;
  border: 1px solid #698394;
  border-radius: 2px;
}

.lock-shape::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  left: 1px;
  top: -6px;
  border: 1px solid #698394;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

footer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #587688;
  font: 500 9px/1.2 "IBM Plex Mono", monospace;
}

footer strong {
  color: #385c70;
}

footer span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #587688;
}

.post-scan-notice {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition:
    max-height 450ms ease,
    margin 450ms ease,
    opacity 300ms ease,
    transform 450ms ease;
}

.post-scan-notice.visible {
  max-height: 150px;
  margin: 22px 2px 0;
  opacity: 1;
  transform: translateY(0);
}

.install-message {
  margin: 0;
  color: #183f55;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.retry-message {
  margin: 8px 0 0;
  color: #607f91;
  font-size: 11px;
  line-height: 1.6;
}

@keyframes scan {
  from {
    top: 17%;
  }
  to {
    top: 82%;
  }
}

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

@keyframes pulse {
  50% {
    box-shadow:
      0 0 0 8px rgba(115, 246, 181, 0),
      0 0 18px var(--green);
  }
}

@keyframes halo {
  50% {
    transform: scale(1.08);
    opacity: 0.65;
  }
}

@keyframes drift {
  to {
    transform: translate3d(30px, -18px, 0) scale(1.04);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes check-in {
  from {
    opacity: 0;
    transform: scale(0.45) rotate(-18deg);
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 22px 16px 18px;
  }

  .scan-card {
    margin-top: 30px;
    padding: 36px 22px 26px;
    border-radius: 24px;
  }

  .connection {
    font-size: 8px;
  }

  footer {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
