/* Współpraca / Work with me: an editorial page built on top of main.css */

html:has(body.work-page) {
  scroll-snap-type: none;
}

.w-page {
  --w-gap: clamp(28px, 4vw, 56px);
  --w-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  padding-bottom: clamp(32px, 5vw, 64px);
}

.w-wrap {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

/* Hero */

.w-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: var(--w-gap);
  align-items: center;
  padding: clamp(36px, 6vw, 84px) 0 clamp(28px, 4vw, 48px);
}

.w-hero h1 {
  margin: 0;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.w-lead {
  max-width: 34em;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  text-wrap: pretty;
}

.w-hero .action-row {
  margin-top: 28px;
}

/* Chaos → order board */

.w-board-wrap {
  margin: 0;
}

.w-board {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  aspect-ratio: 5 / 4;
  min-height: 320px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #fff;
  background-image: radial-gradient(circle, rgba(21, 21, 21, 0.09) 1px, transparent 1.3px);
  background-size: 18px 18px;
}

.w-board::before {
  content: "";
  position: absolute;
  inset: var(--guide-top, 50px) var(--pad, 20px) var(--guide-bottom, 20px);
  background:
    linear-gradient(var(--line), var(--line)) 33.333% 0 / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 66.666% 0 / 1px 100% no-repeat;
  opacity: 0;
  transition: opacity 500ms ease;
  pointer-events: none;
}

.w-board-wrap[data-state="order"] .w-board.is-live::before {
  opacity: 1;
  transition-delay: 450ms;
}

.w-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.w-col-label {
  display: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.js .w-board {
  display: block;
  padding: 0;
}

.js .w-board .w-chip,
.js .w-board .w-col-label {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.w-board.is-live .w-chip {
  opacity: 1;
  transition:
    opacity 300ms ease,
    transform 900ms var(--w-ease),
    color 400ms ease,
    border-color 400ms ease;
}

.w-board.is-live .w-col-label {
  display: block;
  transition: opacity 400ms ease;
}

.w-board-wrap[data-state="order"] .w-col-label {
  opacity: 1;
  transition-delay: 500ms;
}

.w-board-wrap[data-state="order"] .w-chip.is-good {
  border-color: rgba(81, 106, 85, 0.5);
  color: var(--green);
}

.w-board-wrap[data-state="order"] .w-chip.is-risk {
  border-color: rgba(155, 92, 56, 0.5);
  color: var(--rust);
}

.w-board-wrap figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* Proof */

.w-proof {
  padding-bottom: clamp(32px, 5vw, 56px);
}

.w-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.w-metrics > div {
  padding: 22px 20px 24px 0;
}

.w-metrics > div + div {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.w-metrics dt {
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.w-metrics dd {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

/* Sections with a sticky label column */

.w-section {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: var(--w-gap);
  padding: clamp(48px, 7vw, 96px) 0;
  border-top: 1px solid var(--line);
}

.w-label {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 10px;
  margin: 0;
}

.w-num {
  font-size: 56px;
  font-weight: 250;
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.w-label > span:not(.w-num) {
  color: var(--rust);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.w-body h2 {
  max-width: 16em;
  margin: 0;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.w-intro {
  max-width: 40em;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  text-wrap: pretty;
}

.w-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* 01 Who it is for: the customer's own words */

.w-quotes {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.w-quotes li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.w-quotes li:last-child {
  border-bottom: 1px solid var(--line);
}

.w-quotes q {
  font-size: clamp(19px, 1.9vw, 24px);
  font-weight: 650;
  line-height: 1.3;
  text-wrap: balance;
}

.w-quotes q::before,
.w-quotes q::after {
  color: var(--rust);
}

html[lang="pl"] .w-quotes q {
  quotes: "„" "”";
}

html[lang="en"] .w-quotes q {
  quotes: "“" "”";
}

.w-quotes li > span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* 02 Approach */

.w-principles {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.w-principles li {
  display: grid;
  grid-template-columns: 48px minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0 20px;
  align-items: baseline;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.w-principles li:last-child {
  border-bottom: 1px solid var(--line);
}

.w-idx {
  color: var(--rust);
  font-size: 13px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.w-principles h3 {
  margin: 0;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.2;
  text-wrap: balance;
}

.w-principles p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* 03 Offer: a price list */

.w-menu {
  margin: 32px 0 0;
  border-top: 1px solid var(--ink);
}

.w-menu-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.w-menu-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}

.w-menu-head h3 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.15;
}

.w-leader {
  flex: 1;
  min-width: 24px;
  border-bottom: 1px dotted rgba(21, 21, 21, 0.4);
}

.w-price {
  margin: 0 0 0 auto;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 760;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.w-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 4px 8px 3px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 0.3em;
}

.w-menu-meta {
  margin: 8px 0 0;
  color: var(--rust);
  font-size: 13px;
  font-weight: 700;
}

.w-menu-desc {
  max-width: 40em;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.w-more {
  margin-top: 14px;
}

.w-more summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.w-more summary::-webkit-details-marker {
  display: none;
}

.w-more summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  transition: transform 200ms ease, border-color 200ms ease;
}

.w-more[open] summary::before {
  transform: rotate(45deg);
  border-color: var(--ink);
}

.w-more summary span {
  text-decoration: underline;
  text-decoration-color: rgba(21, 21, 21, 0.25);
  text-underline-offset: 4px;
}

.w-more summary:hover span {
  text-decoration-color: currentColor;
}

.w-more ul {
  max-width: 44em;
  margin: 14px 0 0;
  padding: 14px 18px;
  list-style: none;
  border-left: 2px solid var(--rust);
  background: rgba(21, 21, 21, 0.025);
}

.w-more li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.w-more li + li {
  margin-top: 8px;
}

.w-more strong {
  color: var(--ink);
}

.w-aside {
  font-size: 15px;
}

/* 04 What you get: the folder and the Monday list */

.w-deliver {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 32px;
}

.w-tree,
.w-health {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.w-tree {
  --i-folder: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M1.75 4.25v8.5c0 .55.45 1 1 1h10.5c.55 0 1-.45 1-1V6.25c0-.55-.45-1-1-1H7.6L6.1 3.25H2.75c-.55 0-1 .45-1 1z'/%3E%3C/svg%3E");
  --i-doc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M3.75 1.75h5.5l3 3v9.5h-8.5z'/%3E%3Cpath d='M9.25 1.75v3h3M6 8.25h4M6 10.75h4'/%3E%3C/svg%3E");
  --i-sheet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3'%3E%3Crect x='2' y='2.5' width='12' height='11' rx='1'/%3E%3Cpath d='M2 6.25h12M2 9.75h12M6.25 2.5v11'/%3E%3C/svg%3E");
  --i-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3'%3E%3Crect x='2' y='3' width='12' height='11' rx='1'/%3E%3Cpath d='M2 6.5h12M5.25 1.5v3M10.75 1.5v3'/%3E%3C/svg%3E");
  font-size: 14.5px;
  line-height: 1.4;
}

.w-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.w-tree ul ul {
  margin: 2px 0 4px 7px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.w-tree li {
  position: relative;
  padding: 4px 0;
}

.w-tree ul ul li::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -16px;
  width: 11px;
  border-top: 1px solid var(--line);
}

.w-tree span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.w-tree span::before {
  content: "";
  flex: none;
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.w-tree-root {
  margin: 0 0 8px;
  font-weight: 760;
}

.w-tree-root span::before,
.w-tree .is-folder > span::before {
  --icon: var(--i-folder);
  color: var(--rust);
}

.w-tree .is-folder > span {
  font-weight: 650;
}

.w-tree .is-doc > span::before {
  --icon: var(--i-doc);
  color: var(--muted);
}

.w-tree .is-sheet > span::before {
  --icon: var(--i-sheet);
  color: var(--green);
}

.w-tree .is-date > span::before {
  --icon: var(--i-date);
  color: var(--muted);
}

.w-health-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
}

.w-health-head span {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.w-health-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.w-health-list li {
  display: grid;
  grid-template-columns: 10px 42px minmax(0, 1fr);
  gap: 3px 10px;
  align-items: baseline;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.w-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tone);
}

.w-client {
  color: var(--muted);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.w-obs {
  line-height: 1.4;
}

.w-next {
  grid-column: 3;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.w-next::before {
  content: "→ ";
  color: var(--tone);
  font-weight: 700;
}

.is-red { --tone: var(--rust); }
.is-amber { --tone: var(--gold); }
.is-green { --tone: var(--green); }

.w-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.w-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--tone);
}

/* 05 Process: a timeline */

.w-timeline {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 2.5fr 1.3fr;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.w-step {
  position: relative;
  padding: 24px 20px 0 0;
  border-top: 2px solid var(--ink);
}

.w-step::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.w-step-time {
  margin: 0 0 8px;
  color: var(--rust);
  font-size: 13px;
  font-weight: 760;
}

.w-step h3 {
  margin: 0 0 8px;
  font-size: 19px;
  hyphens: manual;
}

.w-step > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.w-weeks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.w-weeks li {
  padding-top: 10px;
  border-top: 6px solid var(--ink);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.w-weeks li:nth-child(2) { border-top-color: rgba(21, 21, 21, 0.7); }
.w-weeks li:nth-child(3) { border-top-color: rgba(21, 21, 21, 0.45); }

.w-weeks b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 13px;
}

/* 06 Ground rules */

.w-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.w-rules li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}

.w-rules strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 16px;
}

/* 07 Contact */

.w-contact .w-body h2 {
  font-size: clamp(36px, 5vw, 64px);
}

.w-contact .action-row {
  margin-top: 26px;
}

.w-sign {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.w-mono {
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #e7e9df;
  color: var(--green);
  font-size: 17px;
  font-weight: 800;
}

.w-sign p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.w-sign strong {
  color: var(--ink);
}

/* Responsive */

@media (max-width: 980px) {
  .w-hero,
  .w-deliver {
    grid-template-columns: 1fr;
  }

  .w-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .w-metrics > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .w-metrics > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 860px) {
  .w-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .w-label {
    position: static;
    display: flex;
    align-items: baseline;
    gap: 12px;
  }

  .w-num {
    font-size: 40px;
  }

  .w-quotes li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .w-principles li {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .w-principles li p {
    grid-column: 2;
  }

  .w-timeline {
    grid-template-columns: 1fr;
  }

  .w-step {
    padding: 0 0 28px 28px;
    border-top: 0;
    border-left: 2px solid var(--ink);
  }

  .w-step:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
  }

  .w-step::before {
    top: 0;
    left: -8px;
  }
}

@media (max-width: 620px) {
  .w-rules {
    grid-template-columns: 1fr;
  }

  .w-leader {
    display: none;
  }

  .w-board {
    min-height: 260px;
  }

  .w-chip {
    height: 26px;
    padding: 0 9px;
    font-size: 11.5px;
  }

  .w-board-wrap figcaption {
    flex-direction: column;
    gap: 6px;
  }

  .w-hero .action-row .button,
  .w-contact .action-row .button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .w-board.is-live .w-chip {
    transition: none;
  }
}
