/* Bran · sección «Proyectos» (#clientes): una tarjeta por cliente con mockups de notebook y celular.
   Se carga después de marca.css. Prefijo pj- para no chocar con las utilidades de app.css.
   Mockups: decisión de Mante (realistas, con algo de sombra). El resto de la sección queda sobrio:
   sin lima, líneas de 1 px, mucho aire. */

.pj-list {
  display: grid;
  gap: 32px;
  margin-top: 48px;
}
@media (min-width: 1024px) {
  .pj-list { gap: 48px; margin-top: 64px; }
}

/* ---------- Tarjeta ---------- */
.pj-card {
  display: grid;
  overflow: hidden;
  border: 1px solid #E3E6E4;
  border-radius: 12px;
  background: #fff;
}
@media (min-width: 900px) {
  .pj-card { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .pj-card:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .pj-card:nth-child(even) .pj-media { order: 2; }
}

.pj-media {
  display: grid;
  align-items: center;
  padding: 24px 16px 20px;
  background: #F6F7F6;
}
.pj-media > [hidden] { display: none; }
@media (min-width: 640px) {
  .pj-media { padding: 40px 32px 32px; }
}

.pj-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 24px 20px 28px;
}
@media (min-width: 640px) {
  .pj-body { padding: 40px; }
}

/* Encabezado: isotipo oficial del cliente + rubro + nombre */
.pj-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pj-logo {
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid #E3E6E4;
  border-radius: 12px;
  background: #fff;
  object-fit: cover;
}
@media (min-width: 640px) {
  .pj-head { gap: 20px; }
  .pj-logo { width: 64px; height: 64px; }
}

.pj-tag {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5A615C;
}
.pj-name {
  margin-top: 8px;
  font-family: var(--font-app-heading);
  font-size: 26px;
  line-height: 32px;
  font-weight: 700;
  font-variation-settings: "wdth" 92;
  letter-spacing: -0.015em;
  color: #161A18;
}
@media (min-width: 640px) {
  .pj-name { font-size: 32px; line-height: 38px; }
}

/* Proyecto único: etiqueta fija. Dos proyectos: pestañas. */
.pj-project {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 32px;
  padding: 4px 14px;
  border: 1px solid #E3E6E4;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #161A18;
}
.pj-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pj-tab {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #E3E6E4;
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: #3D433F;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.pj-tab:hover { border-color: #7F8782; color: #161A18; }
.pj-tab[aria-selected="true"] { background: #1E2320; border-color: #1E2320; color: #fff; }
.pj-tab:focus-visible { outline: 2px solid #1E2320; outline-offset: 4px; }

.pj-panel[hidden] { display: none; }
.pj-facts { display: grid; gap: 20px; }
.pj-facts dt {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5A615C;
}
.pj-facts dd {
  margin-top: 6px;
  font-size: 16px;
  line-height: 24px;
  color: #3D433F;
  max-width: 46ch;
}
.pj-facts dd.pj-did { color: #161A18; font-size: 18px; line-height: 28px; }
@media (min-width: 640px) {
  .pj-facts dd { font-size: 17px; line-height: 26px; }
  .pj-facts dd.pj-did { font-size: 20px; line-height: 30px; }
}

.pj-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #4A6B0E;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.pj-link:hover { color: #161A18; }
.pj-link:focus-visible { outline: 2px solid #1E2320; outline-offset: 4px; border-radius: 4px; }

/* ---------- Mockups ----------
   Medidas en cqw (ancho del contenedor de dispositivos) para que todo escale junto. */
.pj-devices {
  container-type: inline-size;
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.pj-devices--con-celular { padding-right: 4%; }

.pj-laptop { width: 82%; margin-left: 6%; }
.pj-devices--solo .pj-laptop { width: 86%; margin: 0 auto; }

.pj-laptop__lid {
  position: relative;
  padding: 1.7cqw 1.7cqw 2.3cqw;
  border-radius: 2.4cqw 2.4cqw 0 0;
  background: #0E0F10;
  box-shadow: inset 0 0 0 1px #2B2E31, 0 28px 48px -32px rgb(22 26 24 / 0.55);
}
.pj-laptop__lid::before { /* cámara */
  content: "";
  position: absolute;
  top: 0.65cqw;
  left: 50%;
  width: 0.55cqw;
  height: 0.55cqw;
  border-radius: 50%;
  background: #24272A;
  transform: translateX(-50%);
}
.pj-laptop__screen {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.35cqw;
  background: #fff;
}
.pj-laptop__base {
  position: relative;
  height: 1.9cqw;
  margin: 0 -7%;
  border-radius: 0 0 2.6cqw 2.6cqw / 0 0 1.9cqw 1.9cqw;
  background: linear-gradient(#E9EBEC 0%, #CDD0D2 55%, #A9ADB0 100%);
  box-shadow: 0 14px 22px -14px rgb(22 26 24 / 0.5);
}
.pj-laptop__base::before { /* hendidura para abrir la tapa */
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 15%;
  height: 48%;
  border-radius: 0 0 1.2cqw 1.2cqw;
  background: #B6BABD;
  transform: translateX(-50%);
}

.pj-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18%;
  padding: 0.85cqw;
  border-radius: 3.7cqw;
  background: #0E0F10;
  box-shadow: inset 0 0 0 1px #34373A, 0 20px 36px -18px rgb(22 26 24 / 0.6);
}
.pj-phone__screen {
  position: relative;
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: 2.9cqw;
  background: #fff;
}
.pj-phone__screen::after { /* isla de la cámara */
  content: "";
  position: absolute;
  top: 3%;
  left: 50%;
  width: 30%;
  height: 3.6%;
  border-radius: 999px;
  background: #0E0F10;
  transform: translateX(-50%);
}

.pj-laptop__screen img,
.pj-phone__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Contenedor angosto (celulares): el teléfono crece para que se lea */
@container (max-width: 480px) {
  .pj-laptop { width: 76%; margin-left: 2%; }
  .pj-phone { width: 25%; padding: 1.1cqw; border-radius: 5cqw; }
  .pj-phone__screen { border-radius: 4cqw; }
}

@media (prefers-reduced-motion: no-preference) {
  .pj-media > :not([hidden]) { animation: pj-entrar .45s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes pj-entrar {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
