/* KYC proof page styles. Design tokens mirror Figma: Anchorpoint_HKDAP. */

/* Satoshi is a variable font with a 300-900 weight axis, so one file covers
   every weight the page uses (400/500/700/900). The range in font-weight is
   what tells the browser to vary the axis instead of synthesising bold. */
@font-face {
  font-family: "Satoshi Variable";
  src: url("assets/Satoshi-Variable.ttf") format("truetype-variations");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colour tokens (Figma: Anchorpoint_HKDAP) */
  --color-white: #ffffff;
  --color-gray-25: #fcfcfc;
  --color-gray-50: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d6d6d6;
  --color-gray-500: #737373;
  --color-gray-600: #525252;
  --color-gray-700: #424242;
  --color-gray-800: #292929;
  --color-gray-900: #141414;
  --color-primary-500: #57A7E0;
  --color-primary-700: #3977A6;
  --color-success-50: #ecfdf3;
  --color-success-700: #027a48;

  /* Type scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --display-xs: 24px;
  --display-sm: 30px;
  --display-md: 36px;
  --display-lg: 48px;
  --line-tight: 1.3;

  /* Radii */
  --radius-button: 8px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 16px;

  /* Elevation */
  --shadow-xs: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(16, 24, 40, 0.1), 0 1px 2px 0 rgba(16, 24, 40, 0.06);

  --font-sans: "Satoshi Variable", "Satoshi", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* A `display` rule would otherwise beat the hidden attribute's UA default. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--line-tight);
  color: var(--color-gray-900);
  background: var(--color-gray-25);
  -webkit-font-smoothing: antialiased;
}

p {
  margin: 0;
}

/* ---------- Browser chrome (design mockup bar) ---------- */
.browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--color-gray-800);
  overflow: hidden;
}

.browser-bar__group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.browser-bar__url {
  font-size: var(--text-sm);
  color: var(--color-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-bar__icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
  background: currentColor;
  color: var(--color-white);
}

/* Chrome glyphs are drawn as masks so they inherit the bar's colour. */
.browser-bar__icon--close {
  -webkit-mask: var(--icon-close) center / contain no-repeat;
  mask: var(--icon-close) center / contain no-repeat;
}

.browser-bar__icon--external {
  -webkit-mask: var(--icon-external) center / contain no-repeat;
  mask: var(--icon-external) center / contain no-repeat;
}

.browser-bar__icon--menu {
  -webkit-mask: var(--icon-menu) center / contain no-repeat;
  mask: var(--icon-menu) center / contain no-repeat;
}

:root {
  --icon-close: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"><path d="M18 6 6 18M6 6l12 12"/></svg>');
  --icon-external: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 9V3h-6M10 14 20.1 3.9M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/></svg>');
  --icon-menu: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><circle cx="12" cy="5" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="12" cy="19" r="2"/></svg>');
}

/* ---------- Site header ---------- */
.site-header {
  display: flex;
  align-items: center;
  height: 80px;
  padding: 0 80px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-100);
}

/* 160x36 lockup: the mark and wordmark have different intrinsic heights,
 so each is sized from the Figma box rather than stretched to fill. */
.site-header__logo {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 160px;
  height: 36px;
}

.site-header__logo img {
  display: block;
  width: auto;
}

.site-header__logo .logo-mark {
  height: 33.39px;
}

.site-header__logo .logo-wordmark {
  height: 17.44px;
}

/* ---------- Proof page layout ---------- */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px 80px;
}

.page__column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 640px;
}

.page__title {
  font-size: var(--display-sm);
  font-weight: 700;
  color: var(--color-gray-900);
}

/* ---------- Details card ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.card__divider {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--color-gray-200);
}

.row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row--inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.row--split {
  display: flex;
  flex-direction: row;
  gap: 24px;
}

.row--split>.row {
  flex: 1 1 0;
  min-width: 0;
}

.row__label {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
}

.row__value {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gray-900);
}

/* Copyable value: text truncates, button stays pinned to the right. */
.copyable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.copyable--wrap {
  align-items: flex-start;
}

.copyable__value {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copyable--wrap .copyable__value {
  white-space: normal;
  overflow-wrap: anywhere;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 6px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-gray-100);
  cursor: pointer;
  transition: background-color 120ms ease;
}

.copy-button:hover {
  background: var(--color-gray-200);
}

.copy-button:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

.copy-button img {
  display: block;
  width: 12px;
  height: 12px;
}

.copy-button .copy-button__done {
  display: none;
}

.copy-button.is-copied .copy-button__idle {
  display: none;
}

.copy-button.is-copied .copy-button__done {
  display: block;
}

/* ---------- Verified badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-success-50);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-success-700);
  mix-blend-mode: multiply;
}

/* Any status other than "verified" drops the success colouring. */
.badge--muted {
  background: var(--color-gray-100);
  color: var(--color-gray-600);
}

.badge img {
  display: block;
  width: 12px;
  height: 12px;
}

/* ---------- Privacy notice ---------- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
}

.notice img {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
}

.notice p {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
}

/* ---------- Regulator panel ---------- */
.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
}

.panel__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-gray-900);
}

.panel__body {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
}

.link {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary-500);
  text-decoration: none;
  border-radius: var(--radius-button);
}

.link:hover {
  text-decoration: underline;
}

.link:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* ---------- 404 state ---------- */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 96px 24px;
  background: var(--color-white);
}

.error-page__container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: 100%;
  max-width: 1280px;
}

.error-page__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
  flex: 1 1 0;
  min-width: 0;
  padding-right: 32px;
}

.error-page__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.error-page__heading-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.error-page__eyebrow {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-primary-700);
}

.error-page__heading {
  font-size: var(--display-lg);
  font-weight: 900;
  color: var(--color-gray-900);
}

.error-page__support {
  max-width: 480px;
  font-size: var(--text-xl);
  color: var(--color-gray-600);
}

.error-page__actions {
  display: flex;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  box-shadow: var(--shadow-xs);
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button--primary {
  background: var(--color-primary-700);
  border-color: var(--color-primary-700);
  color: var(--color-white);
}

.button--primary:hover {
  filter: brightness(0.94);
}

.button--secondary {
  background: var(--color-white);
  border-color: var(--color-gray-300);
  color: var(--color-gray-700);
}

.button--secondary:hover {
  background: var(--color-gray-50);
}

.button:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* Illustration: parts are positioned off a 480x366.5 box and every
 dimension is multiplied by --s, so mobile just changes that one value. */
.illustration {
  --s: 1;
  position: relative;
  flex: none;
  width: calc(480px * var(--s));
  height: calc(366.545px * var(--s));
}

.illustration__figure {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  height: 640px;
}

.illustration img {
  position: absolute;
  display: block;
}

.illustration__bg {
  left: calc(65.45px * var(--s));
  top: calc(17.45px * var(--s));
  width: calc(349.09px * var(--s));
  height: calc(349.09px * var(--s));
}

.illustration__box {
  left: calc(100.36px * var(--s));
  top: calc(-29.11px * var(--s));
  width: calc(366.55px * var(--s));
  height: calc(387.13px * var(--s));
}

.illustration__dot-1 {
  left: calc(39.27px * var(--s));
  top: calc(43.64px * var(--s));
  width: calc(34.91px * var(--s));
  height: calc(34.91px * var(--s));
}

.illustration__dot-2 {
  left: calc(418.91px * var(--s));
  top: calc(279.27px * var(--s));
  width: calc(26.18px * var(--s));
  height: calc(26.18px * var(--s));
}

.illustration__dot-3 {
  left: calc(32.73px * var(--s));
  top: calc(296.73px * var(--s));
  width: calc(43.64px * var(--s));
  height: calc(43.64px * var(--s));
}

.illustration__dot-4 {
  left: calc(436.36px * var(--s));
  top: calc(96px * var(--s));
  width: calc(43.64px * var(--s));
  height: calc(43.64px * var(--s));
}

.illustration__dot-5 {
  left: calc(401.45px * var(--s));
  top: calc(26.18px * var(--s));
  width: calc(30.55px * var(--s));
  height: calc(30.55px * var(--s));
}

.illustration__badge {
  position: absolute;
  left: calc(178.91px * var(--s));
  top: calc(226.91px * var(--s));
  width: calc(122.18px * var(--s));
  height: calc(122.18px * var(--s));
  border-radius: calc(36px * var(--s));
  background: rgba(52, 64, 84, 0.4);
  backdrop-filter: blur(calc(8.73px * var(--s)));
  -webkit-backdrop-filter: blur(calc(8.73px * var(--s)));
}

.illustration__badge img {
  position: absolute;
  left: calc(30.55px * var(--s));
  top: calc(30.55px * var(--s));
  width: calc(61.09px * var(--s));
  height: calc(61.09px * var(--s));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Loading skeleton ---------- */
.card--loading {
  gap: 28px;
}

.skeleton {
  border-radius: 4px;
  background: linear-gradient(90deg,
      var(--color-gray-100) 25%,
      var(--color-gray-200) 37%,
      var(--color-gray-100) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton--row {
  height: 40px;
}

@keyframes skeleton-shimmer {
  from {
    background-position: 100% 50%;
  }

  to {
    background-position: 0 50%;
  }
}

/* Respect a reduced-motion preference: keep the placeholder, drop the shimmer. */
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .browser-bar {
    padding: 17px 12px;
  }

  .browser-bar__url {
    font-size: var(--text-sm);
  }

  .site-header {
    height: 72px;
    padding: 0 16px;
  }

  .site-header__logo {
    width: 142px;
    height: 32px;
    gap: 11px;
  }

  .site-header__logo .logo-mark {
    height: 29.7px;
  }

  .site-header__logo .logo-wordmark {
    height: 15.5px;
  }

  .page {
    padding: 16px;
  }

  .page__column {
    gap: 16px;
  }

  .page__title {
    font-size: var(--display-xs);
    padding: 8px 0;
  }

  .card {
    gap: 8px;
    padding: 16px;
    border-radius: var(--radius-lg);
  }

  .row {
    gap: 4px;
  }

  .row__label,
  .row__value,
  .copyable__value {
    font-size: var(--text-xs);
  }

  .row__value,
  .copyable__value {
    font-weight: 400;
  }

  .row--split {
    gap: 16px;
  }

  .notice {
    gap: 10px;
    padding: 12px;
    border: 0;
    border-radius: var(--radius-md);
  }

  .notice img {
    width: 16px;
    height: 16px;
  }

  .notice p {
    font-size: var(--text-xs);
  }

  .panel {
    gap: 8px;
    padding: 16px;
    border-radius: var(--radius-lg);
  }

  .panel__body {
    font-size: var(--text-xs);
  }

  .link {
    font-size: var(--text-xs);
    margin-top: 8px;
  }

  /* 404: illustration stacks above the copy, buttons go full-width. */
  .error-page {
    gap: 64px;
    padding: 64px 0;
    align-items: stretch;
  }

  .error-page__container {
    flex-direction: column;
    padding: 0 16px;
  }

  .error-page__content {
    gap: 32px;
    padding-right: 0;
    width: 100%;
    order: 2;
  }

  .error-page__text {
    gap: 16px;
  }

  .error-page__heading {
    font-size: var(--display-md);
    line-height: 44px;
  }

  .error-page__support {
    font-size: var(--text-lg);
    max-width: none;
  }

  .error-page__actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .illustration__figure {
    order: 1;
    height: auto;
    width: 100%;
    justify-content: flex-start;
  }

  /* Same artwork at the 152x124 mobile footprint. */
  .illustration {
    --s: 0.3167;
  }
}
