/* Homepage style switch and shared split-flap clock. */
body > main {position:relative}
.clock-options {position:absolute;top:22px;left:50%;transform:translateX(-50%);display:flex;padding:4px;gap:4px;border:1px solid var(--slate-6);border-radius:14px;background:var(--slate-3);z-index:2;white-space:nowrap}
.clock-options [data-clock-mode] {min-height:40px;padding:0 22px;border-radius:10px;font-size:14px;color:var(--slate-11)}
.clock-options [data-clock-mode][aria-pressed=true] {background:var(--slate-1);color:var(--slate-12);box-shadow:0 1px 4px #00000012}
.clock-options [data-clock-mode]:focus-visible {outline:2px solid var(--indigo-8);outline-offset:2px}
:root[data-clock-mode=flip] .home-dial {display:none}
:root[data-clock-mode=flip] body .time-composition {width:min(1120px,90vw);text-align:center}
.home-flip {display:flex;justify-content:center;align-items:center;gap:2cqw;--card-height:31cqw}
.flip-card {position:relative;flex:1;max-width:46cqw;height:var(--card-height);border-radius:1.6cqw;background:#222326;color:#f1f0eb;perspective:1200px;box-shadow:0 2px 0 #09090b,0 14px 24px -16px #0008;font-family:Arial,Helvetica,sans-serif;font-size:25cqw;line-height:var(--card-height);font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.065em;text-align:center;isolation:isolate}
.flip-half {position:absolute;left:0;width:100%;height:50%;overflow:hidden;backface-visibility:hidden;background:#292a2e}
.flip-half>span {position:absolute;left:0;top:0;width:100%;height:var(--card-height);padding-right:.055em}
.flip-top,.flip-out {top:0;border-radius:1.6cqw 1.6cqw 0 0;background:linear-gradient(#303135,#28292c);color:#e6e5e0;transform-origin:bottom}
.flip-bottom,.flip-in {bottom:0;border-radius:0 0 1.6cqw 1.6cqw;background:linear-gradient(#222326,#27282b);transform-origin:top}
.flip-bottom>span,.flip-in>span {top:calc(var(--card-height) / -2)}
.flip-out,.flip-in {display:none;z-index:2}
.flip-seam {position:absolute;left:0;top:50%;width:100%;height:2px;background:#101114;box-shadow:0 1px 0 #ffffff0d;z-index:3}
.flip-seam:before,.flip-seam:after {content:'';position:absolute;top:-.6cqw;width:.5cqw;height:1.4cqw;border-radius:2px;background:#121315;border:1px solid #ffffff12}
.flip-seam:before {left:.5cqw}.flip-seam:after {right:.5cqw}
.flipping .flip-out {display:block;animation:flip-out .28s ease-in forwards}
.flipping .flip-in {display:block;transform:rotateX(90deg);animation:flip-in .32s .28s ease-out forwards}
@keyframes flip-out {to {transform:rotateX(-90deg);filter:brightness(.6)}}
@keyframes flip-in {to {transform:rotateX(0);filter:brightness(1)}}
:root[data-clock-mode=flip] .signature-meta {margin:30px 0 0;display:flex;justify-content:center}
:root[data-clock-mode=flip] body .date-row {font-size:clamp(13px,1.5cqw,18px);letter-spacing:.03em;gap:14px}
:root[data-clock-mode=flip] .date-row #date:after {margin-left:14px}
:root:is(:fullscreen,.home-fullscreen) body {height:100dvh;min-height:0;display:block;overflow:hidden}
:root:is(:fullscreen,.home-fullscreen) body>.concept-header,:root:is(:fullscreen,.home-fullscreen) .site-footnote,:root:is(:fullscreen,.home-fullscreen) .clock-options {display:none!important}
:root:is(:fullscreen,.home-fullscreen) body>main {height:100%;min-height:0;display:grid;place-items:center}
:root:is(:fullscreen,.home-fullscreen)[data-clock-mode=flip] body .time-composition {width:min(94vw,225vh)}
:root:is(:fullscreen,.home-fullscreen) .home-controls {display:flex!important;position:fixed;bottom:max(16px,env(safe-area-inset-bottom));right:18px;padding:0;z-index:10}
:root:is(:fullscreen,.home-fullscreen) .home-dial {display:none}
:root:is(:fullscreen,.home-fullscreen)[data-clock-mode=flip] .signature-meta {display:flex;margin-top:3cqw}
:root:is(:fullscreen,.home-fullscreen) .quiet {cursor:none}
:root:is(:fullscreen,.home-fullscreen) .quiet .fullscreen-exit {opacity:0;pointer-events:none}
:root:is(:fullscreen,.home-fullscreen) .quiet .fullscreen-exit:focus-visible {opacity:1;pointer-events:auto}
:root:is(:fullscreen,.home-fullscreen) .quiet:has(:focus-visible) {cursor:auto}
@media(max-width:600px) {
  .clock-options {top:18px}.clock-options [data-clock-mode] {padding:0 18px}
  :root[data-clock-mode=flip] body .time-composition {width:92vw}
  .home-flip {gap:2.4cqw;--card-height:43cqw;flex-wrap:wrap}
  .flip-card {flex:0 0 calc(50% - 1.2cqw);max-width:none;font-size:36cqw;border-radius:2cqw}
  .flip-seconds {flex:0 0 27cqw;--card-height:25cqw;font-size:21cqw;margin-top:2cqw;color:#c3c4c7}
  :root[data-clock-mode=flip] .signature-meta {margin-top:24px}
  :root:is(:fullscreen,.home-fullscreen)[data-clock-mode=flip] body .time-composition {width:min(92vw,115vh)}
}
@media(max-height:500px) and (orientation:landscape) {
  .clock-options {top:0}.clock-options [data-clock-mode] {min-height:36px}
  :root[data-clock-mode=flip] body .time-composition {width:min(82vw,190vh);margin-top:40px}
  :root:is(:fullscreen,.home-fullscreen)[data-clock-mode=flip] body .time-composition {margin-top:0;width:min(92vw,210vh)}
  :root[data-clock-mode=flip] .signature-meta {margin-top:14px}
}
@media(prefers-reduced-motion:reduce) {.flipping .flip-out,.flipping .flip-in {display:none}}
:root:is(:fullscreen,.home-fullscreen)[data-clock-mode=flip] .date-row {display:flex!important}
:root:is(:fullscreen,.home-fullscreen) #fullscreenButton {display:none}
:root[data-clock-mode=flip] .display-row:has(#displayWeight) {display:none}

.clock-options a {display:flex;align-items:center;justify-content:center;text-decoration:none;min-width:44px}
:root[data-clock-mode=flip] body>main {padding-top:64px}
:root:is(:fullscreen,.home-fullscreen)[data-clock-mode=flip] body>main {padding-top:0}
/* Keep the analog companion in flow below the new style switch. */
:root[data-clock-mode=digital] body>main {padding-top:72px}
:root[data-clock-mode=digital] .home-dial {position:static;transform:none;width:clamp(104px,14vh,150px);margin:0 auto 24px}
:root:is(:fullscreen,.home-fullscreen)[data-clock-mode=digital] body>main {padding-top:0}
@media(max-height:600px) { :root[data-clock-mode=digital] .home-dial {display:none} }
@media(max-height:500px) and (orientation:landscape) {
  :root[data-clock-mode=flip] body>main {padding-top:48px}
  :root[data-clock-mode=flip] body .time-composition {margin-top:0}
  :root[data-clock-mode=flip] body .date-row {font-size:18px}
  :root:is(:fullscreen,.home-fullscreen)[data-clock-mode=flip] body>main {padding-top:0}
}
/* Keep the fullscreen action beside both clock choices, in the first screen. */
.clock-toolbar{position:absolute;top:22px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;max-width:calc(100% - 24px);z-index:2}
.clock-toolbar .clock-options{position:static;transform:none;flex:none}
.clock-toolbar #fullscreenButton{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:50px;min-width:96px;padding:0 18px;border-radius:14px;background:var(--indigo-9);color:white;border:1px solid transparent;font-size:14px;font-weight:500;white-space:nowrap;box-shadow:0 2px 6px #00000010}
.clock-toolbar #fullscreenButton:hover{background:var(--indigo-10)}
.clock-toolbar #fullscreenButton:focus-visible{outline:2px solid var(--indigo-8);outline-offset:3px}
.clock-toolbar #fullscreenButton svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.6;fill:none}
:root:is(:fullscreen,.home-fullscreen) .clock-toolbar{display:none!important}
@media(max-width:600px){.clock-toolbar{top:18px;gap:10px}.clock-toolbar #fullscreenButton{min-width:82px;padding:0 14px}.clock-toolbar .clock-options [data-clock-mode]{padding:0 14px}}
@media(max-height:500px) and (orientation:landscape){.clock-toolbar{top:0}.clock-toolbar #fullscreenButton{min-height:46px}}
