/* HERO */
.work-hero {
  padding: 150px 0 40px;
  text-align: center;
  background:
    radial-gradient(ellipse at 85% 20%, #ffd7ec 0, transparent 30%),
    radial-gradient(ellipse at 5% 80%, #dcd0ff 0, transparent 32%);
}
.work-hero h1 {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -2.5px;
  margin-bottom: 16px;
}
.work-hero p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  max-width: 480px;
  margin: 0 auto;
}
.work-stats { justify-content: center; }

/* FILTERS */
.work-section { padding-top: 40px; }
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}
.filters button {
  border: 1px solid #d8c9f7;
  background: white;
  color: var(--navy);
  border-radius: 30px;
  padding: 10px 20px;
  font: 600 12px 'Poppins', sans-serif;
  cursor: pointer;
  transition: .3s;
}
.filters button:hover { border-color: var(--purple); }
.filters button.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(110deg, var(--purple), var(--pink), var(--orange));
}

/* GRID */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.work-card {
  background: white;
  border: 1px solid #eee6ff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px #4c27720a;
  transition: transform .4s, box-shadow .4s;
}
.work-card:hover { transform: translateY(-8px); box-shadow: 0 22px 42px #7046a51c; }
.work-card.hide { display: none; }
.work-img {
  position: relative;
  height: 240px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.work-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}
.work-card:hover .work-img img { transform: scale(1.07); }
.ph { font-size: 54px; }
.wg1 { background: linear-gradient(135deg, #e8dcff, #ffdeec); }
.wg2 { background: linear-gradient(135deg, #ffead5, #fff1c9); }
.wg3 { background: linear-gradient(135deg, #d9f5ff, #e8dcff); }
.wg4 { background: linear-gradient(135deg, #d7fbef, #d9f5ff); }
.work-info { padding: 20px 22px 24px; }
.work-info small { color: var(--purple); font-weight: 600; font-size: 11px; }
.work-info h3 { font-size: 16px; margin-top: 6px; }

/* BEFORE / AFTER */
.ba-section { background: white; }
.ba-section .section-heading { margin-inline: auto; text-align: center; }
.ba {
  position: relative;
  max-width: 820px;
  height: 440px;
  margin: auto;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8dcff, #ffdeec);
  box-shadow: 0 25px 60px #45215d21;
  --pos: 50%;
}
.ba-pane { position: absolute; inset: 0; }
.ba-pane img { width: 100%; height: 100%; object-fit: cover; }
.ba-before {
  background: linear-gradient(135deg, #cfc7dd, #aaa2bd);
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ba-pane b {
  position: absolute;
  top: 16px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #201344cc;
  color: white;
  font-size: 11px;
}
.ba-after b { right: 16px; }
.ba-before b { left: 16px; }
.ba input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}
.ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  background: white;
  z-index: 2;
  transform: translateX(-50%);
  box-shadow: 0 0 12px #0003;
}
.ba-line::after {
  content: "↔";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: var(--purple);
  font-weight: 700;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 18px #0003;
}

@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .work-grid { grid-template-columns: 1fr; }
  .ba { height: 300px; }
  .work-hero { padding: 120px 0 30px; }
}

/* MOSAIC */
.mosaic-section { padding-bottom: 20px; }
.mosaic {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  grid-template-rows: 340px 340px;
  gap: 24px;
}
.mosaic figure {
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #e8dcff, #ffdeec);
  box-shadow: 0 18px 40px #45215d1a;
}
.mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s;
}
.mosaic figure:hover img { transform: scale(1.06); }
.m-big { grid-row: 1 / 3; }
.m-wide { grid-column: 2 / 4; }
@media (max-width: 900px) {
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 260px 260px; }
  .m-big { grid-row: auto; grid-column: 1 / 3; }
  .m-wide { grid-column: 1 / 3; }
}
@media (max-width: 600px) {
  .mosaic { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 240px; }
  .m-big, .m-wide { grid-column: auto; }
}