/* Werkbank – neo-brutalism. Bricolage Grotesque, 3px outlines, hard offset shadows. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@keyframes wb-marquee {
  to {
    transform: translateX(-50%);
  }
}

:root[data-design='werkbank'] {
  --ink: #000;
  --yellow: #ffd60a;
  --blue: #2f5bff;
  --pink: #ff5fa2;
  --green: #22d68a;
  --white: #fff;
  --paper: #fbfaf4;
  --line: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);

  & body {
    background: var(--paper);
    color: var(--ink);
    font: 500 17px/1.5 'Bricolage Grotesque', system-ui, sans-serif;
    font-variation-settings: 'opsz' 16;
  }
  & a {
    color: inherit;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
  }
  & :focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
  }
  & h1,
  & h2,
  & h3 {
    font-variation-settings: 'opsz' 96;
    letter-spacing: -0.02em;
  }

  & .wb-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px clamp(16px, 4vw, 48px);
    background: var(--yellow);
    border-bottom: var(--line);
  }
  & .wb-logo {
    font-weight: 800;
    font-size: 20px;
    text-decoration: none;
  }
  & .wb-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-weight: 700;
  }
  & .wb-nav a {
    text-decoration: none;
  }
  & .wb-nav a:hover {
    text-decoration: underline;
  }
  & .wb-nav-cta {
    padding: 2px 10px;
    background: var(--ink);
    color: var(--yellow);
    border-radius: 999px;
  }

  & .wb-btn {
    display: inline-block;
    padding: 12px 22px;
    border: var(--line);
    border-radius: 14px;
    box-shadow: 4px 4px 0 var(--ink);
    font-weight: 800;
    text-decoration: none;
    color: var(--ink);
    background: var(--white);
    transition: transform 0.08s, box-shadow 0.08s;
  }
  & .wb-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
  }
  & .wb-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 var(--ink);
  }
  & .wb-btn-blue {
    background: var(--blue);
    color: var(--white);
  }
  & .wb-btn-pink {
    background: var(--pink);
  }
  & .wb-btn-black {
    background: var(--ink);
    color: var(--white);
    box-shadow: 4px 4px 0 var(--yellow);
    border-color: var(--ink);
  }
  & .wb-btn-black:hover {
    box-shadow: 6px 6px 0 var(--yellow);
  }

  /* Hero */
  & .wb-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
    padding: clamp(32px, 5vw, 72px) clamp(16px, 4vw, 48px) 0;
    background: var(--yellow);
    border-bottom: var(--line);
    overflow: hidden;
  }
  & .wb-hero-text {
    padding-bottom: clamp(32px, 5vw, 72px);
  }
  & .wb-tag {
    display: inline-block;
    margin: 0 0 18px;
    padding: 4px 12px;
    font-weight: 700;
    background: var(--white);
    border: var(--line);
    border-radius: 999px;
    transform: rotate(-2deg);
  }
  & .wb-hero h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 6.4vw, 104px);
    line-height: 0.95;
    font-weight: 800;
  }
  & .wb-intro {
    max-width: 52ch;
    font-size: 19px;
    margin: 0 0 28px;
  }
  & .wb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0;
  }

  & .wb-hero-art {
    position: relative;
    align-self: end;
    aspect-ratio: 0.82;
    max-height: 78vh;
    width: 100%;
    margin-inline: auto;
    touch-action: pan-y;
  }
  & .wb-disc {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 12%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--pink);
    border: var(--line);
  }
  & .wb-photo {
    position: absolute;
    left: 50%;
    bottom: 0;
    height: 96%;
    width: auto;
    max-width: none;
    transform: translateX(-50%);
    filter: drop-shadow(10px 8px 0 var(--ink));
    pointer-events: none;
  }
  & .wb-sticker {
    position: absolute;
    z-index: 2;
    padding: 8px 16px;
    font-weight: 800;
    font-size: clamp(16px, 1.8vw, 24px);
    border: var(--line);
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--ink);
    transform: rotate(var(--r));
    user-select: none;
    touch-action: none;
    cursor: grab;
    transition: transform 0.12s, box-shadow 0.12s;
  }
  & .wb-sticker.is-dragging {
    cursor: grabbing;
    transform: rotate(0deg) scale(1.08);
    box-shadow: 10px 10px 0 var(--ink);
  }
  & .wb-yellow { background: var(--yellow); }
  & .wb-blue { background: var(--blue); color: var(--white); }
  & .wb-green { background: var(--green); }
  & .wb-white { background: var(--white); }
  & .wb-pink { background: var(--pink); }
  & .wb-hint {
    position: absolute;
    right: 0;
    bottom: 10px;
    z-index: 3;
    margin: 0;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 700;
    background: var(--white);
    border: 2px solid var(--ink);
    display: none;
  }
  & .is-live .wb-hint {
    display: block;
  }

  /* Marquee */
  & .wb-marquee {
    overflow: hidden;
    background: var(--ink);
    color: var(--white);
    border-bottom: var(--line);
  }
  & .wb-track {
    display: flex;
    width: max-content;
    animation: wb-marquee 28s linear infinite;
  }
  & .wb-marquee:hover .wb-track {
    animation-play-state: paused;
  }
  & .wb-track span {
    padding: 14px 0;
    font-size: clamp(22px, 3vw, 40px);
    font-weight: 800;
    white-space: pre;
    font-variation-settings: 'opsz' 96, 'wdth' 75;
  }

  & .wb-section {
    padding: clamp(56px, 8vw, 112px) clamp(16px, 4vw, 48px);
    border-bottom: var(--line);
    scroll-margin-top: var(--ds-h);
  }
  & .wb-h2 {
    margin: 0 0 clamp(28px, 4vw, 48px);
    font-size: clamp(36px, 5vw, 72px);
    line-height: 1;
    font-weight: 800;
  }

  & .wb-card {
    background: var(--white);
    border: var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }
  & .wb-lead {
    font-weight: 800;
    font-size: 19px;
    line-height: 1.3;
  }
  & .wb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
  }
  & .wb-chips li {
    padding: 2px 10px;
    font-size: 14px;
    font-weight: 700;
    background: var(--white);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 999px;
  }

  /* Services: four tiles of different weight, not four identical cards */
  & .wb-services {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 22px;
  }
  & .wb-service {
    padding: 26px;
  }
  & .wb-service h3 {
    margin: 0 0 10px;
    font-size: clamp(36px, 4vw, 60px);
    line-height: 1;
    font-weight: 800;
  }
  & .wb-service p {
    margin: 0 0 10px;
  }
  & .wb-s-software {
    grid-row: span 2;
    background: var(--blue);
    color: var(--white);
  }
  & .wb-s-software h3 {
    font-size: clamp(48px, 6vw, 96px);
  }
  & .wb-s-web {
    grid-column: span 2;
    background: var(--yellow);
  }
  & .wb-s-ki {
    background: var(--green);
    transform: rotate(-1deg);
  }
  & .wb-s-sap {
    background: var(--pink);
    transform: rotate(1deg);
  }

  /* Projects as app windows */
  & .wb-projects-wrap {
    background: var(--blue);
  }
  & .wb-projects-wrap .wb-h2 {
    color: var(--white);
  }
  & .wb-projects {
    display: grid;
    gap: 36px;
  }
  & .wb-project {
    overflow: hidden;
    box-shadow: 10px 10px 0 var(--ink);
  }
  & .wb-project:nth-child(2) {
    margin-left: clamp(0px, 6vw, 96px);
  }
  & .wb-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--ink);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
  }
  & .wb-bar i {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--white);
  }
  & .wb-bar i:nth-child(1) { background: var(--pink); }
  & .wb-bar i:nth-child(2) { background: var(--yellow); }
  & .wb-bar i:nth-child(3) { background: var(--green); }
  & .wb-bar span {
    margin-left: 8px;
  }
  & .wb-pbody {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 36px;
    padding: 28px;
  }
  & .wb-pbody > * {
    grid-column: 1;
  }
  & .wb-pbody .wb-check,
  & .wb-pbody .wb-chips,
  & .wb-pbody .wb-btn {
    grid-column: 2;
  }
  & .wb-pbody .wb-check {
    grid-row: 1 / span 4;
  }
  & .wb-pbody .wb-btn {
    justify-self: start;
    margin-top: 18px;
  }
  & .wb-kind {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
  }
  & .wb-project h3 {
    margin: 4px 0 10px;
    font-size: clamp(44px, 6vw, 96px);
    line-height: 0.92;
    font-weight: 800;
  }
  & .wb-project p {
    margin: 0 0 10px;
  }
  & .wb-p-werkstatt360 { background: var(--white); }
  & .wb-p-frametide { background: var(--pink); }
  & .wb-check {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  & .wb-check li {
    position: relative;
    padding: 9px 0 9px 38px;
    border-bottom: 2px solid var(--ink);
    font-weight: 600;
  }
  & .wb-check li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 8px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: var(--yellow);
    border: 2px solid var(--ink);
    border-radius: 6px;
  }

  /* Story strip */
  & .wb-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 22px;
    margin: 0;
    padding: 6px 12px 22px 6px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  & .wb-panel {
    position: relative;
    padding: 56px 22px 22px;
    scroll-snap-align: start;
  }
  & .wb-panel:nth-child(odd) {
    transform: rotate(-1deg);
  }
  & .wb-panel:nth-child(even) {
    transform: rotate(1deg);
    background: var(--yellow);
  }
  & .wb-step {
    position: absolute;
    top: -3px;
    left: -3px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    font-weight: 800;
    font-size: 24px;
    background: var(--ink);
    color: var(--white);
    border-radius: 16px 0 16px 0;
  }
  & .wb-panel h3 {
    margin: 4px 0 8px;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 800;
  }
  & .wb-panel p {
    margin: 0;
  }

  /* CV as a till receipt */
  & .wb-cv-wrap {
    background: var(--green);
  }
  & .wb-cv {
    display: grid;
    grid-template-columns: minmax(0, 440px) 1fr;
    gap: clamp(28px, 5vw, 72px);
    align-items: start;
  }
  & .wb-receipt {
    position: relative;
    padding: 28px 26px 36px;
    background: var(--white);
    border: var(--line);
    border-bottom: 0;
    transform: rotate(-1.5deg);
    font-size: 15px;
    font-variation-settings: 'wdth' 75;
    filter: drop-shadow(8px 8px 0 var(--ink));
    --zig: 14px;
    mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zig) 100%;
    padding-bottom: calc(36px + var(--zig));
  }
  & .wb-receipt h3 {
    margin: 18px 0 6px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  & .wb-r-head {
    margin: 0;
    text-align: center;
    font-weight: 800;
  }
  & .wb-r-rule {
    margin: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.1em;
  }
  & .wb-r-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    font-weight: 700;
  }
  & .wb-r-row span:last-child {
    text-align: right;
    white-space: nowrap;
  }
  & .wb-r-note {
    margin: 0 0 8px;
    font-size: 13px;
  }
  & .wb-r-total {
    font-size: 19px;
    font-weight: 800;
  }
  & .wb-r-foot {
    text-align: center;
    margin: 14px 0;
  }
  & .wb-barcode {
    height: 46px;
    background: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 4px, #000 4px 7px, transparent 7px 9px, #000 9px 10px, transparent 10px 13px);
  }
  & .wb-skills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  & .wb-skill {
    padding: 22px;
  }
  & .wb-skill h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
  }

  /* Contact */
  & .wb-contact {
    padding: clamp(64px, 10vw, 140px) clamp(16px, 4vw, 48px);
    background: var(--pink);
    text-align: center;
    scroll-margin-top: var(--ds-h);
  }
  & .wb-contact h2 {
    margin: 0 0 12px;
    font-size: clamp(64px, 12vw, 200px);
    line-height: 0.9;
    font-weight: 800;
  }
  & .wb-contact > p {
    max-width: 48ch;
    margin: 0 auto 32px;
    font-size: 19px;
  }
  & .wb-btn-big {
    font-size: clamp(17px, 2.6vw, 34px);
    padding: 16px 28px;
    border-radius: 20px;
    box-shadow: 8px 8px 0 var(--ink);
    overflow-wrap: anywhere;
    max-width: 100%;
  }
  & .wb-contact-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
    font-weight: 700;
  }

  & .wb-foot {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px clamp(16px, 4vw, 48px);
    background: var(--ink);
    color: var(--white);
    font-size: 15px;
  }
  & .wb-foot a {
    margin-left: 18px;
  }

  @media (max-width: 900px) {
    & .wb-hero {
      grid-template-columns: 1fr;
    }
    & .wb-hero-art {
      max-width: 460px;
    }
    & .wb-services {
      grid-template-columns: 1fr 1fr;
    }
    & .wb-s-software {
      grid-row: auto;
      grid-column: span 2;
    }
    & .wb-pbody {
      grid-template-columns: 1fr;
    }
    & .wb-pbody .wb-check,
    & .wb-pbody .wb-chips,
    & .wb-pbody .wb-btn {
      grid-column: 1;
      grid-row: auto;
    }
    & .wb-pbody .wb-check {
      margin-top: 8px;
    }
    & .wb-project:nth-child(2) {
      margin-left: 0;
    }
    & .wb-cv {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 560px) {
    & .wb-services,
    & .wb-skills {
      grid-template-columns: 1fr;
    }
    & .wb-s-software,
    & .wb-s-web {
      grid-column: auto;
    }
    & .wb-foot a {
      margin: 0 18px 0 0;
    }
  }

  &[data-motion='off'] {
    & .wb-track {
      animation: none;
    }
    & .wb-btn,
    & .wb-sticker {
      transition: none;
    }
  }
}
