/* =========================================================
                     PROJECT CATEGORY PAGES
   Shared by Design, Performance, Student Competitions & CAE
========================================================= */

.category-page {
  width: min(1280px, calc(100% - 80px));
  margin: 0 auto;
  color: var(--black);
}

.category-intro {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 0 36px;
  text-align: center;
}

.category-kicker {
  margin: 0 0 18px;
  font-size: var(--font-10);
  font-weight: 400;
  letter-spacing: 5px;
  color: var(--grey);
}

.category-intro h1 {
  margin: 0;
  font-size: clamp(52px, 6vw, 82px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--black);
}

.category-title-line {
  width: 130px;
  height: 2px;
  margin: 20px auto 24px;
  background: var(--accent);
}

.category-description {
  max-width: 620px;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 1px;
  color: var(--grey);
}

.category-projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 52px;
  padding: 42px 0 80px;
  border-top: 1px solid var(--light-grey);
}

.category-project-card {
  position: relative;
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

a.category-project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 7px;
}

.category-project-line {
  width: 100%;
  height: 2px;
  margin-bottom: 14px;
  background: var(--accent);
}

.category-project-heading {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.category-project-card h2 {
  margin: 0;
  font-size: var(--font-18);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.4px;
}

.category-project-type {
  margin: 7px 0 18px;
  font-size: var(--font-10);
  line-height: 1.5;
  letter-spacing: 1.5px;
  color: var(--grey);
}

.category-project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--off-white);
}

.category-project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition:
    transform var(--motion-medium) ease,
    filter var(--motion-medium) ease,
    opacity var(--motion-fast) ease;
}

a.category-project-card:hover .category-project-image img,
a.category-project-card:focus-visible .category-project-image img {
  transform: scale(1.015);
  filter: brightness(0.9);
}

.coming-soon-badge {
  flex-shrink: 0;
  padding: 5px 7px;
  border: 1px solid var(--accent);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1.4px;
  color: var(--accent);
}

.category-project-card.coming-soon {
  cursor: default;
}

.category-project-card.coming-soon .category-project-image img {
  opacity: 0.72;
}

.category-project-card.coming-soon .category-project-image::after {
  content: "COMING SOON";
  position: absolute;
  left: -8%;
  top: 50%;
  width: 116%;
  padding: 10px 0;
  transform: translateY(-50%) rotate(-5deg);
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  text-align: center;
  font-size: var(--font-10);
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--accent);
}

.category-closing {
  padding: 0 0 55px;
  text-align: center;
}

.category-closing p {
  margin: 0;
  font-size: var(--font-10);
  letter-spacing: 5px;
  color: var(--grey);
}

.category-closing div {
  width: 45px;
  height: 2px;
  margin: 16px auto 0;
  background: var(--accent);
}

@media (max-width: 1000px) {
  .category-page { width: calc(100% - 50px); }
  .category-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .category-page { width: calc(100% - 28px); }
  .category-intro { padding: 42px 0 32px; }
  .category-kicker { font-size: var(--font-10); letter-spacing: 4px; }
  .category-intro h1 { font-size: clamp(44px, 11vw, 62px); letter-spacing: -1.5px; }
  .category-description { font-size: 12px; }
}

@media (max-width: 620px) {
  .category-projects {
    grid-template-columns: 1fr;
    row-gap: 40px;
    padding-bottom: 64px;
  }
  .category-project-heading { min-height: 0; }
  .category-closing p { line-height: 1.6; letter-spacing: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .category-project-image img { transition: none; }
}
