/* Document */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Helvetica, sans-serif;
    background-color: #eeeeee;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100svh;
}

a {
    color: black;
    text-decoration: none;
}

main {
    width: 100%;
    max-width: 640px;
    padding: 1rem;
}

/* kcolc */

.kcolc {
    border-radius: 50%;
    position: relative;
    background-color: white;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
    background-color: black;
    padding: 5%;
}

.kcolc__inner {
    aspect-ratio: 1;
    border-radius: 50%;
    position: relative;
    background-color: white;
    transform: rotate(var(--rotation, 0deg));
    transition: transform 1s cubic-bezier( 0.68, -0.55, 0.265, 1.55 );
    box-shadow: inset 0px 0px 8px 2px rgba(0, 0, 0, 0.5);
}

.kcolc__hours,
.kcolc__timezones {
    border-radius: 50%;
    position: absolute;
    inset: 12%;
    container-type: inline-size;
}

/* kcolc hours */

.kcolc__hours {
    background-color: white;
    border: 4px solid white;
    animation: turn 43200s linear infinite; 
    animation-delay: var(--offset, 0ms);
    z-index: 1;
}

@keyframes turn {
  to {
    transform: rotate(-1turn);
  }
}

.kcolc__numbers {
    position: absolute;
    list-style: none;
    display: block;
    margin: 0;
    padding: 0;
    inset: 0;
    font-weight: bold;
}

.kcolc__number {
    position: absolute;
    top: 5%;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(var(--angle));
    text-align: center;
    font-size: 9cqi;
}

.kcolc__segments {
    position: absolute;
    list-style: none;
    display: block;
    margin: 0;
    padding: 0;
    inset: 0;
}

.kcolc__segment {
    position: absolute;
    top: 0;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(var(--angle));
    background: linear-gradient(to bottom, black 4%, transparent 4%);
    width: 0.5%;
    will-change: transform;
    opacity: .25;
}

.kcolc__segment:nth-child(6n+1) {
    width: 1%;
    opacity: 1;
    background: linear-gradient(to bottom, black 8%, transparent 8%);
}

.kcolc__segment:nth-child(6n+4) {
    background: linear-gradient(to bottom, black 8%, transparent 8%);
}

/* kcolc timezones */

.kcolc__timezones {
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 2;
    border: 2px solid #eeeeee;
}

.kcolc__timezone {
    position: absolute;
    top: 0;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    transform: translate(-50%) rotate(var(--timezone-rotation, 0deg));
    text-align: center;
    font-size: 6cqi;
    min-width: 8px;
    font-weight: normal;
    text-transform: capitalize;
    padding-top: 10%;
    font-weight: bold;
    color: #ccc;
}

.kcolc__timezone-label {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
}

.kcolc__timezone-label--GMT {
    color: #ccc;
}

.kcolc__timezone-label::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    margin: 4px auto 4px auto;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid currentColor;
}
