/* The title itself is written by two continuous pen strokes. */
.hero h1.pen-only-title { margin-top:18px; margin-bottom:30px; }
.pen-only-title { --pen-ink:#2f5360; }
.hand-pen { display:block; position:relative; height:1em; overflow:visible; fill:none; stroke:var(--pen-ink); stroke-width:4.5; stroke-linecap:round; stroke-linejoin:round; }
.hand-the { width:1.7em; }
.hand-word { width:5.48em; margin-top:-.06em; }
.hand-pen path { vector-effect:non-scaling-stroke; stroke-dasharray:1000; stroke-dashoffset:1000; animation:write-pen 2s linear .2s forwards; }
.hand-word path { animation-duration:4.4s; animation-delay:2.35s; }
@keyframes write-pen { to { stroke-dashoffset:0; } }
@media(min-width:901px){ .hero-art { transform:translate(0,100px); } }
@media(max-width:600px){
 .hero h1.pen-only-title { font-size:clamp(3.1rem,16vw,6rem); margin-top:25px; margin-bottom:26px; }
 .hand-pen { stroke-width:2.7; }
 .hero-copy>.eyebrow { max-width:310px; line-height:1.65; letter-spacing:.13em; }
}
@media(prefers-reduced-motion:reduce){ .hand-pen path { animation:none; stroke-dashoffset:0; } }

/* Finish the handwriting, stamp the circles, then draw the infinity symbol.
   Inline SVG shares the title's document animation clock. */
.hero-loop path { stroke-dasharray:1; stroke-dashoffset:1; animation:write-loop 3.3s linear 7.15s both; }
.hero-loop path:nth-child(2) { animation-delay:7.23s; }
.hero-loop path:nth-child(3) { animation-delay:7.27s; }
.hero-loop path:nth-child(4) { animation-delay:7.31s; }
@keyframes write-loop { to { stroke-dashoffset:0; } }
@media(prefers-reduced-motion:reduce){ .hero-loop path { animation:none; stroke-dashoffset:0; } }

/* Both pigments finish at 10.61s, with the last infinity stroke. */
.art-sun,.art-moon {
 animation:stamp-paper .24s ease-out both, set-stamp-color var(--stamp-setting-time) linear both;
}
.art-sun {
 --stamp-opacity:.8;
 --stamp-setting-time:3.84s;
 --stamp-start:#fff;
 --stamp-color:var(--rust);
 animation-delay:6.77s,6.77s;
}
.art-moon {
 --stamp-opacity:.87;
 --stamp-setting-time:3.7s;
 --stamp-start:#000;
 --stamp-color:#e9dbb0;
 animation-delay:6.91s,6.91s;
}
@keyframes stamp-paper {
 from { opacity:0; transform:scale(1.14); }
 45% { opacity:var(--stamp-opacity); transform:scale(.98); }
 to { opacity:var(--stamp-opacity); transform:scale(1); }
}
@keyframes set-stamp-color {
 0%,12% { background-color:var(--stamp-start); }
 to { background-color:var(--stamp-color); }
}

/* Hide the round line caps until the pen actually reaches the loop. */
.hero-loop { visibility:hidden; animation:reveal-loop 0s 7.15s forwards; }
@keyframes reveal-loop { to { visibility:visible; } }
@media(prefers-reduced-motion:reduce){ .hero-loop { animation:none; visibility:visible; } }

/* Pause .65s after the final stroke, then wiggle twice with a .4s rest between. */
.hero-link { transform-origin:center; animation:registry-wiggle 1.05s ease-in-out 11.26s 2; }
@keyframes registry-wiggle {
 0%,62%,100% { transform:translateX(0) rotate(0); }
 12% { transform:translateX(-2px) rotate(-.6deg); }
 24% { transform:translateX(2px) rotate(.6deg); }
 36% { transform:translateX(-1.5px) rotate(-.4deg); }
 48% { transform:translateX(1px) rotate(.2deg); }
}
@media(prefers-reduced-motion:reduce){
 .art-sun,.art-moon,.hero-link { animation:none; }
}
