  @font-face { font-family: "Stevie Sans Book"; src: url("fonts/stevie-sans-book.woff") format("woff"); font-weight: 400; font-style: normal; font-display: block; }
  .work-view {
    --work-edge: 24px;
    min-height: 100dvh;
    display: grid;
    align-content: end;
    padding-block: 24px;
    color: #1b1b1b;
    font: 400 16px/1.35 "Stevie Sans Book", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  .work-view:not([inert]) { pointer-events: auto; }
  .work-view:focus { outline: none; }

  .work-rail {
    display: grid;
    background: #fff;
    visibility: var(--work-visibility, hidden);
    grid-auto-flow: column;
    grid-auto-columns: clamp(270px, 39.25vw, 780px);
    gap: 24px;
    /* room above the covers for the hover lift, which the sideways scroller would otherwise clip */
    padding-top: 24px;
    margin-top: -24px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--work-edge);
    padding-inline: calc(var(--work-edge) + env(safe-area-inset-left, 0px)) calc(var(--work-edge) + env(safe-area-inset-right, 0px));
  }

  .work-rail:focus-visible { outline: 2px solid #1b1b1b; outline-offset: -2px; }
  .work-card { display:flex;flex-direction:column; min-width: 0; scroll-snap-align: start; color: inherit; text-decoration: none; }
  .work-card-cover { display: block; width: 100%; height: calc(var(--pixel-bar-height) - var(--work-edge)); flex: none; overflow: hidden; }
  .work-card-cover img { display: block; width: 100%; height: auto; min-height: 100%; }
  /* Hover, value for value from the first carousel on molly.studio: the cover alone (not the caption, not
     the other cards) springs up to 1.025× and casts a soft shadow, and springs back the same way. The
     curve is Molly's own "spring-bouyant" linear() over 0.65s: it overshoots by about a quarter of the
     lift, dips back under, and settles. Hovering never moves the carousel. */
  .work-rail {
    --hover-time: 650ms;
    --hover-spring: linear(0, 0.0044, 0.017, 0.0372, 0.0641, 0.0971, 0.1353, 0.1781, 0.2247, 0.2744, 0.3265, 0.3805, 0.4356, 0.4914, 0.5474, 0.6029, 0.6576, 0.711, 0.7628, 0.8127, 0.8604, 0.9056, 0.9482, 0.9879, 1.0247, 1.0584, 1.0891, 1.1166, 1.141, 1.1623, 1.1805, 1.1958, 1.2083, 1.2179, 1.225, 1.2295, 1.2318, 1.2318, 1.2299, 1.2261, 1.2206, 1.2137, 1.2054, 1.196, 1.1856, 1.1745, 1.1626, 1.1503, 1.1376, 1.1248, 1.1118, 1.0988, 1.086, 1.0735, 1.0612, 1.0494, 1.0381, 1.0273, 1.0171, 1.0075, 0.9986, 0.9904, 0.9829, 0.9762, 0.9701, 0.9648, 0.9602, 0.9563, 0.9531, 0.9505, 0.9486, 0.9472, 0.9464, 0.9462, 0.9464, 0.947, 0.9481, 0.9495, 0.9513, 0.9534, 0.9556, 0.9581, 0.9608, 0.9636, 0.9665, 0.9695, 0.9725, 0.9755, 0.9785, 0.9814, 0.9843, 0.9871, 0.9898, 0.9924, 0.9948, 0.9971, 0.9993, 1.0013, 1.0031, 1.0047, 1.0062);
    --hover-lift: 1.025;
    --hover-shadow: rgba(0, 0, 0, 0.2) 0px 15px 17px;
    /* the cards either side of an opening sheet step aside on this spring (project-sheet.js) */
    --cover-spring: linear(0, 0.0067, 0.0251, 0.0528, 0.088, 0.1287, 0.1735, 0.2211, 0.2704, 0.3204, 0.3704, 0.4197, 0.4678, 0.5143, 0.5588, 0.6012, 0.6413, 0.6789, 0.714, 0.7466, 0.7768, 0.8044, 0.8298, 0.8528, 0.8737, 0.8925, 0.9094, 0.9245, 0.9379, 0.9497, 0.9601, 0.9691, 0.977, 0.9838, 0.9895, 0.9944, 0.9985, 1.0019, 1.0047, 1.0069, 1.0086, 1.01, 1.0109, 1.0116, 1.0119, 1.0121, 1.0121, 1.0119, 1.0116, 1.0112, 1.0107, 1.0102, 1.0096, 1.009, 1.0084, 1.0078, 1.0072, 1.0066, 1.0061, 1.0055, 1);
    --cover-time: 612ms;
  }
  .work-card-cover {
    filter: drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px);
    transition: transform var(--hover-time) var(--hover-spring), filter var(--hover-time) var(--hover-spring);
    will-change: transform, filter;
  }
  @media (hover: hover) and (pointer: fine) {
    .work-card-cover:hover {
      transform: scale(var(--hover-lift));
      filter: drop-shadow(var(--hover-shadow));
    }
  }
  /* reduced motion: the shadow still fades in, nothing grows */
  @media (prefers-reduced-motion: reduce) {
    .work-card-cover { transition: filter 0.2s ease; }
    .work-card-cover:hover { transform: none; }
  }
  @font-face { font-family: "Necto Mono"; src: url("fonts/NectoMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
  .work-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: auto 0 12px; }
  .work-caption p { margin: 0; font: 400 15px/1.4 "IBM Plex Sans", sans-serif; color: #1b1b1b; }
  .work-caption h2 { flex: none; margin: 0; font: 400 13px/1.4 "IBM Plex Sans", sans-serif; text-transform: uppercase; color: #858585; word-spacing: .15em; }
  /* Case-study sheet: the Framer homepage's sheet, value for value (project-sheet.js drives it).
     The 16px gap around the sheet is one close button; hovering it brings the back chip and the peek. */
  #project-sheet {
    --sheet-radius: 8px;
    --sheet-shadow: 0px 16px 47px 4px rgba(27, 27, 27, 0.2);
    --sheet-peek-shadow: 0px 12px 52px 0px rgba(27, 27, 27, 0.18);
    --sheet-peek-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --sheet-blur-ease: cubic-bezier(0.23, 1, 0.32, 1);
    --back-ink: #302923;
    position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0; overflow: hidden; background: transparent; color: #1b1b1b;
    pointer-events: auto;
  }
  #project-sheet::backdrop { background: transparent; }
  html:has(#project-sheet[open]) { overflow: hidden; }
  /* The page behind blurs in with the sheet and comes back into focus while the back chip shows. */
  .sheet-blur {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    transition: opacity 0.12s var(--sheet-blur-ease);
  }
  #project-sheet[data-blurred] .sheet-blur { opacity: 1; transition-duration: 0.32s; }
  .sheet-strip {
    position: absolute; inset: 0; z-index: 0; margin: 0; padding: 0; border: 0;
    appearance: none; background: transparent; cursor: pointer;
  }
  .sheet-strip:focus-visible { outline: 2px solid var(--back-ink); outline-offset: -8px; }
  #project-sheet[data-closing] .sheet-strip { pointer-events: none; }
  .sheet-box {
    position: absolute; inset: var(--sheet-margin, 16px); z-index: 1; pointer-events: none;
    transition: transform 0.24s var(--sheet-peek-ease);
  }
  .sheet-panel {
    position: absolute; inset: 0; overflow: hidden; outline: none; opacity: 0;
    border-radius: var(--sheet-radius); background: var(--page-color, #ffffff);
    box-shadow: var(--sheet-shadow); pointer-events: auto;
    transition: box-shadow 0.24s var(--sheet-peek-ease), background-color 0.24s ease;
  }
  #project-sheet[data-peek] .sheet-panel { box-shadow: var(--sheet-peek-shadow); }
  #project-sheet[data-closing] .sheet-panel { pointer-events: none; }
  /* a hairline of light along the top-left edge, as on the Framer sheet */
  .sheet-panel::after {
    content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
    box-shadow: inset 1px 1px 0 0 rgba(255, 255, 255, 0.9);
  }
  .sheet-content { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; clip-path: inset(0 round var(--sheet-radius)); }
  .sheet-content iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: normal; }
  #project-sheet:not([data-ready]) .sheet-content iframe { pointer-events: none; }
  .sheet-content img { display: block; width: 100%; height: 100%; object-fit: contain; }
  .sheet-error {
    position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px;
    padding: 24px; background: #ffffff; color: #1b1b1b; font-size: 15px; text-align: center;
  }
  .sheet-error p { margin: 0; }
  .sheet-error a, .sheet-error button {
    font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #1b1b1b55;
  }
  .sheet-error a:focus-visible, .sheet-error button:focus-visible { outline: 2px solid var(--back-ink); outline-offset: 4px; border-radius: 2px; }
  /* Back chip: the side nav's icon tile. It follows the pointer through the gap (the cursor hides there);
     on touch screens it rests in the middle of the top gap and takes taps. */
  .sheet-chip { position: fixed; left: 0; top: 0; z-index: 3; width: 40px; height: 40px; pointer-events: none; will-change: transform; }
  .sheet-chip > span {
    display: grid; place-items: center; width: 100%; height: 100%; border-radius: 0;
    background: #ffffff; color: var(--back-ink);
    box-shadow: 0px 1px 4px 0px rgba(27, 27, 27, 0.08), 0px 6px 8px 0px rgba(27, 27, 27, 0.06);
    opacity: 0; scale: 0.6;
    transition: opacity var(--chip-time, 0.3s) var(--chip-ease, ease), scale var(--chip-time, 0.3s) var(--chip-ease, ease);
  }
  #project-sheet[data-chip] .sheet-chip > span { opacity: 1; scale: 1; }
  #project-sheet[data-chip][data-pressed] .sheet-chip > span { scale: 0.9; }
  .sheet-chip svg { width: 16px; height: 16px; transition: rotate var(--turn-time, 0.4s) var(--turn-ease, ease); }
  @media (hover: hover) and (pointer: fine) {
    .sheet-strip { cursor: none; }
  }
  @media (hover: none), (pointer: coarse) {
    #project-sheet[data-chip] .sheet-chip { pointer-events: auto; cursor: pointer; }
  }
  @media (max-width: 809.98px) {
    .sheet-chip svg { rotate: 90deg; } /* on phones the arrow points up, toward the gap it closes into */
  }
  @media (prefers-reduced-motion: reduce) {
    .sheet-blur, .sheet-box, .sheet-chip > span, .sheet-chip svg { transition: none; }
  }

  @media (max-width: 600px) {
    .work-rail { grid-auto-columns: 82vw; }
  }


body:has(#work:not([hidden])) {gap:0}
.work-view {flex:1;min-height:0;min-width:0;--work-visibility:visible}
.work-card:hover {text-decoration:none}
.work-mask {position:fixed;inset:0;pointer-events:none;display:grid;grid-template-columns:repeat(12,1fr);grid-template-rows:repeat(8,1fr);z-index:5}
.work-mask span {background:white}
header {position:relative;z-index:6}


.header-links {display:contents}
body:has(footer:not([hidden])) .header-links {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:12px;
}
#section-nav {margin-left:auto;gap:24px;font:400 13px/1.4 "IBM Plex Sans",sans-serif}
#section-nav a {padding:4px 8px}
#section-nav a:is([aria-current="page"],:hover,:focus-visible) {background:var(--accent,#ededed);text-decoration:none}
@media(max-width:760px){
  body:has(footer[hidden]) header {flex-direction:row;flex-wrap:wrap}
  body:has(footer:not([hidden])) .header-links {align-items:flex-start}
  #section-nav {margin-left:0;flex-wrap:nowrap;gap:8px}
  #section-nav a {padding-inline:4px}
}

@media (max-width: 760px) {
  :root {
    --pixel-row-height: min(52.44vw, 29svh);
    --pixel-bar-height: calc(2 * var(--pixel-row-height));
    --cover-start: calc(100svh - var(--pixel-bar-height));
  }
  body:has(footer:not([hidden])), body:has(#work:not([hidden])) {
    justify-content: flex-start;
    gap: 0;
    font-size: 14px;
  }
  body:has(footer:not([hidden])) header, body:has(#work:not([hidden])) header {
    flex-flow: column nowrap;
    justify-content: flex-start;
    min-height: var(--cover-start);
    padding: 12px 16px 24px;
    gap: 24px;
  }
  body:has(footer:not([hidden])) .header-links,
  body:has(#work:not([hidden])) #section-nav { order: -1; }
  nav[aria-label="Contact and location"], #section-nav { font-size: 12px; }
  #section-nav { gap: clamp(4px, 3vw, 16px); flex-wrap: wrap; }
  body:has(#work:not([hidden])) h1 {font-size: 24px; line-height: 1.4}
  #work { display: block; padding: 0 16px 32px; }
  .work-card-cover { order: -1; }
  .work-rail {
    grid-auto-flow: row;
    grid-template-columns: minmax(0,1fr);
    grid-auto-columns: auto;
    gap: 32px;
    margin: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }
  .work-caption {flex-direction: column; align-items: start; gap: 4px; margin: 10px 0 0}
  .work-caption p {font-size: 15px; line-height: 1.4; text-wrap: pretty}
  .work-caption h2 {order: -1; font-size: 12px; line-height: 1.4; color: #666}
  .work-card-cover {height: auto; aspect-ratio: 1.38}
}

.work-mask {overflow:hidden}
@media (min-width:761px) {
  /* Every card is the same size: two whole cards, with a sliver of the one before and after. */
  .work-rail {
    --rest-width:calc((100vw - 72px) / 2.1);
    height:calc(var(--pixel-bar-height) - var(--work-edge) + 124px);
    display:flex;
    align-items:flex-end;
    scroll-snap-type:none;
    overflow-anchor:none;
    /* room below the covers for the hover shadow, which the sideways scroller would otherwise clip */
    padding-bottom:24px;
    margin-bottom:-24px;
  }
  .work-rail::after {content:"";flex:0 0 max(0px,calc(100% - var(--rest-width) - 24px))}
  .work-card {
    flex:0 0 auto;
    width:var(--rest-width);
    translate:var(--sheet-shift,0px) 0;
    transition:translate var(--cover-time) var(--cover-spring);
  }
  .work-card .work-card-cover {height:calc(var(--pixel-bar-height) - var(--work-edge))}
}
@media (prefers-reduced-motion:reduce) {
  .work-card {transition:none;translate:none}
}

.work-rail[data-instant] .work-card {transition:none}

/* The card a case study is open from stays invisible behind its sheet until the sheet has closed back
   into it (project-sheet.js). It vanishes at once (the sheet already covers it); coming back, the cover
   shows at once where the sheet landed and only the caption fades in. */
.work-card[data-sheet-source] > * {opacity:0}
.work-card:not([data-sheet-source]) .work-caption {transition:opacity .2s cubic-bezier(.23,1,.32,1)}

.sheet-return-image {position:absolute;inset:0 auto auto 0;width:100%;pointer-events:none}
.sheet-panel[data-returning] {border-radius:0;box-shadow:none}
.sheet-panel[data-returning]::after {display:none}
@media (min-width:761px) {
  #work {position:relative}
}

#section-nav a[href="#work"][aria-current="page"] { background: var(--project-accent, var(--accent)); }
