/**
 * Kottakkal Theme - Treatments Archive Stylesheet
 * Page: templates/page-treatments.php
 */

.phead {
  padding-block: calc(160px + env(safe-area-inset-top, 0px)) clamp(48px, 7vw, 96px);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font: 500 0.78rem/1.4 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 30px;
}

.crumbs a {
  color: var(--fg-2);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--accent);
}

.phead h1 {
  font-size: var(--fs-hero);
  margin-top: 22px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.phead .lede {
  margin-top: 28px;
  max-width: 60ch;
}

.ph-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font: 500 0.78rem/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--heading);
  text-decoration: none;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s;
}

.chip small {
  font-size: 0.78rem;
  color: var(--fg-2);
  letter-spacing: 0;
  transition: color 0.4s;
}

.chip:hover {
  border-color: var(--heading);
}

.chip[aria-pressed="true"], .chip.active {
  background: var(--heading);
  color: var(--bg);
  border-color: var(--heading);
}

.chip[aria-pressed="true"] small, .chip.active small {
  color: var(--bg);
  opacity: 0.7;
}

/* Grid & Cards */
.xgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.xcard {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--on-dark);
  border-radius: 2px;
  overflow: hidden;
}

.xcard[hidden] {
  display: none !important;
}

.xcard .plate {
  aspect-ratio: 4/5;
}

.xcard:hover .art, .xcard:focus-visible .art {
  transform: scale(1.07);
}

.xcard .ov {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 5;
  padding: 70px 24px 24px;
  background: linear-gradient(180deg, rgba(5, 16, 12, 0), rgba(5, 16, 12, 0.62) 35%, rgba(5, 16, 12, 0.9));
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  display: grid;
  gap: 8px;
}

.xcard .ing {
  font: 600 0.78rem/1.4 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-hi);
}

.xcard h3 {
  color: var(--on-dark);
  font-size: var(--fs-3);
}

.xcard .alt {
  font: 400 0.98rem/1.3 var(--display);
  color: rgba(243, 238, 226, 0.72);
}

.xcard p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(243, 238, 226, 0.82);
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.7s var(--ease), opacity 0.6s var(--ease);
  opacity: 0;
}

.xcard p > span {
  overflow: hidden;
}

.xcard:hover p, .xcard:focus-visible p {
  grid-template-rows: 1fr;
  opacity: 1;
}

.xcount {
  margin-top: 28px;
  font-size: 0.84rem;
  color: var(--fg-2);
}

/* Band */
.band {
  background: var(--surface-3);
  margin-top: var(--section);
}

.band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-block: clamp(56px, 7vw, 96px);
}

.band h2 {
  font-size: var(--fs-2);
  white-space: nowrap;
  max-width: none;
}

@media (max-width: 768px) {
  .band h2 {
    white-space: normal;
  }
}

@media (max-width: 1100px) {
  .xgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .xcard p {
    grid-template-rows: 1fr;
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .xgrid {
    grid-template-columns: minmax(0, 1fr);
  }
}
