/* Work portfolio: shared styles (modeled on the Readymag version) */
:root {
  --ink: #171c3d;
  --text: #22264a;
  --muted: #6b6f8a;
  --line: #14192b;
  --bg: #ffffff;
  --tint: #f4f2f8;
  --purple: #b7a4e6;
  --blue: #2f5bd6;
  --max: 1040px;
  --read: 640px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh; display: flex; flex-direction: column;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Navigation: floating rounded bar, matches the main site ---------- */
.nav {
  position: sticky; top: 14px; z-index: 20;
  display: flex; align-items: center; gap: 4px;
  margin: 14px 4vw 0; padding: 6px;
  background: rgba(250, 250, 248, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid #e4e4de; border-radius: 999px;
  box-shadow: 0 4px 20px rgba(28, 28, 26, .06);
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
}
.nav a {
  padding: 10px 20px; border-radius: 999px;
  font-size: .78rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  color: #6b6b66; text-decoration: none; white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav a.brand {
  background: #1c1c1a; color: #fafaf8; padding: 10px 26px; margin-right: 10px;
  font-size: .9rem; letter-spacing: -.01em; text-transform: none;
}
.nav a.brand:hover { background: #000; }
.nav a.contact { margin-left: auto; border: 1px solid #1c1c1a; color: #1c1c1a; }
.nav a.contact:hover { background: #1c1c1a; color: #fafaf8; }
.nav a:not(.brand):not(.contact):hover { background: #eeeee8; color: #1c1c1a; }
.nav a[aria-current="page"]:not(.brand) { background: #eeeee8; color: #1c1c1a; }

main { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 5vw 56px; }

/* ---------- Home ---------- */
.hero {
  position: relative; min-height: 62vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.hero small { font-size: 1rem; color: var(--ink); }
.hero h1 {
  margin: 10px 0 0; font-weight: 400; letter-spacing: .03em;
  font-size: clamp(3rem, 11vw, 6.5rem); line-height: 1.05; color: #000;
}
.sp { position: absolute; width: 28px; height: 28px; color: var(--ink); animation: twinkle 5s ease-in-out infinite; }
.sp.s2 { animation-delay: -1.2s; } .sp.s3 { animation-delay: -2.4s; } .sp.s4 { animation-delay: -3.6s; }
@keyframes twinkle { 0%,100% { opacity: 1; transform: scale(1) rotate(0); } 50% { opacity: .3; transform: scale(.8) rotate(12deg); } }

.intro-wrap { position: relative; display: flex; gap: 40px; align-items: flex-start; margin: 24px 0 40px; }
.intro { flex: 1 1 340px; margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.35; max-width: 24ch; color: #000; }
.doodle { flex: 1 1 300px; color: #d9d9dd; max-width: 320px; }
.doodle svg { width: 100%; height: auto; }
.doodle.dark { color: #000; }

.section-title { margin: 96px 0 40px; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; color: var(--ink); }
.section-sub { margin: -32px 0 48px; color: var(--text); }

/* project rows: image with softly faded edge, text on the right */
.row {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px; align-items: center; margin: 0 0 44px; padding-bottom: 44px;
  border-bottom: 1px solid #dcdce6;
}
.row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.fade {
  border-radius: 24px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%);
          mask-image: linear-gradient(to right, transparent 0, #000 22%);
}
.fade img { width: 100%; height: auto; }
.fade.ph { background: var(--tint); aspect-ratio: 4 / 3; }
.row h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; color: var(--ink); }
.row p { margin: 0 0 22px; font-size: 1.05rem; line-height: 1.5; max-width: 30ch; }

/* ---------- Buttons and tags ---------- */
.pill {
  display: inline-block; padding: 7px 22px; border: 1px solid var(--line);
  border-radius: 999px; text-decoration: none; font-size: .85rem; color: #000;
  background: transparent; transition: background .15s, color .15s;
}
a.pill:hover { background: #000; color: #fff; }
.pill.off { color: var(--muted); border-color: #b9bbc9; pointer-events: none; }
.tags { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0 0; padding: 0; list-style: none; }
.tags .pill { font-size: .78rem; padding: 6px 22px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Page headings ---------- */
.page-head { padding: 72px 0 48px; }
.page-head h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 500; color: var(--ink); }
.page-head p { margin: 6px 0 0; }

/* ---------- Playground ---------- */
.piece { margin: 0 0 104px; }
.piece h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 500; color: var(--ink); }
.piece .sub { margin: 2px 0 28px; font-size: .95rem; }
.media { border-radius: 14px; overflow: hidden; background: #000; }
.media img { width: 100%; height: auto; }
.media.placeholder {
  display: grid; place-items: center; min-height: 240px; background: var(--tint); color: var(--muted);
  border: 1px dashed #c9c6d6; font-size: .9rem; text-align: center; padding: 24px;
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.posters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; align-items: start; }
.posters img { width: 100%; height: auto; box-shadow: 0 6px 24px rgba(20, 25, 43, .12); }
.caption { margin: 28px 0 0; font-size: .85rem; color: var(--text); }

/* ---------- About ---------- */
.about { max-width: var(--read); margin: 0 auto; text-align: left; padding: 56px 0 24px; }
.about .hello { text-align: center; font-size: 1.1rem; margin: 0 0 24px; color: var(--ink); }
.about p { margin: 0 0 1em; }
.approach { max-width: var(--read); margin: 0 auto; padding: 8px 0 24px; }
.approach h2 { margin: 24px 0 6px; font-size: 1.5rem; font-weight: 500; color: var(--ink); }
.approach .doodle { margin: 24px 0; }
.press { max-width: var(--read); margin: 24px auto 0; font-size: .9rem; }
.press h3 { margin: 0; font-size: .95rem; }
.press ul { list-style: none; margin: 4px 0 0; padding: 0; }
.press strong { display: block; margin-top: 8px; }
.closing { text-align: center; font-weight: 600; margin: 72px 0 96px; color: var(--ink); }

/* ---------- Case studies ---------- */
.case { max-width: 940px; }
.cs-head { padding: 64px 0 8px; }
.cs-head h1 { margin: 0 0 22px; font-size: clamp(2rem, 5vw, 3rem); font-weight: 500; line-height: 1.1; color: #000; }
.cs-top { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; }
.lead { margin: 0; font-size: 1rem; color: var(--ink); }
.meta { margin: 0; padding-left: 14px; border-left: 1px solid #000; font-size: .85rem; line-height: 1.5; }
.meta dt { font-weight: 600; }
.meta dd { margin: 0; }
.cs-hero { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 24px 0 8px; }
/* narrow desktop / tablet widths: the two hero images are wider than the screen, so let the second one drop below */
@media (min-width: 801px) and (max-width: 900px) { .cs-hero { flex-wrap: wrap; } }
.cs-hero img { max-height: 380px; width: auto; }
.cs-hero.wide img { max-height: 420px; }

.case section { margin: 88px 0; }
.case h2 { margin: 0 0 14px; font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.case h3 { margin: 28px 0 8px; font-size: 1rem; font-weight: 600; color: var(--ink); }
.case p, .case li { max-width: var(--read); font-size: .95rem; }
.case p { margin: 0 0 1em; }
.case ul { padding-left: 1.2em; margin: 0 0 1em; }
.case li { margin-bottom: .55em; }
.shot { margin: 32px 0 0; }
.shot img { margin: 0 auto; max-height: 460px; width: auto; }
.shot figcaption { margin-top: 10px; text-align: center; font-size: .82rem; color: var(--muted); }
.shot-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin: 32px 0 0; }
.shot-row img { max-height: 420px; width: auto; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }

/* stats (NetBuddy) */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin: 48px 0; }
.stat strong { display: block; font-size: clamp(3rem, 9vw, 4.5rem); font-weight: 500; line-height: 1; color: var(--purple); margin-bottom: 10px; }
.stat p { font-size: .85rem; }
.stat a { color: var(--muted); }

/* rounded outline cards (quotes, requirements) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.card {
  border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; margin: 0;
}
.card blockquote { margin: 0 0 14px; font-size: .9rem; line-height: 1.45; }
.card cite { font-style: normal; font-size: .75rem; color: var(--muted); }
.reqs { display: grid; gap: 14px; margin-top: 24px; }
.reqs .card { display: flex; gap: 18px; align-items: center; border-radius: 16px; padding: 16px 22px; font-size: .9rem; }
.reqs .card::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--purple); }

/* Aha problem statements */
.problems { list-style: none; padding: 0 !important; margin: 24px 0 0; display: grid; gap: 26px; }
.problems li { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr); gap: 18px; max-width: none; align-items: start; }
.problems .n { font-size: 1.5rem; line-height: 1.2; color: #000; }
.problems blockquote { margin: 0; font-size: .92rem; }
.problems .why { margin: 0; font-size: .85rem; }

/* feature list (Aha) */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; margin-top: 32px; }
.features h3 {
  display: inline-block; margin: 0 0 10px; padding: 4px 18px;
  background: #000; color: #fff; border-radius: 999px; font-size: .75rem; font-weight: 500;
}
.features p { font-size: .85rem; margin: 0; }
.gifs { display: flex; gap: 28px; justify-content: center; margin: 40px 0 0; }
.gifs img { height: 360px; width: auto; border-radius: 26px; }

.reflection li strong { color: var(--ink); }

.case-end { text-align: center; margin: 96px 0 120px; }
.case-end h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.case-end p { margin: 4px auto 22px; }
.case-end .pill-row { justify-content: center; }

/* ---------- Footer ---------- */
footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px;
  margin: auto 4vw 16px; padding: 12px 28px;
  background: rgba(250, 250, 248, .88);
  border: 1px solid #e4e4de; border-radius: 999px;
  box-shadow: 0 4px 20px rgba(28, 28, 26, .06);
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-size: .78rem; letter-spacing: .04em; color: #6b6b66;
}
footer a { color: #1c1c1a; text-decoration: none; }
footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .nav { margin: 10px 3vw 0; top: 10px; padding: 4px; gap: 0; }
  footer { margin: auto 3vw 12px; border-radius: 26px; justify-content: center; text-align: center; padding: 14px 18px; }
  .nav a { padding: 8px 8px; font-size: .62rem; letter-spacing: .03em; }
  .nav a.brand { padding: 8px 12px; margin-right: 2px; font-size: .72rem; }
  .row, .two-col, .cs-top, .stats { grid-template-columns: 1fr; gap: 24px; }
  .row { margin-bottom: 32px; padding-bottom: 32px; }
  .fade { -webkit-mask-image: none; mask-image: none; }
  .intro-wrap { flex-direction: column; }
  .pair { grid-template-columns: 1fr; }
  .posters { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .cards, .features { grid-template-columns: 1fr; }
  .problems li { grid-template-columns: 28px 1fr; }
  .problems .why { grid-column: 2; }
  .gifs img { height: 260px; }
  .cs-hero { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .sp { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Extras: hero float, fly-in, chart, scatter, icons ---------- */
.napkin-fix { position: relative; display: block; }
.napkin-fix::after { content: ""; position: absolute; top: 0; right: 3%; width: 17%; height: 4%; background: #fff; }
.fade.pad { padding-top: 7%; }

.hero-img { max-width: 640px; margin: 0 auto; padding-top: 56px; }
.float { animation: bob 8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* two screenshots that fly in from the sides and meet in the middle (driven by script.js) */
.meet-wrap { width: 100vw; margin-left: calc(50% - 50vw); overflow-x: clip; }
.meet { --p: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; width: min(90vw, calc(940px - 10vw)); margin: 48px auto; }
.meet figure { margin: 0; will-change: transform, opacity; opacity: min(1, calc(var(--p) * 2.2)); }
.meet img { width: 100%; height: auto; max-height: none; margin: 0; }
.meet .l { transform: translateX(calc((1 - var(--p)) * -70vw)); }
.meet .r { transform: translateX(calc((1 - var(--p)) * 70vw)); }
.meet.wide { width: min(94vw, 1040px); gap: 14px; }
.meet.fit { display: flex; gap: 14px; align-items: center; }
.meet.fit figure { min-width: 0; }

/* Aha: key features rows */
.kf-row { display: grid; grid-template-columns: 190px repeat(3, minmax(0, 1fr)); gap: 32px; align-items: center; margin-top: 40px; }
.kf-row.rev { grid-template-columns: repeat(3, minmax(0, 1fr)) 190px; }
.kf-row img { width: 190px; height: auto; border-radius: 26px; }
.kf-row h3 {
  display: flex; align-items: center; justify-content: center; margin: 0; box-sizing: border-box;
  min-height: 44px; padding: 9px 20px; text-align: center; line-height: 1.2;
  background: #000; color: #fff; border-radius: 999px; font-size: .78rem; font-weight: 500; letter-spacing: .01em;
}
.kf-row > div { height: 220px; display: grid; grid-template-rows: auto 1fr; row-gap: 14px; align-content: start; }
html[lang="de"] .kf-row > div { height: 262px; }
@media (min-width: 801px) and (max-width: 1000px) {
  .kf-row > div { height: 252px; }
  html[lang="de"] .kf-row > div { height: 300px; }
}
.kf-row p { font-size: .85rem; margin: 0; }

/* Aha: objective with icons */
.obj { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.icon-list { list-style: none; padding: 0 !important; margin: 18px 0 0; display: grid; gap: 24px; }
.icon-list li { display: flex; gap: 16px; align-items: flex-start; max-width: none; margin: 0; }
.ico { flex: none; width: 54px; height: 54px; border-radius: 50%; background: #eaeefc; color: #2246c9; display: grid; place-items: center; }
.ico svg { width: 27px; height: 27px; }
.icon-list p { margin: 0; }
.icon-list strong { display: block; color: var(--ink); margin-bottom: 2px; }

/* Aha: security and eye-tracking side by side */
.info-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.info-icon { height: 132px; display: flex; align-items: center; margin-bottom: 20px; }
.info-icon img { height: 120px; width: auto; }
.info-icon svg { height: 128px; width: 128px; color: #1f3fbf; }

/* Aha: reflection */
.reflect-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
.reflect-img { width: 100%; height: auto; margin: 0; }
.takeaways { list-style: none; padding: 0 !important; margin: 0 0 1em; }
.takeaways li { max-width: none; }
.shot.full img { width: 100%; max-height: none; }
.shot-pair { display: flex; gap: 24px; align-items: flex-start; margin-top: 24px; }
.shot-pair .shot img { border-radius: 0; }
.shot-pair .shot { margin: 0; min-width: 0; }
.shot-pair img { width: 100%; max-height: none; border-radius: 6px; }

/* NetBuddy: statement */
.case .statement p { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 500; line-height: 1.4; color: var(--ink); max-width: 36ch; }

/* NetBuddy: research age chart */
.ac { margin-top: 24px; }
.ac-title { font-size: .8rem; color: var(--muted); margin: 0 0 12px; }
.ac-scale, .ac-row { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); }
.ac-scale span { font-size: .72rem; color: var(--muted); border-left: 1px solid #e5e2ee; padding: 0 0 6px 6px; }
.ac-row { margin-top: 18px; row-gap: 8px; }
.ac-bar {
  grid-row: 1; height: 38px; border-radius: 999px; display: flex; align-items: center; padding: 0 18px;
  font-size: .85rem; font-weight: 600; color: var(--ink); margin-right: 4px;
}
.ac-note { grid-row: 2; margin: 0; font-size: .82rem; line-height: 1.45; padding-right: 12px; max-width: none !important; }
.c-green { background: #86e6b0; } .c-orange { background: #f7c99b; } .c-pink { background: #f4b0e4; } .c-purple { background: #cbb9f5; }
.res-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; margin-top: 64px; align-items: start; }
.insp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.insp div { border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; font-size: .82rem; line-height: 1.4; }
.insp strong { display: block; color: var(--ink); font-size: .85rem; margin-bottom: 2px; }
.dots { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.dots i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* NetBuddy: quotes in one row */
.cards.row4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cards.row4 .card { padding: 18px 18px; border-radius: 20px; }
.cards.row4 blockquote { font-size: .8rem; }

/* NetBuddy: design requirements with gif */
.req-split { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; align-items: center; }
.req-split .reqs { margin-top: 0; }
.req-split img { width: 240px; height: auto; border-radius: 28px; }

/* NetBuddy: scattered coins and avatars around the outcome text */
.scatter { position: relative; padding: 110px 0; }
.scatter::before {
  content: ""; position: absolute; inset: 6% 6%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(183, 164, 230, .30), rgba(183, 164, 230, 0));
}
.scatter-text { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; }
.scatter-text h2 { text-align: left; }
.sc { position: absolute; z-index: 0; pointer-events: none; height: auto; }
.sc.m { display: none; }

@media (max-width: 800px) {
  .kf-row, .kf-row.rev { grid-template-columns: 1fr; gap: 20px; }
  .kf-row img { order: -1; margin: 0 auto; }
  .kf-row > div, html[lang="de"] .kf-row > div { height: auto; }
  .kf-row h3 { width: 190px; }
  .obj, .info-pair, .reflect-grid, .res-grid, .req-split { grid-template-columns: 1fr; gap: 28px; }
  .shot-pair { flex-direction: column; }
  .shot-pair .shot { flex: none !important; width: 100%; }
  .reflect-img { max-width: 340px; margin: 0 auto; }
  .cards.row4 { grid-template-columns: 1fr 1fr; }
  .insp { grid-template-columns: 1fr; }
  .req-split img { margin: 0 auto; }
  .ac-scale span:nth-child(even) { visibility: hidden; }
  .ac-bar { font-size: .72rem; padding: 0 10px; }
  .ac-note { font-size: .72rem; padding-right: 4px; }
  .sc:not(.m) { display: none; }
  .sc.m { display: block; }
  .arrow { width: 64px; margin: 0 auto; }
  .collage { grid-template-columns: 1fr; }
  .deco { opacity: .8; }
  .scatter { padding: 118px 0 124px; }
  .meet.wide { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .float, .deco { animation: none; }
}

/* ---------- Hand-drawn doodles ---------- */
.hero { padding-bottom: 56px; }
.hero small, .hero h1 { position: relative; z-index: 1; }
.arrow { width: 84px; height: auto; flex: none; margin: 0 auto 0 6%; }
.portrait { width: 64px; height: auto; margin: 0 auto 26px; }
.deco { position: absolute; z-index: 2; height: auto; pointer-events: none; animation: sparkle 7s ease-in-out infinite; }
@keyframes sparkle { 0%, 100% { opacity: 1; transform: scale(1) rotate(0); } 50% { opacity: .7; transform: scale(.93) rotate(4deg); } }
.deco.d2 { animation-delay: -2s; } .deco.d3 { animation-delay: -4s; }
.rel { position: relative; }

/* playground gif collage */
.collage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: end; }
.collage .media { background: #000; }
.collage img { width: 100%; height: auto; }
.collage.small .media { height: 100%; }
.collage.small img { height: 100%; object-fit: cover; }
.pair .media { background: transparent; border-radius: 0; }

/* ---------- About: "show, don't tell" scroll story ---------- */
/* plain version (no JavaScript, or reduced motion): just the four lines */
.approach .ap-intro, .approach .reveal { margin: 0 auto; text-align: center; font-size: 1.1rem; line-height: 1.5; color: var(--text); max-width: 34ch; }
.approach h2.reveal { font-weight: 700; color: var(--ink); }
.approach .ap-pin > * + * { margin-top: 14px; }
.approach .cue { display: none; }

/* enhanced version, switched on by script.js: arrows and lines appear one by one and stay */
.approach.ap-anim { padding: 0; max-width: var(--read); }
.ap-anim .ap-stage { height: 320vh; }
.ap-anim .ap-pin { position: sticky; top: 100px; }
.ap-anim .ap-pin > * + * { margin-top: 6px; }
.ap-anim .reveal, .ap-anim .cue {
  opacity: var(--v, 0);
  transform: translateY(calc((1 - var(--v, 0)) * 22px));
  will-change: opacity, transform;
}
.ap-anim .cue { display: flex; justify-content: center; width: 100%; padding: 6px 0 20px; pointer-events: none; }
.ap-anim .cue img { height: 72px; width: auto; }
.ap-anim .cue img.tall { height: 96px; }
.ap-anim .cue img.nudge { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 10px; } }

@media (max-width: 800px) {
  .ap-anim .ap-pin { top: 80px; }
  .ap-anim .cue img { height: 60px; }
  .ap-anim .cue img.tall { height: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-anim .cue img { animation: none; }
}

/* videos that replaced the gifs */
video { max-width: 100%; display: block; }
.media video { width: 100%; height: auto; }
.collage.small video { width: 100%; height: 100%; object-fit: cover; }
.kf-row video { width: 190px; height: auto; border-radius: 26px; }
.req-split video { width: 240px; height: auto; border-radius: 28px; }
@media (max-width: 800px) {
  .kf-row video { order: -1; margin: 0 auto; }
  .req-split video { margin: 0 auto; }
}

/* playground gifs: inserted raw, no frame */
img.raw { width: 100%; height: auto; border-radius: 0; background: none; }

/* landing page: doodles burst out from behind PORTFOLIO, then float around it */
.fl { position: absolute; z-index: 0; pointer-events: none; }
.fl img { display: block; width: 100%; height: auto; transform: rotate(var(--r, 0deg)); animation: floaty var(--d, 7s) ease-in-out infinite; animation-delay: var(--l, 0s); }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); opacity: .95; }
  50%      { transform: translateY(-11px) rotate(calc(var(--r, 0deg) + 6deg)); opacity: .3; }
}
.burst .fl { animation: burst 1.7s cubic-bezier(.25, .8, .3, 1.06) both; animation-delay: var(--bd, 0s); }
@keyframes burst {
  from { translate: var(--dx, 0) var(--dy, 0); scale: .12; rotate: var(--spin, -100deg); opacity: 0; }
  25%  { opacity: 1; }
  to   { translate: 0 0; scale: 1; rotate: 0deg; opacity: 1; }
}
@media (max-width: 800px) {
  .fl img { scale: .85; }
  .fl.side { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fl img { animation: none; }
}

/* Aha research: text left, demographic table right, prototype images below (a bit smaller) */
.res-top { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: 40px; align-items: start; }
.res-top h3 { margin-top: 0; }
.res-top ul { margin-bottom: 0; }
.res-top .shot { margin: 0; }
.res-top .shot img { width: 100%; max-height: none; margin: 0; }
.shot-pair.small { max-width: 700px; margin: 44px auto 0; }
@media (max-width: 800px) {
  .res-top { grid-template-columns: 1fr; gap: 28px; }
  .shot-pair.small { max-width: none; }
}

/* participant age dot plot (under the demographic table) */
.res-side { display: grid; gap: 30px; }
.res-side .shot { margin: 0; }
.chart { margin: 0; }
.chart figcaption { margin: 0 0 6px; font-size: .8rem; font-weight: 600; color: var(--ink); }
.chart figcaption span { font-weight: 400; color: var(--muted); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; font-size: 11px; }
.chart svg text { fill: var(--text); font-family: inherit; }
.chart .ax { stroke: #14192b; stroke-width: 1; }
.chart .tk { stroke: #14192b; stroke-width: 1; }
.chart .cap { fill: var(--muted); font-size: 10.5px; }
.chart .dot { stroke: #fff; stroke-width: 1.5; }
.chart .dot.adv { fill: #e2483d; }
.chart .dot.sen { fill: #1f3fbf; }
.chart .br { fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.chart .br.adv { stroke: #e2483d; }
.chart .br.sen { stroke: #1f3fbf; }
.chart .lbl { font-weight: 600; font-size: 11px; }
.chart .lbl.adv { fill: #c23a2f; }
.chart .lbl.sen { fill: #1f3fbf; }
@media (max-width: 800px) {
  .chart svg { font-size: 13.5px; }
  .chart .lbl { font-size: 13.5px; }
  .chart .cap { font-size: 13px; }
}

/* Aha reflection: five blue learning tiles that unfold a black card */
.learn { margin: 32px 0; max-width: none; }
.learn-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.lc {
  appearance: none; -webkit-appearance: none; border: 0; margin: 0; font: inherit; text-align: left;
  background: var(--c); color: var(--t); border-radius: 22px; aspect-ratio: 1 / 1; padding: 16px 14px 14px;
  display: flex; flex-direction: column; justify-content: space-between; cursor: default;
  transition: transform .25s ease, box-shadow .25s ease, outline-color .2s;
  outline: 2px solid transparent; outline-offset: 3px;
}
.lc svg { width: 46px; height: 46px; flex: none; }
.lc span { font-size: .86rem; font-weight: 600; line-height: 1.25; }

/* the learning cards: plain stacked cards by default (no JavaScript) */
.learn-panels { margin-top: 16px; }
.lp-stack { display: grid; gap: 12px; }
.lp { background: #fff; color: #0b0b0d; border: 1.5px solid #0b0b0d; border-radius: 22px; padding: 21px 25px; }
.lp strong { display: block; margin-bottom: 6px; font-size: 1rem; }
.lp p { margin: 0; color: #0b0b0d; max-width: 62ch; }

/* interactive mode (switched on by script.js) */
.learn.on .lc { cursor: pointer; }
.learn.on .lc:hover, .learn.on .lc.is-open { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(23, 28, 61, .2); }
.learn.on .lc.is-open { outline-color: #0b0b0d; }
.learn.on .lc:focus-visible { outline-color: #0b0b0d; }
.learn.on .learn-panels { display: grid; grid-template-rows: 0fr; margin-top: 0; transition: grid-template-rows .45s cubic-bezier(.2, .8, .2, 1), margin-top .45s cubic-bezier(.2, .8, .2, 1); }
.learn.on.open .learn-panels { grid-template-rows: 1fr; margin-top: 4px; }
.learn.on .lp-clip { min-height: 0; overflow: hidden; }
.learn.on .lp-stack { position: relative; padding-top: 22px; display: grid; gap: 0; }
.learn.on .lp-stack::before {
  content: ""; position: absolute; top: 0; left: var(--x, 10%); transform: translateX(-50%); z-index: 1;
  width: 2px; height: 22px; border-radius: 2px; background: #0b0b0d;
  transition: left .35s cubic-bezier(.2, .8, .2, 1);
}
.learn.on .lp { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .3s ease, transform .35s ease, visibility 0s linear .3s; }
.learn.on .lp.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease .08s, transform .4s ease .08s, visibility 0s; }

@media (max-width: 800px) {
  .learn-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .lc { padding: 12px 11px 11px; border-radius: 18px; }
  .lc svg { width: 38px; height: 38px; }
  .lc span { font-size: .78rem; }
  .learn.on .lp-stack::before { display: none; }
  .learn.on .lp-stack { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lc, .learn.on .learn-panels, .learn.on .lp, .learn.on .lp.is-open, .learn.on .lp-stack::before { transition: none; }
  .learn.on .lc:hover, .learn.on .lc.is-open { transform: none; }
}

/* ---------- Aha, phones only ---------- */
@media (max-width: 800px) {
  /* user-testing photo: much smaller, centred (it was full width and very tall) */
  .shot-pair .shot:last-child { width: 58%; margin: 0 auto; }
  .shot-pair .shot:last-child figcaption { text-align: center; }
}

/* ---------- Aha reflection on phones: alternating blue bars that shrink and unfold a card ---------- */
.learn-m { display: none; }
@media (max-width: 800px) {
  .learn { display: none; }
  .learn-m { display: block; margin: 28px 0; }
  .learn-m .li { display: flex; align-items: flex-start; margin-bottom: 10px; }
  .learn-m .li.r { flex-direction: row-reverse; }

  .lcm {
    appearance: none; -webkit-appearance: none; border: 0; margin: 0; font: inherit; text-align: left; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background: var(--c); color: var(--t); border-radius: 20px; height: 98px; padding: 11px 12px 10px;
    display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
    flex: 1 0 0; min-width: 0; overflow: hidden;
    transition: flex-grow .45s cubic-bezier(.2, .8, .2, 1), flex-basis .45s cubic-bezier(.2, .8, .2, 1);
  }
  .lcm svg { width: 32px; height: 32px; flex: none; }
  .lcm span { font-size: .8rem; font-weight: 600; line-height: 1.2; }
  .lcm:focus-visible { outline: 2px solid #0b0b0d; outline-offset: 3px; }

  .lpm {
    flex: 0 1 0; min-width: 0; overflow: hidden; box-sizing: border-box;
    background: #fff; color: #0b0b0d; border: 0 solid #0b0b0d; border-radius: 18px;
    padding: 0; margin: 0; opacity: 0; visibility: hidden; max-height: 98px;
    transition: flex-grow .45s cubic-bezier(.2, .8, .2, 1), padding .45s cubic-bezier(.2, .8, .2, 1),
                border-width .45s cubic-bezier(.2, .8, .2, 1), margin .45s cubic-bezier(.2, .8, .2, 1),
                opacity .3s ease, visibility 0s linear .45s;
  }
  /* text keeps the card's final width, so it never reflows while the card grows */
  .lpm strong, .lpm p { width: calc(90vw - 137px); max-width: none; }
  .lpm strong { display: block; margin-bottom: 4px; font-size: .84rem; line-height: 1.3; }
  .lpm p { margin: 0; color: #0b0b0d; font-size: .76rem; line-height: 1.42; }

  /* unfolded: the bar shrinks to a square on its side, the card takes the freed space */
  .learn-m .li.open .lcm, .learn-m:not(.on) .li .lcm { flex: 0 0 98px; }
  .learn-m .li.open .lpm, .learn-m:not(.on) .li .lpm {
    flex: 1 1 0; opacity: 1; visibility: visible; max-height: none; padding: 12px 13px; border-width: 1.5px; margin-left: 10px;
    transition: flex-grow .45s cubic-bezier(.2, .8, .2, 1), padding .45s cubic-bezier(.2, .8, .2, 1),
                border-width .45s cubic-bezier(.2, .8, .2, 1), margin .45s cubic-bezier(.2, .8, .2, 1),
                opacity .35s ease .12s, visibility 0s;
  }
  .learn-m .li.r.open .lpm, .learn-m:not(.on) .li.r .lpm { margin-left: 0; margin-right: 10px; }
}
@media (max-width: 800px) and (prefers-reduced-motion: reduce) {
  .lcm, .lpm, .learn-m .li.open .lpm { transition: none; }
}

/* ---------- NetBuddy design requirements: expandable cards ---------- */
.rq-list { display: grid; gap: 10px; }
.rq { --h: 96px; --pad: 16px; display: flex; align-items: flex-start; container-type: inline-size; }
.rqb {
  appearance: none; -webkit-appearance: none; border: 0; margin: 0; font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative; display: block; box-sizing: border-box;
  background: var(--c); color: var(--t); border-radius: 22px; height: var(--h); padding: 0;
  flex: 1 0 0px; min-width: 0; overflow: hidden;
  transition: flex-grow .45s cubic-bezier(.2, .8, .2, 1), flex-basis .45s cubic-bezier(.2, .8, .2, 1);
}
/* icon pinned top-left, label pinned bottom-left: independent of how a browser lays out button contents,
   so the label always stays visible (if it is ever long it grows upward instead of being clipped) */
.rqb svg { position: absolute; left: 14px; top: 12px; width: 34px; height: 34px; }
.rqb span { position: absolute; left: 14px; right: 10px; bottom: 11px; display: block; color: var(--t); font-size: .9rem; font-weight: 600; line-height: 1.2; overflow-wrap: break-word; }
.rqb:focus-visible { outline: 2px solid #0b0b0d; outline-offset: 3px; }

.rqp {
  flex: 0 1 0; min-width: 0; overflow: hidden; box-sizing: border-box;
  background: #fff; color: #0b0b0d; border: 0 solid #0b0b0d; border-radius: 20px;
  padding: 0; margin: 0; opacity: 0; visibility: hidden; max-height: var(--h);
  transition: flex-grow .45s cubic-bezier(.2, .8, .2, 1), padding .45s cubic-bezier(.2, .8, .2, 1),
              border-width .45s cubic-bezier(.2, .8, .2, 1), margin .45s cubic-bezier(.2, .8, .2, 1),
              opacity .3s ease, visibility 0s linear .45s;
}
/* text keeps the card's final width, so it never reflows while the card grows */
.rqp p { margin: 0; width: calc(100cqw - var(--h) - 10px - 2 * var(--pad) - 3px); max-width: none; color: #0b0b0d; font-size: .92rem; line-height: 1.45; }

/* unfolded: the bar shrinks to a square on the left, the card takes the freed space */
.rq.open .rqb, .rq-list:not(.on) .rq .rqb { flex: 0 0 var(--h); width: var(--h); }
.rq.open .rqp, .rq-list:not(.on) .rq .rqp {
  flex: 1 1 0; opacity: 1; visibility: visible; max-height: none; min-height: var(--h);
  display: flex; align-items: center; padding: 12px var(--pad); border-width: 1.5px; margin-left: 10px;
  transition: flex-grow .45s cubic-bezier(.2, .8, .2, 1), padding .45s cubic-bezier(.2, .8, .2, 1),
              border-width .45s cubic-bezier(.2, .8, .2, 1), margin .45s cubic-bezier(.2, .8, .2, 1),
              opacity .35s ease .12s, visibility 0s;
}

/* phones: same idea, but the cards alternate left and right */
@media (max-width: 800px) {
  .rq { --h: 98px; --pad: 13px; }
  .rq:nth-child(even) { flex-direction: row-reverse; }
  .rq:nth-child(even).open .rqp, .rq-list:not(.on) .rq:nth-child(even) .rqp { margin-left: 0; margin-right: 10px; }
  .rqb { border-radius: 20px; }
  .rqb svg { left: 12px; top: 11px; width: 32px; height: 32px; }
  .rqb span { left: 12px; right: 8px; bottom: 10px; font-size: .8rem; }
  .rqp { border-radius: 18px; }
  .rqp p { font-size: .78rem; line-height: 1.42; }
}
@media (prefers-reduced-motion: reduce) {
  .rqb, .rqp, .rq.open .rqp { transition: none; }
}

/* NetBuddy requirement tiles: icon + label while closed, only the icon (centred) once the card is unfolded */
.rqb svg { transition: left .45s cubic-bezier(.2, .8, .2, 1), top .45s cubic-bezier(.2, .8, .2, 1), transform .45s cubic-bezier(.2, .8, .2, 1); }
.rqb span { transition: opacity .3s ease .15s; }
.rq.open .rqb svg, .rq-list:not(.on) .rq .rqb svg { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.rq.open .rqb span, .rq-list:not(.on) .rq .rqb span { opacity: 0; transition: opacity .15s ease; }
@media (prefers-reduced-motion: reduce) {
  .rqb svg, .rqb span, .rq.open .rqb span { transition: none; }
}

/* Playground poster wall: posters grow a little on hover so they are easier to see */
.posters img {
  position: relative; z-index: 0; transform-origin: center;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .posters img:hover {
    z-index: 2; transform: scale(1.1);
    box-shadow: 0 16px 38px rgba(20, 25, 43, .24);
  }
}
@media (prefers-reduced-motion: reduce) {
  .posters img { transition: none; }
  .posters img:hover { transform: none; }
}

/* footer: legal links sit next to the year */
.legal-links { display: inline-flex; align-items: center; gap: 22px; }
@media (max-width: 800px) { .legal-links { gap: 16px; } }

/* Impressum / Datenschutz pages */
.legal { max-width: 640px; margin: 0 auto; padding: 64px 0 24px; }
.legal h1 { margin: 0 0 28px; font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 500; color: var(--ink); }
.legal h2 { margin: 28px 0 8px; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.legal p, .legal address { margin: 0 0 1em; font-style: normal; font-size: .95rem; line-height: 1.6; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }


.legal h1 { margin-top: 0; }
.legal { padding-top: 44px; }
.legal .note { margin-top: 28px; font-size: .8rem; color: var(--muted); }

/* ---------- DE | EN button (top right of the nav) ---------- */
.lang-btn { display: none; }
.i18n .lang-btn {
  display: inline-flex; align-items: center; gap: 2px; margin: 0 2px 0 8px; padding: 3px;
  border: 1px solid #e4e4de; border-radius: 999px; background: transparent;
}
.lang-btn button {
  appearance: none; -webkit-appearance: none; border: 0; margin: 0; cursor: pointer; background: transparent;
  font: inherit; font-size: .68rem; font-weight: 500; letter-spacing: .08em; line-height: 1;
  padding: 7px 10px; border-radius: 999px; color: #6b6b66; transition: background .2s, color .2s;
}
.lang-btn button:hover { color: #1c1c1a; }
.lang-btn button[aria-pressed="true"] { background: #1c1c1a; color: #fafaf8; }
.lang-btn button:focus-visible { outline: 2px solid #1c1c1a; outline-offset: 2px; }

/* legal pages: English is the default, German shows when the switch says so (or #de without JavaScript) */
.legal section[lang="de"] { display: none; }
.legal:not(.js) #de:target { display: block; }
.legal:not(.js) #de:target ~ #en { display: none; }
.legal.js.show-de section[lang="en"] { display: none; }
.legal.js.show-de section[lang="de"] { display: block; }
.legal.js.show-en section[lang="de"] { display: none; }
.legal.js.show-en section[lang="en"] { display: block; }

/* German words are longer: let long words in the small tiles break politely */
html[lang="de"] .lc span, html[lang="de"] .lcm span, html[lang="de"] .rqb span { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
html[lang="de"] .rqb span { font-size: .8rem; }
@media (max-width: 800px) {
  .i18n .lang-btn { margin-left: 4px; padding: 2px; }
  .lang-btn button { font-size: .58rem; padding: 6px 6px; letter-spacing: .04em; }
}
/* phones: a single small button that offers the other language (shows DE while in English, EN while in German) */
@media (max-width: 560px) {
  .nav { margin: 10px 2.4vw 0; padding: 3px; }
  .nav a { padding: 8px 5px; letter-spacing: .02em; font-size: .6rem; }
  .nav a.brand { padding: 8px 9px; margin-right: 0; font-size: .66rem; }
  .i18n .lang-btn { margin: 0 0 0 2px; padding: 0; border: 0; }
  .lang-btn button[aria-pressed="true"] { display: none; }
  .lang-btn button { font-size: .58rem; padding: 8px 8px; background: #1c1c1a; color: #fafaf8; border-radius: 999px; }
  .lang-btn button:hover { color: #fafaf8; }
}
/* very narrow screens: let the bar scroll rather than break the page */
@media (max-width: 355px) {
  .nav { overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
}
