/* ALLOIC — the Work index (10 November 2026). Loaded after styles.css, by /work only.
   Every project in one place: a large picture on the project's own colour, its name, one line, and what it is
   (live, the studio's own, or a concept built for a made-up business). The buttons narrow the list by kind. */

.wk-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; padding: clamp(2.5rem, 6vw, 5.5rem) var(--margin) 0; }
.wk-head h1 { grid-column: 1 / 6; font-size: min(22vw, 19rem); font-weight: 500; line-height: 0.8; letter-spacing: -0.065em; margin-left: -0.05em; }
.wk-intro { grid-column: 7 / 13; padding-bottom: 0.6rem; }
.wk-lead { font-size: var(--step-lead); line-height: 1.24; letter-spacing: -0.012em; max-width: 40ch; }
.wk-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: clamp(1.25rem, 2.6vw, 2rem); }
.wk-filter button {
  min-height: 2.9rem; padding: 0.5rem 1.2rem; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 1.0625rem; font-weight: 500;
  transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out), transform var(--t-release) var(--ease-out);
}
.wk-filter button.is-on { background: var(--ink); color: var(--bg); }
.wk-filter button:active { transform: scale(0.96); transition-duration: var(--t-hover), var(--t-hover), var(--t-press); }
@media (hover: hover) and (pointer: fine) { .wk-filter button:not(.is-on):hover { background: var(--surface-2); } }

/* Two groups: Featured (the big pieces, two to a row) and More work (three to a row). A group with nothing left
   under the chosen filter goes away with its heading. */
.wk-group { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.wk-group + .wk-group { padding-top: clamp(4rem, 8vw, 7.5rem); }
.wk-group:not(:has(.wk:not([hidden]))) { display: none; }
.wk-group-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 3rem; padding: 0 var(--margin); }
.wk-group-h { font-size: clamp(2.4rem, 1.2rem + 4.6vw, 5.5rem); font-weight: 500; line-height: 0.92; letter-spacing: -0.05em; }
.wk-group-lead { max-width: 40ch; font-size: var(--step-body); line-height: 1.4; color: var(--muted); }
.wk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: clamp(3rem, 6vw, 5.5rem); margin: 0; padding: clamp(1.5rem, 3vw, 2.5rem) var(--margin) 0; list-style: none; }
.wk-more .wk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: clamp(2.5rem, 4.5vw, 4rem); }
.wk-more .wk-text h3 { font-size: clamp(1.6rem, 1rem + 1.5vw, 2.4rem); }
.wk-more .wk-line { font-size: var(--step-small); }
.wk[hidden] { display: none; }
.wk-pic { position: relative; display: block; aspect-ratio: 16 / 10.4; overflow: hidden; border-radius: calc(var(--radius) + 0.5rem); background: var(--field, var(--surface)); container-type: size; }
.wk-pic.is-full picture, .wk-pic.is-full img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wk-pic.is-full img { transition: transform 900ms var(--ease-expo); }
.wk-desk, .wk-phone { position: absolute; display: block; transition: transform 900ms var(--ease-expo); }
.wk-desk { left: 7cqw; top: 9cqh; width: 72cqw; border-radius: 1.4cqw; overflow: hidden; background: #fff; }
.wk-desk img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.wk-phone { right: 6cqw; bottom: -3cqh; width: 20cqw; padding: 0.75cqw; border-radius: 3cqw; background: #0a0a0a; }
.wk-phone img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 19.3; object-fit: cover; object-position: top; border-radius: 2.3cqw; }
.wk-pic-scan { container-type: normal; }
.wk-pic-video { background: #050505; }
.wk-pic-video video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 100% 0%; transform: scale(1.32); transform-origin: 100% 34%; }
.wk-pic-seat { background: #2c2960; }
.wk-pic-seat video { object-position: 50% 50%; transform: none; }
.wk-pic-rackops { background: #0e1620; }
.wk-pic-rackops video { object-position: 50% 50%; transform: none; }
.wk-pic-video .clip-toggle { position: absolute; left: 1rem; bottom: 1rem; background: rgb(255 255 255 / 0.16); color: #fff; }
.wk-text { margin-top: clamp(1rem, 1.8vw, 1.5rem); display: grid; gap: 0.5rem; }
.wk-text h3 { font-size: clamp(1.9rem, 1.1rem + 2.4vw, 3.4rem); font-weight: 500; line-height: 1; letter-spacing: -0.04em; }
.wk-text h3 a { color: inherit; text-decoration: none; }
.wk-line { font-size: var(--step-body); line-height: 1.4; max-width: 44ch; }
.wk-kind { font-size: var(--step-small); line-height: 1.4; color: var(--muted); max-width: 52ch; }
.wk-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin-top: 0.35rem; }
@media (hover: hover) and (pointer: fine) {
  .wk:hover .wk-pic.is-full img { transform: scale(1.035); }
  .wk:hover .wk-desk { transform: translate3d(0, -1.2cqh, 0); }
  .wk:hover .wk-phone { transform: translate3d(0, -3.5cqh, 0); }
  .wk:hover h3 a { text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.14em; }
}
.wk:focus-within h3 a { text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.14em; }

.wk-end { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; margin-top: var(--section); padding: clamp(3rem, 7vw, 6rem) var(--margin); background: var(--accent); color: #fff; }
.wk-end h2 { grid-column: 1 / 8; font-size: min(7.6vw, 7.25rem); font-weight: 500; line-height: 0.9; letter-spacing: -0.055em; margin-left: -0.04em; }
.wk-end-side { grid-column: 8 / 13; padding-bottom: 0.5rem; }
.wk-end-side p { font-size: var(--step-lead); line-height: 1.25; letter-spacing: -0.012em; }
.wk-end-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 1.5rem; }
.wk-end .button { background: #fff; color: #111; }
.wk-end .text-link { color: #fff; font-size: var(--step-body); }
.wk-end :focus-visible { outline-color: #fff; }
.work-index .footer { margin-top: 0; }
@media (hover: hover) and (pointer: fine) { .wk-end .button:hover { background: #ece9e4; } }

@media (max-width: 1099px) {
  .wk-more .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-head { display: block; }
  .wk-intro { margin-top: 1.5rem; }
  .wk-end { display: block; }
  .wk-end-side { margin-top: 1.5rem; }
}
@media (max-width: 767px) {
  .wk-head h1 { font-size: 30vw; }
  .wk-grid, .wk-more .wk-grid { grid-template-columns: minmax(0, 1fr); row-gap: 2.75rem; }
  .wk-more .wk-line { font-size: var(--step-body); }
  .wk-filter { gap: 0.4rem; }
  .wk-filter button { min-height: 2.75rem; padding: 0.4rem 0.95rem; font-size: 1rem; }
  .wk-end h2 { font-size: 14vw; }
}
@media (prefers-reduced-motion: reduce) { .wk-pic img, .wk-desk, .wk-phone { transition: none; } }

/* ---------- the index (after big.dk's old project list): a column per group, a pictogram per project ---------- */
.px { padding: clamp(2.5rem, 5vw, 4.5rem) var(--margin) 0; }
.px-sort { align-items: center; }
.px-sort-label { margin-right: 0.35rem; font-size: var(--step-small); color: var(--muted); }
.px-cols { --cols: 7; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: clamp(0.9rem, 1.8vw, 2rem); row-gap: 2.5rem; align-items: start; }
.px-h { min-height: 2.6em; font-size: var(--step-small); font-weight: 500; line-height: 1.25; }
.px-n { margin-left: 0.25em; color: var(--muted); font-variant-numeric: tabular-nums; }
.px-list { display: grid; gap: clamp(0.9rem, 1.4vw, 1.25rem); margin: 0.75rem 0 0; padding: 0; list-style: none; }
.px-item { display: grid; gap: 0.5rem; justify-items: start; color: inherit; text-decoration: none; border-radius: 0.4rem; }
.px-item .px-sq { width: min(100%, 6.75rem); transition: background-color var(--t-hover) var(--ease-out), transform var(--t-release) var(--ease-out); }
.px-name { max-width: 14ch; font-size: var(--step-small); line-height: 1.25; overflow-wrap: anywhere; }
.px-item.is-open .px-sq { background: var(--accent); }
.px-item.is-open .px-name { font-weight: 500; }
.px-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.px-item:active .px-sq { transform: scale(0.96); transition-duration: var(--t-press); }
@media (hover: hover) and (pointer: fine) {
  .px-item:hover .px-sq { background: var(--accent); transform: translate3d(0, -3px, 0); }
  .px-item:hover .px-name { text-decoration: underline; text-underline-offset: 0.18em; }
}
/* A–Z: one run of squares */
.px-cols.is-flat { grid-template-columns: minmax(0, 1fr); }
.px-cols.is-flat .px-list { grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); margin-top: 0; row-gap: 1.75rem; }

/* the open project, slid in sideways under the index */
.px-open { margin-top: clamp(2rem, 4vw, 3.5rem); padding: clamp(1.25rem, 2.5vw, 2.25rem); border-radius: calc(var(--radius) + 0.75rem); background: var(--surface); overflow: hidden; outline: none; }
.px-open[hidden] { display: none; }
.px-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1rem, 2vw, 1.75rem); }
.px-where { display: flex; align-items: center; gap: 0.75rem; font-size: var(--step-small); color: var(--muted); }
.px-where .px-sq { width: 2.5rem; background: var(--accent); }
.px-where b { font-weight: 500; color: var(--ink); }
.px-btns { display: flex; gap: 0.5rem; }
.px-btn { min-width: 3rem; min-height: 3rem; padding: 0 1.1rem; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; transition: background-color var(--t-hover) var(--ease-out), transform var(--t-release) var(--ease-out); }
.px-btn:active { transform: scale(0.96); transition-duration: var(--t-press); }
.px-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.px-close { background: var(--ink); color: #fff; }
@media (hover: hover) and (pointer: fine) { .px-btn:hover { background: #e4e4e0; } .px-close:hover { background: #000; } }
.px-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
.px-body .wk-text { margin-top: 0; }
.px-body .wk-text h3 { font-size: clamp(2.2rem, 1.2rem + 3vw, 4.25rem); }
.px-body .wk-line { font-size: var(--step-lead); line-height: 1.3; }

/* the pictures, in the order of the index; a tile reached from a pictogram without script is marked */
.wk-all { padding-top: clamp(4rem, 8vw, 7rem); }
.wk:target .wk-pic { outline: 3px solid var(--accent); outline-offset: 4px; }

@media (max-width: 1099px) {
  .px-cols { grid-template-columns: repeat(min(var(--cols), 4), minmax(0, 1fr)); }
  .px-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639px) {
  /* each group becomes a row of squares */
  .px-cols { grid-template-columns: minmax(0, 1fr); row-gap: 1.75rem; }
  .px-h { min-height: 0; }
  .px-list { grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr)); }
  .px-cols.is-flat .px-list { grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr)); }
  .px-btn { padding: 0 0.9rem; }
}

/* Inkfront in four levels: the series spans the row, its four versions side by side */
.wk-series { grid-column: 1 / -1; }
.wk-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.6rem, 1.2vw, 1.25rem); padding: clamp(0.75rem, 1.6vw, 1.5rem); border-radius: calc(var(--radius) + 0.5rem); background: var(--field); color: #fff; text-decoration: none; }
.wk-levels .lv { display: grid; gap: 0.65rem; }
.wk-levels picture, .wk-levels img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: calc(var(--radius) * 0.6); transition: transform 900ms var(--ease-expo); }
.wk-levels .lv-tag { display: flex; align-items: baseline; gap: 0.55rem; font-size: var(--step-body); font-weight: 600; line-height: 1; padding: 0 0.15rem 0.1rem; }
.wk-levels .lv-tag b { font-size: 1.7em; font-weight: 600; letter-spacing: -0.04em; }
.wk-series .wk-line { max-width: 60ch; }
@media (hover: hover) { .wk-levels:hover img { transform: translate3d(0, -0.35rem, 0); } }
@media (max-width: 767px) { .wk-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .wk-levels img { transition: none; } }
