/* ===================================================================
   The Figma file's chrome, shared by the homepage and the case studies:
   brand and theme tokens, the multiplayer cursor (cursor.js), the page
   rulers (rulers.js), the left sidebar and the top-right cluster with
   the light/dark toggle (nav.js), and the pixel wipe the toggle plays.
   Load it before the page's own stylesheet.
   =================================================================== */
/* the brand purple. Dark mode uses the soft lilac; light mode a deeper violet so purple text and
   white-on-purple fills both pass WCAG AA (4.5:1) against the light page. --brand-hi is for small
   purple text and hover states. Everything purple goes through these. */
:root, html[data-theme="dark"] {
    --brand: #a78bfa; --brand-hi: #c4b5fd; --brand-deep: #8b5cf6; --brand-rgb: 167,139,250; --on-brand: #17112b;
}
html[data-theme="light"] {
    --brand: #6b46e0; --brand-hi: #5530c0; --brand-deep: #5530c0; --brand-rgb: 107,70,224; --on-brand: #ffffff;
}
:root, html[data-theme="dark"] {
    color-scheme: dark;
    --grid: rgba(255,255,255,.11); --grid-lit: rgba(var(--brand-rgb), .6); --glow: rgba(var(--brand-rgb), .035);
    --grid-soft: rgba(255,255,255,.065); /* the canvas grid behind long reading (case studies, Selected work) */
    --ruler-bg: #17171b; --ruler-line: rgba(255,255,255,.08); --ruler-tick: rgba(255,255,255,.28); --ruler-tick-2: rgba(255,255,255,.14);
    --ruler-text: #7c7c88; --ruler-band: rgba(var(--brand-rgb), .2); --ruler-mark: var(--brand-hi); --ruler-cursor: var(--brand);
    --fill-rgb: 255,255,255; /* what outlined heading letters fill with near the cursor */
    --fm-text: #ffffff; --fm-bg: #09090b; --fm-border: rgba(255,255,255,.12);
}
html[data-theme="light"] {
    color-scheme: light;
    --grid: rgba(0,0,0,.16); --grid-lit: rgba(var(--brand-rgb), .7); --glow: rgba(var(--brand-rgb), .04);
    --grid-soft: rgba(0,0,0,.09);
    --ruler-bg: #ffffff; --ruler-line: rgba(0,0,0,.09); --ruler-tick: rgba(0,0,0,.32); --ruler-tick-2: rgba(0,0,0,.15);
    --ruler-text: #8b8b96; --ruler-band: rgba(var(--brand-rgb), .14); --ruler-mark: var(--brand-hi); --ruler-cursor: var(--brand);
    --fill-rgb: 24,24,27;
    --fm-text: #18181b; --fm-bg: #ffffff; --fm-border: rgba(0,0,0,.09);
}
/* the toggle, next to "Let's talk" */
.fn-theme { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #d4d4d8; cursor: pointer; transition: background .2s, color .2s; }
.fn-theme:hover { background: rgba(255,255,255,.08); color: #fff; }
.fn-theme:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.fn-theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s cubic-bezier(.34,1.56,.64,1), opacity .2s; }
.fn-theme svg { grid-area: 1 / 1; }
html[data-theme="dark"] .fn-moon, :root:not([data-theme]) .fn-moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
html[data-theme="light"] .fn-sun { opacity: 0; transform: rotate(90deg) scale(.5); }
@media (prefers-reduced-motion: reduce) { .fn-theme svg { transition: none; } }
/* the pixel wipe the toggle plays (nav.js): over everything but the cursor */
.theme-wipe { position: fixed; inset: 0; z-index: 999998; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Appear (reveal.js): blocks fade and rise out of a light blur the first time they scroll into view.
   `translate` rather than `transform`, so it adds to any transform an element already has. ---------- */
.reveal { opacity: 0; translate: 0 28px; filter: blur(5px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), translate .9s cubic-bezier(.2,.7,.2,1), filter .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; translate: 0 0; filter: blur(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; translate: none; filter: none; transition: none; } }

/* ---------- Cursor: a Figma multiplayer cursor with a "You" tag (cursor.js) ----------
   The system cursor is hidden only on mouse devices, once the pointer has moved
   (html.cursor-ready), and never on the UI Design canvas, which keeps its grab cursors. */
@media (pointer: fine) {
    .cursor-ready body, .cursor-ready body *:not(.vc):not(.vc *) { cursor: none !important; }
}
.fig-cursor { position: fixed; z-index: 999999; left: 0; top: 0; pointer-events: none; opacity: 0; will-change: transform; transition: opacity .15s; }
.cursor-ready .fig-cursor { opacity: 1; }
.fig-cursor.is-out, html.vc-hover .fig-cursor { opacity: 0 !important; }
.fig-cursor svg { display: block; width: 22px; height: 22px; margin: -2px 0 0 -4px; fill: var(--brand); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.fig-cursor span {
    position: absolute; left: 12px; top: 17px; padding: 3px 7px 4px; border-radius: 3px 9px 9px 9px; white-space: nowrap;
    background: var(--brand); color: var(--on-brand); font: 600 11px/1 'Outfit', sans-serif; transform-origin: 0 0; transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}
.fig-cursor.is-link span { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) { .fig-cursor span { transition: none; } }

/* the page rulers (rulers.js): fixed to the window, under the nav */
.pg-ruler { position: fixed; z-index: 55; top: 0; left: var(--sb-w); pointer-events: none; }
.pg-ruler-x { width: calc(100% - var(--sb-w)); height: 20px; }
.pg-ruler-y { width: 20px; height: 100%; }
.pg-ruler-corner { position: fixed; z-index: 56; top: 0; left: var(--sb-w); width: 20px; height: 20px; box-sizing: border-box; background: var(--ruler-bg); border-right: 1px solid var(--ruler-line); border-bottom: 1px solid var(--ruler-line); }
.pg-ruler, .pg-ruler-corner { display: none; }
@media (min-width: 768px) { .pg-ruler, .pg-ruler-corner { display: block; } }

/* ===================================================================
   NAV — Figma's left sidebar (nav.js): the file name, Pages and the
   Layers tree, where every section is a frame and the current one is
   highlighted and opened.
   - From 1280px it's docked on the left, full height. html.fn-docked
     moves the page right by --sb-w, and the rulers start after it.
   - The sidebar button collapses it to a pill (remembered), which
     clicking opens again.
   - Below 1280px it's a pill that opens as a drawer over the page.
   "Let's talk" sits top right like Figma's Share button.
   =================================================================== */
:root { --sb: 264px; --sb-w: 0px; }
html.fn-docked { --sb-w: var(--sb); }
html.fn-docked body { padding-left: var(--sb-w); }

.fn { font: 500 13px/1 'Outfit', sans-serif; }
.fn-panel {
    position: fixed; z-index: 60; top: 12px; left: 12px; width: 236px; box-sizing: border-box; overflow: hidden; color: #a1a1aa;
    border-radius: 14px; background: #1c1c21; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 24px 60px -24px #000;
}
/* open: the full-height sidebar (docked on wide screens, a drawer over the page on small ones) */
.fn:not(.is-min) .fn-panel { top: 0; left: 0; bottom: 0; width: var(--sb); display: flex; flex-direction: column; border-radius: 0; border-width: 0 1px 0 0; box-shadow: none; }
@media (max-width: 1279px) { .fn:not(.is-min) .fn-panel { width: min(var(--sb), 86vw); box-shadow: 24px 0 60px -20px #000; } }

.fn-head { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 12px; }
.fn:not(.is-min) .fn-head { padding: 16px 12px 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.fn-logo { flex: none; display: block; border-radius: 8px; }
.fn-logo img { display: block; width: 28px; height: 28px; }
.fn:not(.is-min) .fn-logo { display: none; }
.fn-file { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; cursor: default; }
.fn-file b { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #fff; }
.fn:not(.is-min) .fn-file b { font-size: 16px; }
.fn-file b svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.fn-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fn-meta > span { font-size: 12px; color: #8b8b96; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-badge { flex: none; padding: 3px 6px; border-radius: 4px; background: #4ade80; color: #052e16; font: normal 600 11px/1 'Outfit', sans-serif; }
.fn.is-min .fn-badge { display: none; }
.fn-min { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #a1a1aa; cursor: pointer; transition: background .15s, color .15s; }
.fn-min:hover { background: rgba(255,255,255,.07); color: #fff; }
.fn-min svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.fn.is-min .fn-collapse { display: none; }
.fn-collapse, .fn-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fn-sec { padding: 14px 8px 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.fn-sec-layers { flex: 1; min-height: 0; display: flex; flex-direction: column; border-bottom: 0; }
.fn-sec-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 12px; }
.fn-sec-head b { font-weight: 600; color: #fff; }
.fn-icons { display: flex; gap: 12px; color: #a1a1aa; }
.fn-icons svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.fn-pages, .fn-tree, .fn-kids { margin: 0; padding: 0; list-style: none; }
.fn-page { display: block; padding: 9px 10px; border-radius: 6px; color: #d4d4d8; text-decoration: none; transition: background .15s, color .15s; }
.fn-page:hover { background: rgba(255,255,255,.05); color: #fff; }
.fn-page.is-on { background: rgba(255,255,255,.08); color: #fff; font-weight: 600; }
.fn-tree { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 12px; }
.fn-frow { display: flex; align-items: center; border-radius: 6px; transition: background .15s; }
.fn-frow:hover { background: rgba(255,255,255,.05); }
.fn-frame.is-active > .fn-frow { background: rgba(var(--brand-rgb), .22); }
.fn-caret { flex: none; display: grid; place-items: center; width: 22px; height: 34px; padding: 0; border: 0; background: transparent; color: #6b6b76; cursor: pointer; }
.fn-caret::before { content: ""; border-left: 4.5px solid currentColor; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; transition: transform .2s; }
.fn-caret[aria-expanded="true"]::before { transform: rotate(90deg); }
.fn-caret:hover { color: #fff; }
.fn-link { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 2px; color: #e4e4e7; text-decoration: none; }
.fn-frame.is-active .fn-link { color: #fff; font-weight: 600; }
.fn-link svg, .fn-row svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.fn-kids { display: none; padding-left: 22px; }
.fn-frame.is-open > .fn-kids { display: block; }
.fn-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 6px; color: #a1a1aa; text-decoration: none; transition: background .15s, color .15s; }
.fn-row b { width: 14px; flex: none; text-align: center; font: 600 12px/1 'Outfit', sans-serif; }
.fn-row:hover, .fn-row.is-hover { background: rgba(var(--brand-rgb), .14); color: #fff; }
.fn-link:focus-visible, .fn-row:focus-visible, .fn-page:focus-visible, .fn-caret:focus-visible, .fn-min:focus-visible, .fn-logo:focus-visible, .fn-cta:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 6px; }

.fn-share { position: fixed; z-index: 60; top: 28px; right: 12px; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 14px; background: rgba(24,24,28,.94); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 24px 60px -24px #000; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@media (max-width: 767px) { .fn-share { top: 12px; } }
.fn-avatar { display: grid; place-items: center; width: 30px; height: 30px; box-sizing: border-box; border-radius: 50%; background: var(--brand); color: var(--on-brand); font: 700 11px/1 'Outfit', sans-serif; border: 2px solid #18181c; box-shadow: 0 0 0 1.5px var(--brand); }
.fn-cta { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 9px; background: var(--brand); color: var(--on-brand); font-weight: 600; text-decoration: none; transition: background .2s; }
.fn-cta:hover { background: var(--brand-hi); }
@media (max-width: 480px) { .fn.is-min .fn-panel { width: auto; max-width: calc(100vw - 168px); } .fn.is-min .fn-file b { display: none; } }
@media (prefers-reduced-motion: reduce) { .fn-caret::before, .fn-row, .fn-frow, .fn-page { transition: none; } }

/* nav (the Figma sidebar) */
html[data-theme="light"] .fn-panel { background: #fff; border-color: rgba(0,0,0,.09); color: #52525b; box-shadow: 0 18px 40px -24px rgba(0,0,0,.25); }
html[data-theme="light"] .fn:not(.is-min) .fn-panel { box-shadow: none; }
html[data-theme="light"] .fn:not(.is-min) .fn-head, html[data-theme="light"] .fn-sec { border-color: rgba(0,0,0,.08); }
html[data-theme="light"] .fn-file b, html[data-theme="light"] .fn-sec-head b { color: #18181b; }
html[data-theme="light"] .fn-meta > span { color: #71717a; }
html[data-theme="light"] .fn-min, html[data-theme="light"] .fn-icons { color: #52525b; }
html[data-theme="light"] .fn-min:hover { background: rgba(0,0,0,.05); color: #18181b; }
html[data-theme="light"] .fn-page { color: #3f3f46; }
html[data-theme="light"] .fn-page:hover { background: rgba(0,0,0,.04); color: #18181b; }
html[data-theme="light"] .fn-page.is-on { background: rgba(0,0,0,.06); color: #18181b; }
html[data-theme="light"] .fn-frow:hover { background: rgba(0,0,0,.04); }
html[data-theme="light"] .fn-frame.is-active > .fn-frow { background: rgba(var(--brand-rgb), .14); }
html[data-theme="light"] .fn-link { color: #27272a; }
html[data-theme="light"] .fn-frame.is-active .fn-link { color: #18181b; }
html[data-theme="light"] .fn-caret { color: #a1a1aa; }
html[data-theme="light"] .fn-caret:hover { color: #18181b; }
html[data-theme="light"] .fn-row { color: #52525b; }
html[data-theme="light"] .fn-row:hover, html[data-theme="light"] .fn-row.is-hover { background: rgba(var(--brand-rgb), .1); color: #18181b; }
html[data-theme="light"] .fn-share { background: rgba(255,255,255,.95); border-color: rgba(0,0,0,.08); box-shadow: 0 18px 40px -24px rgba(0,0,0,.25); }
html[data-theme="light"] .fn-theme { color: #3f3f46; }
html[data-theme="light"] .fn-theme:hover { background: rgba(0,0,0,.05); color: #18181b; }
html[data-theme="light"] .fn-avatar { border-color: #fff; }
