.prism-toggle {
--graphite: #252a35;
--slate: #434b5c;
--line: #697386;
--electric: #63f2d7;
--blue: #5787ff;
display: inline-grid;
gap: 13px;
cursor: pointer;
user-select: none;
font-family: Arial, sans-serif;
}
.prism-toggle input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.prism-body {
position: relative;
display: grid;
width: 164px;
height: 142px;
place-items: center;
overflow: hidden;
clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
background: linear-gradient(145deg, #4a5262, #1c2029 62%);
box-shadow: inset 0 0 0 3px #667085, inset 0 0 28px #0b0e15, 0 14px 22px rgba(22, 28, 42, .28);
}
.prism-body::before {
content: "";
position: absolute;
inset: 6px;
clip-path: inherit;
background: var(--graphite);
box-shadow: inset 0 0 18px #0d1017;
}
.prism-grid {
position: absolute;
z-index: 1;
width: 112px;
height: 98px;
opacity: .35;
background-image: linear-gradient(30deg, transparent 47%, #9ea8ba 48%, #9ea8ba 52%, transparent 53%), linear-gradient(150deg, transparent 47%, #9ea8ba 48%, #9ea8ba 52%, transparent 53%);
background-size: 22px 32px;
mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
transition: opacity .45s ease;
}
.prism-orbit {
position: absolute;
z-index: 2;
width: 88px;
height: 88px;
border: 2px dashed #667085;
border-radius: 50%;
transform: rotate(-25deg);
transition: border-color .45s ease, transform .75s cubic-bezier(.2, .9, .2, 1);
}
.prism-orbit span {
position: absolute;
top: -6px;
left: 37px;
width: 11px;
height: 11px;
border-radius: 50%;
background: #8b94a5;
box-shadow: 0 0 0 3px #343a48;
transition: background .4s ease, box-shadow .4s ease;
}
.prism-beacon {
position: relative;
z-index: 3;
display: grid;
width: 50px;
height: 50px;
place-items: center;
background: linear-gradient(135deg, #596273, #202631);
box-shadow: 8px 8px 12px #11151e, -3px -3px 7px #70798b, inset 2px 2px 4px #7e8798;
transform: rotate(45deg);
transition: transform .6s cubic-bezier(.34, 1.56, .64, 1), background .45s ease, box-shadow .45s ease;
}
.prism-beacon i {
width: 13px;
height: 13px;
border: 2px solid #a6afbf;
border-radius: 50%;
box-shadow: inset 0 0 5px #151a24;
transition: background .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.prism-pulse {
position: absolute;
z-index: 1;
width: 28px;
height: 28px;
border: 1px solid transparent;
border-radius: 50%;
opacity: 0;
}
.prism-copy {
display: flex;
justify-content: space-between;
padding: 0 8px;
color: #3e4859;
font-size: 10px;
font-weight: 800;
letter-spacing: 1.3px;
}
.prism-copy span:last-child {
opacity: .35;
transition: opacity .35s ease;
}
.prism-toggle input:checked + .prism-body {
background: linear-gradient(145deg, #6f8cff, #26386e 62%);
}
.prism-toggle input:checked + .prism-body .prism-grid {
opacity: .72;
}
.prism-toggle input:checked + .prism-body .prism-orbit {
border-color: var(--electric);
transform: rotate(335deg);
}
.prism-toggle input:checked + .prism-body .prism-orbit span {
background: var(--electric);
box-shadow: 0 0 0 3px #2d3f72, 0 0 13px var(--electric);
}
.prism-toggle input:checked + .prism-body .prism-beacon {
transform: rotate(225deg) scale(1.12);
background: linear-gradient(135deg, #9cfff0, #4193e8);
box-shadow: 0 0 20px rgba(99, 242, 215, .75), 8px 8px 12px #172b55, inset 2px 2px 5px #d6ffff;
}
.prism-toggle input:checked + .prism-body .prism-beacon i {
background: #fff;
border-color: #fff;
box-shadow: 0 0 12px #fff;
}
.prism-toggle input:checked + .prism-body .prism-pulse {
animation: prism-pulse 1.5s ease-out infinite;
}
.prism-toggle input:checked ~ .prism-copy span:first-child { opacity: .35; }
.prism-toggle input:checked ~ .prism-copy span:last-child { opacity: 1; }
.prism-toggle:has(input:focus-visible) .prism-body {
outline: 3px solid var(--electric);
outline-offset: 6px;
}
@keyframes prism-pulse {
0% { transform: scale(.8); opacity: .8; border-color: var(--electric); }
100% { transform: scale(3.8); opacity: 0; border-color: var(--blue); }
}
You need to sign in before you can write a comment.