/* Local certificate carousel. Motion is driven by certificates.js. */
.certs{
  --certs-bg:#0b0d12;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  padding:clamp(42px,7vh,68px) 0 54px;
  background:var(--certs-bg);
  color:#f5f6fa;
  font:16px/1.5 Inter,Arial,sans-serif;
  scroll-margin-top:var(--header,88px);
}
.certs::before{
  content:"";
  position:absolute;
  z-index:-2;
  inset:0;
  background-image:radial-gradient(circle,#aeb8cc35 .75px,transparent .9px);
  background-size:16px 16px;
  mask-image:linear-gradient(transparent,black 12%,black 82%,transparent);
  pointer-events:none;
}
.certs::after{
  content:"";
  position:absolute;
  z-index:-1;
  left:15%;right:15%;top:12%;bottom:5%;
  background:radial-gradient(ellipse at 50% 58%,#123aad2e 0%,#0c31b914 38%,transparent 70%);
  pointer-events:none;
}
.certs .certs-head{position:relative;z-index:1;max-width:880px;margin:0 auto;padding:0 32px;text-align:center}
.certs .certs-head h2{margin:0;font:400 clamp(34px,3.65vw,52px)/1.15 Stolzl,Arial,sans-serif;letter-spacing:-.035em;text-wrap:balance}
.certs .certs-head p{max-width:650px;margin:14px auto 0;color:#aab2c1;font:15px/1.6 Inter,Arial,sans-serif;text-wrap:balance}
.certs .certs-stage{position:relative;height:clamp(320px,46vh,420px);margin:18px auto 0;perspective:1150px;perspective-origin:50% 45%;touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:grab}
.certs .certs-stage:active{cursor:grabbing}
.certs .certs-stage[data-dragging]:not([data-dragging="false"]){cursor:grabbing}
.certs .certs-stage[data-dragging]:not([data-dragging="false"]) .certs-card{cursor:grabbing}
.certs .certs-stage::before,.certs .certs-stage::after{content:"";position:absolute;z-index:30;top:0;bottom:0;width:clamp(28px,6vw,110px);pointer-events:none}
.certs .certs-stage::before{left:0;background:linear-gradient(90deg,var(--certs-bg),#0b0d1200)}
.certs .certs-stage::after{right:0;background:linear-gradient(270deg,var(--certs-bg),#0b0d1200)}
.certs .certs-track{position:absolute;inset:0;transform-style:preserve-3d;touch-action:pan-y}
.certs .certs-card{
  position:absolute;
  left:50%;top:50%;
  z-index:var(--z-index,1);
  display:block;
  width:clamp(210px,17.3vw,262px);
  max-width:none;
  margin:0;
  padding:8px;
  border:1px solid #70809969;
  border-radius:5px;
  background:linear-gradient(145deg,#343b49,#171c25 48%,#2e3541);
  color:#fff;
  box-shadow:0 18px 46px #0007,inset 0 0 0 1px #ffffff08;
  opacity:var(--card-opacity,1);
  transform:translate(-50%,-50%) translate3d(var(--x,0px),var(--y,0px),var(--z,0px)) rotateY(var(--yaw,0deg)) rotateZ(var(--roll,0deg)) scale(var(--scale,1));
  transform-origin:center;
  backface-visibility:hidden;
  will-change:transform;
  touch-action:pan-y;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.certs .certs-card[data-active="true"],.certs .certs-card[data-active]:not([data-active="false"]){border-color:#9baecf;box-shadow:0 24px 62px #0008,0 0 42px #294db71c,inset 0 0 0 1px #d0dcf61c}
.certs .certs-card[data-outside]:not([data-outside="false"]){visibility:hidden;pointer-events:none}
.certs .certs-card-media{position:relative;display:block;overflow:hidden;background:#f5f4f0;box-shadow:0 0 0 1px #0006}
.certs .certs-card-media img{display:block;width:auto;height:auto;max-width:100%;max-height:clamp(272px,42vh,374px);margin:auto;object-fit:contain;pointer-events:none;-webkit-user-drag:none}
.certs .certs-card-cue{position:absolute;right:18px;bottom:18px;display:grid;place-items:center;width:34px;height:34px;border:1px solid #ffffff3d;border-radius:50%;background:#131b2de8;color:#fff;opacity:0;transition:opacity .18s ease;pointer-events:none}
.certs .certs-card-cue svg{display:block;width:16px;height:16px}
.certs .certs-card[data-active="true"] .certs-card-cue,.certs .certs-card[data-active]:not([data-active="false"]) .certs-card-cue,.certs .certs-card:focus-visible .certs-card-cue{opacity:1}
.certs .certs-card:focus-visible{outline:3px solid #7798ff;outline-offset:5px}
.certs .certs-caption{position:relative;z-index:1;min-height:56px;max-width:730px;margin:8px auto 0;padding:0 28px;text-align:center}
.certs .certs-caption h3{margin:0;font:400 18px/1.4 Stolzl,Arial,sans-serif;letter-spacing:-.015em;text-wrap:balance}
.certs .certs-caption p{margin:8px 0 0;color:#aab2c1;font:13px/1.6 Inter,Arial,sans-serif;text-wrap:balance}
.certs .certs-controls{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;gap:28px;width:max-content;max-width:100%;margin:10px auto 0;padding:0 20px}
.certs .certs-arrow{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:1px solid transparent;border-radius:50%;background:transparent;color:#e5eaf4;cursor:pointer;transition:background .18s ease,border-color .18s ease,color .18s ease}
.certs .certs-arrow svg{display:block;width:24px;height:24px;pointer-events:none}
.certs .certs-arrow[data-prev] svg{transform:rotate(180deg)}
.certs .certs-arrow:disabled{opacity:.3;cursor:default}
.certs .certs-arrow:focus-visible{outline:2px solid #7798ff;outline-offset:4px}
.certs .certs-position{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:144px}
.certs .certs-count{color:#aab2c1;font:12px/1 Inter,Arial,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:.1em}
.certs .certs-meter{position:relative;display:block;width:100%;height:2px;overflow:hidden;background:#58617299;border-radius:1px}
.certs .certs-meter>span{display:block;height:100%;width:var(--progress,0%);background:#8aa5ff;transform-origin:left center;transition:width .22s ease}
@media(hover:hover) and (pointer:fine){
  .certs .certs-card:hover{border-color:#bbcae4}
  .certs .certs-arrow:not(:disabled):hover{background:#1b263f;border-color:#6176a54d;color:#fff}
}

/* The document viewer keeps the scan uncropped and scrolls independently. */
dialog.certs-dialog{width:min(1120px,calc(100vw - 48px));max-width:none;height:min(960px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);margin:auto;padding:0;border:1px solid #45526b;border-radius:14px;background:#11151e;color:#f5f6fa;box-shadow:0 30px 100px #0009;overflow:hidden;font:14px/1.5 Inter,Arial,sans-serif}
.certs-dialog::backdrop{background:#070b13d9;backdrop-filter:blur(8px)}
.certs-dialog .certs-dialog-inner{display:flex;flex-direction:column;min-width:0;height:100%;max-height:100%}
.certs-dialog .certs-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:24px;flex:0 0 auto;min-height:76px;padding:16px 24px;border-bottom:1px solid #ffffff14}
.certs-dialog .certs-dialog-head h3{margin:0;font:400 18px/1.4 Stolzl,Arial,sans-serif;letter-spacing:-.02em}
.certs-dialog .certs-dialog-head button{display:grid;place-items:center;flex:0 0 auto;min-width:44px;height:44px;padding:8px 12px;border:1px solid #73809b55;border-radius:8px;background:#ffffff06;color:inherit;font:14px/1.4 Inter,Arial,sans-serif;cursor:pointer}
.certs-dialog .certs-dialog-head button svg{display:block;width:20px;height:20px}
.certs-dialog .certs-dialog-scroll{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;background:#dce0e6;padding:24px;scrollbar-color:#637088 #dce0e6;touch-action:pan-x pan-y pinch-zoom}
.certs-dialog .certs-dialog-scroll img{display:block;width:auto;max-width:100%;height:auto;max-height:100%;margin:0 auto;background:white;box-shadow:0 5px 26px #1c263a24;object-fit:contain}
.certs-dialog .certs-dialog-scroll[data-zoomed] img{width:min(1280px,200%);max-width:none;max-height:none}
body:has(.certs-dialog[open]){overflow:hidden}
.certs-dialog .certs-dialog-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;flex:0 0 auto;padding:14px 24px;border-top:1px solid #ffffff14}
.certs-dialog .certs-dialog-actions button,.certs-dialog .certs-dialog-actions a{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:10px 16px;border:1px solid #73809b55;border-radius:8px;background:#ffffff06;color:inherit;font:14px/1.4 Inter,Arial,sans-serif;text-decoration:none;cursor:pointer}
.certs-dialog .certs-dialog-actions a{background:#0c31b9;border-color:#0c31b9}
.certs-dialog .certs-dialog-actions .certs-dialog-zoom{margin-left:auto}
.certs-dialog button:focus-visible,.certs-dialog a:focus-visible{outline:2px solid #8aa5ff;outline-offset:3px}
.certs [hidden],.certs-dialog [hidden]{display:none!important}
@media(hover:hover) and (pointer:fine){
  .certs-dialog .certs-dialog-head button:hover,.certs-dialog .certs-dialog-actions button:not(:disabled):hover{background:#ffffff14;border-color:#9baecf}
  .certs-dialog .certs-dialog-actions a:hover{background:#2146cb}
}
@media(max-width:900px){
  .certs{padding-top:64px;padding-bottom:52px}
  .certs .certs-stage{perspective:1000px}
}
@media(max-width:600px){
  .certs{padding-top:50px;padding-bottom:42px}
  .certs::before{background-size:14px 14px;opacity:.65}
  .certs .certs-head{padding-inline:24px}
  .certs .certs-head h2{font-size:32px;line-height:1.2;letter-spacing:-.035em}
  .certs .certs-head p{margin-top:16px;font-size:14px;line-height:1.65}
  .certs .certs-stage{height:368px;margin-top:18px;perspective:900px;perspective-origin:50% 48%}
  .certs .certs-stage::before,.certs .certs-stage::after{width:28px}
  .certs .certs-card{width:min(60vw,230px);padding:6px;border-radius:4px}
  .certs .certs-card-media img{max-height:310px}
  .certs .certs-card-cue{right:14px;bottom:14px;width:32px;height:32px}
  .certs .certs-caption{min-height:70px;padding-inline:24px}
  .certs .certs-caption h3{font-size:16px;line-height:1.45}
  .certs .certs-caption p{font-size:12px;line-height:1.6}
  .certs .certs-controls{margin-top:16px;gap:20px}
  .certs .certs-position{width:120px}
  dialog.certs-dialog{width:calc(100vw - 16px);height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);border-radius:12px}
  .certs-dialog .certs-dialog-head{min-height:70px;padding:12px 14px;gap:12px}
  .certs-dialog .certs-dialog-head h3{font-size:15px;line-height:1.45}
  .certs-dialog .certs-dialog-head button{padding-inline:10px;font-size:12px}
  .certs-dialog .certs-dialog-scroll{padding:12px}
  .certs-dialog .certs-dialog-actions{gap:8px;padding:12px}
  .certs-dialog .certs-dialog-actions button,.certs-dialog .certs-dialog-actions a{font-size:12px;padding:9px 12px}
}
@media(max-width:360px){.certs .certs-stage{height:338px}.certs .certs-head h2{font-size:29px}.certs .certs-dialog-actions a{margin-left:0}}
@media(prefers-reduced-motion:reduce){
  .certs .certs-card{will-change:auto}
  .certs .certs-card-cue,.certs .certs-arrow,.certs .certs-meter>span{transition:none}
}
