/* ═══════════════════════════════════════════════════════
   BeBored — cards.css
   The original BeBored cards (service stack + project
   carousel), now contained in a centred frame instead of
   running edge to edge.
   ═══════════════════════════════════════════════════════ */

.cards-frame {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Services: sticky stacking cards ─── */
.services { padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 9vw, 8rem); }
.services .sec-head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); }

.stack-cards { position: relative; }
.stack-card {
  position: sticky;
  top: calc(96px + var(--i, 0) * 18px);
  min-height: min(62vh, 560px);
  margin-bottom: 1.5rem;
  background: #0d0d0d;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: #fff;
  transform-origin: center top;
  will-change: transform;
}
.stack-card:nth-child(1) { --i: 0; background: #0a0a0a; }
.stack-card:nth-child(2) { --i: 1; background: #111; }
.stack-card:nth-child(3) { --i: 2; background: #0a0a0a; }
.stack-card:nth-child(4) { --i: 3; background: #111; }
.stack-card:last-child { margin-bottom: 0; }

.stack-card__body {
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stack-card__num {
  font-family: var(--font-text);
  font-size: clamp(4rem, 7vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  color: rgba(255,255,255,0.08);
  line-height: 1;
}
.stack-card__content { display: flex; flex-direction: column; align-items: flex-start; }
.stack-card__tag {
  font-size: 0.8125rem;
  color: var(--mint);
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.stack-card__title {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin: 0 0 1.1rem;
}
.stack-card__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  max-width: 34ch;
  margin: 0 0 2rem;
}
.stack-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .25s;
}
.stack-card__link:hover { background: #0f4a2e; }
.stack-card__link svg { width: 1rem; height: 1rem; }

.stack-card__visual {
  position: relative;
  overflow: hidden;
  margin: 0.75rem;
  border-radius: 16px;
  background: #1a1a1a;
}
.stack-card__visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.stack-card:hover .stack-card__visual img { transform: scale(1.04); }

/* ─── Projects: card carousel ─── */
.projects { padding: clamp(4rem, 7vw, 6rem) 0; }
.projects .sec-head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); }
.projects .sec-head .text-link { font-size: 0.9375rem; }

.proj-carousel-outer { position: relative; }
.proj-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}
.proj-track::-webkit-scrollbar { display: none; }
.proj-card-item {
  flex: 0 0 calc((100% - 2.5rem) / 3);
  scroll-snap-align: start;
}
.proj-card {
  aspect-ratio: 4 / 5;
  background: #111 center / cover no-repeat;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  display: block;
  color: #fff;
  text-decoration: none;
}
.proj-card__number {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: clamp(4rem, 7vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  color: rgba(255,255,255,0.12);
  line-height: 1;
  pointer-events: none;
}
.proj-card__glass {
  position: absolute;
  left: 0.75rem; right: 0.75rem; bottom: 0.75rem;
  padding: 1.25rem 1.4rem 1.35rem;
  border-radius: 14px;
  background: rgba(0,0,0,0.38);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background .4s;
}
.proj-card:hover .proj-card__glass { background: rgba(0,0,0,0.55); }
.proj-card__cat {
  display: block;
  font-size: 0.75rem;
  color: var(--mint);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.proj-card__title {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}
.proj-card__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.proj-card:hover .proj-card__img { transform: scale(1.05); }

.proj-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.proj-progress-wrap {
  flex: 1;
  height: 2px;
  background: var(--line);
}
.proj-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width .3s ease;
}
.proj-arrow {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;
  color: #000;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s, color .2s, border-color .2s;
}
.proj-arrow:hover { background: #000; color: #fff; border-color: #000; }
.proj-arrow:disabled { opacity: .3; pointer-events: none; }
.proj-arrow svg { width: 18px; height: 18px; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .stack-card { grid-template-columns: 1fr; min-height: 0; top: calc(80px + var(--i, 0) * 12px); }
  .stack-card__visual { aspect-ratio: 16 / 10; }
  .stack-card__num { font-size: 3.5rem; margin-bottom: 1.5rem; }
  .proj-card-item { flex-basis: 78%; }
}
