/* ============================================================
   Gallery
   ============================================================ */
.gallery { padding-top: 50px; padding-bottom: 90px; }
.gal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 44px; flex-wrap: wrap; }
.gal-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.03em; margin: 14px 0 0; }
.gal-sub { font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 42ch; margin-top: 12px; }
.gal-filters { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- résumé / cover mode toggle ---- */
.gal-modes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.seg { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink-2); transition: 0.2s; }
.seg:hover { color: var(--ink); }
.seg.on { background: var(--ink); color: var(--bg-0); }

/* ---- profile selector rail ---- */
.prof-rail {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 4px 2px 14px; margin-bottom: 22px;
}
@media (max-width: 760px) { .prof-rail { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .prof-rail { grid-template-columns: 1fr; } }
.prof-chip {
  display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 13px 15px; border-radius: 15px; background: var(--bg-2);
  border: 1px solid var(--line); transition: 0.22s var(--ease); min-width: 0;
}
.prof-chip:hover { border-color: var(--line-2); transform: translateY(-2px); }
.prof-chip.on { border-color: transparent; background: linear-gradient(135deg, color-mix(in oklab, var(--pp) 16%, var(--bg-2)), color-mix(in oklab, var(--pp2) 12%, var(--bg-2))); box-shadow: inset 0 0 0 1.5px var(--pp); }
.prof-chip-ic {
  flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--pp), var(--pp2));
}
.prof-chip-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.prof-chip-txt em { white-space: nowrap; }
.prof-chip-txt b { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-chip-txt em { font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

/* ---- selected-profile banner ---- */
.prof-banner {
  display: flex; align-items: center; gap: 16px; margin-bottom: 30px;
  padding: 18px 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(120deg, color-mix(in oklab, var(--pp) 13%, var(--bg-1)), color-mix(in oklab, var(--pp2) 9%, var(--bg-1)));
}
.prof-banner-ic { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--pp), var(--pp2)); box-shadow: var(--shadow-1); }
.prof-banner h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; text-transform: capitalize; }
.prof-banner p { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; max-width: 62ch; }
.prof-banner-n { margin-left: auto; flex: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line-2); padding: 6px 11px; border-radius: 999px; white-space: nowrap; }

.cover-thumb { background: #e9e9ee; }

@media (max-width: 640px) {
  .prof-banner-n { display: none; }
  .prof-banner { flex-wrap: wrap; }
}
.pill { padding: 9px 16px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); transition: 0.2s; }
.pill:hover { color: var(--ink); border-color: var(--line-2); }
.pill.on { background: var(--ink); color: var(--bg-0); border-color: var(--ink); }

.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .gal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .gal-grid { grid-template-columns: 1fr; } }

.tpl-card { animation: rise 0.7s var(--ease) both; }
.tpl-thumb {
  position: relative; aspect-ratio: 768 / 1000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #0c0c11;
  box-shadow: var(--shadow-2); transition: 0.4s var(--ease);
}
.tpl-card:hover .tpl-thumb { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow-3); }
.tpl-thumb-inner { position: absolute; inset: 0; }

.tpl-current { position: absolute; top: 12px; right: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: var(--acc); color: var(--acc-ink); font-size: 11px; font-weight: 800; box-shadow: var(--shadow-1); }
.tpl-hover {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  background: linear-gradient(180deg, transparent 30%, rgba(6,6,10,0.78));
  opacity: 0; transition: 0.35s var(--ease);
}
.tpl-card:hover .tpl-hover { opacity: 1; }
.tpl-hover .btn { transform: translateY(10px); transition: 0.35s var(--ease); }
.tpl-card:hover .tpl-hover .btn { transform: none; }

.tpl-meta { padding: 18px 4px 0; }
.tpl-meta-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tpl-meta h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.tpl-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }
.tpl-meta p { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin: 8px 0 12px; }
.tpl-swatches { display: flex; gap: 6px; }
.tpl-swatches span { width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--line-2); }
