/* CCNDR / CCRNO credential verification — hand-written, brand tokens ported from ccndr.ca */

/* ---------------------------------------------------------------- fonts */
/* Inter — body */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/v1/fonts/inter-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/v1/fonts/inter-latin-ext-400.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/v1/fonts/inter-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/v1/fonts/inter-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/v1/fonts/inter-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/v1/fonts/inter-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Space Grotesk — headings */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/v1/fonts/space-grotesk-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/v1/fonts/space-grotesk-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/v1/fonts/space-grotesk-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/v1/fonts/space-grotesk-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------- tokens */
:root {
  --paper: #f2f1f0;
  --plum: #4c2d61;
  --plum-2: #8851a1;
  --ink: #2b2033;
  --muted: #6f6577;
  --orange: #df6e26;
  --orange-2: #ee852d;
  --orange-d: #c75c1a;
  --linkedin: #0a66c2;
  --linkedin-d: #084d94;
  --card: #ffffff;
  --line: #ece7f0;
  --ok: #2f7d5b;
  --ok-bg: #eaf5ef;
  --ok-line: #c8e3d5;
  --radius: 28px;
  --radius-sm: 16px;
  --radius-xs: 10px;
  --pill: 999px;
  --shadow-card: 0 30px 70px -32px rgba(60, 32, 80, 0.45);
  --shadow-soft: 0 10px 24px -16px rgba(60, 32, 80, 0.5);
  --ring: 0 0 0 4px rgba(136, 81, 161, 0.25);
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--plum);
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin: 0;
}

p {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--plum-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--plum);
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.print-only {
  display: none;
}

.js-only {
  display: none;
}

.js .js-only {
  display: inline-flex;
}

/* ---------------------------------------------------------------- focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--plum-2);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: var(--card);
  color: var(--plum);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.skip-link:focus-visible {
  top: 12px;
}

/* ---------------------------------------------------------------- background */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 55% at 12% 8%, #efe5f6 0%, rgba(239, 229, 246, 0) 60%),
    radial-gradient(65% 60% at 92% 100%, #fcecdd 0%, rgba(252, 236, 221, 0) 60%),
    linear-gradient(135deg, #f3edf7 0%, #f2f1f0 45%, #fbf1e8 100%);
}

.blob {
  position: fixed;
  z-index: -1;
  filter: blur(70px);
  opacity: 0.5;
  border-radius: 50%;
  pointer-events: none;
}

.blob--plum {
  width: 42vw;
  height: 42vw;
  top: -12vw;
  left: -10vw;
  background: #d9c4ec;
}

.blob--orange {
  width: 40vw;
  height: 40vw;
  bottom: -14vw;
  right: -10vw;
  background: #f6cda3;
}

/* ---------------------------------------------------------------- chrome */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 26px) clamp(16px, 4vw, 32px);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-xs);
}

.site-logo {
  width: clamp(148px, 34vw, 190px);
  display: block;
}

.lang-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.86);
  color: var(--plum);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.lang-toggle:hover {
  border-color: var(--plum-2);
  color: var(--plum);
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(8px, 2vw, 20px) clamp(16px, 4vw, 32px) clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.site-footer {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) clamp(22px, 4vw, 34px);
  color: var(--muted);
  text-align: center;
}

.site-footer__line {
  font-size: 12px;
  font-weight: 500;
}

.site-footer__line a {
  color: var(--plum-2);
  font-weight: 600;
  text-decoration: none;
}

.site-footer__line a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- card */
.card {
  width: 100%;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(26px, 5vw, 40px) clamp(20px, 5vw, 38px) clamp(24px, 4vw, 32px);
}

.card--narrow {
  max-width: 520px;
}

.card--center {
  text-align: center;
}

.card__badge {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #6f4690, var(--plum));
  box-shadow: var(--shadow-soft);
}

.card__badge .icon {
  width: 26px;
  height: 26px;
}

.card__title {
  font-size: clamp(22px, 5.2vw, 28px);
  font-weight: 700;
  max-width: 26ch;
  margin: 0 auto;
}

.card--center .lede {
  margin-left: auto;
  margin-right: auto;
}

.lede {
  margin-top: 12px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 15px;
}

.card__action {
  margin-top: 26px;
}

/* ---------------------------------------------------------------- form */
.form {
  margin-top: 26px;
  text-align: left;
}

.form__heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--plum);
  margin-bottom: 12px;
  text-align: center;
}

.field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.field__input {
  width: 100%;
  padding: 15px 18px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.field__input::placeholder {
  color: #b6acbf;
  font-weight: 500;
}

.field__input:hover {
  border-color: #ddd2e6;
}

.field__input:focus {
  outline: none;
  border-color: var(--plum-2);
  box-shadow: var(--ring);
}

.field__input:focus-visible {
  outline: none;
}

.field__hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.btn--block {
  width: 100%;
  margin-top: 20px;
}

.btn--grow {
  flex: 1 1 auto;
}

.btn--icon {
  padding: 14px;
  flex: 0 0 auto;
}

.btn__label {
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--orange-2), var(--orange-d));
  color: #fff;
}

.btn--primary:hover {
  background: var(--orange-d);
  color: #fff;
}

.btn--linkedin {
  background: var(--linkedin);
  color: #fff;
}

.btn--linkedin:hover {
  background: var(--linkedin-d);
  color: #fff;
}

.btn--ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--plum);
}

.btn--ghost:hover {
  border-color: var(--plum-2);
  color: var(--plum);
}

.btn--ghost.is-copied {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok);
}

/* ---------------------------------------------------------------- verified pill */
.cred {
  width: 100%;
  max-width: 760px;
}

.cred__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.link-back {
  font-size: 14px;
  font-weight: 600;
  color: var(--plum-2);
  text-decoration: none;
}

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

.pill-verified {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px 7px 12px;
  border: 1.5px solid var(--ok-line);
  border-radius: var(--pill);
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 14px;
  font-weight: 600;
}

.pill-verified .icon {
  width: 15px;
  height: 15px;
}

.pill-verified__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

/* ---------------------------------------------------------------- credential card */
.cred__card {
  padding: 0;
  overflow: hidden;
}

.hero {
  padding: clamp(20px, 4vw, 40px);
  background:
    radial-gradient(70% 70% at 20% 10%, #f4ecf9 0%, rgba(244, 236, 249, 0) 70%),
    linear-gradient(135deg, #f6f1f9 0%, #f2f1f0 60%, #fbf1e8 100%);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

.hero__frame {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1.414 / 1;
  background: #fff;
  border: 8px solid var(--plum);
  outline: 1px solid var(--plum-2);
  outline-offset: -14px;
  padding: clamp(14px, 3.5vw, 26px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  box-shadow: var(--shadow-soft);
}

.hero__logo {
  width: clamp(96px, 28%, 130px);
  margin-bottom: 6px;
}

.hero__kicker {
  font-family: var(--font-display);
  font-size: clamp(11px, 2.4vw, 14px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum);
}

.hero__rule {
  display: block;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--orange);
  margin: 4px 0 6px;
}

.hero__program {
  font-size: clamp(12px, 2.6vw, 15px);
  font-weight: 600;
  color: var(--ink);
  max-width: 28ch;
}

.hero__org {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.cred__body {
  padding: clamp(24px, 4vw, 38px);
}

.cred__name {
  font-size: clamp(24px, 5.4vw, 34px);
  font-weight: 700;
}

.cred__program {
  margin-top: 6px;
  font-size: clamp(16px, 3.4vw, 19px);
  font-weight: 600;
  color: var(--plum-2);
}

.cred__issuer {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.cred__issuer strong {
  color: var(--ink);
}

.detail-grid {
  margin: 26px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
}

.detail__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail__value {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.chip {
  display: inline-block;
  padding: 6px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xs);
  background: #faf8fb;
  font-size: 15px;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cred__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px clamp(24px, 4vw, 38px);
  border-top: 1px solid var(--line);
  background: #faf8fb;
  color: var(--muted);
  font-size: 13px;
}

.cred__footer .icon {
  width: 18px;
  height: 18px;
  color: var(--plum-2);
}

/* ---------------------------------------------------------------- mobile action bar */
.action-bar {
  display: none;
}

@media (max-width: 639px) {
  .action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    gap: 10px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -18px rgba(60, 32, 80, 0.6);
  }

  body.has-action-bar .site-footer {
    padding-bottom: 96px;
  }

  .actions {
    display: none;
  }
}

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  .btn,
  .lang-toggle,
  .field__input {
    transition:
      transform 0.18s ease,
      box-shadow 0.18s ease,
      border-color 0.18s ease,
      background 0.18s ease,
      color 0.18s ease;
  }

  .btn:hover,
  .lang-toggle:hover {
    transform: translateY(-2px);
  }

  .btn:active {
    transform: translateY(0);
  }

  .card {
    animation: ccndr-rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }

  .pill-verified__dot {
    animation: ccndr-pulse 2.4s ease-in-out infinite;
  }

  @keyframes ccndr-rise {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes ccndr-pulse {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.45;
    }
  }
}

/* ---------------------------------------------------------------- print */
@media print {
  @page {
    margin: 14mm;
  }

  body {
    background: #fff;
    color: #000;
    display: block;
  }

  .bg,
  .blob,
  .skip-link,
  .site-header,
  .site-footer,
  .cred__topbar,
  .actions,
  .action-bar,
  .lang-toggle,
  .js-only {
    display: none !important;
  }

  .site-main {
    max-width: none;
    padding: 0;
    display: block;
  }

  .cred,
  .card,
  .cred__card {
    max-width: none;
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    animation: none;
  }

  .hero {
    padding: 0;
    background: #fff;
    border-bottom: 0;
    display: block;
  }

  .hero__frame {
    max-width: none;
    width: 100%;
    aspect-ratio: auto;
    min-height: 118mm;
    border-color: #4c2d61;
    outline-color: #8851a1;
    box-shadow: none;
    gap: 8px;
  }

  .hero__name {
    font-family: var(--font-display);
    font-size: 24pt;
    font-weight: 700;
    color: #2b2033;
  }

  .hero__program {
    font-size: 12pt;
  }

  .cred__body,
  .cred__footer {
    padding: 10mm 0 0;
    background: #fff;
    border-top: 0;
  }

  /* the hero already carries the name and program on the printed sheet */
  .cred__name,
  .cred__program {
    display: none;
  }

  .print-only {
    display: block;
  }

  .print-verify {
    margin-top: 6mm;
    font-family: var(--font-mono);
    font-size: 9pt;
    color: #2b2033;
  }

  .detail-grid {
    border-top: 1px solid #ddd;
  }
}
