/* Full-screen clock. Loaded after ../assets/style.css: uses the portfolio's
   tokens and shared nav. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.clock {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 2rem 1.5rem 12vh;
}

.now {
  font-family: var(--serif);
  font-size: clamp(3.25rem, 14vw, 8.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.now .sec, .now .ampm { color: var(--muted); font-weight: 400; }
.now .ampm { font-size: 0.32em; letter-spacing: 0; margin-left: 0.35em; }

/* The clock itself is a button: click (or Enter) flips digital/analogue,
   remembered per browser. */
.face {
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
}
.face:focus-visible { outline: 1px solid var(--border); outline-offset: 0.75rem; }
.face .analog { display: none; }
.face.is-analog .now { display: none; }
.face.is-analog .analog { display: block; }

.analog {
  width: min(540px, 88vw, 62vh);
  height: auto;
  overflow: visible;
}
.analog .rim { fill: none; stroke: var(--border); stroke-width: 1.5; }
.analog .tick { stroke: var(--border); stroke-width: 1; stroke-linecap: round; }
.analog .tick.hour { stroke: var(--muted); stroke-width: 2; }
.analog .tick.quarter { stroke: var(--fg); stroke-width: 2.5; }
.analog .num {
  fill: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  text-anchor: middle;
  dominant-baseline: central;
}
.analog .num.quarter { fill: var(--fg); font-weight: 600; }
.analog .ampm {
  fill: var(--muted);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-anchor: middle;
}
/* Baton hands: flat bars outlined in the background colour so they stay
   distinct where they cross, a thin lime second hand, and a hub on top. */
.analog .hand { fill: var(--fg); stroke: var(--bg); stroke-width: 1; stroke-linejoin: round; }
.analog .hub { fill: var(--fg); stroke: var(--bg); stroke-width: 1; }
.analog .sec { stroke: var(--nav-accent); stroke-width: 1.1; }
.analog .pin { fill: var(--nav-accent); }

.date { margin: 0; font-family: var(--serif); font-size: clamp(1rem, 3vw, 1.3rem); color: var(--muted); }

/* How much of today (midnight to midnight) has passed. */
.day {
  width: min(320px, 70vw);
  height: 2px;
  margin-top: 1.25rem;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.day span { display: block; height: 100%; width: 0; background: var(--nav-accent); }

.day-label, .meta { margin: 0; font-family: var(--serif); font-size: 0.75rem; color: var(--muted); }
.meta { margin-top: 0.5rem; }

/* Music toggle: quiet text button under the clock, lime while playing. */
/* Music: round speaker toggle (lime while playing) and the track number beside
   it; clicking the number switches track. */
.sound-row { display: flex; align-items: center; gap: 0.35rem; margin-top: 1.25rem; }
.sound, .track {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.sound { border-color: var(--border); }
.sound:hover, .sound:focus-visible { color: var(--fg); border-color: var(--muted); outline: none; }
.track:hover, .track:focus-visible { color: var(--fg); outline: none; }
.track:focus-visible { border-color: var(--border); }
.sound svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound .wave { display: none; }
.sound[aria-pressed="true"] { color: var(--nav-accent); border-color: color-mix(in srgb, var(--nav-accent) 40%, transparent); }
.sound[aria-pressed="true"] .wave { display: inline; }
.sound[aria-pressed="true"] .mute { display: none; }
.sound[aria-pressed="true"] + .track { color: var(--nav-accent); }
