/* BR.UX Studio — the staggered menu (menu.js). Self-contained: it carries its own copy of the Studio tokens, so it looks
   identical on every page and inside the FigGenie web app, whatever theme the page underneath is in. */
.sm-scope, [data-sm-mount] {
  --sm-ink: #0c0e13; --sm-paper: #fafbfc; --sm-white: #fff; --sm-blue: #2e5bff; --sm-lime: #d6ff3f; --sm-line: #d9dce3; --sm-muted: #6b7280;
  --sm-display: "Michroma", system-ui, sans-serif; --sm-primary: "Sora", system-ui, sans-serif; --sm-mono: "Space Mono", ui-monospace, monospace;
}

/* ---------- toggle: the Studio's radar button (sits in the page header) ---------- */
[data-sm-mount] { position: relative; }
.sm-toggle { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; background: none; border: 1px solid transparent; border-radius: 12px; cursor: pointer; transition: background .2s, border-color .2s; }
.sm-toggle:hover, .sm-toggle[aria-expanded="true"] { border-color: var(--sm-line); background: var(--sm-white); }
.sm-toggle:focus-visible { outline: 2px solid var(--sm-blue); outline-offset: 3px; }
.sm-toggle svg { grid-area: 1 / 1; width: 26px; height: 26px; transition: opacity .25s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.sm-sweep { transform-origin: 12px 12px; }
.sm-toggle:hover .sm-sweep { animation: sm-spin 1.6s linear infinite; }
/* open: the radar spins away and the × turns in; the × draws its two strokes */
.sm-x { opacity: 0; transform: rotate(-90deg) scale(.5); }
.sm-x path { stroke-dasharray: 32; stroke-dashoffset: 32; transition: stroke-dashoffset .4s ease .12s; }
.sm-toggle[aria-expanded="true"] .sm-radar { opacity: 0; transform: rotate(120deg) scale(.5); }
.sm-toggle[aria-expanded="true"] .sm-x { opacity: 1; transform: none; }
.sm-toggle[aria-expanded="true"] .sm-x path { stroke-dashoffset: 0; }
.sm-toggle[aria-expanded="true"]:hover .sm-x { transform: rotate(90deg); }
@keyframes sm-spin { to { transform: rotate(360deg); } }

/* ---------- the BR mark watches the menu (pupils + lids are added to the logo by menu.js) ---------- */
.sm-eyes * { transform-box: fill-box; }
.sm-pupil { fill: currentColor; opacity: 0; transform-origin: center; transform: translate(var(--sm-ex, 0px), var(--sm-ey, 0px)) scale(.4); transition: opacity .25s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
html.sm-open .sm-pupil { opacity: 1; transform: translate(var(--sm-ex, 0px), var(--sm-ey, 0px)); transition: opacity .2s ease .12s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
/* R0-B0's blink: the pupils snap flat for a moment (menu.js toggles html.sm-eyes-shut), no easing, just like the robot */
html.sm-eyes-shut :is(.sm-pupil, .sm-runner-pupil) { scale: 1 .15; }

/* the mark perched in the menu: a stand-in that leaps out of the header and sits on a section's title line (menu.js) */
.sm-runner { position: fixed; left: 0; top: 0; z-index: 2147483000; display: none; pointer-events: none; color: #0c0e13; }
.sm-runner-hop { width: 100%; height: 100%; transform-origin: 50% 100%; }
.sm-runner svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sm-runner-pupil { fill: currentColor; transform-box: fill-box; transform-origin: center; transform: translate(var(--sm-ex, -3px), var(--sm-ey, 6px)); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
/* the title line it sits on gets a touch darker, so the perch reads */
.sm-title::after { transition: background .3s; }

/* ---------- panel: lime and blue layers slide in first, then the paper panel ---------- */
.sm-scope { position: fixed; inset: 0; z-index: var(--sm-z, 39); pointer-events: none; overflow: hidden; color: var(--sm-ink); font-family: var(--sm-primary); }
/* the page behind blurs while the menu is open; clicking it closes the menu */
.sm-backdrop { position: absolute; inset: 0; background: rgba(12, 14, 19, .14); -webkit-backdrop-filter: blur(10px) saturate(1.1); backdrop-filter: blur(10px) saturate(1.1); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.sm-scope.is-open .sm-backdrop { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .35s ease, visibility 0s; }
.sm-prelayers, .sm-panel { position: absolute; top: 0; right: 0; bottom: 0; width: clamp(340px, 38vw, 480px); }
.sm-prelayer { position: absolute; inset: 0; transform: translateX(100%); }
.sm-panel {
  transform: translateX(100%); pointer-events: auto; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; padding: 104px 36px 32px; border-left: 1px solid var(--sm-line);
  background-color: var(--sm-paper); background-image: radial-gradient(circle at 1px 1px, rgba(12, 14, 19, .06) 1px, transparent 0); background-size: 18px 18px;
}
.sm-inner { flex: 1; display: flex; flex-direction: column; }
.sm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sm-title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 400 10px/1 var(--sm-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sm-muted); }
.sm-title::after { content: ""; flex: 1; height: 1px; background: var(--sm-line); }

/* big links: each label rises out of its own slot, numbered 01–05 */
.sm-list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sm-itemWrap { overflow: hidden; padding: 6px 8px; margin: 0 -8px; }
.sm-item { position: relative; display: inline-flex; align-items: flex-start; gap: 12px; padding: 6px 10px 6px 6px; color: var(--sm-ink); text-decoration: none; font: 400 clamp(28px, 2.8vw, 38px)/1.05 var(--sm-display); letter-spacing: -.045em; text-transform: uppercase; }
.sm-itemLabel { display: inline-block; transform: translateY(140%) rotate(10deg); transform-origin: 50% 100%; will-change: transform; }
.sm-num { margin-top: .2em; font: 400 12px/1 var(--sm-mono); letter-spacing: 0; color: var(--sm-blue); opacity: 0; }

/* products */
.sm-group { margin: 0 0 18px; }
.sm-reveal { opacity: 0; }
.sm-prods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sm-prod { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 8px; color: var(--sm-ink); text-decoration: none; }
.sm-prod img { width: 28px; height: 28px; object-fit: contain; flex: none; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.sm-prod:hover img, .sm-prod:focus-visible img { transform: rotate(-8deg) scale(1.1); }
.sm-prod-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sm-prod-tx b { font: 600 15px/1.1 var(--sm-primary); letter-spacing: -.01em; }
.sm-prod-tx small { font: 400 11px/1.2 var(--sm-mono); color: var(--sm-muted); white-space: nowrap; }
.sm-prod[aria-current="page"] .sm-prod-tx b { text-decoration: underline 2px var(--sm-lime); text-underline-offset: 4px; }

/* badges, in the Studio tag style. Their motion plays a few times each time the menu opens, then rests */
.sm-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid var(--sm-ink); font: 700 9.5px/1 var(--sm-mono); letter-spacing: .06em; white-space: nowrap; color: var(--sm-ink); }
.sm-badge b { font: inherit; }
.sm-badge-new { background: var(--sm-lime); }
.sm-badge-live { background: var(--sm-white); }
.sm-badge-live i { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--sm-lime); box-shadow: 0 0 0 1px var(--sm-ink); }
.sm-badge-live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; opacity: 0; }
.sm-scope.is-open .sm-badge-new b { color: transparent; background: linear-gradient(100deg, var(--sm-ink) 0 40%, rgba(12, 14, 19, .3) 50%, var(--sm-ink) 60% 100%) 0 0 / 260% 100%; -webkit-background-clip: text; background-clip: text; animation: sm-shine 1.6s linear 1s 3 both; }
.sm-scope.is-open .sm-badge-live i { animation: sm-blink 1.1s ease-in-out 1s 4; }
.sm-scope.is-open .sm-badge-live i::after { animation: sm-ping 1.1s ease-out 1s 4; }
@keyframes sm-shine { from { background-position: 100% 0; } to { background-position: -60% 0; } }
@keyframes sm-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes sm-ping { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.6); opacity: 0; } }

/* more: rows like the products, with an icon that moves on hover (the old menu's icons) and a plain tag */
.sm-more-ic { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 1px solid var(--sm-line); background: var(--sm-white); color: var(--sm-ink); transition: border-color .2s, color .2s; }
.sm-more-ic svg { width: 17px; height: 17px; overflow: visible; }
.sm-more-ic svg * { transform-box: fill-box; transform-origin: center; }
.sm-more:is(:hover, :focus-visible) .sm-more-ic { border-color: var(--sm-blue); color: var(--sm-blue); }
.sm-more .ln { stroke-dasharray: 9; }
.sm-more:is(:hover, :focus-visible) .ln { animation: sm-write 1.5s ease infinite; }
.sm-more:is(:hover, :focus-visible) .l2 { animation-delay: .12s; }
.sm-more:is(:hover, :focus-visible) .l3 { animation-delay: .24s; }
.sm-more:is(:hover, :focus-visible) .gp { animation: sm-tilt .9s ease-in-out infinite; }
.sm-more:is(:hover, :focus-visible) .b1 { animation: sm-press .6s ease-in-out infinite; }
.sm-more:is(:hover, :focus-visible) .b2 { animation: sm-press .6s ease-in-out .3s infinite; }
@keyframes sm-write { 0%, 100% { stroke-dashoffset: 9; } 35%, 78% { stroke-dashoffset: 0; } }
@keyframes sm-tilt { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
@keyframes sm-press { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.9); } }
.sm-badge-tag { background: var(--sm-white); color: var(--sm-ink); }

/* socials: the home page footer's chips (.socials in site.css) — brand icons, ink at rest, each with its own hover move */
.sm-foot { margin-top: auto; padding-top: 6px; }
.sm-socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sm-socials a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; background: var(--sm-white); border: 1px solid var(--sm-line); font: 400 12px/1 var(--sm-mono); color: var(--sm-ink); text-decoration: none; transition: border-color .2s, transform .2s; }
.sm-socials a:is(:hover, :focus-visible) { border-color: var(--sm-blue); transform: translateY(-2px); outline: none; }
.sm-socials svg { width: 14px; height: 14px; flex: none; transition: color .3s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.sm-socials .so-linkedin:is(:hover, :focus-visible) svg { color: #0a66c2; transform: scale(1.15); }
.sm-socials .so-dribbble:is(:hover, :focus-visible) svg { color: #ea4c89; transform: rotate(360deg); }
.sm-socials .so-ixdf img { width: 18px; height: 18px; flex: none; margin: -2px 0; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.sm-socials .so-ixdf:is(:hover, :focus-visible) img { transform: scale(1.18) rotate(-8deg); }
.sm-socials .so-adplist svg .eye { fill: transparent; transform-box: fill-box; transform-origin: center; stroke-width: .85; transition: fill .25s ease; }
.sm-socials .so-adplist:is(:hover, :focus-visible) svg { transform: rotate(-6deg) scale(1.12); }
.sm-socials .so-adplist:is(:hover, :focus-visible) svg .eye { fill: #ff9bd2; animation: sm-beat .7s ease-in-out infinite; }
.sm-socials .so-adplist:is(:hover, :focus-visible) svg .eye + .eye { animation-delay: .12s; }
.sm-socials .so-medium svg :is(.m1, .m2, .m3) { fill: transparent; transform-box: fill-box; transform-origin: center; transition: fill .25s ease; }
.sm-socials .so-medium:is(:hover, :focus-visible) svg :is(.m1, .m2, .m3) { fill: currentColor; animation: sm-pop .5s cubic-bezier(.34, 1.56, .64, 1) both; }
.sm-socials .so-medium:is(:hover, :focus-visible) svg .m2 { animation-delay: .08s; }
.sm-socials .so-medium:is(:hover, :focus-visible) svg .m3 { animation-delay: .16s; }
@keyframes sm-beat { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.2); } }
@keyframes sm-pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }

/* hover = a selected Figma layer (blue frame + four corner handles), the same as the site's cards, minus the size tag */
.sm-item::before, .sm-prod::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--sm-blue); opacity: 0; transition: opacity .2s; pointer-events: none; }
.sm-item::after, .sm-prod::after {
  content: ""; position: absolute; inset: -4px; opacity: 0; transition: opacity .2s; pointer-events: none;
  background:
    linear-gradient(#fff, #fff) 1px 1px / 6px 6px no-repeat, linear-gradient(#fff, #fff) calc(100% - 1px) 1px / 6px 6px no-repeat,
    linear-gradient(#fff, #fff) 1px calc(100% - 1px) / 6px 6px no-repeat, linear-gradient(#fff, #fff) calc(100% - 1px) calc(100% - 1px) / 6px 6px no-repeat,
    linear-gradient(var(--sm-blue), var(--sm-blue)) 0 0 / 8px 8px no-repeat, linear-gradient(var(--sm-blue), var(--sm-blue)) 100% 0 / 8px 8px no-repeat,
    linear-gradient(var(--sm-blue), var(--sm-blue)) 0 100% / 8px 8px no-repeat, linear-gradient(var(--sm-blue), var(--sm-blue)) 100% 100% / 8px 8px no-repeat;
}
.sm-item:is(:hover, :focus-visible)::before, .sm-item:is(:hover, :focus-visible)::after,
.sm-prod:is(:hover, :focus-visible)::before, .sm-prod:is(:hover, :focus-visible)::after { opacity: 1; }
.sm-item:focus-visible, .sm-prod:focus-visible { outline: none; }

/* the page header goes quiet while the panel is open, so the toggle reads as part of the panel */
html.sm-open .site-header { background: transparent !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

@media (max-width: 640px) {
  .sm-prelayers, .sm-panel { width: 100%; }
  .sm-panel { padding: 92px 22px 26px; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sm-sweep, .sm-more *, .sm-socials * { animation: none !important; }
  .sm-pupil { transition: opacity .2s ease !important; }
  .sm-backdrop { transition: none !important; }
  .sm-scope.is-open .sm-badge-new b, .sm-scope.is-open .sm-badge-live i, .sm-scope.is-open .sm-badge-live i::after { animation: none !important; }
  .sm-scope.is-open .sm-badge-new b { color: var(--sm-ink); background: none; }
}
