/* =====================================================================
   HANDPICKED COLLECTIONS
   A heading with a pair of arrows opposite, over a sideways row of tall photo
   cards. Each card carries a "TOP n" pill above its name and sits on a second
   card peeking out behind it — the stack is what says "collection" rather than
   "one more photograph".

   No panel and no white: the page's own gradient is the ground, so the row
   reads as part of the page.

   Class prefix `kcoll` / `collcard`, checked against every stylesheet before
   use — `.pcard`, `.krail` and `.kdeal` were all already taken.
   ===================================================================== */
.kcoll {
  --kc-ink: #213857;
  --kc-line: rgba(33, 56, 87, .14);
  --kc-accent: #BD830D;
  --kc-gap: clamp(12px, 1.2vw, 20px);
  --kc-ease: cubic-bezier(.22, .61, .36, 1);
  display: block;
  padding: clamp(26px, 3vw, 46px) 0;
  background: transparent;
  color: var(--kc-ink);
}

/* -------------------------------- the head -------------------------------- */
.kcoll__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(16px, 1.9vw, 26px);
}
.kcoll__title {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.12;
}

.kcoll__nav {
  flex: none;
  display: flex;
  align-items: stretch;
  height: clamp(30px, 2.3vw, 36px);
  border: 1px solid var(--kc-line);
  border-radius: 999px;
  overflow: hidden;
}
.kcoll__split { width: 1px; background: var(--kc-line); }
.kcoll__arrow {
  display: grid;
  place-items: center;
  width: clamp(32px, 2.7vw, 42px);
  padding: 0;
  border: 0;
  background: none;
  color: var(--kc-accent);
  cursor: pointer;
  transition: background-color .18s var(--kc-ease), opacity .18s var(--kc-ease);
}
.kcoll__arrow svg { width: 16px; height: 16px; }
.kcoll__arrow:hover { background: rgba(189, 131, 13, .1); }
.kcoll__arrow[disabled] { opacity: .32; cursor: default; }
.kcoll__arrow[disabled]:hover { background: none; }
.kcoll__arrow:focus-visible { outline: 2px solid var(--kc-accent); outline-offset: -2px; }

/* -------------------------------- the track -------------------------------- */
.kcoll__track {
  display: flex;
  gap: var(--kc-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  /* Room at the top for the card peeking out behind each one. */
  padding-top: clamp(10px, .9vw, 14px);
}
.kcoll__track::-webkit-scrollbar { display: none; }

/* -------------------------------- the card -------------------------------- */
.collcard {
  position: relative;
  flex: 0 0 clamp(176px, 17%, 250px);
  /* The reference's proportion — a shade taller than it is wide. */
  aspect-ratio: 270 / 315;
  display: block;
  scroll-snap-align: start;
  text-decoration: none;
}

/* The one behind: narrower, lifted, and only its top edge ever shows. */
.collcard__back {
  position: absolute;
  left: 7%;
  right: 7%;
  top: clamp(-13px, -1vw, -9px);
  height: 26px;
  border-radius: 12px 12px 0 0;
  background: rgba(33, 56, 87, .12);
  transition: top .28s var(--kc-ease);
}

.collcard__face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(33, 56, 87, .06);
}
.collcard__face img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--kc-ease);
}
/* Across the lower half only, so the photograph is left alone above it. */
.collcard__veil {
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  background: linear-gradient(to top,
    rgba(0, 0, 0, .8) 0%,
    rgba(0, 0, 0, .42) 42%,
    rgba(0, 0, 0, 0) 100%);
}

.collcard__foot {
  position: absolute;
  left: clamp(10px, 1vw, 15px);
  right: clamp(10px, 1vw, 15px);
  bottom: clamp(11px, 1.1vw, 16px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(7px, .7vw, 11px);
}
/* The white pill, above the name as the reference has it. */
.collcard__top {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 4px;
  background: #FFFFFF;
  color: #1B2838;
  font-size: clamp(.6rem, .7vw, .72rem);
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.1;
  white-space: nowrap;
}
.collcard__name {
  color: #FFFFFF;
  font-size: clamp(.82rem, .95vw, .98rem);
  font-weight: 700;
  line-height: 1.28;
  /* Three lines is what the reference's longest card runs to. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collcard:hover .collcard__face img { transform: scale(1.05); }
.collcard:hover .collcard__back { top: clamp(-17px, -1.3vw, -12px); }
.collcard:focus-visible { outline: 2px solid var(--kc-accent); outline-offset: 3px; border-radius: 12px; }

/* ------------------------------ dark theme ------------------------------ */
:root[data-theme="dark"] .kcoll {
  --kc-ink: #FAF8F3;
  --kc-line: rgba(250, 248, 243, .18);
}
:root[data-theme="dark"] .collcard__back { background: rgba(250, 248, 243, .16); }
:root[data-theme="dark"] .kcoll__arrow:hover { background: rgba(250, 248, 243, .1); }

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 1100px) { .collcard { flex-basis: clamp(170px, 22%, 240px); } }
@media (max-width: 820px)  { .collcard { flex-basis: clamp(160px, 30%, 220px); } }
@media (max-width: 560px) {
  .collcard { flex-basis: 46%; }
  /* On a phone the row is swiped, so the arrows are dead weight. */
  .kcoll__nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .collcard__face img, .collcard__back, .kcoll__arrow { transition: none; }
}
