/* TrainingWheels: the DKayLABS family pieces shared with Shopwrights, rebuilt for this site:
   the capsule nav, the letter-roll hover and the fade-up reveal. Loaded after the kit and page.css. */

/* ---------- the capsule nav --------------------------------------------------------------- */
:root {
  --nav-h: 3rem; --nav-gutter: 1rem; --nav-w: calc(100% - 2rem); --nav-btn-h: 2.25rem;
  --nav-top: .75rem; --nav-drop: .75rem;
  --nav-scrim: rgb(188 186 178 / .4); --nav-ring: rgb(30 30 33 / .12); --nav-shadow: 0 10px 30px -14px rgb(30 30 33 / .35);
  --nav-btn-a: .055; --nav-btn-edge-a: .12;
  --nav: calc(var(--nav-top) + var(--nav-h) + var(--s-3));
}
@media (min-width: 1024px) { :root { --nav-h: 3.5rem; --nav-gutter: 1.5rem; --nav-w: 50rem; --nav-btn-h: 2.5rem; } }

.tw-nav.nav { height: auto; background: none; border-bottom: 0; color: inherit; }
.tw-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tw-nav { position: fixed; inset: 0 0 auto 0; z-index: 50; pointer-events: none; --nav-p: 0; }
/* backwards, not both: a held opacity fill makes this wrapper a backdrop root and kills the glass blur */
.tw-nav__enter { animation: tw-nav-enter .8s cubic-bezier(.16, 1, .3, 1) backwards; }
@keyframes tw-nav-enter { from { opacity: 0; translate: 0 -16px; } to { opacity: 1; translate: 0 0; } }
.tw-nav__capsule {
  position: relative; pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  width: 100%; max-width: calc(100% - (100% - var(--nav-w)) * var(--nav-p)); height: var(--nav-h); margin-inline: auto;
  margin-top: calc(var(--nav-top) + var(--nav-drop) * var(--nav-p));
  padding-inline: calc(max(var(--gut, 24px), (100% - 1280px) / 2) * (1 - var(--nav-p)) + var(--nav-gutter) * var(--nav-p));
}
.tw-nav:not(.is-scrolled) .tw-nav__glass { visibility: hidden; }
.tw-nav__glass { position: absolute; inset: 0; border-radius: 9999px; pointer-events: none; opacity: max(.001, var(--nav-p));
  background: var(--nav-scrim); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px var(--nav-ring), var(--nav-shadow); }
.tw-nav__logo, .tw-nav__actions { position: relative; }
/* over a dark ground: Shopwrights' dark glass, and light words on the logo, links and buttons only
   (the Features card and the phone sheet keep their own light colours) */
.tw-nav.is-dark { --nav-scrim: rgb(69 69 69 / .6); --nav-ring: rgb(255 255 255 / .14); --nav-shadow: 0 10px 30px -14px rgb(0 0 0 / .6); }
.tw-nav.is-dark :is(.tw-nav__logo, .tw-nav__link, .tw-nav__btn) { --p-ink: #f4f3ef; --p-muted: #b4b4ba; }
.tw-nav.is-dark .tw-nav__cta:is(:hover, :focus-visible) { color: #f7e063; }
.tw-nav__glass { transition: background-color .3s, box-shadow .3s; }
.tw-nav__logo { transition: color .3s; }

/* the footer sizes to what it holds: the kit makes footer.closing a full screen (two on a phone), which
   left an empty ground between the close and the links; here the close and the links sit a set gap apart */
footer.closing.tw-footer { height: auto; min-height: 0; }
footer.closing.tw-footer > .wrap { height: auto; grid-template-rows: auto auto; row-gap: clamp(64px, 7vw, 112px); }
@media (max-width: 639px) {
  footer.closing.tw-footer { display: block; min-height: 0; }
  footer.closing.tw-footer > .wrap { display: grid; row-gap: 56px; }
}

/* the close: the heading on the left and a pill button beside it (not a bar across the page); the
   pill's arrow sits in a dark disc that turns on hover, the same diagonal arrow as the nav's call */
.closing__cta.tw-close { display: grid; grid-template-columns: 1fr; gap: var(--s-6); align-items: end; }
@media (min-width: 900px) { .closing__cta.tw-close { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-8); } }
.tw-close__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.tw-close__btn { display: inline-flex; align-items: center; gap: 20px; height: 60px; padding: 0 8px 0 28px; border-radius: 9999px;
  background: var(--p-accent); color: #111; text-decoration: none; font: 500 18px/1 var(--font-text);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25), 0 12px 32px -16px rgb(247 224 99 / .6);
  transition: background-color .2s, box-shadow .2s, transform .2s cubic-bezier(.16, 1, .3, 1); }
.tw-close__dot { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #111; color: var(--p-accent);
  transition: rotate .35s cubic-bezier(.16, 1, .3, 1); }
.tw-close__dot svg { width: 16px; height: 16px; }
.tw-close__btn:hover, .tw-close__btn:focus-visible { background: #fbe97f; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35), 0 16px 40px -14px rgb(247 224 99 / .7); }
.tw-close__btn:hover .tw-close__dot, .tw-close__btn:focus-visible .tw-close__dot { rotate: 45deg; }
.tw-close__btn:active { transform: scale(.98); }
.tw-close__alt { color: var(--muted); font-size: 15px; text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); transition: color .15s, text-decoration-color .15s; }
.tw-close__alt:hover, .tw-close__alt:focus-visible { color: var(--ink); text-decoration-color: currentColor; }
@media (max-width: 479px) { .tw-close__btn { width: 100%; justify-content: space-between; } }
@media (prefers-reduced-motion: reduce) { .tw-close__dot, .tw-close__btn { transition: none; } }

/* the maker's name in the footer's legal line links home to DKayLABS */
.footer__maker { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in oklab, currentColor 45%, transparent);
  transition: color .15s, text-decoration-color .15s; }
.footer__maker:hover, .footer__maker:focus-visible { color: var(--ink); text-decoration-color: currentColor; }
.tw-nav .skip-link { position: absolute; left: var(--nav-gutter); }

.tw-nav__logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--p-ink); text-decoration: none;
  font: var(--display-weight) 18px/1 var(--font-display); letter-spacing: -.01em; white-space: nowrap; }
.tw-nav__logo svg { width: 30px; height: 30px; flex: none; }

.tw-nav__group { position: absolute; left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 2px; height: var(--nav-btn-h);
  padding-inline: 4px; border-radius: 9999px;
  background: rgb(30 30 33 / calc(var(--nav-btn-a) * (1 - var(--nav-p))));
  box-shadow: inset 0 0 0 1px rgb(30 30 33 / calc(var(--nav-btn-edge-a) * (1 - var(--nav-p)))); }
.tw-nav__item { position: relative; display: flex; align-items: center; height: 100%; }
.tw-nav__link, .tw-nav__btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px; text-decoration: none;
  font: 600 12px/1 var(--font-text); letter-spacing: .06em; text-transform: uppercase; color: var(--p-muted);
  transition: color .2s; cursor: pointer; border: 0; background: none;
}
.tw-nav__link { height: calc(var(--nav-btn-h) - .5rem); padding-inline: .875rem; }
.tw-nav__link::before, .tw-nav__btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: rgb(247 224 99 / .4); box-shadow: inset 0 0 0 1px rgb(201 179 42 / .6); opacity: 0; transition: opacity .2s; }
.tw-nav__link:hover, .tw-nav__link:focus-visible, .tw-nav__item:focus-within > .tw-nav__link, .tw-nav__item.is-open > .tw-nav__link,
.tw-nav__link[aria-current="page"], .tw-nav__btn:hover, .tw-nav__btn:focus-visible { color: var(--p-ink); }
.tw-nav__link:hover::before, .tw-nav__link:focus-visible::before, .tw-nav__item.is-open > .tw-nav__link::before,
.tw-nav__btn:hover::before, .tw-nav__btn:focus-visible::before { opacity: 1; }
.tw-nav__link > *, .tw-nav__btn > * { position: relative; }
.tw-nav__chev { width: 10px; height: 10px; transition: rotate .25s cubic-bezier(.16, 1, .3, 1); }
.tw-nav__item.is-open .tw-nav__chev { rotate: 180deg; }

.tw-nav__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tw-nav__btn { height: var(--nav-btn-h); min-width: var(--nav-btn-h); padding-inline: 14px; justify-content: center; color: var(--p-ink);
  background: rgb(30 30 33 / calc(var(--nav-btn-a) * (1 - var(--nav-p))));
  box-shadow: inset 0 0 0 1px rgb(30 30 33 / calc(var(--nav-btn-edge-a) * (1 - var(--nav-p)))); }
.tw-nav__btn svg { width: 14px; height: 14px; flex: none; }
/* the call to action: a true circle once its label folds away (no gap; the label carries its own left pad),
   and on hover a faint accent tint with a thin accent ring, the arrow taking the accent's dark tone */
.tw-nav__cta { gap: 0; padding-inline: calc((var(--nav-btn-h) - 16px) / 2); transition: color .2s; }
.tw-nav__cta svg { width: 16px; height: 16px; }
.tw-nav__btn.tw-nav__cta::before { background: rgb(247 224 99 / .2); box-shadow: inset 0 0 0 1px rgb(201 179 42 / .55); }
.tw-nav__cta:hover, .tw-nav__cta:focus-visible { color: #7a6500; }
.tw-nav__cta-label { max-width: calc(12rem * (1 - var(--nav-p))); opacity: calc(1 - var(--nav-p) * 2); padding-left: calc(.5rem * (1 - var(--nav-p)));
  overflow: hidden; white-space: nowrap; }

/* the Features menu: a white card under its word, numbered rows */
.tw-nav__menu { position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 6px; width: 300px; padding: 8px; border-radius: 16px;
  background: #fff; box-shadow: 0 0 0 1px rgb(30 30 33 / .08), 0 24px 48px -20px rgb(30 30 33 / .35);
  opacity: 0; visibility: hidden; transition: opacity .2s, translate .25s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .25s; }
.tw-nav__item.is-open > .tw-nav__menu, .tw-nav__item:focus-within > .tw-nav__menu { opacity: 1; visibility: visible; translate: -50% 0; transition-delay: 0s; }
.tw-nav__menu a { display: grid; grid-template-columns: 32px 1fr; gap: 2px 12px; align-items: center; padding: 10px; border-radius: 10px;
  color: var(--p-ink); text-decoration: none; }
.tw-nav__menu a:hover, .tw-nav__menu a:focus-visible, .tw-nav__menu a[aria-current="page"] { background: rgb(247 224 99 / .3); }
.tw-nav__num { grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  font: 500 12px/1 var(--font-mono); color: var(--p-ink); background: rgb(247 224 99 / .45); box-shadow: inset 0 0 0 1px rgb(201 179 42 / .5); }
.tw-nav__menu b { font-weight: 500; font-size: 15px; }
.tw-nav__menu small { font-size: 13px; color: var(--p-muted); }

/* the phone: logo, the menu button and the call to action; the menu opens as a card under the capsule */
.tw-nav__toggle { display: none; }
.tw-nav__sheet { display: none; }
@media (max-width: 899px) {
  .tw-nav__group { display: none; }
  .tw-nav__toggle { display: inline-flex; }
  .tw-nav__sheet { position: absolute; top: calc(100% + 8px); left: 0; right: 0; display: grid; gap: 4px; padding: 8px; border-radius: 20px;
    background: #fff; box-shadow: 0 0 0 1px rgb(30 30 33 / .08), 0 24px 48px -20px rgb(30 30 33 / .35);
    opacity: 0; visibility: hidden; translate: 0 6px; transition: opacity .2s, translate .25s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .25s; }
  .tw-nav.is-menu .tw-nav__sheet { opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0s; }
  .tw-nav__sheet a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; border-radius: 12px;
    color: var(--p-ink); text-decoration: none; font-size: 17px; }
  .tw-nav__sheet a:hover, .tw-nav__sheet a[aria-current="page"] { background: rgb(247 224 99 / .3); }
  .tw-nav__sheet a small { color: var(--p-muted); font: 500 12px/1 var(--font-mono); }
}
@media (max-width: 479px) { .tw-nav__cta { display: none; } }

/* ---------- the letter roll on links and buttons ------------------------------------------- */
.roll-text { position: relative; display: inline-block; vertical-align: top; white-space: nowrap; }
.roll-text__chars { display: inline; }
.roll-text__char { position: relative; display: inline-block; vertical-align: top; overflow: hidden; white-space: pre; padding-top: .14em; margin-top: -.14em; }
/* --roll-gap parts a letter from its copy: the letter must rise clear of the .14em headroom above it (and
   its own descender), or the foot of a g or an o stays visible along the top of the box after the roll */
.roll-text { --roll-gap: .45em; }
.roll-text__track { position: relative; display: block; transition: transform .6s cubic-bezier(.16, 1, .3, 1) var(--roll-delay, 0s); }
.roll-text__track::after { content: attr(data-c); position: absolute; top: calc(100% + var(--roll-gap)); left: 0; width: 100%; }
:is(a, button):focus-visible .roll-text__track, :is(a, button):not(:disabled):hover .roll-text__track { transform: translateY(calc(-100% - var(--roll-gap))); }

/* ---------- the fade-up as things come into view ------------------------------------------- */
html.tw-reveal .rv { opacity: 0; transform: translateY(12px); }
html.tw-reveal .rv.rv-in { opacity: 1; transform: none;
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1) var(--rv-d, 0s), transform .7s cubic-bezier(.16, 1, .3, 1) var(--rv-d, 0s); }

@media (prefers-reduced-motion: reduce) {
  .tw-nav__enter { animation: none; }
  .roll-text__track { transition: none; }
  :is(a, button):hover .roll-text__track, :is(a, button):focus-visible .roll-text__track { transform: none; }
  html.tw-reveal .rv { opacity: 1; transform: none; }
  .tw-nav__cta-label { max-width: none; opacity: 1; padding-left: .5rem; }
}
