.demo-hero {
  min-height: 78vh;
}

.compare-section {
  background: #f7f5f0;
}

.compare-list {
  display: grid;
  gap: 22px;
}

.compact-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.compare-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.compare-card.doc-card {
  border-top: 6px solid var(--coral);
}

.compare-card.fashion-card {
  border-top: 6px solid var(--mint);
}

.compare-card.product-card {
  border-top: 6px solid var(--cyan);
}

.compare-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.compact-gallery .compare-copy p {
  display: none;
}

.compact-gallery .compare-copy h3 {
  margin-bottom: 0;
  font-size: clamp(19px, 2vw, 24px);
}

.compare {
  --position: 50%;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  background: #ece8df;
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.08);
}

.compare-stage {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
}

.compare-after {
  z-index: 2;
  width: 100%;
  clip-path: inset(0 0 0 var(--position));
}

.compare-handle {
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  left: var(--position);
  width: 28px;
  transform: translateX(-50%);
  pointer-events: none;
}

.compare-handle::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.22);
}

.compare-handle::before {
  content: "↔";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  color: rgba(34, 35, 38, 0.72);
  background: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(10px);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.compare-range {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

.expand-compare,
.modal-close {
  position: absolute;
  z-index: 8;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: #151617;
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.expand-compare {
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  font-size: 19px;
  line-height: 1;
}

.expand-compare:hover,
.modal-close:hover {
  background: #fff;
}

.modal-open {
  overflow: hidden;
}

.compare-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: none;
  padding: 24px;
}

.compare-modal.is-open {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 17, 0.78);
  backdrop-filter: blur(10px);
}

.modal-frame {
  position: relative;
  z-index: 1;
  width: min(92vw, 760px);
  height: min(92vh, 920px);
  display: grid;
  place-items: center;
}

.modal-slot {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.modal-slot .compare {
  width: min(100%, calc(92vh * 0.75));
  height: min(100%, calc(92vw * 1.333));
  max-width: none;
  aspect-ratio: 3 / 4;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.modal-slot .compare-range {
  width: 100%;
}

.modal-close {
  top: -10px;
  right: -10px;
  width: 46px;
  height: 46px;
  font-size: 28px;
  line-height: 1;
}

.state-label {
  display: none;
}

.real-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.real-image.cover {
  object-fit: cover;
}

.real-image.contain {
  object-fit: contain;
  padding: 18px;
}

.real-image.light {
  background: #fff;
}

.real-image.warm {
  background: #f7efe7;
}

.real-image.muted {
  background: #eee8dd;
}

.real-before-grid {
  position: absolute;
  inset: 0;
  display: block;
  padding: 18px;
  background:
    radial-gradient(circle at 80% 14%, rgba(201, 150, 61, 0.14), transparent 28%),
    linear-gradient(135deg, #f7f5f0, #e7ded5);
}

.real-before-grid img {
  position: absolute;
  width: 36%;
  height: 34%;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(31, 29, 27, 0.16);
  padding: 4px;
}

.real-before-grid img:nth-child(1) {
  left: 7%;
  top: 8%;
  width: 37%;
  height: 31%;
  transform: rotate(-5deg);
  z-index: 2;
}

.real-before-grid img:nth-child(2) {
  right: 8%;
  top: 7%;
  width: 38%;
  height: 36%;
  transform: rotate(4deg);
  z-index: 3;
}

.real-before-grid img:nth-child(3) {
  left: 13%;
  top: 37%;
  width: 44%;
  height: 36%;
  transform: rotate(3deg);
  z-index: 4;
}

.real-before-grid img:nth-child(4) {
  right: 7%;
  top: 42%;
  width: 39%;
  height: 38%;
  transform: rotate(-4deg);
  z-index: 5;
}

.real-before-grid img:nth-child(5) {
  left: 7%;
  bottom: 6%;
  width: 38%;
  height: 30%;
  transform: rotate(-2deg);
  z-index: 6;
}

.real-before-grid img:nth-child(6) {
  right: 9%;
  bottom: 7%;
  width: 40%;
  height: 31%;
  transform: rotate(5deg);
  z-index: 7;
}

.mini-example:nth-child(3n) .real-before-grid img:nth-child(1) {
  left: 10%;
  top: 7%;
  transform: rotate(4deg);
}

.mini-example:nth-child(3n) .real-before-grid img:nth-child(2) {
  right: 10%;
  top: 13%;
  transform: rotate(-5deg);
}

.mini-example:nth-child(3n) .real-before-grid img:nth-child(4) {
  right: 5%;
  top: 39%;
}

.mini-example:nth-child(4n) .real-before-grid img:nth-child(3) {
  left: 7%;
  top: 34%;
  transform: rotate(-5deg);
}

.mini-example:nth-child(4n) .real-before-grid img:nth-child(6) {
  right: 14%;
  bottom: 5%;
  transform: rotate(2deg);
}

.portrait-before,
.portrait-after,
.product-before,
.product-studio,
.product-atmosphere,
.collage-clean,
.collage-pinterest,
.model-studio,
.model-street {
  background: #fff;
}

.mock-photo,
.item-scatter,
.outfit-clean,
.pin-board,
.model-shot,
.table-scene,
.studio-product,
.toy-city {
  position: absolute;
  inset: 0;
}

.portrait-before {
  background:
    linear-gradient(120deg, rgba(54, 75, 93, 0.24), rgba(227, 211, 190, 0.65)),
    #d6c7b7;
}

.wall-art {
  position: absolute;
  top: 18%;
  left: 12%;
  width: 30%;
  height: 22%;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(-5deg);
}

.person {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 38%;
  height: 72%;
  transform: translateX(-50%) rotate(-4deg);
}

.portrait-after {
  background: #fdfdfb;
}

.portrait-after .person {
  bottom: 3%;
  transform: translateX(-50%);
}

.doc-frame {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 64%;
  height: 92%;
  transform: translateX(-50%);
  background: linear-gradient(#fff, #f5f5f2);
}

.document-portrait .person {
  width: 52%;
  height: 78%;
}

.hair,
.head,
.neck,
.body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.hair {
  top: 8%;
  width: 34%;
  height: 19%;
  border-radius: 48% 52% 40% 40%;
  background: #2a211e;
}

.head {
  top: 15%;
  width: 28%;
  height: 28%;
  border-radius: 48%;
  background: #d8aa82;
  box-shadow:
    -18px 23px 0 -15px #2b2b2b,
    18px 23px 0 -15px #2b2b2b;
}

.neck {
  top: 41%;
  width: 12%;
  height: 13%;
  border-radius: 10px;
  background: #c99572;
}

.body {
  bottom: 0;
  width: 78%;
  height: 48%;
  border-radius: 38% 38% 0 0;
  background: #38485f;
}

.document-portrait .body {
  width: 92%;
  background: #2e394d;
}

.fashion-before,
.street-kit,
.model-kit {
  background:
    linear-gradient(120deg, rgba(222, 218, 211, 0.8), rgba(246, 244, 239, 0.92)),
    #ede8df;
}

.fashion-before.alt {
  background: #e7ded6;
}

.item {
  position: absolute;
  display: block;
  filter: drop-shadow(0 14px 16px rgba(30, 28, 26, 0.16));
}

.item-scatter .coat {
  left: 24%;
  top: 18%;
  width: 28%;
  height: 46%;
  border-radius: 18px 18px 30px 30px;
  background: #bf6e58;
  transform: rotate(-8deg);
}

.item-scatter .bag {
  right: 18%;
  top: 20%;
  width: 22%;
  height: 24%;
  border-radius: 8px 8px 16px 16px;
  background: #2d302f;
  transform: rotate(9deg);
}

.item-scatter .bag::before,
.outfit-clean .bag::before,
.pin-board .bag::before {
  content: "";
  position: absolute;
  left: 24%;
  top: -28%;
  width: 52%;
  height: 42%;
  border: 5px solid currentColor;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  color: inherit;
}

.item-scatter .shoe,
.outfit-clean .shoe,
.pin-board .shoe {
  width: 22%;
  height: 10%;
  border-radius: 999px 70% 40% 30%;
  background: #f2f0e8;
  border-bottom: 8px solid #262626;
}

.item-scatter .shoe.left {
  left: 20%;
  bottom: 16%;
  transform: rotate(8deg);
}

.item-scatter .shoe.right {
  right: 23%;
  bottom: 16%;
  transform: rotate(-7deg);
}

.item-scatter .glasses,
.outfit-clean .glasses,
.pin-board .glasses {
  width: 18%;
  height: 8%;
  border: 6px solid #151617;
  border-left-width: 10px;
  border-right-width: 10px;
  border-radius: 999px;
  background: transparent;
}

.item-scatter .glasses {
  right: 28%;
  top: 57%;
  transform: rotate(-12deg);
}

.collage-clean {
  background: #fbfaf6;
}

.outfit-clean .coat {
  left: 38%;
  top: 14%;
  width: 24%;
  height: 48%;
  border-radius: 18px 18px 28px 28px;
  background: #bf6e58;
}

.outfit-clean .bag {
  left: 62%;
  top: 34%;
  width: 19%;
  height: 22%;
  border-radius: 8px 8px 16px 16px;
  background: #2d302f;
}

.outfit-clean .shoe.left {
  left: 35%;
  bottom: 18%;
}

.outfit-clean .shoe.right {
  left: 52%;
  bottom: 18%;
}

.outfit-clean .glasses {
  left: 22%;
  top: 22%;
}

.sweater {
  left: 21%;
  top: 18%;
  width: 28%;
  height: 31%;
  border-radius: 20px 20px 28px 28px;
  background: #d6a048;
  transform: rotate(-9deg);
}

.skirt {
  right: 24%;
  top: 34%;
  width: 24%;
  height: 26%;
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
  background: #435e6f;
  transform: rotate(7deg);
}

.item-scatter .bag.small,
.pin-board .bag.small {
  width: 17%;
  height: 19%;
  background: #7a4e3f;
}

.collage-pinterest {
  background:
    radial-gradient(circle at 84% 18%, rgba(226, 167, 127, 0.38), transparent 22%),
    linear-gradient(135deg, #fbf4ea, #ede4dc);
}

.paper {
  position: absolute;
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 40px rgba(44, 34, 26, 0.14);
}

.paper.one {
  left: 12%;
  top: 17%;
  width: 32%;
  height: 39%;
  transform: rotate(-7deg);
}

.paper.two {
  right: 11%;
  bottom: 16%;
  width: 32%;
  height: 37%;
  transform: rotate(6deg);
}

.palette {
  position: absolute;
  right: 14%;
  top: 17%;
  width: 26%;
  height: 8%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 16% 50%, #d6a048 0 14%, transparent 15%),
    radial-gradient(circle at 38% 50%, #435e6f 0 14%, transparent 15%),
    radial-gradient(circle at 60% 50%, #7a4e3f 0 14%, transparent 15%),
    radial-gradient(circle at 82% 50%, #f2f0e8 0 14%, transparent 15%);
}

.pin-board .sweater {
  left: 20%;
  top: 22%;
  transform: rotate(-5deg);
}

.pin-board .skirt {
  right: 24%;
  top: 42%;
}

.pin-board .bag {
  left: 59%;
  top: 25%;
}

.pin-board .shoe {
  left: 22%;
  bottom: 19%;
}

.pin-board .glasses {
  left: 52%;
  bottom: 23%;
}

.top {
  left: 22%;
  top: 17%;
  width: 26%;
  height: 27%;
  border-radius: 18px 18px 24px 24px;
  background: #f1eee4;
}

.pants {
  right: 24%;
  top: 33%;
  width: 22%;
  height: 38%;
  border-radius: 14px 14px 30px 30px;
  background: #454b59;
}

.jacket {
  left: 24%;
  top: 16%;
  width: 28%;
  height: 42%;
  border-radius: 18px 18px 28px 28px;
  background: #6f8c7e;
  transform: rotate(-6deg);
}

.pants.denim {
  background: #47647c;
}

.model-studio {
  background:
    radial-gradient(ellipse at 50% 78%, rgba(0, 0, 0, 0.11), transparent 30%),
    #fbfaf6;
}

.model-street {
  background:
    linear-gradient(180deg, rgba(106, 124, 135, 0.28), rgba(235, 222, 207, 0.95)),
    #d8d0c7;
}

.city-bg span {
  position: absolute;
  bottom: 24%;
  width: 18%;
  border-radius: 10px 10px 0 0;
  background: rgba(78, 91, 98, 0.26);
}

.city-bg span:nth-child(1) {
  left: 6%;
  height: 52%;
}

.city-bg span:nth-child(2) {
  left: 76%;
  height: 44%;
}

.city-bg span:nth-child(3) {
  left: 55%;
  height: 63%;
}

.model-head,
.model-hair,
.model-top,
.model-pants,
.model-leg,
.model-bag,
.model-shadow {
  position: absolute;
  display: block;
}

.model-head {
  left: 47%;
  top: 12%;
  width: 10%;
  height: 14%;
  border-radius: 48%;
  background: #d8aa82;
}

.model-hair {
  left: 45%;
  top: 9%;
  width: 14%;
  height: 17%;
  border-radius: 50% 50% 42% 42%;
  background: #2a211e;
}

.model-top {
  left: 41%;
  top: 28%;
  width: 22%;
  height: 26%;
  border-radius: 18px 18px 24px 24px;
  background: #f1eee4;
}

.model-top.jacket {
  background: #6f8c7e;
}

.model-pants {
  left: 43%;
  top: 52%;
  width: 18%;
  height: 22%;
  border-radius: 8px 8px 22px 22px;
  background: #454b59;
}

.model-pants.denim {
  background: #47647c;
}

.model-leg {
  top: 71%;
  width: 7%;
  height: 17%;
  border-radius: 999px 999px 6px 6px;
  background: #d8aa82;
}

.model-leg.left {
  left: 44%;
}

.model-leg.right {
  left: 53%;
}

.model-bag {
  right: 31%;
  top: 45%;
  width: 12%;
  height: 16%;
  border-radius: 8px 8px 14px 14px;
  background: #2d302f;
}

.model-shadow {
  left: 37%;
  bottom: 8%;
  width: 30%;
  height: 6%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.14);
}

.product-before {
  background:
    linear-gradient(160deg, rgba(170, 137, 109, 0.4), rgba(72, 82, 88, 0.22)),
    #cab9a7;
}

.table-scene::before {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -2%;
  height: 35%;
  transform: rotate(-3deg);
  background: #a77f5d;
}

.toy-product,
.phone-shadow,
.mess,
.product-shadow,
.building,
.road {
  position: absolute;
  display: block;
}

.table-scene .toy-product {
  left: 39%;
  top: 32%;
  width: 24%;
  height: 34%;
  border-radius: 32px 32px 26px 26px;
  background:
    radial-gradient(circle at 34% 34%, #171717 0 6%, transparent 7%),
    radial-gradient(circle at 66% 34%, #171717 0 6%, transparent 7%),
    #e6c84e;
  transform: rotate(-8deg);
}

.phone-shadow {
  left: 30%;
  top: 29%;
  width: 40%;
  height: 42%;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(8deg);
}

.mess {
  width: 18%;
  height: 11%;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.32);
}

.mess.left {
  left: 15%;
  bottom: 20%;
  transform: rotate(18deg);
}

.mess.right {
  right: 15%;
  top: 20%;
  transform: rotate(-15deg);
}

.product-studio {
  background: #fff;
}

.studio-product .toy-product {
  left: 38%;
  top: 25%;
  width: 26%;
  height: 38%;
  border-radius: 32px 32px 26px 26px;
  background:
    radial-gradient(circle at 34% 34%, #171717 0 6%, transparent 7%),
    radial-gradient(circle at 66% 34%, #171717 0 6%, transparent 7%),
    #e6c84e;
}

.product-shadow {
  left: 34%;
  top: 68%;
  width: 34%;
  height: 8%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  filter: blur(2px);
}

.product-atmosphere {
  background:
    linear-gradient(180deg, #bcd6df 0%, #f6dfbf 55%, #a97552 100%);
}

.building {
  bottom: 34%;
  width: 16%;
  border-radius: 8px 8px 0 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 22%, rgba(255, 255, 255, 0.36) 23% 34%),
    rgba(95, 105, 112, 0.74);
}

.building.one {
  left: 10%;
  height: 34%;
}

.building.two {
  right: 12%;
  height: 42%;
}

.building.three {
  left: 62%;
  height: 28%;
}

.road {
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 35%;
  background: #504a47;
}

.toy-city .toy-product {
  left: 39%;
  top: 39%;
  width: 25%;
  height: 36%;
  border-radius: 32px 32px 26px 26px;
  background:
    radial-gradient(circle at 34% 34%, #171717 0 6%, transparent 7%),
    radial-gradient(circle at 66% 34%, #171717 0 6%, transparent 7%),
    #e6c84e;
  filter: drop-shadow(0 20px 16px rgba(0, 0, 0, 0.28));
}

@media (max-width: 920px) {
  .compact-gallery {
    grid-template-columns: 1fr;
  }

  .compare-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .compare-card {
    padding: 20px;
  }

  .compare-modal {
    padding: 14px;
  }

  .modal-close {
    top: 8px;
    right: 8px;
  }
}
