/* Tessera buttons: the one implementation for every tessera.ink page (homepage, guides, pricing, legal, every language).
   Load it on every page; site.js runs the hop. Don't restyle buttons in a page's own stylesheet: add a variant here.

   Markup: <a class="press btn btn-yellow" href="…"><span class="face">Make a timeline</span></a>
   The <a>/<button> is a still hit target that never moves; the .face inside carries the look and does the motion,
   so the mouse can't fall off it. Hover = a hop (site.js varies it each time and lets it play to the end), press =
   a squash down onto the edge, and the buttons beside a pressed one pop. prefers-reduced-motion turns all of it off.

   Rules (Handbook > Style > Buttons): chunky edged buttons (.btn-yellow, .btn-ink) are for primary actions only, and
   yellow is the one main action per view. Secondary actions use .btn-line (outline, no edge) or .mx-b (soft fill,
   press only, no hop). The editor uses the same press + face structure (.btn-face) with press only, no hop. */
.press{display:inline-flex;text-decoration:none;color:inherit;background:none;border:0;padding:0;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.press > .face{flex:1;transform-origin:50% 100%;transition:transform 120ms cubic-bezier(.9,0,1,.6)}
.press:hover > .face{transform:translateY(-3px)}.press.hop > .face{animation:btnHop var(--hd,520ms) both}
.press:active > .face{animation:none;transform:translateY(5px) scale(1.03,.94);box-shadow:0 1px 0 rgba(0,0,0,.6) !important}
:has(> .press:active) > .press:not(:active) > .face{animation:btnPop 460ms both}
:has(> .press:active) > .press:nth-child(even):not(:active) > .face{animation-name:btnPop2}
@keyframes btnHop{0%{transform:translateY(0) scale(1,1) rotate(0)}14%{transform:translateY(1px) scale(var(--hsx,1.05),var(--hsy,.9)) rotate(0);animation-timing-function:cubic-bezier(.22,.61,.36,1)}46%{transform:translateY(var(--hy,-13px)) scale(.97,1.06) rotate(var(--hr,-2.6deg));animation-timing-function:cubic-bezier(.9,0,1,.6)}66%{transform:translateY(-1px) scale(1.04,.94) rotate(var(--hr2,1.4deg));animation-timing-function:cubic-bezier(.22,.61,.36,1)}82%{transform:translateY(-4px) scale(.99,1.01) rotate(var(--hr3,-.6deg))}100%{transform:translateY(-3px) scale(1,1) rotate(0)}}
@keyframes btnPop{0%{transform:translateY(0) rotate(0)}40%{transform:translateY(-8px) scale(.98,1.04) rotate(2.4deg);animation-timing-function:cubic-bezier(.9,0,1,.6)}68%{transform:translateY(0) scale(1.03,.95) rotate(-1deg)}100%{transform:translateY(0) scale(1,1) rotate(0)}}
@keyframes btnPop2{0%{transform:translateY(0) rotate(0)}40%{transform:translateY(-8px) scale(.98,1.04) rotate(-2.4deg);animation-timing-function:cubic-bezier(.9,0,1,.6)}68%{transform:translateY(0) scale(1.03,.95) rotate(1deg)}100%{transform:translateY(0) scale(1,1) rotate(0)}}
@media (prefers-reduced-motion: reduce){.press .face{transform:none !important;animation:none !important}}

/* Sizes and looks. Pages use these instead of styling a face inline. */
.press.btn{border-radius:4px}
.btn > .face{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:50px;padding:0 22px;box-sizing:border-box;border-radius:4px;font-weight:800;font-size:17px;white-space:nowrap}
.btn-yellow > .face{background:#f2c11d;color:#1a1a1a;box-shadow:0 5px 0 #a3800a}
.btn-ink > .face{background:#f2f2f2;color:#121212;box-shadow:0 5px 0 #a2a2a2}
:where(:root[data-theme=light]) .btn-ink > .face{background:#1a1a1a;color:#ffffff;box-shadow:0 5px 0 #000000}
.btn-line > .face{background:transparent;color:var(--ink,#f0f0f0);box-shadow:inset 0 0 0 2px currentColor}
:where(:root[data-theme=light]) .btn-line > .face{color:var(--ink,#1a1a1a)}
.press.btn-line:active > .face{box-shadow:inset 0 0 0 2px currentColor !important}
.btn-sm > .face{min-height:44px;padding:0 18px;font-size:16px}
.btn-nav > .face{min-height:46px;padding:0 20px;font-weight:700;font-size:inherit}
.btn-lg > .face{min-height:56px;font-size:19px}

/* Soft-fill secondary button: quieter, press only, no hop. */
.mx-b{flex:1 1 0;min-width:max-content;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:44px;padding:0 12px;box-sizing:border-box;border:0;border-radius:4px;background:rgba(255,255,255,.09);color:#f0f0f0;font-weight:700;font-size:16px;text-decoration:none;-webkit-tap-highlight-color:transparent;transition:background-color .12s}
.mx-b:hover{background:rgba(255,255,255,.15)}
:where(:root[data-theme=light]) .mx-b{background:rgba(120,40,30,.08);color:#1a1a1a}
:where(:root[data-theme=light]) .mx-b:hover{background:rgba(120,40,30,.14)}
.mx-b:active{transform:translateY(1px)}
.mx-b:focus-visible{outline:3px solid #2b6fde;outline-offset:3px}
@media (prefers-reduced-motion: reduce){.mx-b:active{transform:none}}
