.credentials-page {
  --credential-blue: #1b2e64;
  --credential-night: #071226;
  --credential-deep: #08152e;
  --credential-black: #050a14;
  --credential-gold: #c5a15a;
  --credential-gold-light: #e1c88b;
  --credential-text: #f3f1eb;
  --credential-muted: #a9b1c0;
  --stage-gold-light: #d8bd7a;
  --stage-gold-main: #a6813e;
  --stage-gold-deep: #5d431f;
  --stage-gold-dark: #241a0e;
  --stage-highlight: rgba(238, 211, 145, 0.48);
  color: var(--credential-text);
  background: var(--credential-black);
  overflow: clip;
}

.credentials-page :where(h1, h2, h3, p) {
  text-wrap: pretty;
}

.credential-eyebrow {
  margin: 0 0 18px;
  color: var(--credential-gold-light);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.credential-hero {
  position: relative;
  min-height: 100svh;
  padding: 88px clamp(28px, 3.5vw, 68px) 0;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 77% 42%, rgba(197, 161, 90, 0.13), transparent 26%),
    radial-gradient(circle at 12% 84%, rgba(27, 46, 100, 0.38), transparent 32%),
    linear-gradient(118deg, #071226 0%, #08152e 52%, #050a14 100%);
}

.credential-hero::before {
  content: "";
  position: absolute;
  inset: 88px 0 0;
  z-index: -3;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(225, 200, 139, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 200, 139, 0.12) 1px, transparent 1px);
  background-size: 112px 112px;
  mask-image: linear-gradient(90deg, transparent, #000 36%, #000 74%, transparent);
}

.credential-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.17'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.credential-hero__blueprint {
  position: absolute;
  inset: 18% auto auto 45%;
  z-index: -1;
  width: min(48vw, 820px);
  color: rgba(225, 200, 139, 0.22);
  pointer-events: none;
}

.credential-hero__blueprint svg {
  width: 100%;
  height: auto;
}

.credential-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(580px, 1.16fr);
  gap: clamp(34px, 3.8vw, 72px);
  align-items: center;
  width: min(100%, 1600px);
  min-height: calc(100svh - 88px);
  margin: 0 auto;
}

.credential-hero__copy {
  position: relative;
  z-index: 3;
  max-width: 690px;
  padding-block: 32px;
}

.credential-hero__copy h1 {
  max-width: 680px;
  margin: 0;
  color: var(--credential-text);
  font-size: clamp(52px, 5vw, 86px);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.credential-hero__copy > p:not(.credential-eyebrow) {
  max-width: 590px;
  margin: 28px 0 0;
  color: #c1c7d1;
  font-size: clamp(16px, 1.16vw, 19px);
  line-height: 1.9;
}

.credential-hero .credential-actions {
  margin-top: 34px;
}

.credential-hero .credential-button {
  min-height: 48px;
  padding-inline: 20px;
  border-color: rgba(225, 200, 139, 0.42);
  border-radius: 3px;
  background: rgba(5, 10, 20, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-weight: 600;
}

.credential-hero .credential-button i {
  color: var(--credential-gold-light);
}

.credential-hero .credential-button:hover,
.credential-hero .credential-button:focus-visible {
  background: rgba(225, 200, 139, 0.075);
  transform: none;
}

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

.credential-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 23px;
  border: 1px solid rgba(225, 200, 139, 0.28);
  border-radius: 999px;
  color: var(--credential-text);
  background: rgba(243, 241, 235, 0.045);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    color 0.24s ease,
    background 0.24s ease,
    border-color 0.24s ease,
    transform 0.24s ease;
}

.credential-button i {
  font-style: normal;
  transition: transform 0.24s ease;
}

.credential-button:hover,
.credential-button:focus-visible {
  color: var(--credential-gold-light);
  background: rgba(225, 200, 139, 0.09);
  border-color: rgba(225, 200, 139, 0.72);
  transform: translateY(-2px);
}

.credential-button:hover i,
.credential-button:focus-visible i {
  transform: translateX(4px);
}

.credential-button:focus-visible {
  outline: 2px solid var(--credential-gold-light);
  outline-offset: 4px;
}

.credential-stage {
  position: relative;
  min-width: 0;
  height: min(78svh, 820px);
  min-height: 610px;
  perspective: 1400px;
  transform-style: preserve-3d;
}

.credential-stage::before {
  content: "";
  position: absolute;
  left: 5%;
  right: -2%;
  top: 8%;
  bottom: 12%;
  height: auto;
  background: radial-gradient(ellipse at 54% 38%, rgba(197, 161, 90, 0.19), transparent 58%);
  filter: blur(26px);
}

.credential-stage__frame {
  --shift-x: 0px;
  --shift-y: 0px;
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 250px;
  aspect-ratio: 258 / 365;
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgba(216, 189, 122, 0.38);
  border-radius: 4px;
  background: linear-gradient(145deg, #3d301d, #17130d 54%, #5d431f);
  box-shadow:
    0 36px 78px rgba(0, 0, 0, 0.6),
    0 10px 24px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(238, 211, 145, 0.09) inset;
  transition:
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.5s ease;
}

.credential-stage__frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 1;
  border: 1px solid rgba(238, 211, 145, 0.24);
  pointer-events: none;
}

.credential-stage__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f1efe8;
}

.credential-stage__frame--main {
  left: 49%;
  top: 43%;
  z-index: 5;
  width: clamp(280px, 20vw, 350px);
  transform: translate3d(calc(-50% + var(--shift-x)), calc(-50% + var(--shift-y)), 72px)
    rotateY(-3deg);
}

.credential-stage__frame--left {
  left: 10%;
  top: 28%;
  z-index: 2;
  width: clamp(210px, 15vw, 270px);
  filter: brightness(0.66) saturate(0.82) blur(0.25px);
  transform: translate3d(var(--shift-x), var(--shift-y), -34px) rotateY(7deg) rotateZ(-3deg);
}

.credential-stage__frame--right {
  right: 1%;
  top: 32%;
  z-index: 3;
  width: clamp(200px, 14vw, 254px);
  aspect-ratio: 1;
  filter: brightness(0.7) saturate(0.8) blur(0.2px);
  transform: translate3d(var(--shift-x), var(--shift-y), -14px) rotateY(-6deg) rotateZ(2.5deg);
}

.credential-stage__frame:hover {
  filter: brightness(1);
}

.credential-stage__platform {
  position: absolute;
  left: 3%;
  right: 0;
  bottom: 4%;
  z-index: 4;
  height: 29%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 34px 42px rgba(0, 0, 0, 0.46));
}

.credential-stage__step {
  position: absolute;
  display: block;
  transform-origin: center bottom;
  border-top: 1px solid var(--stage-highlight);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 199, 0.08),
    inset 0 -14px 24px rgba(15, 9, 3, 0.34),
    0 20px 36px rgba(0, 0, 0, 0.4);
}

.credential-stage__step::before,
.credential-stage__step::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.credential-stage__step::before {
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(36, 26, 14, 0.5),
    transparent 14%,
    rgba(238, 211, 145, 0.12) 52%,
    transparent 84%,
    rgba(36, 26, 14, 0.56)
  );
}

.credential-stage__step::after {
  left: 0;
  right: 0;
  top: 100%;
  height: 18px;
  clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%);
  background: linear-gradient(180deg, var(--stage-gold-deep), var(--stage-gold-dark));
  border-top: 1px solid rgba(238, 211, 145, 0.2);
  box-shadow: inset 0 -1px 0 rgba(238, 211, 145, 0.06);
}

.credential-stage__step--top {
  left: 27%;
  right: 22%;
  top: 0;
  z-index: 3;
  height: 25%;
  transform: perspective(760px) rotateX(52deg) translateZ(34px);
  border-top-color: rgba(238, 211, 145, 0.54);
  background: linear-gradient(180deg, #bea363 0%, #8e6d35 54%, #5d431f 100%);
}

.credential-stage__step--top::after {
  height: 15px;
}

.credential-stage__step--middle {
  left: 14%;
  right: 10%;
  top: 31%;
  z-index: 2;
  height: 29%;
  transform: perspective(840px) rotateX(57deg) translateZ(12px);
  border-top-color: rgba(238, 211, 145, 0.38);
  background: linear-gradient(180deg, #9b783b 0%, #6b4d24 58%, #3f2c17 100%);
}

.credential-stage__step--middle::after {
  height: 22px;
}

.credential-stage__step--base {
  left: 0;
  right: 0;
  top: 65%;
  z-index: 1;
  height: 35%;
  transform: perspective(920px) rotateX(61deg);
  clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%);
  border-top-color: rgba(238, 211, 145, 0.24);
  background: linear-gradient(180deg, #59401f 0%, #352512 56%, #181108 100%);
}

.credential-stage__step--base::after {
  height: 28px;
  clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
}

.credential-stage__caption {
  position: absolute;
  right: 2%;
  bottom: 5%;
  z-index: 7;
  display: grid;
  gap: 4px;
  max-width: 280px;
  padding-left: 14px;
  border-left: 1px solid rgba(225, 200, 139, 0.52);
  color: var(--credential-muted);
  font-size: 12px;
  line-height: 1.6;
}

.credential-stage__caption b {
  color: var(--credential-gold-light);
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 1240px) {
  .credential-hero__inner {
    grid-template-columns: minmax(0, 0.76fr) minmax(480px, 1fr);
  }

  .credential-stage__frame--left {
    left: 7%;
  }

  .credential-stage__frame--right {
    right: 0;
  }
}

@media (max-width: 920px) {
  .credential-hero {
    min-height: 100svh;
    padding-inline: 24px;
  }

  .credential-hero__inner {
    grid-template-columns: minmax(0, 0.78fr) minmax(390px, 1fr);
    gap: 18px;
    min-height: calc(100svh - 88px);
  }

  .credential-hero__copy h1 {
    font-size: clamp(46px, 7vw, 62px);
  }

  .credential-stage {
    height: min(72svh, 680px);
    min-height: 560px;
  }

  .credential-stage__frame--main {
    width: 270px;
  }

  .credential-stage__frame--left {
    width: 190px;
    transform: translate3d(var(--shift-x), var(--shift-y), -34px) rotateY(6deg) rotateZ(-3deg);
  }

  .credential-stage__frame--right {
    width: 176px;
    transform: translate3d(var(--shift-x), var(--shift-y), -14px) rotateY(-5deg) rotateZ(3deg);
  }
}

@media (max-width: 760px) {
  .credential-hero {
    min-height: auto;
    padding: 132px 16px 58px;
  }

  .credential-hero::before {
    inset: 132px 0 0;
    background-size: 64px 64px;
  }

  .credential-hero__blueprint {
    inset: auto -18% 6% auto;
    width: 108vw;
    opacity: 0.45;
  }

  .credential-hero__inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .credential-hero__copy {
    max-width: 100%;
    padding: 36px 0 18px;
  }

  .credential-hero__copy h1 {
    max-width: 520px;
    font-size: clamp(46px, 14vw, 66px);
  }

  .credential-hero__copy > p:not(.credential-eyebrow) {
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.82;
  }

  .credential-actions {
    display: grid;
    margin-top: 30px;
  }

  .credential-button {
    width: 100%;
  }

  .credential-stage {
    height: 450px;
    min-height: 0;
    margin-top: 4px;
    perspective: none;
  }

  .credential-stage__frame--main {
    left: 49%;
    top: 43%;
    width: min(56vw, 250px);
    transform: translate(-50%, -50%);
  }

  .credential-stage__frame--left {
    left: 2%;
    top: 27%;
    width: min(38vw, 170px);
    filter: brightness(0.65) saturate(0.82);
    transform: rotate(-3deg);
  }

  .credential-stage__frame--right {
    right: 0;
    top: 31%;
    width: min(35vw, 156px);
    filter: brightness(0.68) saturate(0.8);
    transform: rotate(3deg);
  }

  .credential-stage__platform {
    left: -2%;
    right: -2%;
    bottom: 8%;
    height: 27%;
  }

  .credential-stage__step--top {
    left: 28%;
    right: 24%;
  }

  .credential-stage__step--middle {
    left: 15%;
    right: 12%;
  }

  .credential-stage__caption {
    right: 2%;
    bottom: 1.5%;
    max-width: 220px;
  }
}

@media (max-width: 440px) {
  .credential-stage {
    height: 410px;
  }

  .credential-stage__caption {
    max-width: 190px;
    font-size: 11px;
  }
}

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