/* ---------- Samples grid ---------- */

.samples-scroll {
  width: 100%;
  align-self: stretch;
  overflow-y: auto;
  padding: 40px clamp(24px, 5vw, 64px);
}

.samples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(20px, 2.5vw, 32px);
  max-width: 1400px;
  margin: 0 auto;
}

.sample-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.sample-card-image {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: #f0f0f0;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.sample-card:hover .sample-card-image {
  transform: scale(1.03);
}

.sample-card-title {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.2s ease;
}

.sample-card:hover .sample-card-title {
  color: var(--ink-soft);
}

/* ---------- Samples project popup ---------- */

.sp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sp-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sp-window {
  width: min(1160px, 94vw);
  height: min(780px, 88vh);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.14), 0 4px 14px rgba(17, 17, 17, 0.06);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  overflow: hidden;
}

.sp-backdrop.is-open .sp-window {
  transform: scale(1) translateY(0);
}

.sp-content {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.sp-media {
  position: absolute;
  inset: 0;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-media img,
.sp-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sp-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px clamp(20px, 4vw, 40px) 22px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 55%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.sp-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.sp-description {
  margin: 0;
  max-width: 640px;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.sp-footer {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-counter {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #ffffff;
  background: rgba(17, 17, 17, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 5px 11px;
  border-radius: 20px;
}

.sp-nav {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.sp-nav button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(17, 17, 17, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.sp-nav button:hover {
  border-color: #ffffff;
  background: rgba(17, 17, 17, 0.65);
}

@media (max-width: 720px) {
  .sp-window {
    height: min(600px, 82vh);
  }
  .sp-text {
    padding: 24px 20px 18px;
  }
  .sp-title {
    font-size: 18px;
  }
  .sp-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}
