/* Topic pages — Materials / Projects / Premium / Engineering / Durability */
html:has(.page-topic) {
  overflow: hidden;
}

.page-topic.page-shell {
  overflow: hidden;
}

.page-shell .fq-main.topic-screen {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  min-height: 0;
}

.topic-hero {
  padding: clamp(14px, 2vh, 28px) clamp(16px, 2vw, 32px);
  border-right: 1px solid var(--insp-line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  background: var(--insp-bg);
}

.topic-hero__label {
  font-size: var(--insp-text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--insp-muted);
  margin-bottom: clamp(4px, 0.8vh, 10px);
}

.topic-hero__num {
  font-family: var(--insp-serif);
  font-size: clamp(2.25rem, 6.5vh, 4.75rem);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.topic-hero__title {
  font-size: clamp(0.75rem, 1.55vh, 1rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: clamp(8px, 1.2vh, 14px);
}

.topic-hero__lead {
  font-size: clamp(0.625rem, 1.2vh, 0.75rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--insp-muted);
  max-width: 36ch;
  margin-bottom: clamp(12px, 1.8vh, 20px);
}

.topic-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 10px);
}

.topic-points li {
  position: relative;
  padding-left: 14px;
  font-size: clamp(0.625rem, 1.15vh, 0.75rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--insp-ink);
}

.topic-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 1px;
  background: var(--insp-ink);
}

.topic-cta {
  display: inline-block;
  margin-top: clamp(14px, 2vh, 22px);
  font-size: var(--insp-text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--insp-ink);
  border-bottom: 1px solid rgba(42, 40, 36, 0.35);
  padding-bottom: 2px;
  width: max-content;
}

.topic-cta:hover {
  border-bottom-color: var(--insp-ink);
}

.topic-body {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1.15fr) minmax(120px, 0.55fr);
  background: var(--insp-bg-deep);
}

.topic-body--photo {
  grid-template-rows: minmax(0, 1fr);
}

.topic-visual {
  margin: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--insp-bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topic-visual--product {
  background: var(--insp-bg);
}

.topic-visual--product img {
  object-fit: contain;
  mix-blend-mode: multiply;
  max-height: 100%;
  padding: clamp(12px, 2vh, 28px);
}

.topic-visual--dark {
  background: #1c1b19;
}

.topic-visual--dark img {
  object-fit: contain;
  mix-blend-mode: lighten;
  padding: clamp(16px, 3vh, 40px);
  max-height: 100%;
}

.topic-visual--full {
  height: 100%;
}

.topic-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--insp-line);
  min-height: 0;
}

.topic-swatch {
  margin: 0;
  border-right: 1px solid var(--insp-line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--insp-bg);
  overflow: hidden;
}

.topic-swatch:last-child {
  border-right: none;
}

.topic-swatch img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  padding: 8px;
}

.topic-swatch figcaption {
  flex-shrink: 0;
  padding: 6px 4px 8px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--insp-muted);
}

.topic-cards {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: linear-gradient(transparent, rgba(20, 18, 16, 0.72));
  pointer-events: none;
}

.topic-body--photo {
  position: relative;
}

.topic-card {
  padding: clamp(12px, 1.8vh, 20px) clamp(10px, 1.2vw, 18px);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.topic-card:last-child {
  border-right: none;
}

.topic-card h2 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.topic-card p {
  font-size: clamp(0.5625rem, 1.05vh, 0.6875rem);
  font-weight: 300;
  line-height: 1.45;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

@media (max-width: 900px) {
  html:has(.page-topic) {
    overflow: auto;
  }

  .page-topic.page-shell {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  .page-shell .fq-main.topic-screen {
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: auto;
  }

  .topic-hero {
    border-right: none;
    border-bottom: 1px solid var(--insp-line);
    padding: 24px 20px;
  }

  .topic-body {
    grid-template-rows: 280px auto;
    min-height: 420px;
  }

  .topic-body--photo {
    min-height: 360px;
  }

  .topic-swatches {
    grid-template-columns: repeat(2, 1fr);
  }

  .topic-swatch:nth-child(odd) {
    border-bottom: 1px solid var(--insp-line);
  }

  .topic-cards {
    position: relative;
    grid-template-columns: 1fr;
    background: #1c1b19;
  }

  .topic-card {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 560px) {
  .topic-swatches {
    grid-template-columns: 1fr;
  }
}
