/* Project window for the Websites and Apps pages (Evan, 2026-10-01), built by js/project-window.js.
   In the spirit of awwwards.com: sticky bar with thumb and primary button, huge title with a facts column,
   the project's story and images. Also rounds the Websites card shots.
   Motion: the sheet slides up and back down, the backdrop fades, the title lines rise, the shot unmasks. */
:root { --wk-ease: cubic-bezier(.7, 0, .3, 1); --wk-out: cubic-bezier(.16, 1, .3, 1); }
#work a > img { border-radius: 18px; transition: transform .6s var(--wk-ease); }
#work a:hover > img { transform: translateY(-6px); }

/* the sheet */
.wk-case { --pad: max(24px, calc((100vw - 1240px) / 2)); border: 0; padding: 0; background: #fff; color: #000; width: 100%; max-width: none;
  height: calc(100% - 20px); max-height: none; margin: 20px 0 0; overflow-y: auto; overscroll-behavior: contain; border-radius: 24px 24px 0 0;
  font-family: "Mona Sans", sans-serif; }
.wk-case::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(10px); }
.wk-case[open] { animation: wk-up .9s var(--wk-out); }
.wk-case[open]::backdrop { animation: wk-fade .6s ease; }
.wk-case.is-closing { animation: wk-down .6s var(--wk-ease) forwards; }
.wk-case.is-closing::backdrop { animation: wk-fade .6s ease reverse forwards; }
@keyframes wk-up { from { transform: translateY(100%); } }
@keyframes wk-down { to { transform: translateY(100%); } }
@keyframes wk-fade { from { opacity: 0; } }

/* sticky bar */
.wk-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 14px; height: 72px; padding-inline: var(--pad);
  background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); /* glass: shared --glass-* tokens */
  border-bottom: var(--glass-edge); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .04); border-radius: 24px 24px 0 0; }
.wk-thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; object-position: top; flex: none; border: 1px solid #e3e3e3; }
.wk-thumb.is-contain { object-fit: contain; background: #000; }
.wk-who { display: grid; line-height: 1.25; }
.wk-who b { font-size: 16px; font-weight: 500; }
.wk-who span { font-size: 13px; color: #6e6e73; }
.wk-bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.wk-about-body .w-button { margin-top: 4px; }
/* the bar button matches the nav's "Free visibility check" size */
.wk-case .wk-bar .w-button { height: 40px; min-height: 40px; padding: 0 20px; font-size: 15px; }
.wk-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #e3e3e3; background: #fff; color: #000; display: grid; place-items: center; cursor: pointer; flex: none;
  transition: transform .5s var(--wk-ease), background .3s, color .3s; }
.wk-x:hover { transform: rotate(90deg); background: #000; color: #fff; }
.wk-x svg { width: 12px; height: 12px; }

/* page */
.wk-in { padding-inline: var(--pad); }
.wk-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; align-items: end; padding-block: 64px 40px; }
.wk-title { margin: 0; font-size: clamp(56px, 9vw, 150px); line-height: .9; font-weight: 500; letter-spacing: -.045em; }
.wk-title .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.wk-title .ln > span { display: block; animation: wk-line 1s var(--wk-out) both; animation-delay: calc(.25s + var(--n, 0) * .08s); }
@keyframes wk-line { from { transform: translateY(105%); } }
.wk-facts { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 40px; margin: 0; padding-bottom: .6em; }
.wk-facts dt { font-size: 13px; color: #6e6e73; }
.wk-facts dd { margin: 0; font-size: 16px; font-weight: 500; }
.wk-facts > div { animation: wk-rise .8s var(--wk-out) both; animation-delay: calc(.45s + var(--n, 0) * .07s); }
@keyframes wk-rise { from { opacity: 0; transform: translateY(18px); } }

.wk-frame { border-radius: 22px; overflow: hidden; border: 1px solid #e3e3e3; background: #f5f5f4; animation: wk-unmask 1.1s var(--wk-out) .35s both; }
@keyframes wk-unmask { from { clip-path: inset(100% 0 0 0 round 22px); } to { clip-path: inset(0 0 0 0 round 22px); } }
.wk-chrome { display: flex; justify-content: center; padding: 12px; border-bottom: 1px solid #e3e3e3; }
.wk-chrome span { font-size: 13px; color: #6e6e73; background: #fff; border: 1px solid #e6e6e6; border-radius: 20px; padding: 6px 18px; }
.wk-frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; animation: wk-settle 1.4s var(--wk-out) .35s both; }
.wk-frame img.is-contain { object-fit: contain; background: #000; }
@keyframes wk-settle { from { transform: scale(1.08); } }

.wk-about-body p { margin: 0 0 36px; max-width: 28ch; font-size: clamp(30px, 3.6vw, 56px); line-height: 1.12; letter-spacing: -.025em; font-weight: 500; }

/* below About: desktop pages in a 2x2 grid, more writing, then phone screens in a carousel. Each block fades up. */
/* every section is full width: a header row with a thin rule, then the content */
.wk-block { padding-top: 96px; }
.wk-block-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 16px; margin-bottom: 32px; border-bottom: 1px solid #ececec; }
.wk-block-head h4 { margin: 0; font-size: 14px; font-weight: 500; color: #6e6e73; }
.wk-block:not(.is-in) { opacity: 0; transform: translateY(40px); }
.wk-block { transition: opacity .9s var(--wk-out), transform .9s var(--wk-out); }
.wk-slot { margin: 0; overflow: hidden; border: 1px solid #e3e3e3; background: #f2f2f0; }
.wk-slot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.wk-slot.is-empty { display: grid; place-content: center; text-align: center; gap: 6px; padding: 16px; }
.wk-slot.is-empty span { font-size: 14px; font-weight: 500; color: #6e6e73; }
.wk-slot.is-empty small { font-size: 11px; color: #9a9a9a; word-break: break-all; }

.wk-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
/* used: js/project-window.js gives every desktop screenshot "wk-slot is-page" (rounded 16:10 tiles) */
.wk-slot.is-page { aspect-ratio: 16 / 10; border-radius: 16px; transition: transform .6s var(--wk-ease); }
.wk-slot.is-page:hover { transform: translateY(-4px); }

.wk-more { margin: 0; max-width: 46ch; font-size: clamp(22px, 2vw, 28px); line-height: 1.45; columns: 1; }
.wk-more.is-empty { color: #9a9a9a; font-size: 16px; padding: 20px; border: 1px solid #e3e3e3; border-radius: 16px; background: #f7f7f5; }

/* "Inside the site": a row of big verified numbers, then what visitors can do there */
.wk-stats { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 24px; margin: 0 0 40px; }
.wk-stats div { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid #000; }
.wk-stats dd { order: -1; margin: 0; font-size: clamp(56px, 7vw, 112px); line-height: .9; font-weight: 500; letter-spacing: -.045em; }
.wk-stats dt { font-size: 15px; color: #6e6e73; }
.wk-block.is-in .wk-stats div { animation: wk-rise .8s var(--wk-out) both; animation-delay: calc(var(--n, 0) * .08s); }
.wk-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.wk-chips li { margin: 0; padding: 10px 18px; border: 1px solid #dcdcdc; border-radius: 40px; font-size: 16px; line-height: 1.2; }
.wk-carousel { position: relative; min-width: 0; margin-right: calc(-1 * var(--pad)); }   /* bleeds off the right edge */
.wk-track { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 22vw, 300px); column-gap: 24px; padding-right: var(--pad); scroll-padding-left: 0; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; outline: none; padding-block: 4px; }
.wk-track::-webkit-scrollbar { display: none; }
.wk-slot.is-phone { aspect-ratio: 9 / 19.5; border-radius: 26px; scroll-snap-align: start; }
.wk-car-ctrl { display: flex; align-items: center; gap: 10px; }
.wk-car-num { font-size: 14px; color: #6e6e73; font-variant-numeric: tabular-nums; margin-right: 8px; }
.wk-car-ctrl.is-static { display: none; }
.wk-car-btn { position: static; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #e3e3e3; background: #fff; color: #000;
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .25); transition: background .3s, color .3s, transform .4s var(--wk-ease); }
.wk-car-btn svg { width: 14px; height: 14px; }
.wk-car-btn:hover { background: #000; color: #fff; transform: scale(1.06); }

@media (max-width: 820px) {
  .wk-case { --pad: 16px; }
  .wk-who span, .wk-bar   .wk-head { grid-template-columns: 1fr; padding-block: 40px 28px; }
  .wk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
  .wk-facts dd { overflow-wrap: anywhere; }   /* long domains like firstchoicefinances.com wrap instead of pushing past the screen */

  .wk-block { padding-top: 56px; }
  .wk-block-head { margin-bottom: 20px; }
  .wk-about-body p { font-size: 26px; }
  .wk-stats { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .wk-stats dd { font-size: 56px; }
  .wk-chips li { font-size: 14px; padding: 8px 14px; }
  .wk-pages { grid-template-columns: 1fr; gap: 12px; }
  .wk-track { grid-auto-columns: 64%; column-gap: 12px; }
  .wk-car-btn { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .wk-case[open], .wk-case[open]::backdrop, .wk-case.is-closing, .wk-case.is-closing::backdrop, .wk-title .ln > span, .wk-facts > div,
  .wk-frame, .wk-frame img { animation: none; }
  .wk-block:not(.is-in) { opacity: 1; transform: none; }
  .wk-block.is-in .wk-stats div { animation: none; }
  #work a > img, #work a:hover > img { transform: none; transition: none; }
}

/* ---------- Apps (kept from the approved A polish, brand-pane 2026-10-01) ----------
   Light rounded hero (#f1f3f4), phones running off its bottom edge under one full-width glass band of figures,
   no black sections. App screenshots use App Store corners (--app-shot-r, defined in css/apps-work.css). */
.wk-thumb.is-app { border-radius: 10px; object-fit: cover; object-position: top; }
.wk-apphero { position: relative; overflow: hidden; border-radius: 28px; background: #f1f3f4; padding-top: clamp(36px, 4vw, 56px); animation: wk-rise .9s var(--wk-out) .3s both; }
.wk-appstrip { display: flex; justify-content: safe center; gap: 24px; padding-inline: 24px; margin-bottom: -48px; }
.wk-appstrip img { flex: none; height: min(580px, 62vh); width: auto; border-radius: var(--app-shot-r, 6% / 2.76%); box-shadow: 0 28px 56px rgba(0, 0, 0, .16);
  animation: wk-rise .9s var(--wk-out) both; animation-delay: calc(.4s + var(--n, 0) * .08s); }
.wk-appstrip img:nth-child(2n) { translate: 0 -40px; }
.wk-figs-wrap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding-block: 28px 32px; background-color: rgba(255, 255, 255, .24);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transform: translateZ(0); isolation: isolate; }
.wk-figs-wrap .wk-in { padding-inline: clamp(24px, 4vw, 56px); }
.wk-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; }
.wk-figs div { display: flex; flex-direction: column; gap: 6px; }
.wk-figs dd { order: -1; margin: 0; font-size: clamp(30px, 3.4vw, 48px); line-height: 1; letter-spacing: -.035em; font-weight: 500; color: #000; }
.wk-figs dt { font-size: 14px; color: #000; }
.wk-figs dd, .wk-figs dt { text-shadow: 0 0 2px rgba(255, 255, 255, .6), 0 0 18px rgba(255, 255, 255, .85); }   /* readable over dark screens */
.wk-apphero + * { margin-top: 0; }
.wk-in > .wk-apphero { margin-bottom: 0; }
.wk-pull { margin: 0 0 40px; max-width: 20ch; font-size: clamp(34px, 4.4vw, 64px); line-height: 1.02; letter-spacing: -.03em; font-weight: 500; }
.wk-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(48px, 6vw, 96px); }
.wk-pair h5 { margin: 0 0 12px; font-size: 14px; font-weight: 500; color: #6e6e73; }
.wk-pair p { margin: 0; font-size: 19px; line-height: 1.55; }
.wk-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.wk-cards li { margin: 0; background: #f5f5f7; border-radius: 22px; padding: 24px; font-size: 18px; line-height: 1.4; min-height: 160px; }
.wk-carousel.is-app .wk-slot.is-phone { border-radius: var(--app-shot-r, 6% / 2.76%); }
.wk-ctas { display: flex; flex-wrap: wrap; gap: 10px; padding-block: 64px 96px; }
@media (max-width: 820px) {
  .wk-apphero { border-radius: 24px; }
  .wk-appstrip { justify-content: flex-start; overflow-x: auto; margin-bottom: -36px; scrollbar-width: none; }
  .wk-appstrip img { height: min(420px, 52vh); }
  .wk-figs-wrap { padding-block: 16px 18px; }
  .wk-figs { gap: 12px; }
  .wk-figs dd { font-size: 22px; }
  .wk-figs dt { font-size: 11px; line-height: 1.25; }
  .wk-in > .wk-apphero { margin-bottom: 56px; }
  .wk-pair { grid-template-columns: 1fr; }
  .wk-cards { grid-template-columns: 1fr 1fr; }
  .wk-cards li { min-height: 0; }
  .wk-ctas { padding-bottom: 56px; }
}
@media (prefers-reduced-motion: reduce) { .wk-apphero, .wk-appstrip img { animation: none; } }
