• Updated 30 Nov, 18:10 UTC
  • Next run 1 Dec, 05:17 UTCNext 1 Dec 05:17
  • Last 7 days: 5 new models · 76 runs7 d: 5 models · 76 runs
Wristwatch that shows the current time

DaisyRose 27BRadixArk

Network offOpen alone (new tab)

Run details

Model
radixark/daisyrose-27b
Route
OpenRouter API
Served by
DeepInfra
Effort
xhigh (OpenRouter default)
Limits
60 min · 235,929 output tokens (model max)
Date
26 Nov 2026
Time
3 min 54 s
Size
23 kB
Tokens
128 in, 41,718 out (32,795 thinking)
List price
$0.078 at today's price ($0.15 in / $1.88 out per M)
Paid
$0.078

Raw: output · meta.json

Prompt

Draw a mechanical wristwatch that shows the current local time, with a sweeping seconds hand and a date window. Make it look expensive.

It must be one complete, self-contained HTML file: inline all CSS and JavaScript, and make no network requests of any kind (no CDNs, web fonts or remote images). Reply with the file in a single ```html code block.

Source

23 kB 512 lines Raw

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Aurélin — Calibre AT·73 · Genève</title>
<style>
  :root{
    --ink:#efe7d6;
    --ink-dim:#b9ad93;
    --gold:#d8b37e;
    --gold-dim:#9b7f56;
    --line:rgba(216,179,126,.22);
    --serif:"Didot","Bodoni MT","Bodoni 72","Playfair Display",Georgia,"Times New Roman",serif;
    --sans:"Optima","Gill Sans","Gill Sans MT","Candara","Trebuchet MS","Segoe UI",sans-serif;
  }
  *{box-sizing:border-box}
  html,body{height:100%}
  body{
    margin:0; overflow:hidden;
    display:grid; grid-template-rows:auto 1fr auto;
    background:
      radial-gradient(60% 45% at 50% 28%, rgba(255,214,150,.10), transparent 70%),
      radial-gradient(120% 90% at 50% 32%, #1d4536 0%, #123125 42%, #0a1c14 74%, #05100b 100%);
    color:var(--ink);
    font-family:var(--sans);
    user-select:none;
  }
  body::before{ /* fine grain */
    content:""; position:fixed; inset:0; pointer-events:none; z-index:5;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
    opacity:.05; mix-blend-mode:overlay;
  }
  body::after{ /* vignette */
    content:""; position:fixed; inset:0; pointer-events:none; z-index:4;
    background:radial-gradient(90% 80% at 50% 42%, transparent 55%, rgba(2,8,5,.62) 100%);
  }

  /* ---------- header ---------- */
  header{
    position:relative; z-index:6;
    display:flex; justify-content:space-between; align-items:flex-start;
    padding:26px 44px 0;
  }
  .wm{
    font-family:var(--serif);
    font-size:clamp(19px,2.2vw,27px);
    letter-spacing:.4em; text-transform:uppercase;
    color:var(--ink); font-weight:400; line-height:1;
  }
  .sub{
    display:block; margin-top:8px;
    font-size:10px; letter-spacing:.32em; text-transform:uppercase;
    color:var(--gold-dim);
  }
  .caliber{text-align:right}

  /* ---------- stage ---------- */
  .stage{position:relative; display:flex; align-items:center; justify-content:center; z-index:1}
  .halo{
    position:absolute; left:50%; top:44%; width:76vmin; height:76vmin;
    transform:translate(-50%,-50%);
    background:radial-gradient(circle, rgba(255,213,150,.14), rgba(255,213,150,.05) 45%, transparent 70%);
    filter:blur(12px); pointer-events:none;
    animation:breathe 7s ease-in-out infinite alternate;
  }
  @keyframes breathe{
    from{opacity:.65; transform:translate(-50%,-50%) scale(1)}
    to{opacity:1; transform:translate(-50%,-50%) scale(1.05)}
  }
  .watch-tilt{position:relative; will-change:transform}
  .watch-in{
    position:relative;
    animation:watchIn 1.25s cubic-bezier(.16,.84,.3,1) .12s both;
  }
  @keyframes watchIn{
    from{opacity:0; transform:translateY(30px) scale(.965)}
    to{opacity:1; transform:none}
  }
  #watch{
    display:block; height:min(76vh,760px); width:auto; max-width:96vw;
    filter:drop-shadow(0 34px 48px rgba(0,0,0,.55)) drop-shadow(0 8px 14px rgba(0,0,0,.4));
  }
  .glare{
    position:absolute; left:48.5%; top:39.53%; width:70.6%; aspect-ratio:1/1;
    transform:translate(-50%,-50%);
    border-radius:50%; pointer-events:none; mix-blend-mode:screen; will-change:transform;
    background:radial-gradient(circle at 34% 26%, rgba(255,255,255,.30), rgba(255,255,255,.06) 42%, transparent 62%);
  }
  .sheen{
    position:absolute; left:48.5%; top:39.53%; width:70.6%; aspect-ratio:1/1;
    transform:translate(-50%,-50%);
    border-radius:50%; overflow:hidden; pointer-events:none; mix-blend-mode:screen;
  }
  .sheen::before{
    content:""; position:absolute; inset:-25%;
    background:linear-gradient(115deg, transparent 42%, rgba(255,248,235,.16) 50%, transparent 58%);
    animation:sweep 9s linear infinite;
  }
  @keyframes sweep{
    0%{transform:translateX(-130%)}
    55%,100%{transform:translateX(130%)}
  }
  #dateWin{transform-box:fill-box; transform-origin:center}
  #dateWin.roll{animation:dateRoll .5s cubic-bezier(.34,1.2,.4,1)}
  @keyframes dateRoll{
    0%{transform:translateY(0); opacity:1}
    40%{transform:translateY(-9px); opacity:.25}
    100%{transform:translateY(0); opacity:1}
  }

  /* ---------- footer ---------- */
  footer{position:relative; z-index:6; display:flex; flex-direction:column; align-items:center; gap:12px; padding:0 20px 26px}
  .specline{display:flex; align-items:center; flex-wrap:wrap; justify-content:center}
  .edge{
    font-size:10px; letter-spacing:.3em; color:var(--gold-dim);
    text-transform:uppercase; white-space:nowrap; padding:0 26px;
  }
  .specs{display:flex; list-style:none; margin:0; padding:0; flex-wrap:wrap; justify-content:center}
  .specs li{
    font-size:10px; letter-spacing:.26em; color:var(--ink-dim);
    text-transform:uppercase; padding:0 20px; border-left:1px solid var(--line);
    transition:color .35s; cursor:default;
  }
  .specs li:first-child{border-left:0}
  .specs li:hover{color:var(--gold)}
  .readout{
    font-size:11px; letter-spacing:.3em; color:var(--gold);
    font-variant-numeric:tabular-nums; text-transform:uppercase;
  }
  .readout b{color:var(--ink); font-weight:600}

  /* ---------- entrances ---------- */
  @keyframes rise{from{opacity:0; transform:translateY(14px)} to{opacity:1; transform:none}}
  .rise{opacity:0; animation:rise .9s cubic-bezier(.22,.8,.3,1) forwards}
  .d1{animation-delay:.2s}.d2{animation-delay:.5s}.d3{animation-delay:.75s}

  @media (max-width:720px){
    header{padding:20px 22px 0}
    .specs li{padding:0 10px; letter-spacing:.18em}
    .edge{display:none}
  }
  @media (prefers-reduced-motion: reduce){
    .sheen::before,.halo,.watch-in{animation:none}
    .rise{animation:none; opacity:1}
  }
</style>
</head>
<body>

<header class="rise d1">
  <div>
    <span class="wm">Aurélin</span>
    <span class="sub">Haute Horlogerie · Genève</span>
  </div>
  <div class="caliber">
    <span class="wm">Calibre AT·73</span>
    <span class="sub">Édition Privée — Automatic</span>
  </div>
</header>

<main class="stage" id="stage">
  <div class="halo"></div>
  <div class="watch-tilt" id="tilt">
    <div class="watch-in">

      <svg id="watch" viewBox="0 0 680 860" role="img"
           aria-label="Mechanical wristwatch — Aurélin Calibre AT·73, showing the current local time">
        <defs>
          <linearGradient id="caseG" x1="0" y1="0" x2="1" y2="1">
            <stop offset="0" stop-color="#f9e6c8"/>
            <stop offset="0.22" stop-color="#e0a972"/>
            <stop offset="0.5" stop-color="#8f5a2e"/>
            <stop offset="0.74" stop-color="#c98f57"/>
            <stop offset="1" stop-color="#f2d5ab"/>
          </linearGradient>
          <linearGradient id="bezelG" x1="0" y1="0" x2="0.85" y2="1">
            <stop offset="0" stop-color="#fff3e0"/>
            <stop offset="0.3" stop-color="#f0c896"/>
            <stop offset="0.62" stop-color="#a86f3c"/>
            <stop offset="0.85" stop-color="#6f4220"/>
            <stop offset="1" stop-color="#d8a76b"/>
          </linearGradient>
          <linearGradient id="rehautG" x1="0" y1="0" x2="1" y2="1">
            <stop offset="0" stop-color="#eedcb4"/>
            <stop offset="1" stop-color="#b58a52"/>
          </linearGradient>
          <radialGradient id="dialG" cx="0.5" cy="0.44" r="0.62">
            <stop offset="0" stop-color="#fbf8f1"/>
            <stop offset="0.55" stop-color="#f0ebdf"/>
            <stop offset="0.85" stop-color="#ded7c3"/>
            <stop offset="1" stop-color="#c9c0a8"/>
          </radialGradient>
          <radialGradient id="dialSheenG" cx="0.34" cy="0.28" r="0.8">
            <stop offset="0" stop-color="#ffffff" stop-opacity="0.5"/>
            <stop offset="0.5" stop-color="#ffffff" stop-opacity="0.07"/>
            <stop offset="1" stop-color="#ffffff" stop-opacity="0"/>
          </radialGradient>
          <linearGradient id="idxG" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stop-color="#f7ddb2"/>
            <stop offset="0.55" stop-color="#c08a52"/>
            <stop offset="1" stop-color="#7e4f26"/>
          </linearGradient>
          <linearGradient id="bluedH" x1="0" y1="0" x2="1" y2="0">
            <stop offset="0" stop-color="#b9cdf3"/>
            <stop offset="0.38" stop-color="#5f86cf"/>
            <stop offset="0.56" stop-color="#1e3a78"/>
            <stop offset="0.8" stop-color="#101f4b"/>
            <stop offset="1" stop-color="#23448c"/>
          </linearGradient>
          <linearGradient id="bluedS" x1="0" y1="0" x2="1" y2="0">
            <stop offset="0" stop-color="#dce8fb"/>
            <stop offset="0.5" stop-color="#274b9c"/>
            <stop offset="1" stop-color="#12265a"/>
          </linearGradient>
          <radialGradient id="capG" cx="0.35" cy="0.3" r="0.9">
            <stop offset="0" stop-color="#ffedcf"/>
            <stop offset="0.6" stop-color="#caa06b"/>
            <stop offset="1" stop-color="#8a5c2f"/>
          </radialGradient>
          <linearGradient id="leatherG" x1="0" y1="0" x2="1" y2="0">
            <stop offset="0" stop-color="#33200f"/>
            <stop offset="0.2" stop-color="#5d3a20"/>
            <stop offset="0.5" stop-color="#7c5030"/>
            <stop offset="0.8" stop-color="#5d3a20"/>
            <stop offset="1" stop-color="#33200f"/>
          </linearGradient>
          <linearGradient id="leatherG2" x1="0" y1="0" x2="1" y2="0">
            <stop offset="0" stop-color="#2a1a0c"/>
            <stop offset="0.2" stop-color="#543318"/>
            <stop offset="0.5" stop-color="#6f4626"/>
            <stop offset="0.8" stop-color="#543318"/>
            <stop offset="1" stop-color="#2a1a0c"/>
          </linearGradient>
          <linearGradient id="crownG" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stop-color="#f3d3a8"/>
            <stop offset="0.35" stop-color="#c89058"/>
            <stop offset="0.7" stop-color="#7c4e26"/>
            <stop offset="1" stop-color="#c89058"/>
          </linearGradient>
          <linearGradient id="dateFrameG" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stop-color="#f0d5ae"/>
            <stop offset="1" stop-color="#9c6a34"/>
          </linearGradient>
          <linearGradient id="winInsetG" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stop-color="#000000" stop-opacity="0.18"/>
            <stop offset="0.35" stop-color="#000000" stop-opacity="0"/>
          </linearGradient>
          <radialGradient id="lensG" cx="0.5" cy="0.42" r="0.65">
            <stop offset="0" stop-color="#ffffff" stop-opacity="0.34"/>
            <stop offset="0.65" stop-color="#ffffff" stop-opacity="0.12"/>
            <stop offset="1" stop-color="#ffffff" stop-opacity="0"/>
          </radialGradient>

          <filter id="softShadow" x="-40%" y="-40%" width="180%" height="180%">
            <feDropShadow dx="2" dy="4" stdDeviation="3" flood-color="#160d04" flood-opacity="0.45"/>
          </filter>
          <filter id="handShadow" x="-60%" y="-60%" width="220%" height="220%">
            <feDropShadow dx="3" dy="6" stdDeviation="4" flood-color="#0d0d07" flood-opacity="0.38"/>
          </filter>

          <clipPath id="dialClip"><circle cx="330" cy="340" r="240"/></clipPath>
          <clipPath id="winClip"><rect x="482" y="319" width="52" height="42" rx="5"/></clipPath>
          <path id="rehautPath" d="M330,340 m-247,0 a247,247 0 1,1 494,0 a247,247 0 1,1 -494,0" fill="none"/>
        </defs>

        <!-- leather strap -->
        <g>
          <path d="M252,0 L408,0 L404,150 L256,150 Z" fill="url(#leatherG)"/>
          <path d="M266,2 L262,118" stroke="#d8b583" stroke-width="1.8" stroke-dasharray="6 6" opacity=".5" fill="none"/>
          <path d="M394,2 L398,118" stroke="#d8b583" stroke-width="1.8" stroke-dasharray="6 6" opacity=".5" fill="none"/>
          <path d="M256,600 L404,600 L412,860 L248,860 Z" fill="url(#leatherG2)"/>
          <path d="M262,620 L254,858" stroke="#d8b583" stroke-width="1.8" stroke-dasharray="6 6" opacity=".45" fill="none"/>
          <path d="M398,620 L406,858" stroke="#d8b583" stroke-width="1.8" stroke-dasharray="6 6" opacity=".45" fill="none"/>
          <rect x="250" y="696" width="162" height="38" rx="8" fill="url(#leatherG)" stroke="rgba(0,0,0,.35)"/>
          <line x1="252" y1="700" x2="410" y2="700" stroke="rgba(255,230,190,.22)" stroke-width="1.5"/>
        </g>

        <!-- crown -->
        <g>
          <rect x="592" y="326" width="16" height="28" fill="#7a4d26"/>
          <rect x="606" y="314" width="44" height="52" rx="11" fill="url(#crownG)" stroke="rgba(50,25,8,.5)"/>
          <line x1="618" y1="318" x2="618" y2="362" stroke="rgba(60,30,10,.4)" stroke-width="2"/>
          <line x1="626" y1="316" x2="626" y2="364" stroke="rgba(60,30,10,.4)" stroke-width="2"/>
          <line x1="634" y1="316" x2="634" y2="364" stroke="rgba(60,30,10,.4)" stroke-width="2"/>
          <line x1="642" y1="318" x2="642" y2="362" stroke="rgba(60,30,10,.4)" stroke-width="2"/>
          <line x1="612" y1="321" x2="644" y2="321" stroke="rgba(255,240,210,.55)" stroke-width="1.6"/>
        </g>

        <!-- case & bezel -->
        <circle cx="330" cy="340" r="282" fill="url(#caseG)" stroke="rgba(40,20,5,.6)" stroke-width="1.5"/>
        <circle cx="330" cy="340" r="266" fill="url(#bezelG)" stroke="rgba(255,240,215,.5)" stroke-width="1"/>
        <circle cx="330" cy="340" r="254" fill="url(#rehautG)"/>
        <text font-size="10.5" letter-spacing="2.5" fill="#7a5636" opacity=".85"
              font-family="Optima,'Gill Sans','Trebuchet MS',sans-serif">
          <textPath href="#rehautPath">AURÉLIN · GENÈVE · AURÉLIN · GENÈVE · AURÉLIN · GENÈVE · AURÉLIN · GENÈVE · AURÉLIN · GENÈVE · AURÉLIN · GENÈVE · AURÉLIN · GENÈVE · AURÉLIN · GENÈVE ·</textPath>
        </text>

        <!-- dial -->
        <circle cx="330" cy="340" r="240" fill="url(#dialG)"/>
        <g clip-path="url(#dialClip)" id="sunray"></g>
        <circle cx="330" cy="340" r="240" fill="url(#dialSheenG)" opacity=".6"/>
        <g id="ticks"></g>
        <circle cx="330" cy="340" r="240" fill="none" stroke="rgba(30,20,10,.35)" stroke-width="5"/>
        <circle cx="330" cy="340" r="236" fill="none" stroke="rgba(255,255,255,.35)" stroke-width="1"/>

        <!-- applied indices -->
        <g id="indices" filter="url(#softShadow)"></g>

        <!-- dial lettering -->
        <text x="330" y="252" text-anchor="middle" font-family="Didot,'Bodoni MT',Georgia,serif"
              font-size="31" letter-spacing="8" fill="#2b2620">AURÉLIN</text>
        <text x="330" y="274" text-anchor="middle" font-size="10" letter-spacing="5"
              font-family="Optima,'Gill Sans','Trebuchet MS',sans-serif" fill="#6e6355">GENÈVE</text>
        <text x="330" y="432" text-anchor="middle" font-size="10" letter-spacing="4.5"
              font-family="Optima,'Gill Sans','Trebuchet MS',sans-serif" fill="#6e6355">AUTOMATIQUE</text>
        <text x="330" y="562" text-anchor="middle" font-size="9" letter-spacing="3"
              font-family="Optima,'Gill Sans','Trebuchet MS',sans-serif" fill="#8a7f6c">SWISS MADE</text>

        <!-- date window with cyclops -->
        <g id="dateWin">
          <rect x="482" y="319" width="52" height="42" rx="5" fill="#f9f7f1"/>
          <g clip-path="url(#winClip)">
            <text id="dateText" x="508" y="351" text-anchor="middle"
                  font-family="Arial,'Helvetica Neue',sans-serif" font-size="34" font-weight="600"
                  fill="#191713">1</text>
          </g>
          <rect x="484" y="321" width="48" height="5" rx="3" fill="url(#winInsetG)"/>
          <rect x="482" y="319" width="52" height="42" rx="5" fill="none" stroke="url(#dateFrameG)" stroke-width="3"/>
          <ellipse cx="508" cy="340" rx="31" ry="25" fill="url(#lensG)"/>
        </g>

        <!-- hands -->
        <g transform="translate(330 340)">
          <g id="hourG" transform="rotate(280)" filter="url(#handShadow)">
            <path d="M0,-124 L8.5,8 L0,22 L-8.5,8 Z" fill="url(#bluedH)" stroke="#0e1f47" stroke-width="0.8"/>
          </g>
          <g id="minG" transform="rotate(120)" filter="url(#handShadow)">
            <path d="M0,-198 L7.5,6 L0,20 L-7.5,6 Z" fill="url(#bluedH)" stroke="#0e1f47" stroke-width="0.8"/>
          </g>
          <g id="secG" filter="url(#handShadow)">
            <path d="M0,-214 L2.6,-198 L2.6,58 L-2.6,58 L-2.6,-198 Z" fill="url(#bluedS)" stroke="#0a1c44" stroke-width="0.5"/>
            <circle cy="38" r="9" fill="url(#bluedS)" stroke="#0a1c44" stroke-width="0.6"/>
          </g>
          <circle r="9.5" fill="url(#capG)"/>
          <circle r="4.5" fill="#14295e"/>
        </g>

        <!-- crystal highlights -->
        <path d="M93.3 276.6 A245 245 0 0 1 266.6 103.3" fill="none" stroke="rgba(255,255,255,.45)" stroke-width="2"/>
        <path d="M566.7 276.6 A245 245 0 0 1 542.2 462.5" fill="none" stroke="rgba(255,255,255,.14)" stroke-width="1.5"/>
      </svg>

      <div class="sheen"></div>
      <div class="glare" id="glare"></div>
    </div>
  </div>
</main>

<footer>
  <div class="specline rise d2">
    <span class="edge">Est. 1874</span>
    <ul class="specs">
      <li>42 mm</li>
      <li>18k Rose Gold</li>
      <li>28 800 vph</li>
      <li>72 h Reserve</li>
      <li>Sapphire · Cyclops</li>
    </ul>
    <span class="edge">N° 047 / 500</span>
  </div>
  <div class="readout rise d3">Local time&nbsp;&nbsp;<b id="roT">--:--:--</b>&nbsp;·&nbsp;<span id="roZ">Local</span></div>
</footer>

<script>
(function(){
  "use strict";
  var CX = 330, CY = 340;

  /* ---- sunray-brushed guilloché spokes ---- */
  (function(){
    var g = document.getElementById('sunray'), parts = [], i, a, s, c;
    for (i = 0; i < 120; i++){
      a = i * 3 * Math.PI / 180; s = Math.sin(a); c = Math.cos(a);
      parts.push(
        '<line x1="'+(CX+s*50).toFixed(1)+'" y1="'+(CY-c*50).toFixed(1)+
        '" x2="'+(CX+s*239).toFixed(1)+'" y2="'+(CY-c*239).toFixed(1)+
        '" stroke="'+(i%2 ? 'rgba(66,55,38,.055)' : 'rgba(255,255,255,.15)')+'" stroke-width="2"/>'
      );
    }
    g.innerHTML = parts.join('');
  })();

  /* ---- printed minute track ---- */
  (function(){
    var g = document.getElementById('ticks'), parts = [], i, major;
    for (i = 0; i < 60; i++){
      major = (i % 5 === 0);
      parts.push(
        '<g transform="rotate('+(i*6)+' '+CX+' '+CY+')"><line x1="'+CX+'" y1="'+(CY-224)+
        '" x2="'+CX+'" y2="'+(CY-224+(major?16:10))+'" stroke="'+(major?'#7c5330':'#6b6152')+
        '" stroke-width="'+(major?4:1.6)+'"/></g>'
      );
    }
    g.innerHTML = parts.join('');
  })();

  /* ---- applied rose-gold batons (12 o'clock doubled, 3 o'clock = date) ---- */
  (function(){
    var g = document.getElementById('indices'), parts = [], hh, a;
    for (hh = 0; hh < 12; hh++){
      if (hh === 3) continue;
      a = hh * 30;
      if (hh === 0){
        parts.push(
          '<g transform="rotate('+a+' '+CX+' '+CY+')">'+
          '<rect x="'+(CX-18)+'" y="'+(CY-196)+'" width="11" height="36" rx="2" fill="url(#idxG)" stroke="rgba(60,32,12,.45)"/>'+
          '<rect x="'+(CX+7)+'" y="'+(CY-196)+'" width="11" height="36" rx="2" fill="url(#idxG)" stroke="rgba(60,32,12,.45)"/>'+
          '<line x1="'+(CX-12.5)+'" y1="'+(CY-191)+'" x2="'+(CX-12.5)+'" y2="'+(CY-165)+'" stroke="rgba(255,242,214,.7)" stroke-width="1.4"/>'+
          '<line x1="'+(CX+12.5)+'" y1="'+(CY-191)+'" x2="'+(CX+12.5)+'" y2="'+(CY-165)+'" stroke="rgba(255,242,214,.7)" stroke-width="1.4"/>'+
          '</g>'
        );
      } else {
        parts.push(
          '<g transform="rotate('+a+' '+CX+' '+CY+')">'+
          '<rect x="'+(CX-7.5)+'" y="'+(CY-196)+'" width="15" height="36" rx="2" fill="url(#idxG)" stroke="rgba(60,32,12,.45)"/>'+
          '<line x1="'+(CX-3)+'" y1="'+(CY-191)+'" x2="'+(CX-3)+'" y2="'+(CY-165)+'" stroke="rgba(255,242,214,.7)" stroke-width="1.4"/>'+
          '</g>'
        );
      }
    }
    g.innerHTML = parts.join('');
  })();

  /* ---- live time (sweeping seconds) ---- */
  var hourG   = document.getElementById('hourG'),
      minG    = document.getElementById('minG'),
      secG    = document.getElementById('secG'),
      dateEl  = document.getElementById('dateText'),
      dateWin = document.getElementById('dateWin'),
      roT     = document.getElementById('roT'),
      roZ     = document.getElementById('roZ');

  var zone = 'LOCAL';
  try { zone = (Intl.DateTimeFormat().resolvedOptions().timeZone || 'LOCAL'); } catch(e){}
  roZ.textContent = zone;

  function p2(n){ return (n < 10 ? '0' : '') + n; }

  var lastDay = new Date().getDate();
  dateEl.textContent = lastDay;

  /* ---- tilt / glare toward the pointer ---- */
  var stage = document.getElementById('stage'),
      tilt  = document.getElementById('tilt'),
      glare = document.getElementById('glare'),
      tX = 0, tY = 0, cX = 0, cY = 0, gTX = 0, gTY = 0, cGX = 0, cGY = 0;

  var reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
  var fine   = window.matchMedia('(pointer: fine)').matches;

  if (fine && !reduce){
    stage.addEventListener('pointermove', function(e){
      var r  = stage.getBoundingClientRect(),
          nx = ((e.clientX - r.left) / r.width)  * 2 - 1,
          ny = ((e.clientY - r.top)  / r.height) * 2 - 1;
      tX = -ny * 7;  tY = nx * 9;
      gTX = nx * 34; gTY = ny * 24;
    });
    stage.addEventListener('pointerleave', function(){
      tX = 0; tY = 0; gTX = 0; gTY = 0;
    });
  }

  function stepTilt(){
    if (!fine || reduce) return;
    cX  += (tX  - cX ) * 0.07;
    cY  += (tY  - cY ) * 0.07;
    cGX += (gTX - cGX) * 0.07;
    cGY += (gTY - cGY) * 0.07;
    tilt.style.transform  = 'perspective(1200px) rotateX('+cX.toFixed(2)+'deg) rotateY('+cY.toFixed(2)+'deg)';
    glare.style.transform = 'translate(-50%,-50%) translate3d('+cGX.toFixed(1)+'px,'+cGY.toFixed(1)+'px,0)';
  }

  function frame(){
    var now = new Date(),
        s   = now.getSeconds() + now.getMilliseconds() / 1000,
        m   = now.getMinutes() + s / 60,
        h   = (now.getHours() % 12) + m / 60;

    secG.setAttribute('transform', 'rotate(' + (s * 6).toFixed(2) + ')');
    minG.setAttribute('transform', 'rotate(' + (m * 6).toFixed(3) + ')');
    hourG.setAttribute('transform','rotate(' + (h * 30).toFixed(3) + ')');

    var d = now.getDate();
    if (d !== lastDay){
      dateEl.textContent = d;
      lastDay = d;
      dateWin.classList.remove('roll');
      void dateWin.getBoundingClientRect();   /* restart animation */
      dateWin.classList.add('roll');
    }

    roT.textContent = p2(now.getHours()) + ':' + p2(now.getMinutes()) + ':' + p2(now.getSeconds());
    stepTilt();
    requestAnimationFrame(frame);
  }
  requestAnimationFrame(frame);
})();
</script>
</body>
</html>

Compare

Other runs