.ttm-new-projects {
  --ttm-ink: var(--theme-palette-color-4, #2c1e18);
  --ttm-muted: var(--theme-palette-color-3, #6a615d);
  --ttm-accent: var(--theme-palette-color-1, #cb602c);
  --ttm-paper: var(--theme-palette-color-5, #f2efe7);
  --ttm-white: var(--theme-palette-color-7, #fff);
  background: var(--ttm-paper);
  color: var(--ttm-ink);
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

/* Reuse the page's existing section slot instead of showing a second old gallery. */
.stk-9c3cd89,
.stk-29a99c4 { display: none !important; }

.ttm-new-projects__inner {
  margin-inline: auto;
  max-width: 1290px;
}

.ttm-new-projects__intro {
  margin: 0 auto clamp(30px, 4vw, 52px);
  max-width: 760px;
  text-align: center;
}

.ttm-new-projects__eyebrow {
  color: var(--ttm-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.ttm-new-projects__intro h2 {
  color: var(--ttm-ink);
  font-size: clamp(2rem, 4.3vw, 3.5rem);
  letter-spacing: -.035em;
  line-height: 1.08;
  margin: 0;
}

.ttm-new-projects__intro > p:last-child {
  color: var(--ttm-muted);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.75;
  margin: 18px auto 0;
  max-width: 640px;
}

.ttm-new-projects__grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 28px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ttm-project-card[hidden] { display: none !important; }

.ttm-project-card {
  background: var(--ttm-white);
  min-width: 0;
}

.ttm-project-card__open {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: block;
  padding: 0;
  text-align: left;
  width: 100%;
}

.ttm-project-card__image {
  aspect-ratio: 4 / 3;
  background: #e7e1d9;
  display: block;
  overflow: hidden;
  position: relative;
}

.ttm-project-card__image img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: opacity .55s ease, transform .65s cubic-bezier(.2,.7,.2,1);
  width: 100%;
}

.ttm-project-card__image img.is-changing { opacity: .18; }

.ttm-project-card__overlay {
  align-items: center;
  background: linear-gradient(180deg, transparent 35%, rgba(25, 18, 14, .68));
  bottom: 0;
  color: #fff;
  display: flex;
  font-size: 12px;
  font-weight: 650;
  justify-content: space-between;
  left: 0;
  letter-spacing: .04em;
  opacity: 0;
  padding: 30px 18px 16px;
  position: absolute;
  right: 0;
  transform: translateY(5px);
  transition: opacity .25s ease, transform .25s ease;
}

.ttm-project-card__overlay span:last-child {
  color: #f3c18f;
  font-size: 20px;
}

.ttm-project-card__open:hover img,
.ttm-project-card__open:focus-visible img {
  transform: scale(1.045);
}

.ttm-project-card__open:hover .ttm-project-card__overlay,
.ttm-project-card__open:focus-visible .ttm-project-card__overlay {
  opacity: 1;
  transform: translateY(0);
}

.ttm-project-card__open:focus-visible,
.ttm-project-dialog__close:focus-visible {
  outline: 2px solid var(--ttm-accent);
  outline-offset: 3px;
}

.ttm-project-card__caption {
  padding: 17px 18px 19px;
}

.ttm-project-card__number {
  color: var(--ttm-accent);
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.ttm-project-card__caption h3 {
  color: var(--ttm-ink);
  font-size: clamp(16px, 1.55vw, 20px);
  letter-spacing: -.015em;
  line-height: 1.25;
  margin: 8px 0 9px;
}

.ttm-project-card__caption p {
  align-items: center;
  color: var(--ttm-muted);
  display: flex;
  font-size: 12px;
  gap: 7px;
  margin: 0;
}

.ttm-project-card__caption p span {
  color: var(--ttm-accent);
  font-size: 15px;
}

.ttm-project-dialog {
  background: var(--theme-palette-color-5, #f2efe7);
  border: 0;
  box-shadow: 0 24px 80px rgba(20, 12, 8, .3);
  color: var(--theme-palette-color-4, #2c1e18);
  max-height: min(90vh, 1000px);
  max-width: 1080px;
  padding: clamp(18px, 3vw, 32px);
  width: calc(100% - 28px);
}

.ttm-project-dialog::backdrop {
  background: rgba(24, 17, 13, .78);
  backdrop-filter: blur(5px);
}

.ttm-project-dialog__header {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.ttm-project-dialog__header p {
  color: var(--theme-palette-color-1, #cb602c);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.ttm-project-dialog__header h2 {
  color: var(--theme-palette-color-4, #2c1e18);
  font-size: clamp(21px, 3vw, 32px);
  line-height: 1.15;
  margin: 0;
}

.ttm-project-dialog__close {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(44, 30, 24, .22);
  color: var(--theme-palette-color-4, #2c1e18);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  padding: 10px;
  width: 42px;
}

.ttm-project-dialog__close svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
  width: 20px;
}

.ttm-project-dialog__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: calc(90vh - 130px);
  overflow: auto;
  overscroll-behavior: contain;
}

.ttm-project-dialog__figure {
  margin: 0;
  min-width: 0;
}

.ttm-project-dialog__figure img {
  background: #e7e1d9;
  display: block;
  height: auto;
	max-height: 65vh;
  object-fit: contain;
  width: 100%;
}

.ttm-project-dialog__figure figcaption {
  color: var(--theme-palette-color-3, #6a615d);
  font-size: 11px;
  padding: 7px 2px 2px;
}

.ttm-projects-more-wrap { margin-top: 34px; text-align: center; }
.ttm-projects-more {
  background: transparent;
  border: 1px solid currentColor;
  color: var(--ttm-ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  letter-spacing: .06em;
  padding: 14px 24px;
  transition: background .2s ease, color .2s ease;
}
.ttm-projects-more:hover { background: var(--ttm-ink); color: #fff; }
.ttm-projects-more:focus-visible { outline: 2px solid var(--ttm-accent); outline-offset: 3px; }

@media (max-width: 900px) {
  .ttm-new-projects__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .ttm-new-projects { padding-inline: 16px; }
  .ttm-new-projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ttm-new-projects__grid { gap: 14px; }
  .ttm-project-card__caption { padding: 13px 12px 15px; }
  .ttm-project-card__caption h3 { font-size: 15px; }
  .ttm-project-card__overlay { opacity: 1; transform: none; padding: 26px 12px 10px; }
  .ttm-project-dialog { padding: 16px; }
  .ttm-project-dialog__grid { gap: 8px; }
}

@media (max-width: 390px) {
  .ttm-new-projects__grid { grid-template-columns: minmax(0, 1fr); }
  .ttm-project-card__caption h3 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .ttm-project-card__image img,
  .ttm-project-card__overlay { transition: none; }
}
