/* Split layout variation (after nicolasmarx.framer.website): a fixed left panel holds the identity,
   navigation and the floating objects; the work scrolls past on the right as large tinted tiles. */
:root { --panel-w: clamp(360px, 36vw, 540px); --tile-r: 18px; --gap-s: 8px; --plate-pad: clamp(20px, 3.4vw, 52px); }

.split { display: grid; grid-template-columns: var(--panel-w) 1fr; min-height: 100vh; }
.panel { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 40px 24px; box-sizing: border-box; }
.panel .corners { width: auto; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; }
.panel .intro { margin-top: 48px; padding: 0; }
.panel .intro h1 { font: inherit; font-size: 17px; margin: 0 0 .7em; }
.panel .intro p { margin: 0 0 .7em; font-family: var(--font-body); letter-spacing: 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.panel .intro p:first-of-type { color: var(--ink); }
.panel .stage { position: relative; flex: 1; min-height: 220px; margin: 16px -40px 8px; }
.panel .stage .objects-canvas.is-contained { z-index: 1; }
.panel .foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 13px; color: var(--ink-soft); }
.panel .foot a { color: var(--ink-soft); }
.panel .foot a:hover { color: var(--ink); }
.panel .theme-row { padding: 0; }
.back { display: inline-block; padding: 6px 0; font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.back:hover { color: var(--ink); }

/* Work: framed screenshots. Each shot is cropped clear of browser or phone chrome and sits inside a
   tinted frame with room on every side, full width or as a 50/50 pair. */
.tiles { display: flex; flex-direction: column; gap: var(--gap-s); padding: var(--gap-s) var(--gap-s) var(--gap-s) 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-s); }
.tile { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--tile-r); background: var(--tint, var(--paper)); aspect-ratio: 16 / 11; padding: var(--plate-pad); box-sizing: border-box; container-type: size; display: grid; place-items: center; }
.pair .tile { aspect-ratio: 4 / 5; }
.tile .bg, .tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile .bg { object-fit: cover; }
/* the screen fits the frame's inner box at its own proportions; the image inside is shifted so only the crop shows */
.screen { position: relative; z-index: 2; width: min(100cqw, 100cqh * var(--ar)); aspect-ratio: var(--ar); overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 24px 60px -24px rgb(0 0 0 / .4); transition: transform .9s var(--ease); }
.screen img { position: absolute; max-width: none; width: calc(100% / var(--cw)); left: calc(-100% * var(--cx) / var(--cw)); top: calc(-100% * var(--cy) / var(--ch)); }
.work { display: block; color: var(--ink); text-decoration: none; }
.work:hover .screen { transform: translateY(-6px); }
.work .meta { display: flex; justify-content: space-between; gap: 12px; padding: 10px 6px 14px; font-size: 13px; }
.work .tag { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.work .tag span, .work .go { color: var(--ink-soft); }
.shot-fig { margin: 0; }
/* Stageshow demos (demos/*-demos.js) draw on a clear stage, so the tinted plate is ours. Their windows sit
   about 2.8% in from the stage, so the padding makes up the rest of the same --plate-pad every tile has */
.demo-fig .demo-stage { box-sizing: border-box; aspect-ratio: auto !important; padding: max(8px, calc(var(--plate-pad) - 2.8%)); background: var(--tint); border-radius: var(--tile-r); overflow: hidden; }
.shot-fig figcaption { padding: 10px 6px 14px; font-size: 13px; color: var(--ink-soft); max-width: 60ch; }
/* type set in a frame, for the principles and the pull quote */
.tile:has(.say) { container-type: normal; aspect-ratio: auto; }
.tile .say { position: relative; z-index: 2; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; gap: 22px; list-style: none; font-family: var(--font-display); line-height: 1.25; letter-spacing: -0.01em; }
/* the rules are a numbered card, a sibling of the UI that sits on the other plates */
.tile ol.say { display: block; width: 100%; counter-reset: rule; padding: 6px clamp(20px, 3vw, 36px); background: var(--bg); border-radius: 12px; box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 24px 60px -24px rgb(0 0 0 / .4); }
.tile ol.say li { counter-increment: rule; display: grid; grid-template-columns: 44px 1fr; padding: 22px 0; font-family: var(--font-body); font-size: 15px; line-height: 1.45; letter-spacing: 0; color: var(--ink-soft); }
.tile ol.say li + li { border-top: 1px solid var(--line); }
.tile ol.say li::before { content: counter(rule); grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: #161616; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile ol.say li strong { display: block; font-weight: 400; font-family: var(--font-display); font-size: clamp(18px, 1.6vw, 23px); line-height: 1.2; color: var(--ink); margin-bottom: 6px; }
.tile blockquote.say p { margin: 0; max-width: 24ch; font-size: clamp(26px, 2.6vw, 40px); }

@media (max-width: 899px) {
  .split { display: block; }
  .panel { position: static; height: auto; padding: 20px 16px 8px; }
  .panel .intro { margin-top: 28px; }
  .panel .stage { flex: none; height: 260px; margin: 8px -16px; }
  .tiles { padding: 8px; }
  .tile { aspect-ratio: 4 / 3.4; }
}

.more-link { display: inline-block; padding: 4px 0; font-size: 15px; color: var(--ink); text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.more-link:hover { text-decoration-color: currentColor; }

/* Case study: the whole story sits in one panel on the left, the same six headings every time,
   and the work scrolls past on the right: a hero on its painting, then animations on flat plates. */
.cs { --cs-w: clamp(380px, 38vw, 560px); display: grid; grid-template-columns: var(--cs-w) 1fr; }
.cs-panel { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; box-sizing: border-box; padding: 28px 40px 24px; scrollbar-width: thin; display: flex; flex-direction: column; }
.cs-panel .corners { padding: 0; margin: 0 0 36px; display: block; }
.cs-panel .back { align-self: start; }
.cs-panel.ch-text h1 { font-size: clamp(26px, 2.1vw, 30px); }
.cs-work { display: flex; flex-direction: column; gap: var(--gap-s); padding: var(--gap-s) var(--gap-s) var(--gap-s) 0; min-width: 0; }
.story { display: flex; flex-direction: column; gap: 12px; }
.story section { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 0; }
.cs-panel .story h2 { margin: 0; font: inherit; font-size: 14px; line-height: 1.5; letter-spacing: 0; color: var(--ink-soft); }
.cs-panel .story p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); max-width: none; }
.cs-panel .foot { margin-top: auto; }
/* the hero is the one place the painting shows at full strength, with room around the UI */
.hero-tile { --art-opacity: 1; --tint: #fff; margin: 0; aspect-ratio: auto; container-type: normal; display: block; place-items: normal; padding: clamp(28px, 9%, 96px); padding-bottom: calc(clamp(28px, 9%, 96px) + 32px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-tile { --tint: #000; } }
:root[data-theme="dark"] .hero-tile { --tint: #000; }
.hero-tile .bg, .hero-tile canvas { inset: -6%; width: 112%; height: 112%; } /* crops any picture frame out of the scan */
.hero-tile .demo-stage { position: relative; z-index: 2; }
.hero-credit { position: absolute; z-index: 3; left: 12px; bottom: 12px; max-width: calc(100% - 24px); box-sizing: border-box; padding: 4px 10px; border-radius: 8px; font-size: 12px; line-height: 1.4; color: #161616; background: rgb(255 255 255 / .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-credit a { color: inherit; text-decoration: none; }
.hero-credit a:hover { text-decoration: underline; }
/* the SafetyCulture hero keeps its whole window on the stage and fades to white inside it,
   instead of the bundle's mask, which dissolved the window into whatever sat behind it */
.demo-stage[data-demo="sc-hero"] .scx-fade { -webkit-mask-image: none; mask-image: none; }
.demo-stage[data-demo="sc-hero"] .scx-fade .scx-win { height: 636px; }
[data-demo="sc-hero"] .scx-win::after { content: ""; position: absolute; inset: auto 0 0; height: 200px; background: linear-gradient(to bottom, rgb(255 255 255 / 0), #fff 85%); pointer-events: none; }
.demo-stage[data-demo="ps-hero"] { aspect-ratio: 16 / 10; }
/* the phone sits centre-stage, so long artwork credits wrap in the gutter beside it */
@media (min-width: 900px) { .hero-tile:has([data-demo="ps-hero"]) .hero-credit { max-width: 30%; } }
.ch-text h1 { font-family: var(--font-display); font-size: clamp(30px, 2.8vw, 42px); line-height: 1.08; letter-spacing: -0.02em; margin: 18px 0 10px; }
.ch-text h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 2vw, 30px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 18px; }
.ch-text h3 { font-size: 15px; margin: 22px 0 4px; }
.ch-text p { font-family: var(--font-body); font-size: 15px; line-height: 1.55; margin: 0 0 .9em; color: var(--ink-soft); max-width: 46ch; }
.ch-text .dek { font-size: 17px; color: var(--ink); }
.ch-text .chapter-no { font-size: 13px; margin: 0 0 10px; }
.ch-text .note { border-left: 2px solid var(--line); padding-left: 14px; font-size: 14px; }
.ch-text .note b { color: var(--ink); font-weight: 500; }
.ch-text .small { font-size: 13px; }
.facts { display: grid; grid-template-columns: 92px 1fr; gap: 2px 16px; margin: 18px 0; font-size: 14px; }
.facts dt { color: var(--ink-soft); } .facts dd { margin: 0; }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 10px; }
.nums strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.nums span { font-size: 13px; color: var(--ink-soft); }
.ch-text .next { display: inline-block; margin: 18px 0 16px; font-size: 15px; color: var(--ink); }
.ch-text .foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 13px; color: var(--ink-soft); }
.ch-text .foot a { color: var(--ink-soft); }
.ch-text .theme-row { padding: 0; }
@media (max-width: 899px) {
  .cs { display: block; }
  .cs-panel { position: static; height: auto; overflow: visible; padding: 28px 16px 24px; }
  .cs-work { padding: 0 8px 8px; }
  .hero-tile { padding: 20px 20px 52px; }
  .pair { grid-template-columns: 1fr; }
  .pair .tile { aspect-ratio: 4 / 3.4; }
  .tile .say { gap: 14px; }
}
