﻿:root {
  --clock-size: min(86vw, 560px);
  --paper: #efe2c3;
  --paper-dark: #d8bf8f;
  --ink: #4f4434;
  --brass-1: #c8a96e;
  --brass-2: #a37f48;
  --brass-3: #6a5029;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 30%, #f4f4f1 0%, #e8e8e2 60%, #d8d8d2 100%);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

.wrap {
  width: 100%;
  display: grid;
  place-items: center;
}

.clock {
  position: relative;
  width: var(--clock-size);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, #f7edd3 0%, var(--paper) 58%, var(--paper-dark) 73%, #8d7248 78%, #5a4627 88%, #342613 100%);
  border: 10px solid #8d6a3b;
  box-shadow:
    inset 0 0 0 2px #d3b37a,
    inset 0 0 0 8px #6d522d,
    inset 0 0 32px rgba(64, 44, 18, 0.5),
    0 20px 40px rgba(0, 0, 0, 0.25);
}

.clock::before {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 2px solid rgba(90, 69, 38, 0.35);
  pointer-events: none;
}

.clock::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(90, 69, 38, 0.35);
  pointer-events: none;
}

.dial {
  position: absolute;
  border-radius: 50%;
  transition: transform 0.08s linear;
}

.minute-dial {
  inset: 11.5%;
  z-index: 1;
}

.hour-dial {
  inset: 22%;
  z-index: 2;
}

.number {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center;
  user-select: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.minute-number {
  font-size: clamp(0.55rem, 1.15vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #7f6640;
  opacity: 0.85;
}

.hour-number {
  font-size: clamp(1.55rem, 3.3vw, 2.6rem);
  font-weight: 700;
  color: #5a4933;
}

.mechanism {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  z-index: 3;
  background:
    radial-gradient(circle at 45% 40%, #b7935a 0%, #8d6b3d 42%, #5f4623 72%, #3a2a15 100%);
  border: 6px solid #c3a269;
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.4),
    inset 0 0 0 2px rgba(42, 30, 12, 0.6);
}

.gear {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d6bb82 0%, #9d7a47 55%, #5d4321 100%);
  border: 2px solid #594124;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.35);
}

.g1 {
  width: 34%;
  aspect-ratio: 1;
  left: 12%;
  top: 18%;
}

.g2 {
  width: 28%;
  aspect-ratio: 1;
  right: 16%;
  top: 42%;
}

.g3 {
  width: 24%;
  aspect-ratio: 1;
  left: 38%;
  bottom: 12%;
}

.hand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: bottom center;
  border-radius: 999px;
  z-index: 5;
}

.hour {
  width: 10px;
  height: 21%;
  background: linear-gradient(180deg, #5c626c 0%, #24282f 100%);
  border: 1px solid #111318;
  transform: translate(-50%, -100%) rotate(90deg);
}

.minute {
  width: 6px;
  height: 34%;
  background: linear-gradient(180deg, #6f767f 0%, #2b3139 100%);
  border: 1px solid #111318;
  transform: translate(-50%, -100%);
}

.pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  background: radial-gradient(circle at 35% 30%, #e0c78d 0%, #a9854f 58%, #654a25 100%);
  border: 2px solid #3a2912;
  display: none;
}

@media (max-width: 700px) {
  .clock {
    border-width: 8px;
  }

  .mechanism {
    inset: 29%;
  }
}
