.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(30px, 4vw, 64px) clamp(20px, 3.4vw, 60px);
}

.showcase-grid--wide {
  grid-template-columns: repeat(3, 1fr);
}

.case-tile {
  display: block;
  width: 100%;
  text-align: left;
  transition: transform var(--dur-3) var(--ease);
}

.case-tile__img {
  display: block;
  aspect-ratio: 470 / 440;
  border-radius: var(--r-xl);
  border: 1px solid var(--surface-line);
  background: var(--bg-2);
  overflow: hidden;
}

.case-tile__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform var(--dur-3) var(--ease);
}

.case-tile:hover .case-tile__img img,
.case-tile:focus-visible .case-tile__img img {
  transform: scale(1.05);
}

.case-tile__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 26px;
  border-bottom: 1px solid var(--surface-line);
}

.case-tile__row b {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.2;
  color: var(--text-0);
}

.case-tile__row small {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-1);
}

.case-tile__row .round-btn {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
}

.case-tile:hover .round-btn,
.case-tile:focus-visible .round-btn {
  background: var(--accent);
  transform: rotate(45deg);
}



/* modal */

.showcase-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 40px);
  visibility: hidden;
  pointer-events: none;
}

.showcase-modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.showcase-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
}

.showcase-modal.is-open .showcase-modal__overlay {
  opacity: 1;
}

.showcase-window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1080px, 100%);
  max-height: calc(100vh - clamp(24px, 6vw, 80px));
  border-radius: var(--r-lg);
  border: 1px solid var(--surface-line-strong);
  background: var(--bg-1);
  overflow: hidden;
  outline: none;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}

.showcase-modal.is-open .showcase-window {
  opacity: 1;
  transform: none;
}

.showcase-window.is-expanded {
  width: 100%;
  max-height: 100%;
  height: 100%;
}

.showcase-window__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 14px clamp(16px, 2.6vw, 26px);
  border-bottom: 1px solid var(--surface-line);
}

.showcase-window__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.showcase-window__body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.showcase-slides {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.showcase-track {
  display: flex;
  height: 100%;
  transition: transform var(--dur-3) var(--ease);
}

.showcase-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  overflow-y: auto;
  padding: clamp(22px, 3.4vw, 44px) clamp(22px, 5.4vw, 76px);
  -webkit-overflow-scrolling: touch;
}

.showcase-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--text-0);
  color: var(--bg-0);
  transform: translateY(-50%);
  transition: background var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease);
}

.showcase-nav:hover {
  background: var(--accent);
}

.showcase-nav:disabled {
  opacity: 0.25;
  pointer-events: none;
}

.showcase-nav svg {
  width: 22px;
  height: 22px;
}

.showcase-nav--prev { left: 14px; }
.showcase-nav--next { right: 14px; }

.showcase-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-shrink: 0;
  padding: 16px;
  border-top: 1px solid var(--surface-line);
}

.showcase-dots.is-single {
  display: none;
}

.showcase-dots__dot {
  width: 9px;
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--surface-line-strong);
  transition: background var(--dur-2) var(--ease), width var(--dur-2) var(--ease);
}

.showcase-dots__dot.is-active {
  width: 26px;
  background: var(--accent);
}



/* overview */

.demo-overview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
}

.demo-overview__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
}

.demo-overview__text {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-1);
}

.demo-overview__points {
  display: grid;
  width: 100%;
  margin-top: 4px;
  border-top: 1px solid var(--surface-line);
}

.demo-overview__point {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--surface-line);
  font-size: 0.97rem;
  color: var(--text-0);
}

.demo-overview__point svg {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  color: var(--accent);
}



/* tip */

.tip {
  position: absolute;
  z-index: 20;
  max-width: 230px;
  padding: 9px 13px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--r-xs);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  pointer-events: none;
}

.tip.is-on {
  opacity: 1;
  transform: none;
}

.tip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  transform: translateX(-50%) rotate(45deg);
}

.tip.tip--below::after {
  bottom: auto;
  top: -4px;
}

.demo-hot {
  cursor: help;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(250, 164, 26, 0.22);
  transition: box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}

.demo-hot:hover,
.demo-hot:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(250, 164, 26, 0.7);
  background: rgba(250, 164, 26, 0.07);
}

.demo-map__pin.demo-hot {
  box-shadow: 0 0 0 4px rgba(250, 164, 26, 0.25);
}

.demo-map__pin.demo-hot:hover,
.demo-map__pin.demo-hot:focus-visible {
  box-shadow: 0 0 0 5px rgba(250, 164, 26, 0.5);
}



@media (max-width: 1080px) {
  .showcase-grid--wide {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .showcase-modal {
    padding: 10px;
    align-items: flex-end;
  }

  .showcase-window {
    max-height: calc(100vh - 20px);
    border-radius: var(--r-md);
  }

  .showcase-slide {
    padding: 20px 16px 26px;
  }

  .showcase-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .showcase-grid,
  .showcase-grid--wide {
    grid-template-columns: 1fr;
  }
}
