.certificate-showcase {
  --certificate-navy: #061f3d;
  --certificate-blue: #0c3767;
  --certificate-orange: #f26a21;
  --certificate-teal: #1b8b88;
  --confetti-fall-distance: 520px;
  --confetti-stage-one: 135px;
  --confetti-stage-two: 285px;
  --confetti-stage-three: 420px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.45rem, 3.8vw, 3.35rem) 0;
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(38, 112, 185, .18), transparent 25rem),
    linear-gradient(118deg, #041a34 0%, var(--certificate-navy) 48%, #092b52 100%);
}

.certificate-showcase::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .14;
  background-image:
    linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 45%, #000);
  mask-image: linear-gradient(90deg, #000, transparent 45%, #000);
}

.certificate-showcase::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1320px, calc(100% - 3rem));
  height: 3px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--certificate-orange) 0 22%, #6da8dc 22% 100%);
}

.certificate-showcase__glow {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 50%;
  pointer-events: none;
}

.certificate-showcase__glow--one {
  width: 26rem;
  height: 26rem;
  top: -18rem;
  left: -7rem;
  box-shadow: 0 0 0 3.5rem rgba(255, 255, 255, .018), 0 0 0 7rem rgba(255, 255, 255, .012);
}

.certificate-showcase__glow--two {
  width: 19rem;
  height: 19rem;
  right: -8rem;
  bottom: -13rem;
  border-color: rgba(242, 106, 33, .16);
  box-shadow: 0 0 0 3rem rgba(242, 106, 33, .025);
}

.certificate-confetti {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.certificate-confetti__piece {
  position: absolute;
  top: -14px;
  left: var(--confetti-x);
  width: var(--confetti-size);
  height: calc(var(--confetti-size) * .48);
  opacity: 0;
  color: var(--confetti-color);
  border-radius: 2px;
  background: var(--confetti-color);
  box-shadow: 0 0 7px rgba(255, 255, 255, .08);
  transform: translate3d(0, -20px, 0) rotate(0deg);
  animation: certificateConfettiFall var(--confetti-duration) linear var(--confetti-delay) infinite;
  animation-play-state: paused;
  will-change: transform, opacity;
}

.certificate-confetti__piece--dot { height: var(--confetti-size); border-radius: 50%; }
.certificate-confetti__piece--slim { width: calc(var(--confetti-size) * .38); height: calc(var(--confetti-size) * 1.45); border-radius: 99px; }

.certificate-confetti__piece--diamond {
  width: calc(var(--confetti-size) * .8);
  height: calc(var(--confetti-size) * .8);
  border-radius: 1px;
}

.certificate-confetti__piece--ring {
  height: var(--confetti-size);
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.certificate-confetti__piece--stripe {
  height: calc(var(--confetti-size) * .72);
  border: 1px solid currentColor;
  background: repeating-linear-gradient(45deg, currentColor 0 1.5px, transparent 1.5px 3px);
}

.certificate-confetti__piece--arc {
  height: var(--confetti-size);
  border: 2px solid currentColor;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.certificate-confetti__piece--spark {
  width: calc(var(--confetti-size) * 1.25);
  height: calc(var(--confetti-size) * 1.25);
  background: transparent;
  box-shadow: none;
}

.certificate-confetti__piece--spark::before,
.certificate-confetti__piece--spark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 99px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.certificate-confetti__piece--spark::before { width: 2px; height: 100%; }
.certificate-confetti__piece--spark::after { width: 100%; height: 2px; }

.certificate-showcase.confetti-active:not(.confetti-paused) .certificate-confetti__piece { animation-play-state: running; }

@keyframes certificateConfettiFall {
  0% { opacity: 0; transform: translate3d(0, -20px, 0) rotate(0deg); }
  12% { opacity: var(--confetti-opacity); }
  30% { transform: translate3d(var(--confetti-sway-one), var(--confetti-stage-one), 0) rotate(var(--confetti-turn-one)); }
  58% { transform: translate3d(var(--confetti-sway-two), var(--confetti-stage-two), 0) rotate(var(--confetti-turn-two)); }
  82% { opacity: var(--confetti-opacity); transform: translate3d(var(--confetti-sway-three), var(--confetti-stage-three), 0) rotate(var(--confetti-turn-three)); }
  100% { opacity: 0; transform: translate3d(var(--confetti-drift), var(--confetti-fall-distance), 0) rotate(var(--confetti-turn)); }
}

.certificate-showcase__inner {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 3rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(450px, 1.04fr);
  align-items: center;
  gap: clamp(2.5rem, 5.5vw, 5rem);
}

.certificate-showcase__content { max-width: 580px; }

.certificate-showcase__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 .8rem;
  color: #f8c39e;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.certificate-showcase__eyebrow span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
}

.certificate-showcase__eyebrow svg { width: 17px; height: 17px; }

.certificate-showcase h2 {
  max-width: 590px;
  margin: 0;
  color: #fff;
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: clamp(2.15rem, 3.7vw, 3.35rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.05em;
}

.certificate-showcase h2 span { color: #ff9b55; }

.certificate-showcase__lead {
  max-width: 550px;
  margin: .8rem 0 0;
  color: #b9c9da;
  font-size: .86rem;
  line-height: 1.65;
}

.certificate-showcase__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.15rem;
}

.certificate-showcase__action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 0 1.1rem;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .74rem;
  font-weight: 800;
  text-decoration: none;
  transition: color .22s ease, background .22s ease, border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.certificate-showcase__action svg { width: 15px; height: 15px; transition: transform .22s ease; }
.certificate-showcase__action:hover { transform: translateY(-2px); }
.certificate-showcase__action:hover svg { transform: translateX(3px); }

.certificate-showcase__action--primary {
  color: #fff;
  background: var(--certificate-orange);
  box-shadow: 0 12px 25px rgba(242, 106, 33, .2);
}

.certificate-showcase__action--primary:hover { color: #fff; background: #ff7b32; box-shadow: 0 15px 30px rgba(242, 106, 33, .28); }

.certificate-showcase__action--secondary {
  color: #eef6ff;
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .055);
}

.certificate-showcase__action--secondary:hover { color: #fff; border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .1); }

.certificate-showcase__benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem 1rem;
  max-width: 475px;
  margin: 1.05rem 0 0;
  padding: .8rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, .11);
  list-style: none;
}

.certificate-showcase__benefits li {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: #c9d6e4;
  font-size: .67rem;
  font-weight: 700;
}

.certificate-showcase__benefits svg {
  width: 16px;
  height: 16px;
  padding: 3px;
  color: #fff;
  border-radius: 50%;
  background: rgba(242, 106, 33, .85);
}

.certificate-preview {
  position: relative;
  min-height: 278px;
  padding: clamp(1.2rem, 2.5vw, 1.65rem);
  overflow: hidden;
  color: #10243d;
  border: 1px solid rgba(255, 220, 197, .9);
  border-radius: 15px;
  background:
    radial-gradient(circle at 91% 17%, rgba(242, 106, 33, .1), transparent 9rem),
    radial-gradient(circle at 8% 88%, rgba(27, 139, 136, .085), transparent 10rem),
    linear-gradient(145deg, #fff 0%, #fbfdff 62%, #eef5f8 100%);
  box-shadow: 0 28px 60px rgba(0, 8, 23, .35), 0 0 0 8px rgba(255, 255, 255, .045), inset 4px 0 0 rgba(12, 55, 103, .08);
  transform: rotate(1.2deg);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s ease;
}

.certificate-preview:hover { transform: rotate(0) translateY(-5px); box-shadow: 0 34px 70px rgba(0, 8, 23, .43), 0 0 0 8px rgba(255, 255, 255, .05); }

.certificate-preview::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid #c8d9e4;
  border-radius: 9px;
  pointer-events: none;
}

.certificate-preview::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 4px;
  border-radius: 0 0 99px 99px;
  background: linear-gradient(90deg, var(--certificate-blue) 0 48%, var(--certificate-orange) 48% 75%, var(--certificate-teal) 75% 100%);
}

.certificate-preview__corner {
  position: absolute;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, rgba(12, 55, 103, .14), transparent 62%);
  pointer-events: none;
}

.certificate-preview__corner--top { top: 0; left: 0; }
.certificate-preview__corner--bottom { right: 0; bottom: 0; background: linear-gradient(135deg, rgba(242, 106, 33, .16), transparent 62%); transform: rotate(180deg); }

.certificate-preview__head,
.certificate-preview__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.certificate-preview__head {
  margin: -.25rem -.2rem 0;
  padding: .1rem .2rem .45rem;
  border-bottom: 1px solid rgba(12, 55, 103, .08);
}

.certificate-preview__logo {
  position: relative;
  width: 145px;
  height: 36px;
  display: block;
  overflow: hidden;
}

.certificate-preview__logo img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 204px;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
}

.certificate-preview__verified {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .31rem .5rem;
  color: #20715f;
  border: 1px solid #bcded3;
  border-radius: 99px;
  background: linear-gradient(135deg, #f1fbf7, #e5f6f1);
  font-size: .57rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.certificate-preview__verified svg { width: 13px; height: 13px; }

.certificate-preview__body {
  position: relative;
  z-index: 1;
  width: min(400px, 92%);
  margin: .85rem auto .9rem;
  text-align: center;
}

.certificate-preview__body > p:first-child {
  margin: 0 0 .35rem;
  color: #df5915;
  font-size: .54rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.certificate-preview__body h3 {
  margin: 0;
  color: #102a48;
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.certificate-preview__body h3 span {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, #2f6b9e 18%, var(--certificate-teal) 52%, #df5915 84%);
  -webkit-background-clip: text;
  background-clip: text;
}

.certificate-preview__recipient { margin-top: .65rem; }
.certificate-preview__recipient small { display: block; color: #8392a3; font-size: .54rem; }
.certificate-preview__recipient strong { display: inline-block; min-width: 185px; margin-top: .22rem; padding: 0 .8rem .2rem; color: #0a2f59; border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, transparent, #2f6b9e 22%, var(--certificate-teal) 50%, #df5915 78%, transparent) 1; font-family: 'Space Grotesk', Arial, sans-serif; font-size: 1rem; font-weight: 600; }
.certificate-preview__copy { max-width: 355px; margin: .55rem auto 0; color: #76879a; font-size: .54rem; line-height: 1.5; }

.certificate-preview__foot { align-items: flex-end; }
.certificate-preview__foot > div { min-width: 105px; }
.certificate-preview__foot span { color: #345675; font-size: .53rem; font-weight: 800; }
.certificate-preview__foot small { margin-top: .2rem; color: #8d9cac; font-size: .47rem; }

.certificate-preview__signature { display: flex; flex-direction: column; }
.certificate-preview__signature::before { content: ''; width: 88px; margin-bottom: .3rem; border-top: 1px solid var(--certificate-teal); }

.certificate-preview__credential {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem;
  text-align: right;
}

.certificate-preview__credential > svg { width: 25px; height: 25px; color: #df5915; }
.certificate-preview__credential > span { display: flex; flex-direction: column; }

.certificate-preview__seal {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff !important;
  border: 3px solid #ffe3c7;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff9a4f, var(--certificate-orange) 58%, #d84e12);
  box-shadow: 0 7px 16px rgba(242, 106, 33, .28), 0 0 0 3px rgba(27, 139, 136, .08);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}

.certificate-preview:hover .certificate-preview__seal { transform: rotate(8deg) scale(1.05); }
.certificate-preview__seal svg { width: 20px; height: 20px; }

@media (max-width: 940px) {
  .certificate-showcase {
    --confetti-fall-distance: 820px;
    --confetti-stage-one: 205px;
    --confetti-stage-two: 430px;
    --confetti-stage-three: 650px;
  }
  .certificate-showcase__inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .certificate-showcase__content { max-width: 700px; }
  .certificate-preview { width: min(640px, 100%); }
}

@media (max-width: 620px) {
  .certificate-showcase {
    --confetti-fall-distance: 760px;
    --confetti-stage-one: 190px;
    --confetti-stage-two: 395px;
    --confetti-stage-three: 600px;
  }
  .certificate-showcase { padding: 2.25rem 0; }
  .certificate-showcase::after,
  .certificate-showcase__inner { width: calc(100% - 1.5rem); }
  .certificate-showcase h2 { font-size: clamp(2rem, 10.5vw, 2.75rem); }
  .certificate-showcase__lead { font-size: .82rem; }
  .certificate-showcase__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .certificate-showcase__action { width: 100%; }
  .certificate-showcase__benefits { gap: .65rem; }
  .certificate-preview { min-height: 272px; padding: 1.15rem; transform: none; }
  .certificate-preview__body { width: 96%; margin: .75rem auto .8rem; }
  .certificate-preview__copy { max-width: 270px; }
}

@media (max-width: 390px) {
  .certificate-showcase__benefits { grid-template-columns: 1fr; }
  .certificate-showcase__actions { grid-template-columns: 1fr; }
  .certificate-preview__verified { padding: .32rem; }
  .certificate-preview__verified svg { width: 15px; height: 15px; }
  .certificate-preview__verified { font-size: 0; }
  .certificate-preview__foot > div { min-width: 80px; }
  .certificate-preview__logo { width: 124px; height: 32px; }
  .certificate-preview__logo img { width: 176px; }
}

@media (prefers-reduced-motion: reduce) {
  .certificate-confetti { display: none; }
  .certificate-showcase *, .certificate-showcase *::before, .certificate-showcase *::after { transition: none !important; }
}
