.key-hero {
  isolation: isolate;
  overflow: clip;
  color: #f8f6ef;
  background:
    radial-gradient(ellipse at 81% 43%, #64462165, transparent 42%),
    linear-gradient(111deg, #121519 13%, #151719 51%, #201e1b 83%, #17191a);
}

.key-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #eddfcc32 .7px, transparent .95px);
  background-position: center;
  background-size: 13px 13px;
  mask-image: radial-gradient(ellipse 53% 79% at 76% 49%, #0008, transparent 85%);
}

.key-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(22px, 3.2vw, 52px);
  min-height: max(565px, calc(100svh - var(--wc-header-height, 77px)));
  padding-block: clamp(26px, 4.2vh, 58px) clamp(42px, 6.4vh, 86px);
}

.key-copy {
  container-type: inline-size;
}

.key-kicker {
  gap: .5em;
  color: #e4ccb0;
  font: 600 clamp(.67rem, .78vw, .76rem)/1.55 var(--sans);
  letter-spacing: .043em;
}

.key-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  margin-right: 4px;
  background: var(--accent);
}
.key-kicker span[aria-hidden] { color: #ad967b; }

.key-copy h1 {
  /* Break only a word that no longer fits after user text-spacing changes. */
  overflow-wrap: anywhere;
  margin: clamp(19px, 2.8vh, 34px) 0 clamp(20px, 3.4vh, 36px);
  font: 900 clamp(40px, 7vw, 105px)/.92 var(--display);
  font-size: min(16.2cqi, 109px);
  letter-spacing: -.045em;
  color: #f8f6ef;
}
.key-copy h1 > span:last-child {
  margin-top: .12em;
  font-size: .79em;
  letter-spacing: -.04em;
  color: var(--accent);
}

.key-lead {
  max-width: 26em;
  font-size: clamp(1.05rem, 1.45vw, 1.43rem);
  line-height: 1.48;
  letter-spacing: -.029em;
  color: #e4e3df;
}

.key-actions { margin-block-start: clamp(20px, 3vh, 32px); }
.key-actions .button { --bs-btn-border-radius: 8px; }
.key-actions .btn-outline {
  --bs-btn-color: #f5f1e9;
  --bs-btn-border-color: #686761;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #302d28;
  --bs-btn-hover-border-color: #a29277;
}
.key-shortcut {
  min-height: 40px;
  margin-block-start: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: #e5e1db;
}
.key-shortcut .icon { width: 16px; height: 16px; color: var(--accent); }
.key-shortcut .arrow-small { width: 13px; }
.key-shortcut:hover span { text-decoration: underline; }
.key-hero :focus-visible { outline: 3px solid #ffd685; outline-offset: 4px; }

.key-stage {
  isolation: isolate;
}

.key-viewport {
  height: clamp(355px, min(50vw, 71svh), 715px);
  isolation: isolate;
}

/* The faint rings sit on the set behind the object, never over its faces. */
.key-viewport::before {
  content: "";
  position: absolute;
  inset: -12% -9% -9%;
  z-index: -2;
  pointer-events: none;
  background: repeating-radial-gradient(circle closest-side at 52% 48%,
    transparent 0 calc(74% - 1px), #b6a38325 calc(74% - 1px) 74%,
    transparent 74% calc(100% - 1px), #b6a38330 calc(100% - 1px) 100%);
  mask-image: linear-gradient(118deg, transparent 5%, #000a 34%, #000 70%, transparent 95%);
}

.key-viewport::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: 70%;
  height: 16%;
  left: 17%;
  bottom: 0;
  background: radial-gradient(ellipse, #07080796, transparent 68%);
}

.key-poster, .key-canvas {
  inset: 0;
}
.key-poster {
  inset: 50% auto auto 50%;
  width: 88%;
  height: 87%;
  transform: translate(-50%, -50%);
}
.key-stage:not([data-render="webgl"]) .key-canvas { opacity: 0; }
.key-stage[data-render="webgl"] .key-poster { opacity: 0; }
.key-callout { display: none; }

@media (min-width: 1150px) {
  .key-callout {
    position: absolute;
    top: 46.5%;
    left: 69%;
    display: flex;
    align-items: center;
    gap: 8px;
    font: 500 .66rem/1.2 var(--sans);
    letter-spacing: .072em;
    color: #d5c4ab;
    pointer-events: none;
 }
  .key-callout::before {
    content: "";
    width: clamp(38px, 4.5vw, 75px);
    height: 9px;
    margin-top: 8px;
    border-top: 1px solid #ad9673;
    border-left: 1px solid #ad9673;
    transform: skewX(-47deg);
 }
  .key-stage[data-pose="entering"] .key-callout { opacity: 0; }
}

.key-caption {
  gap: 12px;
  margin: 13px auto 0;
  padding-top: 13px;
  width: min(100%, 505px);
  border-top: 1px solid #bda37d49;
  color: #e6e0d6;
  font-size: .75rem;
  line-height: 1.35;
}
.key-caption::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.key-legend { gap: 9px; }
.key-legend kbd {
  padding-block: 0;
  background: transparent;
  height: 23px;
  padding-inline: 5px;
  border: 1px solid #8c8271;
  border-bottom-width: 2px;
  border-radius: 4px;
  color: #e4c391;
  font: 600 .65rem/1 var(--sans);
}
.key-hero + .deliverable-scene {
  position: relative;
  z-index: 1;
  margin-top: -17px;
  border-radius: 19px 19px 0 0;
}

@media (prefers-reduced-motion: no-preference) {
  .key-callout { transition: opacity .25s; }
  .key-copy h1 > span {
    animation: key-typeset .75s cubic-bezier(.2,.65,.25,1) backwards;
 }
  .key-copy h1 > span:nth-child(2) { animation-delay: 75ms; }
  .key-copy h1 > span:nth-child(3) { animation-delay: 150ms; }
  @keyframes key-typeset {
    from { transform: translateY(.23em); opacity: .3; }
    to { transform: translateY(0); opacity: 1; }
 }
}

@media (min-width: 751px) and (max-width: 1070px) {
  .key-layout { gap: 16px; grid-template-columns: 1fr 1fr; }
  .key-caption { flex-wrap: wrap; }
}

@media (max-width: 750px) {
  .key-hero {
    background: radial-gradient(ellipse at 70% 73%, #57412577, transparent 44%), #141618;
 }
  .key-hero::before { mask-image: radial-gradient(ellipse at 60% 75%, #0009, transparent 63%); }
  .key-layout {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
    padding-block: clamp(28px, 5vw, 44px) 43px;
 }
  .key-copy h1 { font-size: min(15.5cqi, 75px); margin: 17px 0; }
  .key-kicker { font-size: .68rem; }
  .key-kicker::before { width: 16px; }
  .key-actions { margin-block-start: 16px; }
  .key-actions .button { padding: 10px 12px; font-size: .81rem; }
  .key-shortcut { margin-block-start: 2px; }
  .key-stage { max-width: 560px; margin-inline: auto; }
  .key-viewport { height: clamp(244px, 74vw, 360px); }
  .key-caption { margin-top: 3px; padding-top: 9px; }
  .key-hero + .deliverable-scene { margin-top: -11px; border-radius: 13px 13px 0 0; }
}

@media (max-width: 440px) {
  .key-layout { width: calc(100% - 36px); }
  .key-caption { justify-content: flex-start; gap: 15px; font-size: .69rem; }
  .key-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 7px;
 }
  .key-actions .button { padding-inline: 6px; gap: 4px; font-size: .78rem; }
  .key-actions .icon { width: 15px; height: 15px; }
}
@media (max-width: 350px) {
  .key-actions .button { padding-inline: 8px; font-size: .75rem; gap: 5px; }
  .key-caption { flex-wrap: wrap; }
}
