/* Registry-driven Projects hub and isolated project preview shell. */

.cf-project-catalog {
  color: #121826;
  background: #f8f1eb;
}

.cf-project-hero {
  min-height: 500px;
  padding: 52px 0;
  border-bottom: 1px solid #e3d9d1;
  background: #f8f1eb;
}

.cf-project-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
  align-items: center;
  gap: 48px;
}

.cf-project-hero__content { min-width: 0; }

.cf-project-hero h1 {
  max-width: 650px;
  margin: 0;
  font-size: 44px;
  font-weight: 620;
  line-height: 1.08;
}

.cf-project-hero__content > p {
  max-width: 650px;
  margin: 20px 0 0;
  color: #596276;
  font-size: 15px;
  line-height: 1.7;
}

.cf-project-hero__content > strong {
  display: block;
  margin-top: 18px;
  color: #34405b;
  font-size: 13px;
  font-weight: 650;
}

.cf-project-hero__content nav,
.cf-project-card__content nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.cf-project-hero__content nav a,
.cf-project-card__content nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #5366cc;
  border-radius: 5px;
  color: #fff;
  background: #5366cc;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.cf-project-hero__content nav a:last-child,
.cf-project-card__content nav a:last-child {
  color: #25304a;
  background: transparent;
  border-color: #bfc6d8;
}

.cf-project-hero__content nav a:is(:hover, :focus-visible),
.cf-project-card__content nav a:is(:hover, :focus-visible) {
  outline: 2px solid rgba(83, 102, 204, 0.24);
  outline-offset: 2px;
}

.cf-project-hero__showcase {
  position: relative;
  min-width: 0;
  min-height: 390px;
  isolation: isolate;
}

.cf-project-hero__project {
  position: absolute;
  display: block;
  width: 74%;
  overflow: hidden;
  border: 1px solid #d7cec7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(42, 35, 29, 0.11);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.cf-project-hero__project:first-child {
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 1;
}

.cf-project-hero__project:nth-child(2) {
  inset-inline-end: 0;
  inset-block-end: 0;
  z-index: 3;
  width: 56%;
}

.cf-project-hero__project:nth-child(3) {
  inset-inline-start: 12%;
  inset-block-end: 1%;
  z-index: 2;
  width: 42%;
}

.cf-project-hero__showcase[data-project-count="1"] .cf-project-hero__project {
  inset: 50% auto auto 50%;
  width: 94%;
  transform: translate(-50%, -50%);
}

.cf-project-hero__project:is(:hover, :focus-visible) {
  z-index: 4;
  border-color: #9da9df;
  box-shadow: 0 22px 46px rgba(42, 35, 29, 0.15);
  outline: 2px solid rgba(83, 102, 204, 0.3);
  outline-offset: 3px;
  transform: translateY(-3px);
}

.cf-project-hero__showcase[data-project-count="1"] .cf-project-hero__project:is(:hover, :focus-visible) {
  transform: translate(-50%, calc(-50% - 3px));
}

.cf-project-hero__project img,
.cf-project-card__preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
}

.cf-project-process {
  padding: 50px 0;
  background: #fff;
}

.cf-project-process h2,
.cf-project-collection__heading h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 620;
}

.cf-project-process ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  border-block: 1px solid #dcd6d0;
  list-style: none;
}

.cf-project-process li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 15px;
  min-width: 0;
  padding: 26px 28px;
  border-inline-start: 1px solid #dcd6d0;
}

.cf-project-process li:first-child { border-inline-start: 0; }
.cf-project-process li > span { color: #5366cc; font-size: 11px; font-weight: 700; }
.cf-project-process h3 { margin: 0; font-size: 17px; font-weight: 620; line-height: 1.35; }
.cf-project-process p { margin: 9px 0 0; color: #687187; font-size: 13px; line-height: 1.55; }

.cf-project-collection { padding: 68px 0 82px; background: #f8f1eb; }
.cf-project-collection__heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr); align-items: end; gap: 40px; margin-bottom: 30px; }
.cf-project-collection__heading p { margin: 0; color: #687187; font-size: 14px; line-height: 1.6; }

.cf-project-filters { display: flex; flex-wrap: wrap; margin-bottom: 30px; border-bottom: 1px solid #d8cec6; }
.cf-project-filters button { position: relative; border: 0; padding: 10px 18px 12px; color: #626b7c; background: transparent; font: 500 13px/1.2 Inter, sans-serif; cursor: pointer; }
.cf-project-filters button::after { position: absolute; inset-inline: 18px; bottom: -1px; height: 2px; background: transparent; content: ""; }
.cf-project-filters button:is(:hover, :focus-visible, .is-active) { color: #121826; }
.cf-project-filters button.is-active::after { background: #5366cc; }

.cf-project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.cf-project-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.cf-project-card { min-width: 0; overflow: hidden; border: 1px solid #ded5ce; border-radius: 8px; background: #fff; box-shadow: 0 12px 32px rgba(41, 34, 29, 0.07); }
.cf-project-card[hidden] { display: none; }
.cf-project-card__preview { display: block; min-width: 0; overflow: hidden; background: #ebe5df; }
.cf-project-card__preview img { transition: transform 220ms ease; }
.cf-project-card__preview:hover img { transform: scale(1.01); }
.cf-project-card__preview--brand { display: grid; place-content: center; justify-items: center; aspect-ratio: 1672 / 941; padding: 28px; color: #172033; background: #f4f1eb; text-align: center; }
.cf-project-card__preview--brand > span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border: 1px solid #172033; font: 400 27px/1 Georgia, serif; }
.cf-project-card__preview--brand > strong { font: 600 22px/1.2 Georgia, serif; }
.cf-project-card__preview--brand > small { margin-top: 7px; color: #687187; font-size: 11px; }
.cf-project-card__content { padding: 25px; }
.cf-project-card__content > span { display: block; margin-bottom: 8px; color: #5366cc; font-size: 11px; font-weight: 650; }
.cf-project-card h3 { margin: 0; font-size: 23px; font-weight: 620; }
.cf-project-card__content > p { margin: 10px 0 0; color: #687187; font-size: 13.5px; line-height: 1.6; }
.cf-project-grid.is-single .cf-project-card { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr); align-items: stretch; }
.cf-project-grid.is-single .cf-project-card__preview img { height: 100%; min-height: 330px; }
.cf-project-grid.is-single .cf-project-card__content { display: flex; flex-direction: column; justify-content: center; padding: 38px; }
.cf-project-collection__empty { padding: 32px; border: 1px solid #ded5ce; border-radius: 8px; background: #fff; }
.cf-project-collection__empty h3 { margin: 0; font-size: 19px; }
.cf-project-collection__empty p { margin: 8px 0 0; color: #687187; font-size: 14px; }

/* Preview shell */
.cf-template-preview { margin: 0; background: #fff; }
.cf-template-preview .cookie-consent-banner { display: none; }
.tpl-preview-bar { position: relative; z-index: 1000; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 48px; padding: 7px 18px; border-bottom: 1px solid #dfe3eb; background: #fff; color: #25304a; font: 500 11px/1.2 Inter, sans-serif; }
.tpl-preview-bar a { color: inherit; text-decoration: none; }
.tpl-preview-bar > strong { color: #121826; font-size: 12px; text-align: center; }
.tpl-preview-bar nav { display: flex; justify-content: end; align-items: center; gap: 14px; }
.tpl-preview-bar a.tpl-preview-bar__brand { color: #5366cc; font-weight: 700; }
.tpl-preview-bar a.tpl-preview-bar__cta { padding: 7px 10px; border-radius: 4px; background: #5366cc; color: #fff; }
.tpl-site, .tpl-site * { box-sizing: border-box; }
.tpl-site { min-width: 0; overflow: hidden; }
.tpl-site img { display: block; max-width: 100%; }
.tpl-site a { text-decoration: none; }
.tpl-site h1, .tpl-site h2, .tpl-site h3, .tpl-site p, .tpl-site figure, .tpl-site blockquote { margin-top: 0; }
.tpl-mobile-nav { display: none; }

@media (max-width: 1024px) {
  .cf-project-hero__layout { grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr); gap: 34px; }
  .cf-project-hero h1 { font-size: 39px; }
  .cf-project-process li { padding-inline: 20px; }
  .cf-project-grid.is-single .cf-project-card { grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr); }
}

@media (max-width: 768px) {
  .cf-project-hero { min-height: 0; padding: 40px 0; }
  .cf-project-hero__layout { grid-template-columns: 1fr; gap: 28px; }
  .cf-project-hero h1 { font-size: 35px; }
  .cf-project-hero__content > p { margin-top: 15px; font-size: 14px; line-height: 1.6; }
  .cf-project-hero__content > strong { margin-top: 14px; }
  .cf-project-hero__content nav { margin-top: 20px; }
  .cf-project-hero__showcase { min-height: 360px; }
  .cf-project-process { padding: 40px 0; }
  .cf-project-process ol { grid-template-columns: 1fr; }
  .cf-project-process li { border-inline-start: 0; border-top: 1px solid #dcd6d0; padding: 21px 0; }
  .cf-project-process li:first-child { border-top: 0; }
  .cf-project-collection { padding: 46px 0 58px; }
  .cf-project-collection__heading { grid-template-columns: 1fr; gap: 10px; }
  .cf-project-grid, .cf-project-grid.is-single { grid-template-columns: 1fr; }
  .cf-project-grid.is-single .cf-project-card { display: block; }
  .cf-project-grid.is-single .cf-project-card__preview img { min-height: 0; height: auto; }
  .cf-project-grid.is-single .cf-project-card__content { padding: 24px; }
  .tpl-preview-bar { grid-template-columns: 1fr auto; gap: 10px; min-height: 58px; padding: 8px 12px; }
  .tpl-preview-bar > strong { display: none; }
  .tpl-preview-bar nav { gap: 8px; }
  .tpl-preview-bar nav > a:first-child { display: none; }
  .tpl-preview-bar__brand, .tpl-preview-bar__cta { font-size: 10px; }
  .tpl-desktop-nav { display: none; }
  .tpl-mobile-nav { position: relative; display: block; justify-self: end; }
  .tpl-mobile-nav summary { display: grid; gap: 4px; width: 34px; padding: 8px; cursor: pointer; list-style: none; }
  .tpl-mobile-nav summary::-webkit-details-marker { display: none; }
  .tpl-mobile-nav summary span { display: block; height: 1px; background: currentColor; }
  .tpl-mobile-nav nav { position: absolute; top: 40px; right: 0; z-index: 20; display: grid; min-width: 190px; padding: 12px; background: #fff; box-shadow: 0 15px 35px rgba(0,0,0,.18); }
  details.tpl-mobile-nav nav a { padding: 10px; color: #252525; font: 500 11px Inter, sans-serif; }
}

@media (max-width: 430px) {
  .cf-project-hero { padding: 32px 0 34px; }
  .cf-project-hero h1 { font-size: 31px; }
  .cf-project-hero__content nav { display: grid; grid-template-columns: 1fr 1fr; }
  .cf-project-hero__content nav a { min-width: 0; padding-inline: 10px; }
  .cf-project-hero__showcase { min-height: 270px; }
  .cf-project-hero__project { width: 86%; }
  .cf-project-hero__project:nth-child(2) { width: 68%; }
  .cf-project-hero__project:nth-child(3) { inset-inline-start: 7%; width: 58%; }
  .cf-project-hero__showcase[data-project-count="1"] .cf-project-hero__project { width: 100%; }
  .cf-project-process h2, .cf-project-collection__heading h2 { font-size: 24px; }
  .cf-project-card__content nav { display: grid; grid-template-columns: 1fr; }
  .tpl-preview-bar__brand { max-width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .cf-project-hero__project, .cf-project-card__preview img { transition: none; }
}
