/* Hoot v2 home page, #timer section (2026-11-12). Loaded on / only, AFTER /assets/v2/timer.css.
   The timer itself is the one from /pomodoro-timer (timer.css + timer.js). This file only undoes that page's
   full-screen hero layout (sky, land, paintings, owl) and lays the same parts out as a home section:
   a ring with the clock inside it, and the panel beside it (below it on phones). */

body.v2 .h-home-timer { position: relative; background: var(--h-bg); }
body.v2 .h-home-timer__stars { position: absolute; inset: 0 0 auto 0; width: 100%; height: 260px; pointer-events: none; }
body.v2 .h-home-timer .h-container { position: relative; }
body.v2 .h-home-timer .h-section-head { margin-bottom: clamp(28px, 4vw, 44px); }

/* the timer root: a plain block, not a hero */
body.v2 .tm-hero.tm-hero--home {
  --ring: 232px;
  --owl: calc(var(--ring) * .75);
  --k: 1;
  margin: 0 auto;
  padding: 0;
  min-height: 0;
  max-width: 860px;
  overflow: visible;
  background: transparent;
}
@media (min-width: 600px) { body.v2 .tm-hero.tm-hero--home { --ring: 264px; --k: 1.1; } }
@media (min-width: 860px) { body.v2 .tm-hero.tm-hero--home { --ring: 300px; --k: 1.2; } }

body.v2 .tm-home__grid { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 22px; }
@media (min-width: 860px) {
  body.v2 .tm-home__grid { grid-template-columns: auto minmax(0, 440px); justify-content: center; align-items: start; column-gap: clamp(40px, 6vw, 84px); }
}

body.v2 .tm-hero--home .tm-scene { grid-area: auto; align-self: start; justify-self: center; margin-top: 0; z-index: 1; }
body.v2 .tm-hero--home .tm-panel { grid-area: auto; margin-top: 0; max-width: 440px; }
@media (min-width: 860px) { body.v2 .tm-hero--home .tm-scene { margin-top: 6px; } }

/* the dial: the ring is always there, with a soft glow inside it */
body.v2 .tm-hero--home .tm-stage {
  border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, rgba(148, 169, 255, .1), rgba(148, 169, 255, .03) 52%, transparent 70%);
}
body.v2 .tm-hero--home .tm-ring { opacity: 1; }
body.v2 .tm-hero--home[data-view="ready"] .hoot-ring-fill { opacity: 0; }

/* the clock sits in the middle of the ring and stays there in every state */
body.v2 .tm-hero--home .tm-readout,
body.v2 .tm-hero--home[data-scene="nest"] .tm-readout {
  position: absolute; inset: 0; z-index: 3;
  justify-content: center;
  margin: 0; min-height: 0; padding-top: 14px;
  transform: none;
}
body.v2 .tm-hero--home .tm-round { min-height: 18px; margin-top: 2px; }
/* long clocks (hours) and the tiled Classic style still fit inside the ring */
body.v2 .tm-hero--home .popup-clock { max-width: calc(var(--ring) - 34px); padding: 0 4px; }
body.v2 .tm-hero--home .hoot-clock--classic { font-size: calc(36px * var(--k)); gap: 3px; }
body.v2 .tm-hero--home .popup-clock:has(> :nth-child(7)) { font-size: calc(34px * var(--k)); }
body.v2 .tm-hero--home .hoot-clock--classic:has(> :nth-child(7)) { font-size: calc(25px * var(--k)); gap: 2px; }

/* finished or ended: the old clock steps out (as on /pomodoro-timer) and a mint tick takes its place in a full ring.
   No owl here, so no sparkles placed beside one. */
body.v2 .tm-hero--home .tm-stage::before { content: none; }
body.v2 .tm-hero--home .tm-stage::after,
body.v2 .tm-hero--home[data-view="finished"] .tm-stage::after {
  content: "\2713"; inset: 0; display: grid; place-items: center;
  color: #6dd6b3; font-size: calc(64px * var(--k)); font-weight: 700; line-height: 1;
  text-shadow: 0 0 10px rgba(109, 214, 179, .45), 0 0 26px rgba(109, 214, 179, .22);
  opacity: 0; transform: scale(.8); animation: none;
  transition: opacity .3s var(--h-ease-out), transform .45s var(--h-ease-out);
}
body.v2 .tm-hero--home:is([data-view="finished"], [data-view="saved"]) .tm-stage::after { opacity: 1; transform: none; }
body.v2 .tm-hero--home:is([data-view="finished"], [data-view="saved"]) .hoot-ring-fill { stroke: #6dd6b3; stroke-dashoffset: 0; animation: none; filter: drop-shadow(0 0 5px rgba(109, 214, 179, .5)); }
html.motion-off body.v2 .tm-hero--home .tm-stage::after { transition: none; opacity: 0; }
html.motion-off body.v2 .tm-hero--home:is([data-view="finished"], [data-view="saved"]) .tm-stage::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { body.v2 .tm-hero--home .tm-stage::after { transition: none; } }

body.v2 .h-home-timer .tm-note { margin-top: clamp(22px, 3vw, 32px); }

/* r22 fix: shorter run of empty dark before the valley band */
body.v2 .h-home-timer { padding-bottom: calc(var(--h-section-y) * .5); }
