:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #11150e;
  color: #fff8e9;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 280px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(114, 102, 48, 0.32), transparent 42%),
    radial-gradient(circle at 50% 110%, rgba(31, 74, 25, 0.42), transparent 47%),
    linear-gradient(160deg, #1e2819 0%, #11150e 56%, #080a07 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 76%);
}

.clock-stage {
  display: grid;
  width: 100%;
  min-height: 100svh;
  place-items: center;
  padding: clamp(0.5rem, 2.2vmin, 1.5rem);
}

.onion-clock {
  display: block;
  width: min(100%, calc(100svh * 0.87));
  height: min(100svh, calc(100vw * 1.15));
  max-height: calc(100svh - 1rem);
  overflow: visible;
  filter: saturate(1.05);
}

.leaves {
  fill: url("#leaf-fill");
  stroke: #243f1d;
  stroke-width: 8;
  stroke-linejoin: round;
}

.leaves path:nth-child(2) {
  filter: brightness(0.86);
}

.leaves path:nth-child(3) {
  filter: brightness(0.92);
}

.leaves path:nth-child(4) {
  filter: brightness(1.08);
}

.bulb {
  fill: url("#bulb-fill");
  stroke: #5b3319;
  stroke-width: 11;
  stroke-linejoin: round;
}

.skin-line {
  fill: none;
  stroke: #6f3d1d;
  stroke-width: 8;
  stroke-linecap: round;
  opacity: 0.36;
}

.roots {
  fill: none;
  stroke: #c58c45;
  stroke-width: 9;
  stroke-linecap: round;
}

.dial-ring {
  fill: #58341c;
  stroke: #2e1c11;
  stroke-width: 8;
}

.dial-face {
  fill: url("#dial-fill");
  stroke: #9e6a30;
  stroke-width: 7;
}

.hour-marks {
  stroke: #342318;
  stroke-width: 9;
  stroke-linecap: round;
}

.numbers {
  fill: #3b281a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.hand {
  transform-origin: 400px 487px;
}

.hand line {
  stroke-linecap: round;
}

.hour-hand line {
  stroke: #322117;
  stroke-width: 22;
}

.minute-hand line {
  stroke: #4e3421;
  stroke-width: 14;
}

.second-hand {
  fill: #a4311e;
}

.second-hand line {
  stroke: #a4311e;
  stroke-width: 6;
}

.pin-shadow {
  fill: #2b1a11;
  opacity: 0.42;
}

.pin {
  fill: #c2482f;
  stroke: #692416;
  stroke-width: 4;
}

.digital-time {
  fill: rgba(58, 35, 19, 0.7);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-aspect-ratio: 3 / 5) {
  .onion-clock {
    width: 100%;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .onion-clock {
    filter: none;
  }
}
